Question regarding G1 option to run parallel Old generation garbage collection?
Charlie Hunt
chunt at salesforce.com
Fri Oct 19 12:25:11 UTC 2012
Quite honestly I would not recommend running G1 with a Java 6 JVM. It's not supported in Java 6.
I'd move to a Java 7u4 or later JVM where it is supported, ideally Java 7u9.
When you do move to 7u4 or later, suggest you start with these command line options:
-Xmx1280M -Xms1280m -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -XX:ParallelGCThreads=7
Using these command line options have implications:
Sizing young gen (i.e. -XX:NewRatio) tells G1 to ignore the pause time goal. G1 will adaptively size young gen based on MaxGCPauseMillis. When you set NewRatio, you are telling G1 that you think you can do better. G1 also adaptively sizes survivor spaces based on MaxGCPauseMillis. So, don't set SurvivorRatio either. MaxTenuringThreshold defaults to 15.
Also realize that InitiatingHeapOccupancyPercent is the entire heap occupancy, not old gen heap occupancy. At 0, you're suggesting to initiate a concurrent cycle immediately, and continuously run there afterwards. At a MaxGCPauseMillis=500 and a 1280M Java heap, I doubt you would need such an aggressive configuration. And, iirc, ConcGCThreads is not used by G1 GC, (could be wrong though).
I'd start with the above suggested tuning on 7u4 or later, and then tune InitatingHeapOccupancyPercent as needed.
hths,
charlie ...
On Oct 19, 2012, at 12:13 AM, csewhiz wrote:
Hello All,
Sorry for posting this question in this mailing list. I am unable to find any answer for this. I am trying to tune our application for G1GC as we need very small pauses Below 500msec.
But the problem is when we are runing with G1GC (under jdk 6_u37) Old generation of garbage collection only happening when it is reaching the Max GC size I noticed on jdk 6U 37 if max heap size is 1GB then it is close to 1sec 2GB close to 2 sec pauses.
Is there any parameter to force the old gc happening regularly.
I am trying following setting,
-Xms1280M -Xmx1280M -XX:+UseG1GC -XX:MaxTenuringThreshold=15 -XX:SurvivorRatio=8 -XX:NewRatio=1 -XX:GCPauseIntervalMillis=7500 -XX:MaxGCPauseMillis=500 -XX:InitiatingHeapOccupancyPercent=0 -XX:ParallelGCThreads=7 -XX:ConcGCThreads=7
If anyone can give insight on how full GC is triggred internals will be of great help.
PS: I have tried without any option for G1 but not of much help hence .. this one trying to be agressive ? but of not much help.
Regards,
Soumit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20121019/c95c25cc/attachment.htm>
More information about the hotspot-gc-dev
mailing list