| Most servers have many processes loaded in memory at any given time. Most, however, are sitting idle and waiting for an event to occur (such as an incoming network request, or a set period of time to elapse). The "load average" refers to the average number of RunnableProcesses. An instantaneous measurement would be rather useless, since many processes only run for a very short amount of time (think of a webserver that sends a few files simultaneously, then goes back to waiting). If you were to query the system at the precise instant of a flurry of activity or during a lull, you would get an inaccurate impression of the system's activity level. | ||||||||
| Line: 13 to 13 | ||||||||
|---|---|---|---|---|---|---|---|---|
| An interesting question that has come to light since writing that chapter is, whether or not the code for calculating the load avg. was inherited from early AT&T UNIX. I have documented evidence that the algorithm was developed and used in the Multics project (the MIT precursor to UNIX at Bell Labs). If so, does SCO actually have a case? | ||||||||
| Changed: | ||||||||
| < < |
--njg | |||||||
| > > |
--njg (12-25-03) | |||||||
Non-Technical Definition | ||||||||
| Most servers have many processes loaded in memory at any given time. Most, however, are sitting idle and waiting for an event to occur (such as an incoming network request, or a set period of time to elapse). The "load average" refers to the average number of RunnableProcesses. An instantaneous measurement would be rather useless, since many processes only run for a very short amount of time (think of a webserver that sends a few files simultaneously, then goes back to waiting). If you were to query the system at the precise instant of a flurry of activity or during a lull, you would get an inaccurate impression of the system's activity level. | ||||||||
| Added: | ||||||||
| > > |
+++++++++++++++++++++++++ I just surfed upon this discussion and observed that there are more near truths than correct statements. A very detailed (and hopefully correct) analysis of what are the load average metrics (there are 3 of them, note) and how it works can be found online at a talk I gave to a Linux group in 2002 ... http://www.luv.asn.au/overheads/NJG_LUV_2002/luvSlides.html Basically, the load average is an exponentially damped moving average of the run_queue length, which includes those processes currently running on CPUs but NOT those that are suspended waiting for I/O completion, etc. See also Chap. 4 of my new book http://www.perfdynamics.com/iBook/ppa_new.html An interesting question that has come to light since writing that chapter is, whether or not the code for calculating the load avg. was inherited from early AT&T UNIX. I have documented evidence that the algorithm was developed and used in the Multics project (the MIT precursor to UNIX at Bell Labs). If so, does SCO actually have a case? --njg | |||||||
Non-Technical DefinitionAn analogy (thanks to MattBear?): | ||||||||
| Most servers have many processes loaded in memory at any given time. Most, however, are sitting idle and waiting for an event to occur (such as an incoming network request, or a set period of time to elapse). | ||||||||
| Changed: | ||||||||
| < < |
The "load average" refers to the average number of RunnableProcesses. An instantaneous measurement would be rather useless, since many processes only run for a very short amount of time (think of a webserver that sends a few files simultaneously, then goes back to waiting). If you were to query the system at the precise instant of a flurry of activity or during a lull, you would get an inaccurate impression of the system's activity level. | |||||||
| > > |
The "load average" refers to the average number of RunnableProcesses. An instantaneous measurement would be rather useless, since many processes only run for a very short amount of time (think of a webserver that sends a few files simultaneously, then goes back to waiting). If you were to query the system at the precise instant of a flurry of activity or during a lull, you would get an inaccurate impression of the system's activity level. | |||||||
Non-Technical Definition | ||||||||
| Line: 20 to 20 | ||||||||
|---|---|---|---|---|---|---|---|---|
Comparisons"Priorities" given to processes indicate who can cut in front of whom in the CPU line. | ||||||||
| Changed: | ||||||||
| < < |
WindowsNT? has about 7 PriorityLevels?; Sun Solaris has about TwoBillion. | |||||||
| > > |
WindowsNT? has about 7 PriorityLevels?; Sun Solaris has about TwoBillion. | |||||||
Effects | ||||||||
| Line: 41 to 41 | ||||||||
| ||||||||
| Added: | ||||||||
| > > |
| |||||||
| Line: 1 to 1 | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Added: | |||||||||||||||||||||||
| > > |
Most servers have many processes loaded in memory at any given time. Most, however, are sitting idle and waiting for an event to occur (such as an incoming network request, or a set period of time to elapse).
The "load average" refers to the average number of RunnableProcesses. An instantaneous measurement would be rather useless, since many processes only run for a very short amount of time (think of a webserver that sends a few files simultaneously, then goes back to waiting). If you were to query the system at the precise instant of a flurry of activity or during a lull, you would get an inaccurate impression of the system's activity level.
Non-Technical DefinitionAn analogy (thanks to MattBear?): Imagine that there are several lines (queues, for the British) to stand in, and the processes are the ones standing in line. There's a CPU line, an InputOutput? line, a FileSystem? line, and so on. The LoadAverage is the average number of processes standing in the CPU line. Imagine the lines are like checkout lines, and there are "people" to serve the processes waiting at the end of the line. A SingleProcessor? machine has only one person to serve everyone in line. A DualProcessor? machine has two, and so on. So, a LoadAverage of 2 means that there's no contention for the CPU in a DualProcessor? machine.More-Technical DefinitionThe load average is the average number of lines in a ps listing where the process has an "R" code (to indicate that it's in the RunQueue?).Comparisons"Priorities" given to processes indicate who can cut in front of whom in the CPU line. WindowsNT? has about 7 PriorityLevels?; Sun Solaris has about TwoBillion.EffectsLoadAverage has much more effect on a running system than CpuUsage?, since it's possible to have a long-running process that uses 100% of the available CPU when it taken, but which instantly relinquishes the CPU to any other program that wants to use it (examples: the DistributedDotNet? RC5 contest, SetiAtHome). A high load average can cause a system to feel unresponsive as many processes contend for a chance to run. A very heavily loaded system can begin to "thrash", as new processes are launched more quickly than old processes can finish running. Example load averages and their perceived system impact:
| ||||||||||||||||||||||