Hi Michael,
Thanks for your reply.
Are you passing any options to the JVM? You can specify an initial
(minimum) heap size and a maximum one, at least on Linux/Windows JVMs.
I think the switch is -Xms256M and -Xmx1024M or something very
similar. That might be why. I haven't heard of multiple JVMs pooling
their resources, they should run independently AFAIK.
I cited results from the case where I used the default options, which
AFAIK mean 16MB of heap. Setting -Xmx5m or -Xmx100m makes virtually no
difference - it always steals about 200M more than the max heap value
in -Xmx. Setting -Xmx1024M showed a value of 1304MB!!!
I verified that the memory isn't shared around the JVMs by watching
the physical and virtual memory summaries at the head of the 'top'
display. See the following table:
JVMs top SUMMARY
5 "Memory: 433836K (379644K) real, 2159012K (1392276K) virtual,
124488K free Page# 1/13"
4 "Memory: 451564K (410752K) real, 1666308K (1198744K) virtual,
78332K free Page# 1/13"
3 "Memory: 385220K (342764K) real, 1418032K (967408K) virtual,
141136K free Page# 1/13"
2 "Memory: 327068K (286700K) real, 1202192K (769004K) virtual,
196076K free Page# 1/13"
1 "Memory: 268708K (223612K) real, 1036680K (591376K) virtual,
260364K free Page# 1/13"
0 "Memory: 190008K (141388K) real, 764088K (307456K) virtual,
337032K free Page# 1/12"
For each JVM I specified -Xmx48m. Top reported the SIZE value for each
as 250M. I don't fully understand this table, but it does seem
apparent that the 250M is per JVM not shared.
Its a ludicrous and frustrating situation, and I'm find I get
OutOfMemoryError occuring when theres probably loads of wasted memory
on the machine, and this causes me further headaches in my production
system!!!
http://forum.java.sun.com/thread.jsp...&thread=507980
Oh well, if anyone can say anything about this, I'd be interested to
hear.
Kind regards,
Dave