RFR(M) 8186888: Need a full GC when old area is expanded
Michihiro Horie
HORIE at jp.ibm.com
Tue Aug 29 09:55:08 UTC 2017
Dear all,
Would you please review the following change?
CSR: https://bugs.openjdk.java.net/browse/JDK-8186888
Bug pointing to CSR: https://bugs.openjdk.java.net/browse/JDK-8186834
Webrev: http://cr.openjdk.java.net/~mhorie/8186834/webrev.00/
As additional data, following is a simple micro benchmark I used to see the
benefit of this change. As a result, pause time of full GC reduced by 30%.
Full GC count reduced by 54%. 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
-XX:+UseAdaptiveGenerationSizePolicyBeforeMajorCollection
UseAdaptiveGenerationSizePolicyBeforeMajorCollection is the option I added
in this change.
Best regards,
--
Michihiro,
IBM Research - Tokyo
More information about the csr-discuss
mailing list