De JVM bevat meerdere geheugen onderdelen die met bijvoorbeeld micrometer op te halen zijn.
Heap geheugen old generation:
heap_old_gen: Tenured Space: The objects which reach to max tenured threshold during the minor GC or young GC, will be moved to “Tenured Space” or “Old Generation Space“.
Heap geheugen young generation:
heap_survivor_space : This contains the objects that have survived from the Young garbage collection or Minor garbage collection. We have two equally divided survivor spaces called S0 and S1.
max_heap_eden_space: When we create an object, the memory will be allocated from the Eden Space.
Non-heap geheugen:
nonheap_metaspaces : Hierin staat de class metadata als compressed class space disabled is (die staat voor 64bit machines standaard aan, en is aan te passen met UseCompressedClassPointers).
nonheap_compressed_class_space: Hierin staan de classes metadata als de compressed class space enabled is (default staat hij aan), de size is aan te passen met -XX:CompressedClassSpaceSize.
nonheap_non_nmethods: A non-method code heap containing non-method code, such as compiler buffers and bytecode interpreter. This code type will stay in the code cache forever. Default 5MB, pas aan met -XX:NonNMethodCodeHeapSize.
nonheap_profiled_nmethods: A profiled code heap containing lightly optimized, profiled methods with a short lifetime. Default 122MB, pas aan met -XX:ProfiledCodeHeapSize.
nonheap_non_profiled_nmethods: A non-profiled code heap containing fully optimized, non-profiled methods with a potentially long lifetime. Default 122MB, pas aan met -XX:NonProfiledCodeHeapSize.
Elk deel geheugen heeft een used, comitted en max size.
De used size is het huidige gebruik. De max size is de max size, maar die waarde is niet gegarandeerd beschikbaar. De committed size is de size die gegarandeerd voor de jvm beschikbaar is.
Links
https://dzone.com/articles/understanding-the-java-memory-model-and-the-garbag
https://www.baeldung.com/java-heap-used-committed-max
https://www.baeldung.com/jvm-code-cache
https://stackoverflow.com/questions/59189225/in-java-memory-pool-what-is-the-replacement-of-code-cache-replacement-in-java-11