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