JDK-8303483 : Enable NMT in summary mode by default
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 21
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2023-03-01
  • Updated: 2024-07-25
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.
Other
tbdUnresolved
Related Reports
Blocks :  
Relates :  
Description
It will be very useful to enable NMT by default. Currently, the following option needs to be added to the command line to enable NMT in summary mode:

-XX:NativeMemoryTracking=summary

If this option is not added to the command line at the process launch time, it is not possible to collect NMT output from the process without stopping and re-starting it again.
Comments
I moved this issue out of 22 into 23. It's blocked by JDK-8317453 Testing with JDK-8317453 reveals that current NMT memory overhead is too much (in Java2Demo) at about 7-9% overhead, to be able to turn it ON without some extra work. We can probably make it work by controlling malloc overhead and making NMT header smaller. It looks doable, but not in 22 timeframe.
09-11-2023

Maybe we could track only a subset of NMT allocation types ON by default, just enough to track RSS of general interest for example?
08-03-2023

Yeah, I agree with David. The overhead of NMT doesn't seem to be well-explained however, other than the "5-10%" overhead cited. I think that the work here is more experimental and social: Do experiments to show the overhead of NMT and explain them to the users so that they can make well-informed decisions.
08-03-2023

NMT has to be an opt-in facility because of the overheads.
02-03-2023