首页  

JVM MemoryUsage中init,committed,used,max说明     所属分类 jvm 浏览量 1646
init
represents the initial amount of memory (in bytes) that 
the Java virtual machine requests from the operating system for memory management during startup.  
The Java virtual machine may request additional memory from the operating system and may also release memory to the system over time.
The value of init  may be undefined.
 

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).  
The Java virtual machine may release memory to the system and committed  could be less than init.
committed  will always be greater than or equal to used.


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).


committed
represents the amount of memory (in bytes) that is guaranteed to be available for use by the Java virtual machine.

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).


committed 是jvm 确保可以使用的内存 ,
即使 used <= max  ,内存分配可能失败 
当used 接近committed的时候,heap 或者 nonheap 就会grow up 


mempool{name="Code Cache",subtype="used",type="NON_HEAP"} 26319808
mempool{name="Code Cache",subtype="init",type="NON_HEAP"} 2555904
mempool{name="Code Cache",subtype="committed",type="NON_HEAP"} 26869760
mempool{name="Code Cache",subtype="max",type="NON_HEAP"} 251658240

mempool{name="Metaspace",subtype="used",type="NON_HEAP"} 36841704
mempool{name="Metaspace",subtype="init",type="NON_HEAP"} 0
mempool{name="Metaspace",subtype="committed",type="NON_HEAP"} 38232064
mempool{name="Metaspace",subtype="max",type="NON_HEAP"} -1

mempool{name="Compressed Class Space",subtype="used",type="NON_HEAP"} 3299480
mempool{name="Compressed Class Space",subtype="init",type="NON_HEAP"} 0
mempool{name="Compressed Class Space",subtype="committed",type="NON_HEAP"} 3670016
mempool{name="Compressed Class Space",subtype="max",type="NON_HEAP"} 1073741824

mempool{name="Eden Space",subtype="used",type="HEAP"} 37012600
mempool{name="Eden Space",subtype="init",type="HEAP"} 71630848
mempool{name="Eden Space",subtype="committed",type="HEAP"} 71696384
mempool{name="Eden Space",subtype="max",type="HEAP"} 195756032

mempool{name="Survivor Space",subtype="used",type="HEAP"} 4736032
mempool{name="Survivor Space",subtype="init",type="HEAP"} 8912896
mempool{name="Survivor Space",subtype="committed",type="HEAP"} 8912896
mempool{name="Survivor Space",subtype="max",type="HEAP"} 24444928

mempool{name="Tenured Gen",subtype="used",type="HEAP"} 137996608
mempool{name="Tenured Gen",subtype="init",type="HEAP"} 178978816
mempool{name="Tenured Gen",subtype="committed",type="HEAP"} 178978816
mempool{name="Tenured Gen",subtype="max",type="HEAP"} 489357312

上一篇     下一篇
老程序员的20条编码原则

sql优化建议

jvm codecache 相关整理

堆外内存使用实例

redis优化要点

devops简介及工具链