Is UseGCOverheadLimit supported with G1 GC?
Asked Answered
T

1

7

In HotSpot JVM GC Tuning Guide the UseGCOverheadLimit option is mentioned only on the pages about CMS and Parallel GCs. Additionally, on GC Ergonomics doc page the related options GCTimeLimit and GCHeapFreeLimit are mentioned like if they work only with Parallel GC:

The parallel garbage collector (UseParallelGC) throws an out-of-memory exception if an excessive amount of time is being spent collecting a small amount of the heap. To avoid this exception, you can increase the size of the heap. You can also set the parameters -XX:GCTimeLimit=time-limit and -XX:GCHeapFreeLimit=space-limit [...]

Are those options supported with -XX:+UseG1GC?

Trainband answered 28/8, 2017 at 19:19 Comment(0)
A
6

GC overhead limit is the feature of AdaptiveSizePolicy, which is used in Parallel GC and CMS, but not in G1.

You may also double-check that gc_overhead_limit_was_exceeded flag is never set in G1CollectedHeap::mem_allocate.

So, -XX:+UseGCOverheadLimit does nothing in G1 GC.

Ancestry answered 28/8, 2017 at 21:38 Comment(1)
There is actually a RFE created for G1 to support this. See bugs.openjdk.java.net/browse/JDK-8212084Rohrer

© 2022 - 2024 — McMap. All rights reserved.