Why is there such a big difference in memory usage of a Java application in Windows XP 32 and Windows 7 64

I have a small Java application that I wrote to record my work. Since I open it all day, every day, one of the things that originally concerned me in choosing a language is the amount of memory that it will use.

Fortunately, in Windows XP, I usually consumed about 5 MB while minimizing and 12 or so at maximum magnification and happily worked with -Xmx5M(memory consumption according to the Windows task manager).

When I upgraded my home computer with new hardware and at the same time to Windows 7 64 ( although I installed and use the 32-bit JVM ), I immediately noticed that the JVM for this application now always shows 68 MB + ... and that with -Xmx5M -Xss16K, in accordance with the task set "Work Set".

Both old and new machines had / had 4 GB of RAM, of which 512 MB used video. Both were running the latest builds of Java 6 — update 15 for WinXP and now update 24 for Win7. The volume of the application on the disk is 70 K in 12 classes. In addition, my working computer still runs on Windows XP, runs on Java 6_24, and it shows about 12 MB for this identical application - and by identity I mean literally that since the two systems are synchronized for all my development tools .

As a developer, I need to understand why my applications seem to chew on so much memory.

Can anyone shed some light on this and suggest how to significantly reduce the amount of memory for a Java 6 application?

Edit

The answer may be excessive PermGen. According to JVisualVM, I have a bunch of:

: 5.2 , : 4.3 ( ) 6.2 .

PermGen

: 12,5 , : 4,6 () 67,1 .

enter image description here

, , 68 , Win 7, , ?

2

PermGen 12 , JVisualVM (-, 12 - , , JVVM).

+5
5

64- 64 , 32- 32 . .

+1

, Java ( ), 64- 64- .

JVM (- XX: + UseCompressedOops), . , 32- .

+1

64- JVM , 64- . 32 , 32 . Java- 40% . . oops JVM Hotspot. :

-XX:+UseCompressedOops

, 32- JVM 64- , 64- ( , , ).

, Windows 7 , , XP ( , ). 32- 64- Windows.

+1

, 64- - Windows XP Windows 7 .

- Windows 7 , , Windows XP. - Windows 7 , : .

0

, PermGen 30% 64- :

-XX: MaxPermSize - . [5.0 : 64- 30% ; 1,4 amd64: 96 ; 1.3.1 -client: 32m.]

0

All Articles