Integration of ParralellGC and CMS

Jon Masamitsu jon.masamitsu at
Wed Jan 26 20:04:45 UTC 2011

On 1/22/2011 12:19 PM, Clemens Eisserer wrote:
> Hi,
> Just to be curious, how hard would it be to integrate the
> Parallell(Old)GC with CMS?
> As far as I can imagine it would be quite beneficial to fall back to a
> multithreaded stop-the-world collector compared to a single-threaded
> one.
> Another idea would be a multithreaded CMS stop-the-world
> defragmentation phase, which could prevent CMS to fail because of
> fragmentation.

Generally CMS fights fragmentation by a STW compaction.  Doing a MT version
of that would be the integration of ParallelOldGC into CMS which was 
your first
question.  But perhaps that's not what you meant.

Any STW full compaction would likely be too disruptive for a user of CMS
even if MT.  Perhaps more interesting would be an incremental STW
compaction where only part of the old gen is compacted.  A complete
marking of the live data would be needed for the increment of the
compaction.  But you'd only need to do the actual compaction (moving
data and adjusting pointers) on part of the old gen.  Look at the
serial old gen collector if you're interested in this.  The ParallelOldGC
will be somewhat more complicated.  We're not particularly
interested in it because that's what G1 does.

More information about the hotspot-gc-dev mailing list