Open main menu

OpenVZ Virtuozzo Containers Wiki β

Loadavg

Load average is a traditional UNIX metric. Its value is the average number of processes that are either in a runnable or uninterruptable state during a particular time period.

A process in a runnable state (shown with status of R in top utility) is either using the CPU or waiting to use the CPU. A process in uninterruptable state (shown with status of D in top utility) is waiting for some I/O access, eg waiting for disk.

The averages are taken over the three time intervals: 1, 5 and 15 minutes. Load averages are not normalized for the number of CPUs in a system, so a load average of 1 means a single CPU system is loaded all the time while on a 4 CPU system it means it was idle 75% of the time.

How to get container's load averageEdit

For a single specific container:

vzctl exec $CTID cat /proc/loadavg

For all running (or some specified) containers

vzlist -o ctid,laverage [CTID ...]

See vzlist(8) for details on vzlist.

Reasons for high load averageEdit

Two reasons for high load average is lack of CPU time or disk I/O bandwidth. For container, it can also be because of its limits, such as the CPU limit or low disk I/O priority.

For VSwap-enabled containers, one case is the lack of RAM (physpages). Whenever a RAM shortage occurs, system will start doing virtual swapping, delaying a given container to emulate the effect of a real swap-out.