Usage:
Enable Native Memory Tracking (NMT) mode. It has the following syntax: -XX:NativeMemoryTracking=mode, where mode can be one of the following modes: off, summary and detail
Since:
Starting from JDK 7.
Examples:
To enable summary mode for Native Memory Tracking:
java -XX:NativeMemoryTracking=summary MainClass
Description:
Native Memory Tracking (NMT) is a feature used by Hotspot VM to analyze the memory usage inside the VM. We can use the tool jcmd (which comes with jdk) to access NMT data. It has three modes:
- off: does not track usage of native methods. This is the default mode.
- summary: only tracks memory usage of JVM subsystems such as java heap, classes, code and threads.
- detail: In addition to tracking memory usage by the JVM subsystem, a single call to CallSite tracks memory usage, a single virtual memory region and its delegated region.
Default Value:
By default, this option is disabled.
Note:
Turning on NMT will bring 5%-10% performance loss.
Related Posts:
- The jcmd Utility
- Native Memory Tracking
- Java Oracle
Edit your Comment