Some sources about jvm memory allocation?

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.

It should not be that different. You’re probably looking to virtual size, which is just how much virtual memory process can view, not about actual allocated memory (there can be mapped files, etc.). Look into RSS, which is better but also not accurate as it doesn’t count swapped RAM (I think). Best is to measure real used memory by comparing listing of “free” command before and after you run your app. You must subtract/add buffers/caches to get real number (ie. mem used - buffers used = real used value, that you should compare).

It might be because the server VM is automatically used on linux, but not on windows which defaults to the client VM.

see http://java.sun.com/docs/hotspot/gc5.0/ergo5.html for defaults.