RFR(M) 8186834:Expanding old area without full GC in parallel GC

Michihiro Horie HORIE at jp.ibm.com
Mon Aug 28 15:20:23 UTC 2017

Dear all,

Would you please review the following change?
bug: https://bugs.openjdk.java.net/browse/JDK-8186834
webrev: http://cr.openjdk.java.net/~mhorie/8186834/webrev.00/

In parallel GC, old area is expanded only after a full GC occurs.
I am wondering if we could give an option to expand old area without full
GC. So, I added an option

Following is a simple micro benchmark I used to see the benefit of this
As a result, pause time of full GC reduced by 30%. Full GC count reduced by
Elapsed time reduced by 7%.

import java.util.HashMap;
import java.util.Map;
public class HeapExpandTest {
  static Map<Integer, byte[]> map = new HashMap<>();
  public static void main(String[] args) throws Exception {
    long start = System.currentTimeMillis();
    for (int i = 0; i < 2200; ++i) {
      map.put(i, new byte[1024*1024]); // 1MB
    System.out.println("elapsed= " + (System.currentTimeMillis() - start));

JVM options: -XX:+UseParallelGC -XX:+UseAdaptiveSizePolicy
-XX:ParallelGCThreads=8 -Xms64m -Xmx3g

Best regards,
IBM Research - Tokyo

More information about the hotspot-dev mailing list