By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,204 Members | 1,161 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,204 IT Pros & Developers. It's quick & easy.

Java allocates 200+MB at startup on HP-UX 11.11

P: n/a
Hi,

Does anyone else find this? I'm using Java 1.3.1. Even a 'hello world'
type program allocates about 220M as soon as it starts (according to
'top' that is).

I'm not sure if all JVM instances are sharing one big lump, or if each
is really taking this memory. I'd really appreciate any concrete
answers anyone can give.
Thanks, Dave
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Dave,

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.

Hope that helps--

Michael Scovetta
el********@volcanomail.com (dave) wrote in message news:<57**************************@posting.google. com>...
Hi,

Does anyone else find this? I'm using Java 1.3.1. Even a 'hello world'
type program allocates about 220M as soon as it starts (according to
'top' that is).

I'm not sure if all JVM instances are sharing one big lump, or if each
is really taking this memory. I'd really appreciate any concrete
answers anyone can give.
Thanks, Dave

Jul 17 '05 #2

P: n/a
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
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.