I see these metrics:
# HELP jvm_memory_max_bytes The maximum amount of memory in bytes that can be used for memory management
# TYPE jvm_memory_max_bytes gauge
jvm_memory_max_bytes{area="heap",id="G1 Survivor Space",} -1.0
jvm_memory_max_bytes{area="heap",id="G1 Old Gen",} 8.05306368E8
jvm_memory_max_bytes{area="nonheap",id="Metaspace",} 2.01326592E8
jvm_memory_max_bytes{area="nonheap",id="CodeCache",} 1.34217728E8
jvm_memory_max_bytes{area="heap",id="G1 Eden Space",} -1.0
jvm_memory_max_bytes{area="nonheap",id="Compressed Class Space",} 3.3554432E7
I don't understand why i see -1
?
Nomad
Settings:
jvm:
ReservedCodeCache: 128
CompressedClassSpace: 32
ThreadsCount: 100
MetaSpace: 64
MaxMetaSpace: 192
Xss: 256
flags: >-
-XX:+HeapDumpOnOutOfMemoryError
-XX:+UnlockDiagnosticVMOptions
-XX:NativeMemoryTracking=summary
-XX:+PrintNMTStatistics
-XX:+UseG1GC
-XX:+UseCompressedOops
-verbose:sizes
-Dcom.sun.jndi.ldap.object.disableEndpointIdentification=true
--add-opens java.base/java.lang=ALL-UNNAMED
java_xmx: 768
extra_memory: 50
This happend when migrated to java 17, before on java 8 all metrics were valid and not -1
.