Long mixed pauses when using G1
Environment
- JBoss Enterprise Application Platform (EAP)
- Java 8
- G1
Issue
- We use G1 gc and sometimes see long mixed collection pauses (10+ seconds). How can we reduce these mixed pause times?
Resolution
- Increase
G1MixedGCCountTargetso that eligible old gen regions are collected across a larger amount of mixed collections, reducing individual mixed pauses.
-XX:G1MixedGCCountTarget=16
- Reduce
G1OldCSetRegionThresholdPercentso fewer regions are collected in a mixed collection:
-XX:G1OldCSetRegionThresholdPercent=5
- Increase
G1MixedGCLiveThresholdPercentto limit and focus collections to old regions containing less live objects:
-XX:+UnlockExperimentalVMOptions -XX:G1MixedGCLiveThresholdPercent=85
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.