oracle / oracle/visualvm

Wrong/Inconsistent Max Metaspace value

Open
#318 1 comment 1 reaction 1 assignee View on GitHub

@thurka is already working on this.

Since Jun 28, 2021.

bug
Dominant language
Java
Stars
3.3k
Forks
334
PR merge metrics
No merged PRs in 30d

Description

Visual VM 2.0.7 shows an incorrect Max Metaspace value. If you observe the screenshots below you can see that the application (available at https://github.com/silver-mx/jvm-memory-metrics-demo) was started with -XX:MaxMetaspaceSize=64m, but Visual VM reports 84MB ( 88 080 384B) (see screenshot). I double-checked what value is given in JConsole and that it is 65 536 kbytes which is accurate (see screenshot).

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repository available at https://github.com/silver-mx/jvm-memory-metrics-demo.
  2. Run mvnw spring-boot:run
  3. Open VisualVM 2.0.7 and click on the application com.dns.metrics.JvmMemoryMetricsApplicationDemo
  4. Observe the Metaspace Max value.

Expected behavior
I expect the Metaspace max value to reflect the 64MB assigned via XX:MaxMetaspaceSize=64m.

Screenshots
visualvm-show-max-metaspace
visualvm-show-max-metaspace-2
visualvm-show-max-metaspace-3

Desktop (please complete the following information):

  • OS: [Windows 10 and Linux Manjaro]
  • JDK version [jdk-16.0.1.9-hotspot]
  • Version [16]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.