简体   繁体   English

监视Java堆使用情况

[英]Monitor Java heap usage

I am about to monitor JVM memory utilization for individual nodes. 我即将监视各个节点的JVM内存利用率。 The tool (JON 3.3) has different metrics like initial heap/non heap , committed heap/non heap , used heap /non heap , maximum heap/non heap usages. 该工具(JON 3.3)具有不同的度量标准,如初始堆/非堆,提交的堆/非堆,使用的堆/非堆,最大堆/非堆使用。 I have decided to monitor used heap and committed heap usage to observe the memory performance of JVM. 我决定监视已使用的堆和已提交的堆使用情况,以观察JVM的内存性能。

Is it enough to watch mentioned parameters if not what are the other parameters should be monitored apart from used and committed heap usage.Please advice on this. 是否足以观察所提到的参数,如果不是除了使用和提交的堆使用之外应该监视的其他参数。请就此提出建议。

enter image description here 在此输入图像描述

  • init

    represents the initial amount of memory (in bytes) that the Java virtual machine requests from the operating system for memory management during startup. 表示Java虚拟机在启动期间从操作系统请求内存管理的初始内存量(以字节为单位)。 The Java virtual machine may request additional memory from the operating system and may also release memory to the system over time. Java虚拟机可以从操作系统请求额外的内存,并且还可以随时间向系统释放内存。 The value of init may be undefined. init的值可能未定义。

  • 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. 表示保证可供Java虚拟机使用的内存量(以字节为单位)。 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. Java虚拟机可能会向系统释放内存,并且已提交的内存可能少于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. max表示可用于内存管理的最大内存量(以字节为单位)。 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. 如果定义了max,则已使用和已提交的内存量将始终小于或等于max。 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). 如果内存分配尝试增加已使用的内存,则可能会失败,即使已使用>已提交<= max仍然为真(例如,当系统虚拟内存不足时)。 Below is a picture showing an example of a memory pool: 下面是一张显示内存池示例的图片:

     +----------------------------------------------+ +//////////////// | + +//////////////// | + +----------------------------------------------+ |--------| init |---------------| used |---------------------------| committed |----------------------------------------------| 
  • Non-Heap memory (~Perm) 非堆内存(~Perm)

    Also, the JVM has memory other than the heap, referred to as non-heap memory. 此外,JVM还有堆以外的内存,称为非堆内存。 It is created at the JVM startup and stores per-class structures such as runtime constant pool, field and method data, and the code for methods and constructors, as well as interned Strings. 它在JVM启动时创建并存储每类结构,例如运行时常量池,字段和方法数据,方法和构造函数的代码,以及实习字符串。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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