Talk:Load (computing): Difference between revisions

Content deleted Content added
SineBot (talk | contribs)
Hackeye (talk | contribs)
Line 104:
 
:::In other words, it's possible to have a Load Average below 1.0 and have 100% CPU usage (single process using all CPU with no other processes waiting) but it's not possible to have a Load Average above 1.0 with less than 100% CPU usage (doesn't make sense to have lots of processes blocked with idle CPU). At least, that's how I read this. <small>—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/66.92.218.124|66.92.218.124]] ([[User talk:66.92.218.124|talk]]) 20:21, 18 October 2007 (UTC)</small><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->
 
::http://www.linuxjournal.com/article/9001 seems to give a much clearer idea of the concept of load and load average. i quote an important point:
"It is important to remember that a CPU is a discrete state machine. It really can be at only 100%, executing an instruction, or at 0%, waiting for something to do. There is no such thing as using 45% of a CPU. The CPU percentage is a function of time."
[[User:Hackeye|Hackeye]] ([[User talk:Hackeye|talk]]) 05:03, 24 November 2007 (UTC) hackeye
 
::The profile of the load depends on when those processes want their 1/20th of a second slot. If they all do something for 1/20th of a second then sleep for 19/20ths and you start them at exactly the same time the load will start at 10 (1 running, 9 waiting for the CPU), drop to 9 after 1/20th seconds (1 running 8 waiting, 1 sleeping), then 8 and so on until after 0.5 seconds all the processes are sleeping. In this case, the average of the load over a whole second is 1.1. If each process is designed to run in a different 1/20th of a second e.g. the first process runs straight away, the second waits 1/20th seconds then runs, the third waits 2/20ths of a second then runs etc, the load will be 1 while there is a process running and 0 while there isn't. Over the second, the average load will be 0.5 in this case.