Usage:
Sets an upper limit on the number of old regions to be collected during a mixed garbage collection cycle. The command can be used as the following:
-XX:G1OldCSetRegionThresholdPercent=percent , where percent is the desired value in %.
Since:
Starting from JDK 6.
Examples:
This will instruct JVM to set an upper limit of 50% on the number of old regions:
-XX:G1OldCSetRegionThresholdPercent=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 G1OldCSetRegionThresholdPercent. This option sets an upper limit on the number of old regions to be collected during a mixed garbage collection cycle.
This is an experimental flag.
Default Value:
Default is 10%.
Errors:
The value should be between 0 and 100.
Arguments related:
G1NewSizePercent, G1MaxNewSizePercent, UseG1GC, MinHeapFreeRatio, MaxHeapFreeRatio, DefaultMinNewGenPercent, G1ReservePercent, G1HeapWastePercent, G1MixedGCCountTarget, G1MixedGCLiveThresholdPercent.
Related Posts:
NOTE:
When you increase or decrease the percentage, make sure to adjust the total Java heap by the same amount. This setting is not available in Java HotSpot VM, build 23.
Edit your Comment