I have recently ran into the problem to watch the memory behaviour of my application on a linux machine (more detailed a
vserver system with gentoo). I am really not too familiar with unix system, only having some good basics.
In difference to my experiences on windows machines the jvm on this linux machine seems to grab an enormous amount
of memory at startup even when it is only reserved but not used.
So even very small applications doing e.g. a Thread.sleep are started from a jvm reserving some hundred mb of memory. A ‘top’
ressource view of the machine shows that only a little part of that memory gets actually used. This leads to the problem that
memory is so fast wasted that there is no space for further jvms to be loaded.
I had some success limiting the memory with -xms/-xmx parameters. But nonetheless I never noticed such a behavour on
Windows machines.
So some links or ressources would be welcome, which describe the memory allocation behaviour of a freshly started jvm
and - if exists - the differences on the operating systems.