RFR: 8294751: Zero: Allow larger default heaps

Aleksey Shipilev shade at openjdk.org
Tue Oct 4 09:48:33 UTC 2022


Zero is currently defaulting to `MaxRAM=1G` on all machines. It is set in `compiler_globals.pd` under `#if !defined(COMPILER1) && !defined(COMPILER2) && !INCLUDE_JVMCI`.

Zero supports lots of GCs, and there is little sense to penalize it unnecessarily with too small heaps. After [JDK-8292847](https://bugs.openjdk.org/browse/JDK-8292847), this would allow G1 with reasonable heap size on most machines.

Motivational improvements, `SPECjvm2008:serial`:


# Baseline, G1
Serial.test  thrpt   10  1619.863 ± 16.694  ops/s

# Baseline, Serial
Serial.test  thrpt   10  1094.438 ± 20.425  ops/s

# Patched, G1
Serial.test  thrpt   10  1623.090 ± 17.553  ops/s

# Patched, Serial
Serial.test  thrpt   10  1624.531 ± 15.792  ops/s  ; <---- matches G1 now, because young is not tiny


Before:


$ build/linux-x86_64-zero-release/jdk/bin/java -Xlog:gc -Xlog:gc+init Alloc.java
[0.003s][info][gc     ] Using G1
...
[0.005s][info][gc,init] Memory: 125G
...
[0.005s][info][gc,init] Heap Region Size: 1M
[0.005s][info][gc,init] Heap Min Capacity: 8M
[0.005s][info][gc,init] Heap Initial Capacity: 16M
[0.005s][info][gc,init] Heap Max Capacity: 256M


After:


$ build/linux-x86_64-zero-release/jdk/bin/java -Xlog:gc -Xlog:gc+init Alloc.java
[0.003s][info][gc     ] Using G1
...
[0.007s][info][gc,init] Memory: 125G
...
[0.007s][info][gc,init] Heap Region Size: 16M
[0.007s][info][gc,init] Heap Min Capacity: 16M
[0.007s][info][gc,init] Heap Initial Capacity: 2016M
[0.007s][info][gc,init] Heap Max Capacity: 30208M

-------------

Commit messages:
 - Fix

Changes: https://git.openjdk.org/jdk/pull/10552/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10552&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8294751
  Stats: 7 lines in 1 file changed: 7 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/10552.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10552/head:pull/10552

PR: https://git.openjdk.org/jdk/pull/10552


More information about the hotspot-runtime-dev mailing list