Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any sense to specify additional GC to the concurrent one?

Today we use the concurrent mark sweep specifying it like this:

-XX:+UseConcMarkSweepGC

I seen some articles recommending using additional parameters in this form:

-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+UseParNewGC

From what I read, the UseParNewGC is specified automatically when using concurrent mark sweeper, and the CMSIncrementalMode required if the machine has only 1 or 2 CPU's.

So, any sense to use these additional parameters, considering the fact most of our machines are quad-core (making the amount of CPU visible to system 4 or 8)?

Thanks!

like image 619
SyBer Avatar asked Mar 30 '11 12:03

SyBer


1 Answers

The -XX:+CMSIncrementalMode will try to trigger conccurent cleans when it determines it might be a good time to do this. I have used it and I don't believe it helped.

IMHO the most useful one to play with is likely to be the new size e.g. -XX:NewSize=1g -mx2g either make it larger or smaller depending on how long lived your short lived objects are. i.e. you want the eden size to be small, but large enough that objects usually are discarded by the time it is cleaned up.

like image 57
Peter Lawrey Avatar answered Sep 27 '22 22:09

Peter Lawrey