Profile Image

What is Memory tuning: -XX:+-ShrinkHeapInSteps?

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

  • jvmargument

  • xx-shrinkheapinsteps

  • x-shrinkheapinsteps

  • Memory tuning

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky



You can enable/disable step-by-step heap shrinking with:


-XX:ShrinkHeapInSteps=[true,false],  where you can choose either true or false value




Will disable this option and commands JVM to shrink heap in one cycle:






Incrementally reduces the Java heap to the target size, specified by the option -XX:MaxHeapFreeRatio. This option is enabled by default. If disabled, then it immediately reduces the Java heap to the target size instead of requiring multiple garbage collection cycles. Disable this option if you want to minimize the Java heap size. You will likely encounter performance degradation when this option is disabled.


Default Value:


Default value is true






Arguments related:


TODO link –XX:MaxHeapFreeRatio


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
  • jvmargument

  • xx-shrinkheapinsteps

  • x-shrinkheapinsteps

  • Memory tuning