Skip to main content

CMS: concurrent mode failure - not parallel?

2 replies [Last post]
ecki
Offline
Joined: 2003-06-15
Points: 0

Hello,

I am currently trying to avoid CMS mode failures in our application. However when they occur (mispredictin or fragmentation) I want the full collection happen as quickly as possible. On the Hotspot VMs I have seen I only see a single thread doing the collection (which takes in my case up to 10s due to large heap). Is there a way to use all 8 cores for that collection type?

Gruss
Bernd

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
briand
Offline
Joined: 2005-07-11
Points: 0

No, not currently. CMC concurrent mode failure is serial.

The only solution is to try to avoid these CMFs through various trial and error
configuration changes. Things to consider:

- use a larger overall heap size
- set CMSInitiatingOccupancyFraction to a lower value - thus making CMS start collections much earlier and hopefully keep up with the mutators.
- Use a larger young generation and larger survivor spaces and avoid promoting too early (I.e. set -Xmn=, set -XX:SurvivorRatio= -XX:MaxTenuringThreshold=N where N is largish, not smallish (max N is either 15 or 31 depending on the version of HotSpot you are using). This will likely result in longer minor collections, but the side effect will be less promotion to the old gen and less work for CMS to do; in conjunction, there will likely be less fragmentation of the old gen, which it turn could actually result in shorter minor collection times.

You'll have to monitor verbose gc output to see what parameters meet your
specific needs and use a trial an error like process to hone in on the best
settings.

In the future, things like Compressed OOPs (ordinary object pointers, which are
essentially HotSpot's pointers to objects in the heap) will allow you to move to a
64-bit process with a larger heap and much less penalty for 64-bitness. Another
future would be the G1 garbage collector. In the mean time, the above suggestions
are probably your only alternatives.

HTH
Brian

linuxhippy
Offline
Joined: 2004-01-07
Points: 0

would be also interested in the answer ;)