Monitoring Azul Zing Memory Use

Monitoring Azul Zing Memory Use

book

Article ID: KB0074809

calendar_today

Updated On:

Products Versions
TIBCO Streaming 7

Description

Warnings regarding low available heap are seen when starting a LiveView project using the Azul Zing ZVM:
 
2013-04-09-10:57:40.941 [AsyncLogger] WARN LVMonitor - Low Available Heap: Max size 120,096 MB, Free 5,962 MB
2013-04-09-10:57:41.937 [AsyncLogger] WARN LVMonitor - Low Available Heap: Max size 120,096 MB, Free 5,474 MB
2013-04-09-10:57:42.940 [AsyncLogger] WARN LVMonitor - Low Available Heap: Max size 120,096 MB, Free 5,164 MB
2013-04-09-10:57:43.955 [AsyncLogger] WARN LVMonitor - Low Available Heap: Max size 120,096 MB, Free 4,438 MB
2013-04-09-10:57:44.952 [AsyncLogger] WARN LVMonitor - Low Available Heap: Max size 120,096 MB, Free 3,510 MB


These warnings inform you that used heap is approaching the -Xmx limit (i.e. "reserved memory") specified for this ZVM. However, there are no warnings to indicate how much contingency memory is still available in addition to reserved memory. Hence, the above warnings cannot tell you if the application is close to running out of memory.

Issue/Introduction

Monitoring Azul Zing Memory Use

Resolution

To monitor the use of contingency memory in the Azul Zing Partition, use the zing-ps command. The zing-ps command-line utility can provide a snapshot of all running ZVMs, and reports the following information regarding the Zing Memory Partition space:
  • Committed (reservable memory)
  • Overdraft (contingency memory)
  • PausePrevention (pause prevention memory)

For example..
 
$ zing-ps --acct

Fund breakdown (total 8)
NAME BALANCE MAXIMUM
fund[0]: Committed 1073741824 3221225472
fund[1]: Overdraft 31457280 178257920
fund[2]: Unknown 0 0
fund[3]: PausePrevention 178257920 178257920
fund[4]: Unknown 0 0
fund[5]: Unknown 0 0
fund[6]: Unknown 0 0
fund[7]: Unknown 0 0

Found 1 processes.

USER PID PROCESS
myuser 21962 "/opt/streambase/zing-jdk/bin/java"
NAME BALANCE ALLOCATED MAXIMUM FND ODFND
account[0]: default 20971520 2097152 23068672 0 1
account[1]: emergency_gc 0 0 0 -1 -1
account[2]: heap -146800640 2271215616 2302672896 0 1
account[3]: pause_prevention 0 0 274877906944 3 3
account[4]: unknown 0 0 0 -1 -1
account[5]: unknown 0 0 0 -1 -1
account[6]: unknown 0 0 0 -1 -1
account[7]: unknown 0 0 0 -1 -1


In the above example, a single running ZVM was found (PID=21962), which currently has a negative BALANCE. This means that used heap for this ZVM has exceeded the amount reserved (set by -Xmx), and it is now drawing from the contingency memory pool. This indicates that the application may run out of memory if it exhausts the remaining contingency space. Note that the BALANCE for the running ZVM heap (-146800640) is equal to the BALANCE of contingency memory (31457280) minus the MAXIMUM contingency memory (178257920).

To get a value for the amount of total contingency memory available for all running ZVMs (in MB), obtain the BALANCE for fund[1] (Overdraft) by running the following command:
 
$ echo "Zing Available Contingency Memory is "`zing-ps --acct|grep Committed|awk '{print int($3/(1024*1024))}'` "MB"

Zing Available Contingency Memory is 30 MB


For the above example, the available contingency memory is 31457280/(1024*1024) = 30 MB