Summary
Introduce new option -XX:ZAllowHeapOnFileSystem
to allocate heap for ZGC to filesystem.
Problem
ZGC supports tmpfs and hugetlbfs as Java heap backing storage. We can allocate Java heap on NV-DIMM by JEP 316, but ZGC does not support it.
Solution
Introduce new option -XX:ZAllowHeapOnFileSystem
to allocate heap for ZGC to filesystem.
According to Linux kernel document for DAX, DAX is supported in ext2, ext4, and xfs.
Also we need to mount it with -o dax
. So we need to support any filesystems for it.
This option need to be set combination with -XX:AllocateHeapAt
.
Specification
--- old/src/hotspot/share/gc/z/z_globals.hpp 2020-02-14 17:56:55.619510600 +0900
+++ new/src/hotspot/share/gc/z/z_globals.hpp 2020-02-14 17:56:54.823184100 +0900
@@ -58,6 +58,10 @@
"Uncommit memory if it has been unused for the specified " \
"amount of time (in seconds)") \
\
+ experimental(bool, ZAllowHeapOnFileSystem, false, \
+ "Allow to use filesystem as Java heap backing storage " \
+ "specified by -XX:AllocateHeapAt") \
+ \
diagnostic(uint, ZStatisticsInterval, 10, \
"Time between statistics print outs (in seconds)") \
range(1, (uint)-1) \
- csr of
-
JDK-8239129 ZGC: Allow -XX:AllocateHeapAt to use any filesystem
-
- Resolved
-