简体   繁体   中英

JVM Memory Types

I'm working on a monitoring project; we have the monitoring software working and recollecting the metrics from the server. Everything is working fine, but we need some information about the JVM Memory Usage details. We have some columns with different memory types. We need to know what these are:

  • Heap
  • Non Heap
  • Usage
  • Peak
  • Coll

We've got maximums for all these columns (HeapMax, NonHeapMax, UsageMax, PeakMax and CollMax) and also used (HeapUsed, NonHeapUsed, UsageUsed, PeakUsed and CollUsed)

We know what Heap and NonHeap is, but we don't know about Usage, Peak and Coll.

Does anybody know what they are?

Thank you in advance.

Usage :- might be the memory currently being used (ie Used: in the image)

Peak :- might be the committed memory till the time (ie Commited: in the image)

Coll :- might be the maximum memory that can be used (ie Max: in the image)

Max: is fixed for the running JMV's lifetime.

Used and Committed : varies as per the load.

I have attached a snapshot of JConsole which lists these attributes.

From java documentation link :

A MemoryUsage object represents a snapshot of memory usage. Instances of the MemoryUsage class are usually constructed by methods that are used to obtain memory usage information about individual memory pool of the Java virtual machine or the heap or non-heap memory of the Java virtual machine as a whole.

A MemoryUsage object contains four values:

init represents the initial amount of memory (in bytes) that the Java virtual machine requests from the operating system for memory management during startup.

used represents the amount of memory currently used (in bytes).

committed represents the amount of memory (in bytes) that is guaranteed to be available for use by the Java virtual machine. The amount of committed memory may change over time (increase or decrease).

max represents the maximum amount of memory (in bytes) that can be used for memory management. Its value may be undefined. The maximum amount of memory may change over time if defined.

The amount of used and committed memory will always be less than or equal to max if max is defined.

A memory allocation may fail if it attempts to increase the used memory such that used > committed even if used <= max would still be true (for example, when the system is low on virtual memory).

Have a look at this link to understand about various API related to memory.

Have a look at this SE question for Heap and Non Heap memory types and internals of them.

How is the java memory pool divided?

I have not found any information about CollUsed and I am suspecting a type error in the question. I suspect that it may be committed memory if I am not wrong.

Please cross check once on exact API.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM