Content deleted Content added
No edit summary Tags: Reverted nowiki added references removed Visual edit Mobile edit Mobile web edit |
m Reverted edits by 149.140.247.196 (talk) to last version by Dawnseeker2000 |
||
Line 1:
{{Short description|Amount of computational work that a computer system performs}}
system '''load''' is a measure of the amount of computational work that a computer system performs. The '''load average''' represents the average system load over a period of time. It conventionally appears in the form of three numbers which represent the system load during the and fifteen-minute periods.▼
{{Use dmy dates|date=September 2022}}
{{more citations needed|date=November 2010}}
▲[[File:Big-load.png|thumb|[[htop]] displaying a significant computing load (top right: ''Load average:'')]] In [[UNIX]] [[computing]], the system '''load''' is a measure of the amount of computational work that a computer system performs. The '''load average''' represents the average system load over a period of time. It conventionally appears in the form of three numbers which represent the system load during the last one-, five-, and fifteen-minute periods.
== Unix-style load calculation ==
All Unix and Unix-like systems generate a dimensionless [[Software metric|metric]] of three "load average" numbers in the [[kernel (computer science)|kernel]]. Users can easily query the current result from a [[Unix shell]] by running the <code>[[uptime]]</code> command:
<syntaxhighlight lang="console">
$ uptime
14:34:03 up 10:43, 4 users, load average: 0.06, 0.11, 0.09
</syntaxhighlight>
An idle computer has a load number of 0 (the idle process is not counted). Each [[process (computing)|process]] using or waiting for [[Central processing unit|CPU]] (the ''ready queue'' or [[run queue]]) increments the load number by 1. Each process that terminates decrements it by 1. Most UNIX systems count only processes in the ''running'' (on CPU) or ''runnable'' (waiting for CPU) [[Process states|states]]. However, Linux also includes processes in [[uninterruptible sleep]] states (usually waiting for [[Hard disk|disk]] activity), which can lead to markedly different results if many processes remain blocked in [[Input/output|I/O]] due to a busy or stalled I/O system.<ref>{{Cite web|url=http://linuxtechsupport.blogspot.com/2008/10/what-exactly-is-load-average.html|title=Linux Tech Support: What exactly is a load average?|date=23 October 2008}}</ref> This, for example, includes processes blocking due to an [[Network File System (protocol)|NFS]] server failure or too slow [[Data storage device|media]] (e.g., [[Universal Serial Bus|USB]] 1.x storage devices). Such circumstances can result in an elevated load average which does not reflect an actual increase in CPU use (but still gives an idea of how long users have to wait).
Systems calculate the load ''average'' as the [[Moving average#Exponential moving average|exponentially damped/weighted moving average]] of the load ''number''. The three values of load average refer to the past one, five, and fifteen minutes of system operation.<ref name="drdobbs">{{cite web |url=http://www.linuxjournal.com/article/9001 |title=Examining Load Average |first=Ray |last=Walker |date=1 December 2006 |work=Linux Journal |access-date=13 March 2012 }}</ref>
Line 28 ⟶ 31:
In a system with four CPUs, a load average of 3.73 would indicate that there were, on average, 3.73 processes ready to run, and each one could be scheduled into a CPU.
On modern UNIX systems, the treatment of [[Thread (computer science)|threading]] with respect to load averages varies. Some systems treat threads as processes for the purposes of load average calculation: each thread waiting to run will add 1 to the load. However, other systems, especially systems implementing so-called [[Thread (computer science)#M:N (hybrid threading)|M:N threading]], use different strategies such as counting the process exactly once for the purpose of load (regardless of the number of threads), or counting only threads currently exposed by the user-thread scheduler to the kernel, which may depend on the level of concurrency set on the process. Linux appears to count each thread separately as adding 1 to the load.<ref>See http://serverfault.com/a/524818/27813</ref>
== CPU load vs CPU utilization ==
|