Profile Image
vishnupriya

What is Memory tuning: -XX:+ScavengeBeforeFullGC?

What is Memory tuning: -XX:+ScavengeBeforeFullGC? 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-scavengebeforefullgc

  • x-scavengebeforefullgc

  • Memory tuning

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky

Usage:

 

You can trigger a young generation GC prior to a full GC with:

 

-XX:+ScavengeBeforeFullGC

 

Examples:

 

To enable this option for JVM:

 

-XX:+UseGCOverheadLimit

 

Description:

 

Enables GC of the young generation before each full GC. This option is enabled by default. It is recommended that you don't disable it, because scavenging the young generation before a full GC can reduce the number of objects reachable from the old generation space into the young generation space. To disable GC of the young generation before each full GC, specify the option -XX:-ScavengeBeforeFullGC. As a result of using this option, we can improve garbage collection performance as it will not need to check for references between the young and old generation heap spaces.

 

Default Value:

 

Default value is false

 

Errors:

 

None

 

Arguments related:

 

TODO link UseG1GC, MinHeapFreeRatio, MaxHeapFreeRatio, Xmx, Xms, UseSerialGC, USeParNewGC, UseParallelGC, UseZGC

 

 Related Posts:

NOTE:

 

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-scavengebeforefullgc

  • x-scavengebeforefullgc

  • Memory tuning