-Xms
The -Xms option sets the initial and minimum Java heap size. The Java heap (the “heap”) is the part of the memory where blocks of memory are allocated to objects and freed during garbage collection.
Note: -Xms does not limit the total amount of memory that the JVM can use.
Operation
Format: -Xms<size>[g|G|m|M|k|K]
Combine -Xms with a memory value and add a unit.
For Example:
java -Xms:64m myApp
sets the initial and minimum java heap to 64 MB.
If you do not add a unit, you will get the exact value you state; for example, 64 will be interpreted as 64 bytes, not 64 megabytes or 64 kilobytes.
For best performance, set -Xms to the same size as the maximum heap size, for example:
java -Xgcprio:throughput -Xmx:64m -Xms:64m myApp