Profile Image

What is Garbage collection tuning: -XX: MinHeapFreeRatio?

What is Garbage collection tuning: -XX: MinHeapFreeRatio? Have you used this JVM argument before? What are the pros & cons of using this Java argument? Can you share your perspective/experience in using this JVM argument?

  • jvm-argument

  • xx-minheapfreeratio

  • x-minheapfreeratio

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky



-XX:MaxHeapFreeRatio=<maximum>, where maximum – is maximum proportion of free space at each collection. Its total size is bound by –Xmx<max> value.




Set minHeapFreeRatio to 70%:


java -XX:MinHeapFreeRatio=70




Different options affects generation size. During initialization of the JVM, the entire space for the heap is reserved. The size of the reserved space can be specified with the -Xmx and –Xms options. If the value of the -Xms parameter is smaller than the value of the -Xmx parameter, then not all of the space that's reserved is immediately committed to the virtual machine. The uncommitted space is called “virtual”. The different parts of the heap, so called old and young generations, can grow to the limit of the virtual space as needed.


Default Value


Default value for -XX: MinHeapFreeRatio is dependent on JVM, for instance default option for the 64-bit Solaris operating system (SPARC Platform Edition) is 40, meaning that if the percent of free space in a generation falls below 40%, then the generation expands to maintain 40% free space, up to the maximum allowed size of the generation.




Should be less or equals to the value set in -XX:MaxHeapFreeRatio


Arguments related:


TODO link MaxHeapFreeRatio, Xmx, Xms


Related Posts:



If you have additional comments, interesting experiences or even point of disagreement with this JVM argument description, please leave a comment. Your insights will help the entire 10+ million java developer community to develop one standard source of documentation for all the JVM arguments.

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • jvm-argument

  • xx-minheapfreeratio

  • x-minheapfreeratio