Talk:Load (computing): Difference between revisions

Content deleted Content added
Line 102:
 
::Your example is flawed. Running processes do not use only a percentage of the CPU. The running process is always using 100%. When we say that a process takes 5% of the CPU we mean that, over a defined period, it is running for 5% of the time. Each of your 1 second long processes with 5% utilisation is in reality running for 1/20 of a second and waiting for something (e.g. disk I/O or sleeping) for 19/20 of a second.
 
:::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.
 
::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.