RFR: 8294751: Zero: Allow larger default heaps [v2]

Aleksey Shipilev shade at openjdk.org
Thu Oct 6 10:13:01 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

Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:

 - Move to compiler_globals_pd.hpp
 - Merge branch 'master' into JDK-8294751-zero-larger-heaps
 - Fix

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/10552/files
  - new: https://git.openjdk.org/jdk/pull/10552/files/d3d831e0..9d120795

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=10552&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10552&range=00-01

  Stats: 1823 lines in 133 files changed: 919 ins; 447 del; 457 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