linux_wiki:high_system_load

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_wiki:high_system_load [2015/10/07 22:47]
billdozor [Traffic/Bridge analogy]
linux_wiki:high_system_load [2019/05/25 23:50] (current)
Line 6: Line 6:
  
 **Checklist** **Checklist**
-  * Distro: Enterprise Linux 6.x+  * Distro(s): Enterprise Linux 6
  
 ---- ----
 +
 ====== Understanding System Load ====== ====== Understanding System Load ======
  
Line 26: Line 27:
   * Load of 1.00 means the bridge is at capacity. No more cars(processes) at this very second can get CPU time without waiting.   * Load of 1.00 means the bridge is at capacity. No more cars(processes) at this very second can get CPU time without waiting.
   * Load over 1.00 means there is a backup.   * Load over 1.00 means there is a backup.
-    * 2.00 => there are "two lanes" worth of cars(processes) waiting for CPU time.+    * 2.00 => there are "two lanes" worth of cars(processes). One lane is being processed, another lane is waiting for CPU time.
  
 **Multi-CPU/Core Systems** **Multi-CPU/Core Systems**
Line 33: Line 34:
     * 2 CPU/Cores = 100% is load 2.00     * 2 CPU/Cores = 100% is load 2.00
     * 4 CPU/Cores = 100% is load 4.00     * 4 CPU/Cores = 100% is load 4.00
-  * Example: From the analogy above, each CPU Core can handle 1 bridge lane.+  * Example: From the analogy above, each CPU Core can actively process 1 bridge lane.
  
 ===== Calculate Overall CPU Load ===== ===== Calculate Overall CPU Load =====
-  * Get number of CPUs +  * Get number of CPUs<code bash>grep -c proc /proc/cpuinfo 
-    * <code bash>grep -c proc /proc/cpuinfo</code>+OR 
 +nproc</code>
   * Load Average / NumProccessors = decimal % load   * Load Average / NumProccessors = decimal % load
     * Example: LoadAvg(1.5) / 2 Processors = 0.75 or 75% system load on a dual core system.     * Example: LoadAvg(1.5) / 2 Processors = 0.75 or 75% system load on a dual core system.
Line 92: Line 94:
 ---- ----
  
-==== High CPU ====+===== High CPU =====
  
 Clues that you should investigate high CPU usage: Clues that you should investigate high CPU usage:
Line 109: Line 111:
 ---- ----
  
-==== High Memory Use ====+===== High Memory Use ====
 + 
 +Notes on Linux memory management 
 +  * Linux uses free memory in RAM as a buffer cache to speed up application performance. 
 +  * When memory is needed, the buffer cache shrinks to allow other applications to use it. 
 +  * **Actual free memory = Memory Free + Buffers + Cached**
  
 Clues that you should investigate high memory usage: Clues that you should investigate high memory usage:
Line 131: Line 138:
 ---- ----
  
-==== Disk I/O ====+===== Disk I/O ====
 + 
 +  * I/O wait (wa) is the percentage of time a CPU is waiting on disk. 
 +    * If I/O wait % is > (1/# CPU cores), then the CPUs are spending a lot of time waiting on disk. 
 +  * Easiest ways to improve disk I/O 
 +    * Give the system more memory 
 +    * Tune the application to use more in memory caches than disk
  
 Clues that you should investigate high Disk I/O: Clues that you should investigate high Disk I/O:
Line 137: Line 150:
   * High CPU "wa" (wait)   * High CPU "wa" (wait)
  
 +\\
 **iostat** - View I/O stats with extended statistics, every 3 seconds **iostat** - View I/O stats with extended statistics, every 3 seconds
 <code bash> <code bash>
Line 143: Line 157:
   * "%util" => If this is close to 100%, the listed "Device" is the one to investigate.   * "%util" => If this is close to 100%, the listed "Device" is the one to investigate.
  
 +\\
 **iotop** - Live disk I/O similar to top **iotop** - Live disk I/O similar to top
 <code bash> <code bash>
Line 148: Line 163:
 </code> </code>
  
 +\\
 **lsof** - If a particular device is discovered, another option for further details is to list open files for that mount point. **lsof** - If a particular device is discovered, another option for further details is to list open files for that mount point.
   * Device discovered via iostat   * Device discovered via iostat
  • linux_wiki/high_system_load.1444272424.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)