[Linux] VM.info output for container information is confusing

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P3
    • None
    • Affects Version/s: None
    • Component/s: hotspot
    • generic
    • linux

      Running VM.info jcmd on a containerized deployment of the JVM can result in output like the following in the "container (cgroup) information" section:

      memory_limit_in_bytes: 1572864 k
      memory_and_swap_limit_in_bytes: 1572864 k
      memory_soft_limit_in_bytes: unlimited
      memory_usage_in_bytes: 1328504 k
      memory_max_usage_in_bytes: not supported
      memory_swap_current_in_bytes: unlimited
      memory_swap_max_limit_in_bytes: unlimited

      It says "memory_limit_in_bytes:" but actually shows the value in KB (note the 'k' suffix after the value). We should drop the "_in_bytes" suffixes. Originally when only cgroups v1 was a thing those matched the interfaces files which is no longer the case for cgroup v2. So dropping the suffix seems fine. Alternatively, we should drop the "k" calculation done in JDK-8287011 when values are > 1024.

            Assignee:
            Unassigned
            Reporter:
            Severin Gehwolf
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: