-Xms: Initial heap size or minimum heap size?

The initial heap size is the minimum heap size. It won’t get smaller than the initial heap size.

From Tuning Garbage Collection with the 5.0 Java[tm] Virtual Machine:

By default, the virtual machine grows
or shrinks the heap at each collection
to try to keep the proportion of free
space to live objects at each
collection within a specific range.
This target range is set as a
percentage by the parameters
-XX:MinHeapFreeRatio= and -XX:MaxHeapFreeRatio=, and the total size is bounded below by
-Xms and above by -Xmx .

Leave a Comment