Garbage collection options

Here is a list of JVM sizing options:

Sizing description JVM option flag
This flag establishes the initial heap size (combined young and tenured space). XX:InitialHeapSize=3g
This flag establishes the maximum heap size (combined young and tenured space). -XX:MaxHeapSize=3g
This flag establishes the initial and maximum heap size (combined young and tenured space). -Xms2048m -Xmx3g
This flag establishes the initial size of young space. -XX:NewSize=128m
This flag establishes the maximum size of young space. -XX:MaxNewSize=128m
This flag establishes young space size. It uses a ration of young versus tenured space. In the sample flag to the right, 3 means that young space will be three times smaller than ...

Get Mastering Java 11 - Second Edition 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.