eG Monitoring
 

Measures reported by ZingJvmMemoryUsage

Zing is a Java Virtual Machine (JVM) and runtime platform for Java applications that is designed to remove memory limitations and scale elastically.

Zing is based on established technology from Azul that allows existing Java applications to scale to dozens of CPU cores and hundreds of gigabytes of memory “elastically”, meaning resources can also scale up and down based on real-time demands, and without garbage collection pauses present in other Java runtimes.

Typically, the performance of the applications running on the Zing VM depends upon how well-sized the host's memory resources are and how the different memory components use it. The most important of these memory components are, namely - System Linux Memory, physical memory, and System Zing Memory.

The portion of host memory used by the Linux kernel and the Linux processes is collectively termed as System Linux memory.

The Zing Virtual Machine (ZVM) uses ZST's ZMM for managing memory in three memory types: Reservable memory, Contingency memory and Pause Prevention memory. Together, these three memory pools form what is called the System Zing Memory. The System Zing Memory represents that portion of the host system memory that has to be set aside and managed independently from Linux. This memory is configured when the ZST' system-config-zing-memory tool is run. Memory can be reserved at configuration using the reserve-at-config policy or just an upper limit can be set and no memory reserved until the launch of a ZVM process using the reserve-at-launch policy.

The Reservable memory is a portion of the System Zing memory reserved when the reserve-at-config policy is chosen when configuring your system using the system-config-zing-memory tool. In this case, the Reservable memory is available to any ZVM instance at launch. Specific requests for memory made by the ZVM are assigned to that ZVM instance running a Java application. Reservable memory is assigned to new ZVM instances until the available Reservable memory is insufficient to start another ZVM instance. Reservable memory comprises the bulk of the System Zing memory.

As part of the configuration of System Zing memory, the system-config-zing-memory tool sets aside a percentage of the System Zing memory for Pause Prevention memory. When there is a sudden increase in the object allocation rate, the ZVM instance can use the Pause Prevention memory to efficiently keep up with and sustain the throughput during the heavy, unexpected workloads. Using memory from Pause Prevention memory gives the ZVM instance's Continuously Concurrent Compacting Collector additional time to adjust to and keep up with suddenly increased allocation rates. This ensures that the garbage collector does not stop or pause a ZVM instance running a Java application.

To help ensure that ZVM instances survive unanticipated peak loads and to prevent out of memory errors, the system-config-zing-memory tool sets aside a percentage of the System Zing memory for Contingency memory. Contingency memory is additional memory available to any ZVM instance running a Java application. The ZVM instance uses Contingency memory to manage memory requests for space in the ZVM instance's Java heap. Memory from Contingency memory is used as needed by the ZVM, growing and shrinking as the needs of ZVM instances fluctuate.

This elastic memory management ability of the Zing VM is one of the main reasons why it is increasingly used in online retail applications, cloud-based solutions, SaaS deployments, Big Data, and more!

To ensure the peak performance of such an application and to assure its end-users of a high-quality experience, administrators must continuously track how that application uses the host system's memory resources, proactively detect a memory contention on the application host, and accurately identify which portion of the host system's memory resources is contributing to the contention - is it the System Linux Memory portion ? is it the physical memory of the host? or is it the System Zing Memory portion?

This is exactly what the ZingJvmMemoryUsage test does! This test monitors the memory usage of an application running in the Zing VM and reports how that application is utilizing the different portions of the host system's memory resources - this includes System Linux Memory usage, physical memory usage, and System Zing Memory usage. In the process, the test captures and alerts administrators to memory bottlenecks and also pinpoints where the root-cause of the bottleneck lies - is it in the System Linux memory usage? physical memory usage? or System Zing memory usage?

If abnormalities are noticed in the application's System Zing memory usage, then the test provides deeper insights into the System Zing memory portion by reporting how the application is utilizing the Reservable, Pause Prevention, and Contingency memory pools of the System Zing memory. This way, the test accurately isolates that memory pool from which the maximum System Zing memory resources are drained.

Moreover, in the event that the System Zing Memory is used erratically, the test also leads you to the exact process running on the Zing VM that is consuming maximum memory.

Measurement Description Measurement Unit Interpretation
Used_memory Indicates the amount of memory of this type that is used currently. For the Total descriptor, this will be the fraction of the System Zing memory that is in use. MB  
Free_memory Indicates the amount of memory of this type that is unused. For the Total descriptor, this will be the fraction of the System Zing memory that is currently unused. MB  
Total_memory Indicates the total amount of memory allocated to this type. For the Total descriptor, this is the total System Zing memory of the host.  MB  
Percentage_used Indicates the percentage of allocated memory used by this type. For the Total descriptor, this is the percentage of the total System Zing memory that is in use presently. Percentage Compare the value of this measure across the Linux memory, physical memory, and Zing memory descriptors to know where the contention is.

If the Total descriptor under Zing reports a value close to 100%, it means that System Zing Memory is over-utilized. In this case, to know in which memory pool the contention is maximum, compare the value of this measure across the Reservable, Contingency, and Pause Prevention descriptors.

If this comparison reveals that the host is running out of Reservable memory, it means that no new ZVM instances can be started on the ZVM until additional Reservable memory is made available.

If this comparison reveals that the host is running out of Pause Prevention memory, it could soon result in a significant dip in the throughput and responsiveness of the ZVM. This is because, when there is a sudden increase in the object allocation rate, the ZVM instance typically uses the Pause Prevention memory to efficiently keep up with and sustain the throughput during the heavy, unexpected workloads. Using memory from Pause Prevention memory gives the ZVM instance's Continuously Concurrent Compacting Collector additional time to adjust to and keep up with suddenly increased allocation rates. This ensures that the garbage collector does not stop or pause a ZVM instance running a Java application. If the Pause Prevention memory is not adequate, then the ZVM's collector will have little time to keep up with the increased workload, forcing the garbage collector to stop/pause the ZVM instance. This in turn will decrease the throughput and responsiveness of the ZVM instance.

If there is insufficient Contingency memory on the other hand, then ZVM instances will not be allocated extra memory when they need it. This could cause that instance to trigger out-of-memory failures.

Use the detailed diagnosis of this measure for the Total descriptor to accurately identify which process is consuming System Zing memory excessively and degrading application performance.
ZVM_instance_count Indicates the number of ZVM instances running on the host. Number This measure is reported only for the Total descriptor under Zing.