[INFRAUTILS-20] Monitorability of JVM's native memory usage Created: 03/Nov/17 Updated: 24/Sep/21 Resolved: 24/Sep/21 |
|
| Status: | Resolved |
| Project: | infrautils |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Medium |
| Reporter: | Michael Vorburger | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Description |
|
while researching around NETVIRT-974, I stumbled upon some blog posts mentioning how a JVM's native memory usage can be monitored. I believe it would be useful to have a small utility (in infrautils) which uses the respective Java API, and exposes this e.g. by JMX and CLI, incl. with regular dumping. I'll use |
| Comments |
| Comment by Michael Vorburger [ 21/Dec/17 ] |
|
I'm currently adding BufferPoolMetricSet and MemoryUsageGaugeSet to infrautils.metrics and it seems this will gives us something related to this, but we would need the options below enabled on start-up, which is probably a bad idea to enable by default because "note that enabling this will cause 5-10% performance overhead" ... -XX:NativeMemoryTracking=[off | summary | detail] -XX:+UnlockDiagnosticVMOptions -XX:+PrintNMTStatistics so I'm un-assigning myself from this issue as I don't plan to go beyond what I'm doing today in infrautils.metrics; if we suspect native memory problems in the future based on what we'll find in metrics, then we can add the JVM startup options above during lab testing to find out more. |
| Comment by Robert Varga [ 24/Sep/21 ] |
|
The JVM already provides a ton of metrics via JMX without the need for any code on our part. Even more JVM-related things are available through Java Flight Recorder, so this really is about knowing how to deploy Java applications. |