Profile Image
vishnupriya

What is JVM startup parameter: -XX:G1MixedGCLiveThresholdPercent?

What is JVM startup parameter: -XX:G1MixedGCLiveThresholdPercent? 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-g1mixedgclivethresholdpercent

  • x-g1mixedgclivethresholdpercent

  • JVM startup parameter

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky

Usage:

 

You can set the percentage for regions to be considered for inclusion in the collection set of mixed GCs with:

 

-XX:G1MixedGCLiveThresholdPercent=percent , where percent is the desired value in %.

 

Since:

 

Starting from JDK 7.

 

Examples:

 

This will instruct JVM to set 50% of regions to be considered for inclusion:

 

-XX:G1MixedGCLiveThresholdPercent=50

 

Description:

 

G1 (Garbage First) GC is designed for apps in multi-processor environments with large memory space (more than 4GB). It is available from the JDK7 Update 4. Unlike other collectors, the G1 collector partitions the heap into a set of equal-sized heap regions (usually 1MB to 32MB) chunks, prioritizes them, and then performs the garbage collection on those chunks based on the priority. The G1 collector is designed for applications that:

  • Can operate concurrently with applications threads like the CMS collector.
  • Compact free space without lengthy GC induced pause times.
  • Need more predictable GC pause durations.
  • Do not want to sacrifice a lot of throughput performance.
  • Do not require a much larger Java heap.

 

We can tune G1 with additional options, one of them is G1MixedGCLiveThresholdPercent. This flag sets the occupancy threshold for an old region to be included in a mixed garbage collection cycle.

 

This is an experimental flag. This setting replaces the -XX:G1OldCSetRegionLiveThresholdPercent setting.

 

Default Value:

 

Default is 85%.

 

Errors:

 

The value should be between 0 and 100.

 

Arguments related:

 

G1NewSizePercent, G1MaxNewSizePercent, UseG1GC, MinHeapFreeRatio, MaxHeapFreeRatio, DefaultMinNewGenPercent, G1ReservePercent, G1HeapWastePercent, G1MixedGCCountTarget, G1OldCSetRegionThresholdPercent

 

Related Posts:

 

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • jvmargument

  • xx-g1mixedgclivethresholdpercent

  • x-g1mixedgclivethresholdpercent

  • JVM startup parameter