Garbage collection options

Here is a list of JVM sizing options:

Sizing description JVM option flag
Sets the initial heap size (young space plus tenured space).

-XX:InitialHeapSize=3g

Sets the maximum heap size (young space plus tenured space). -XX:MaxHeapSize=3g
Sets the initial and maximum heap size (young space plus tenured space). -Xms2048m -Xmx3g
Sets the initial size of young space. -XX:NewSize=128m
Sets the maximum size of young space. -XX:MaxNewSize=128m
Sets young space size. Uses ration of young verses tenured space. In the sample flag to the right, 3 means that young space will be three times smaller than tenured space. -XX:NewRation=3
Sets the size of single survivor space as a portion of Eden space size.

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.