Usage:
• -XX:AllocateHeapAt=<filename>
Example:
java -XX:AllocateHeapAt=/mnt/pmem1 -Xmx128g
Description:
The -XX:AllocateHeapAt option can be used to allocate the Java heap on a
non-standard memory device such as non-volatile DIMM (NVDIMM).
On systems that support it, such memory devices may be mounted in the
filesystem, and the -XX:AllocateHeapAt option can be used to point the JVM
at the path of the mounted memory device. In this way, the Java heap will be
created in the special memory device rather than in the normal DRAM.
This feature is only available on JDK 11 and above and on systems that have
hardware and OS support for non-standard memory devices.
Default Value:
-XX:AllocateHeapAt is undefined by default, meaning the Java heap will be
allocated in the normal DRAM memory of the computer.
Errors:
If the specified path is not a supported memory device, then the JVM will print
an error and exit:
OpenJDK 64-Bit Server VM warning: Could not create file for heap
with template /mnt/pmem1/jvmheap.kWgeDT
Error occurred during initialization of VM
Could not create file for Heap at location /mnt/pmem1
Arguments Related to -XX:AllocateHeapAt:
TODO: link to -Xmx TODO: link to -XX:AllocateOldGenAt
Related Posts:
• Java Support for Intel Optane DC Persistent Memory: an example of
an alternative non-volatile memory device that can be used with the
-XX:AllocateHeapAt option.
NOTE:
If you have additional comments, interesting experiences or even point of disagreement with this JVM argument description, please leave a comment. Your
insights will help the entire 10+ million java developer community to develop
one standard source of documentation for all the JVM arguments.
Edit your Comment