414
More information about this feature can be found in these resources:
• Oracle JavaSE 10 Documentation [https://docs.oracle.com/
javase/10/tools/java.htm#GUID-3B1CE181-CD30-4178-9602230B800D4FAE__BABCBGHF]
• OpenJDK JEP 316: Heap Allocation on Alternative Memory Devices
[http://openjdk.java.net/jeps/316]
Partial Heap Allocation on Alternative Memory Devices
HotSpot JVM 12.0.1 introduced a feature to allocate old generation of Java heap on an
alternative memory device, such as persistent memory, specified by the user.
The feature in G1 and parallel GC allows them to allocate part of heap memory in
persistent memory to be used exclusively for old generation objects. The rest of the heap
is mapped to DRAM, and young generation objects are always placed here.
Operating systems expose persistent memory devices through the file system, so
the underlying media can be accessed directly, or direct access (DAX). File systems that
support DAX include NTFS on Microsoft Windows and ext4 and XFS on Linux. Memorymapped files in these file systems bypass the file cache and provide a direct mapping of
virtual memory to the physical memory on the device. The specification of a path to a
DAX mounted file system uses the flag -XX:AllocateOldGenAt= which enables
this feature. There are no additional flags to enable this feature.
When enabled, young generation objects are placed in DRAM only, while old
generation objects are always allocated in persistent memory. At any given point, the
garbage collector guarantees that the total memory committed in DRAM and persistent
memory is always less than the size of the heap as specified by -Xmx.
When enabled, the JVM also limits the maximum size of the young generation based
on available DRAM, although it is recommended that users set the maximum size of the
young generation explicitly.
For example, if the JVM is executed with -Xmx756g on a system with 32GB DRAM and
1024GB persistent memory, the garbage collector will limit the young generation size
based on the following rules:
• No -XX:MaxNewSize or -Xmn is specified: The maximum young
generation size is set to 80% of available memory (25.6GB).
Appendix d JAvA for persistent MeMory
More information about this feature can be found in these resources:
• Oracle JavaSE 10 Documentation [https://docs.oracle.com/
javase/10/tools/java.htm#GUID-3B1CE181-CD30-4178-9602230B800D4FAE__BABCBGHF]
• OpenJDK JEP 316: Heap Allocation on Alternative Memory Devices
[http://openjdk.java.net/jeps/316]
Partial Heap Allocation on Alternative Memory Devices
HotSpot JVM 12.0.1 introduced a feature to allocate old generation of Java heap on an
alternative memory device, such as persistent memory, specified by the user.
The feature in G1 and parallel GC allows them to allocate part of heap memory in
persistent memory to be used exclusively for old generation objects. The rest of the heap
is mapped to DRAM, and young generation objects are always placed here.
Operating systems expose persistent memory devices through the file system, so
the underlying media can be accessed directly, or direct access (DAX). File systems that
support DAX include NTFS on Microsoft Windows and ext4 and XFS on Linux. Memorymapped files in these file systems bypass the file cache and provide a direct mapping of
virtual memory to the physical memory on the device. The specification of a path to a
DAX mounted file system uses the flag -XX:AllocateOldGenAt=
this feature. There are no additional flags to enable this feature.
When enabled, young generation objects are placed in DRAM only, while old
generation objects are always allocated in persistent memory. At any given point, the
garbage collector guarantees that the total memory committed in DRAM and persistent
memory is always less than the size of the heap as specified by -Xmx.
When enabled, the JVM also limits the maximum size of the young generation based
on available DRAM, although it is recommended that users set the maximum size of the
young generation explicitly.
For example, if the JVM is executed with -Xmx756g on a system with 32GB DRAM and
1024GB persistent memory, the garbage collector will limit the young generation size
based on the following rules:
• No -XX:MaxNewSize or -Xmn is specified: The maximum young
generation size is set to 80% of available memory (25.6GB).
Appendix d JAvA for persistent MeMory
