Difference between revisions of "Loadavg"
(minor fixes) |
(enhance )) |
||
Line 1: | Line 1: | ||
'''Load average''' is a traditional UNIX metric. Its value is the average | '''Load average''' is a traditional UNIX metric. Its value is the average | ||
− | number of processes that are either in a runnable or uninterruptable state | + | number of processes that are either in a '''runnable''' or '''uninterruptable''' state |
− | during a particular time period | + | during a particular time period. |
− | |||
− | A process in a runnable | + | 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 | + | is either using the CPU or waiting to use the CPU. A process in '''uninterruptable''' |
− | state is waiting for some I/O access, eg waiting for disk. | + | state (shown with status of '''D''' in top utility) is waiting for some I/O access, |
− | The averages are taken over the three time intervals. | + | eg waiting for disk. |
− | are not normalized for the number of CPUs in a system, so a load average | + | |
+ | 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 | 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. | CPU system it means it was idle 75% of the time. |
Latest revision as of 15:26, 30 May 2012
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 average[edit]
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 average[edit]
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.