Load Average

Der Load Average in Ubuntu (und Linux im Allgemeinen) zeigt die durchschnittliche Anzahl der Prozesse, die entweder auf der CPU laufen oder auf CPU- oder I/O-Zeit warten.  Er wird als exponentiell gewichteter gleitender Durchschnitt über die letzten 1, 5 und 15 Minuten berechnet und gibt Aufschluss über die Systemauslastung, ist aber nicht direkt mit der CPU-Auslastung in Prozent gleichzusetzen. 

  • Bereitstellung: Die Werte sind über die Befehle uptimetop oder die Datei /proc/loadavg einsehbar. 
  • Interpretation: Ein Wert von 1,0 bedeutet bei einem einzelnen CPU-Kern, dass dieser zu 100 % ausgelastet ist; bei einem Mehrkern-Prozessor entspricht die Kapazitätsgrenze der Anzahl der Kerne (z.  B. ist 4,0 bei 4 Kernen voll ausgelastet). 
  • Werte über der Kernanzahl: Wenn der Load Average höher ist als die Anzahl der verfügbaren CPU-Kerne, müssen Prozesse warten, was zu einer langsameren Systemreaktion führen kann. 
  • Hoher Load bei niedriger CPU: Ein hoher Load Average bei gleichzeitig niedriger CPU-Auslastung deutet oft auf I/O-Engpässe (z.  B. langsame Festplatte oder Netzwerk-Dateisysteme wie NFS) hin, da Prozesse im Zustand „D“ (uninterruptible sleep) auf das Ende von Lese-/Schreibvorgängen warten.

Understanding load average and % CPU in Linux

superuser.com › questions › 1402079 › understanding-load-average-and-cpu-in-linux

Understanding Load Average: 0.83 0.73, 0.55

  • Load is the measure of the amount of computational work a system performs. The three values is the load average over a time interval. The intervals are, the last 1 minute, 5 minutes, and 15 minutes. Load average is computed as an exponential moving average. If you wish, you can take a deep dive and read Examining Load Average

Single Core System

  • The load average value varies in range. With a single core system the value 0.83 means your CPU was at 83% capacity within the last minute. A value of 1.0 would mean your CPU is at exact capacity (100%). With the value 1.0 the system will be overloaded by adding even a little bit of additional work. A value greater than 1.0 means it’s getting more than it can handle. This isn’t bad, it just means that more processes are waiting for CPU time. You would see the slowness of the computer.

Multi-Core System

  • With a multi-core system, you divide the load average by the number of cores you have. So for example, having a load average of 0.83 and having 4 cores, you would take 0.83 / 4 to get 0.2075 or (0.83 / 4) * 100 to get 20.75% capacity. With a quad-core system, if you had a load average equal to 4.0 that would indicate all cores are at 100% capacity, and any overload will result in processes waiting for CPU time.
  • Overloading occurs when you go over your max capacity. The load average as an overload can be a bit confusing to read because it’s based on your cores. If you have a quad-core CPU, you won’t overload until the load value is over 4.0. If the first load average value was 5.50 that would mean your system is 150% overloaded, and on average 1.5 processes in the last minute had to wait for CPU time.

Understanding %Cpu(s): 0.8us, 0.8sy….

  • This section is a displays how the CPU has been used. Each suffix stands for something specific, and indicates how much time the CPU spent on that set of tasks. If you add up all of the numbers in that output row, it will add up to 100%.

The tasks are defined as… source

  • us is the percentage of the CPU for user processes
  • sy is the percentage of the CPU for system processes
  • ni is the percentage of the CPU processes with priority upgrade nice Ni easter egg
  • id is the percentage of the CPU not used
  • wa is the percentage of the CPU processes waiting for I/O operations
  • hi is the percentage of the CPU serving hardware interrupts
  • si is the percentage of the CPU serving software interrupts
  • st in a virtualized environment, a part of the CPU resources are given to each virtual machine (VM). The OS detects when it has work to do, but it cannot perform them because the CPU is busy on some other VM. The amount of time lost in this way is the steal time

Antwort von DrZoo von Stack Exchange