JDK-8211417 : Allocation of old generation of java heap on alternate memory devices
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2018-10-03
  • Updated: 2018-10-03
  • Resolved: 2018-10-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 12
12Resolved
Related Reports
Duplicate :  
Description
Summary
-----------------
Enable an experimental feature in HotSpot JVM to allocate old generation of Java heap on an alternative memory device, such as NV-DIMM, specified by the user. The goal of this enhancement is to facilitate exploration of different use cases for new memory technologies with the possibility of dramatically large heap sizes at increased cost efficiencies.

Motivation
-----------------
With the availability of cheap NV-DIMM memory, future systems may be equipped with a heterogeneous memory architecture. Such an architecture, in addition to DRAM, will have one or more types of non-DRAM memory with different characteristics. NV-DIMMs such as Intel Persistent Memory are projected to have higher capacity as compared to DRAM. Java applications would like to take advantage of this capacity. The motivation behind this JEP is to provide an experimental feature to facilitate exploration of different use cases for these non-DRAM memories.

Description
---------------
Operating systems today expose NV-DIMM memory devices through the file system. Examples are NTFS DAX mode and ext4 DAX. Memory-mapped 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 idea is to allocate part of Heap memory in NV-DIMM and use it exclusively for old generation objects. The rest of the heap is mapped to DRAM and young generation objects are always placed here. This implementation would add a new experimental option, `-XX:AllocateOldGenAt=<path>`. `AllocateOldGenAt` takes a path to the file system where the device is mounted, and use it to create a temporary, nameless file to map part of heap to NV-DIMM. GCs to be supported are: G1 and ParallelScavenge.

Testing
-------------
At a higher level we need to test: 

1. Correct mapping of Old generation to specified NV-DIMM device and correct placement of young/old objects in corresponding memory spaces. 
2. No regression when this feature is not used. 
3. File which is created to map memory to NV-DIMM is protected by corrected permissions and ceases to exist on different termination conditions such as graceful termination, power failure, system shutdown, etc.