Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8191369

NMT: Enhance thread stack tracking

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 10
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b04
    • OS:
      linux, windows

      Description

      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.


       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              zgu Zhengyu Gu
              Reporter:
              zgu Zhengyu Gu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: