SyBer
SyBer

Reputation: 5597

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!

Upvotes: 6

Views: 437

Answers (1)

Peter Lawrey
Peter Lawrey

Reputation: 533520

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.

Upvotes: 2

Related Questions