Operating System - HP-UX
1753436 Members
4499 Online
108794 Solutions
New Discussion юеВ

HP-11i: huge memory requested by a trivial Java app

 
SOLVED
Go to solution
Leda Fonti
New Member

HP-11i: huge memory requested by a trivial Java app

Hi folk,
I have a strange behaviour on HP11i machines (32-bit). When I run a very simple Java app (Hello world!), memory size listed by top command jumps immediately to 204MB!! Same Java main on another HP11i (same model and type but 64-bit) required just about 4 MB.... I applied all patches on 32-bit machines; I also had a look at Kernel configuration, but I did not find relevant differences... Furthermore, if I run java with different heap max size (via -Xmx option), memory size increases if I put big max heap size value, and decrease otherwise. If I run java with -classic option, memory size decreases (about one half), but it is still too much.... I tried also to change the JVM (1.3.1_02, 1.3.1_08, 1.3.0xx), but the issue remains... and on 64-bit machines everything works fine with every JVM a tested... It seems, all the space that could be needed by the app is allocated when the app starts, and some more else....why? Do you have any idea? Is there any parameter to set to avoid this big problem? Is the problem depending on 32-bit? Thank you in advance, ciao

Leda
2 REPLIES 2
Dietmar Konermann
Honored Contributor
Solution

Re: HP-11i: huge memory requested by a trivial Java app

Leda,

I believe the symptoms you see have nothing to do with different Java and/or OS revisions. It's the top command, that has changed its behaviour.

See also this thread:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf8dd7a6067d9b24e907826100b9f38c3,00.html

Older top(1) versions only added Text, Data and Stack to get the process' SIZE. Now the complete VSS is printed including shared resources. Compare the what(1) strings of the commands you're using.

Especially Java processes appear to be huge with this approach. The reason for this is, that Java does some some huge mmap()'s using the MAP_NORESERVE option, which means they use lazy swap reservation. No real resources are used though... it's just the way how the VM's internal memory management is designed.

However, the processes _could_ demand more swap while they are running. So it's a good idea, not to be too thrifty with swap.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Leda Fonti
New Member

Re: HP-11i: huge memory requested by a trivial Java app

Dietmar,
thank you very much! Your answer resolved my problem! I run the ps -o vsz command and everyhting is ok! Actually I already tried to run ps -o command, but it did not work, I discovered on this forum I had to set variable UNIX95=1..!

Thanks again for your precious help, have a good weekend

Leda