
Managing Resources
59
Monitoring Memory Consumption
You can monitor a number of memory parameters for the whole Hardware Node and for
particular Virtual Private Servers with the help of the
vzmemcheck
utility. For example:
# vzmemcheck -v
Output values in %
veid LowMem LowMem RAM MemSwap MemSwap Alloc Alloc Alloc
util commit util util commit util commit limit
101 0.19 1.93 1.23 0.34 1.38 0.42 1.38 4.94
1 0.27 8.69 1.94 0.49 7.19 1.59 2.05 56.54
----------------------------------------------------------------------
Summary: 0.46 10.62 3.17 0.83 8.57 2.02 3.43 61.48
The
–v
option is used to display the memory information for each Virtual Private Server and
not for the Hardware Node in general. It is also possible to show the absolute values in
Megabytes by using the
–A
switch. The monitored parameters are (from left to right in the
output above) low memory utilization, low memory commitment, RAM utilization,
swap utilization, swap commitment, allocated memory utilization, allocated
memory commitment, allocated memory limit.
To understand these parameters, let us first draw the distinction between utilization and
commitment levels.
Utilization
level is the amount of resources consumed by VPSs at the given
time. In general, low utilization values mean that the system is under-utilized. Often, it means
that the system is capable of supporting more Virtual Private Servers if the existing VPSs
continue to maintain the same load and resource consumption level. High utilization values (in
general, more than 1, or 100%) mean that the system is overloaded and the service level of the
Virtual Private Servers is degraded.
Commitment
level shows how much resources are
“promised” to the existing Virtual Private Servers. Low commitment levels mean that the
system is capable of supporting more Virtual Private Servers. Commitment levels more than 1
mean that the Virtual Private Servers are promised more resources than the system has, and the
system is said to be
overcommitted
. If the system runs a lot of VPSs, it is usually acceptable to
have some overcommitment because it is unlikely that all Virtual Private Servers will request
resources at one and the same time. However, very high commitment levels will cause VPSs to
fail to allocate and use the resources promised to them and may hurt system stability.
There follows an overview of resources checked up by the
vzmemcheck
utility. Their
complete description is provided in the
OpenVZ Management of System Resources
guide.
The
low memory
is the most important RAM area representing the part of memory residing at
lower addresses and directly accessible by the kernel. In OpenVZ, the size of the “low” memory
area is limited to 832 MB in the UP (uniprocessor) and SMP versions of the kernel, and to 3.6
GB in the Enterprise version of the kernel. If the total size of the computer RAM is less than the
limit (832 MB or 3.6 GB, respectively), then the actual size of the “low” memory area is equal
to the total memory size.