CMS vs G1 - Scan RS very long

John Cuthbertson john.cuthbertson at
Thu Jan 31 18:07:21 UTC 2013

Hi Kirk,

Please see my reply to Michal about high RSet scan times. Further 
response inline...

On 1/31/2013 6:47 AM, Kirk Pepperdine wrote:
> Hi,
> I'd like to add to Michal's comment to say that i've to add that I've seen very similar results in recent tuning efforts for low latency. In this case we didn't have a lot of mutation in old gen but I wasn't able to get young gen pauses times down to any where near what I could get to with the CMS collector. Unfortunately I've not been able to characterize the problem as well as you have as we had other fish to fry and I only had a limited amount of time to look at GC. That said I still will be able to run more experiments in the next two weeks.
> What I did notice is that young gen started reducing it's size but where as I calculated that a 15m eden was optimal, it stopped down sizing @ 40m. I'd be interested if anyone has any suggestions on how to get the young gen shrink if it's not shrinking enough on it's own. I'm hesitant to fix the size as there are times when heap should grow but under normal load I would hope that it would return to the smaller size.

I believe you are running into the G1YoungSizePercent problem. This is 
the lower bound on the young gen as a percentage of the heap. The 
default was 20. I just recently changed the name of the flag and made 
the default 5. In 7u this flag is G1DefaultMinNewGenPercent so try 
-XX:+UnlockExperimentalVMOptions -XX:G1DefaultMinNewGenPercent=5 and see 
if your young gen gets reduced sufficiently for your needs.



More information about the hotspot-gc-dev mailing list