RFR (M): 8040162: Avoid reallocating PLABs between GC phases in G1
thomas.schatzl at oracle.com
Fri Aug 7 12:05:02 UTC 2015
can I have reviews for this significant improvement in memory use
during GC by changing how G1 manages G1ParScanThreadState instances?
So until now G1 uses separate G1ParScanThreadState instances with their
separate PLABs for every phase of the GC. This means that the
G1ParScanThreadState/PLAB is thrown away after every phase. This means
that even PLABs which only have a single object in it, but are
potentially hundreds of kB in size are filled with dummy objects and
This change instantiates a single G1ParScanThreadState for the entire
GC. PLABs are reused as long as possible. This decreases memory use
during GC significantly in some cases, which can significantly reduce
the number of GCs, improves throughput, and so on.
Care has been taken in this change to not change the values for the
termination statistics during gc, so a few members of
G1ParScanThreadState were relocated (making it a lot nicer too imo).
There is also some bug where the age table and the per-region survivor
statistics are only taken from the initial parallel collection phase
This will be fixed as JDK-8073146, but if wanted I can merge them.
This change is based on the change for JDK-8073013 which is currently
out for review.
lots of runs, jprt, a few aurora nightly runs
More information about the hotspot-gc-dev