From very beginning, thread stack was tracked when thread is created and counts the max stack size as reserved and committed. It served its purpose as NMT was initial developed for detecting memory leaks, etc.
With growing popularity in container in recent years, people started to use NMT to study JVM memory and turn it accordingly to fit in memory constraints of container.
Now, thread stack tracking becomes sore point, as it overstates memory usage. In some cases, it results NMT to report committed memory > RSS.
This enhancement addresses above issue by querying actual committed stack sizes at NMT query time.
It addresses the issue on Linux first, as it is the platform mostly used to host docker containers.
For now, current behavior is preserved for other platforms. It can be implemented for other platforms if found it is useful also.
With growing popularity in container in recent years, people started to use NMT to study JVM memory and turn it accordingly to fit in memory constraints of container.
Now, thread stack tracking becomes sore point, as it overstates memory usage. In some cases, it results NMT to report committed memory > RSS.
This enhancement addresses above issue by querying actual committed stack sizes at NMT query time.
It addresses the issue on Linux first, as it is the platform mostly used to host docker containers.
For now, current behavior is preserved for other platforms. It can be implemented for other platforms if found it is useful also.
- relates to
-
JDK-8249666 Improve Native Memory Tracking to report the actual RSS usage
-
- In Progress
-
-
JDK-8308019 NMT: Enhance thread stack tracking on macOS
-
- Closed
-
-
JDK-8199067 [REDO] NMT: Enhance thread stack tracking
-
- Closed
-