On May 31, 8:51 pm, "parminde...@[EMAIL PROTECTED]
" <parminde...@[EMAIL PROTECTED]
>
wrote:
> I did that, but that doesn't help. I set the size to 64 megs. but the
> VM size behaved the same way. Please let me know if there's something
> else that can be done.
>
> Also, can you please point me to the diff between the VM size and the
> heap size?
I can only do some guesswork, but it should be like this: the heap is
the memory where the Java program running inside the VM may allocate
objects. Together with the stack, it limits the amount of memory the
Java program may consume. So, by using -Xmx (and -Xms), you may modify
this amount of memory; and judging from your description of JProf this
already works fine.
However, the virtual machine needs memory for itself - this should
include loaded class files, but may also contain hotspot-compiled
code, garbage collection data and such things. If your application is
really, really big (like a Spring web application which requires about
20 JAR files, each a few MB big) it does not seem too unlikely that
your VM requires so much memory.
There are OS-dependent ways of limiting the memory a single
application may consume. For Linux, using a csh shell gives you the
"limit" command (see "man csh" for the syntax) that allows you to
limit memory usage of any process. However, whether this will keep the
VM from crashing is another question; if it is just caching some data,
it may be forced to cope with the tighter memory limit, but if it
really needs memory that big, you are lost, as there is nothing you
can do (besides checking out other VM, like the BEA JRockit engine,
which might be a little more sensible towards those issues - but
again, I am just guessing.)
Regards,
H.


|