0

I've been trying to understand the memory usage of one of our apps. This is a chart output from one container JVM using kibana APM (I didn't set up & don't have access to configure the charts so I can't swear to the specific metrics used to generate it).

enter image description here

This seems to make sense. At the same time though I added a utility to log some memory usage statistics at start up and the MemoryMxBean is telling me that the reserved space for compressed class usage is 1024 MiBs. Which this (great) article tells me is the default.

As I understand it this is a, reserved space and b, a part of the metaspace. So I dont understand why this would not be a part of the non-heap memory allocation. Even if it is not used surely it should be a part of the max figure ?

Looking at a few of our containers the reported non heap usage is always close to maximum whether in the mid 100 to 200 range or bigger. My assumption is as we haven't set a maximum this grows as needed and doesn't grow until needed. This seems right to me and I thought I understood until I saw the output / default reserved space of 1024MiB for compressed class memory.

Am I mis-understanding the nature of reserved space or must there something wrong with either the chart or my initial output? I used a slightly modified version of Runtime.getRuntime().maxMemory() Calculate Method (although I'm using java 11) to generate the initial jvm config output although the article referred to implies this is the default.

gringogordo
  • 1,990
  • 6
  • 24
  • 60

0 Answers0