30 April 2013

load averages

by mo

load averages are the 3 numbers shown with the “uptime” and “top” commands.

load averages: 1.51 1.30 1.24

run-queue-length: the sum of the number of processes that are currently running plus the number that are waiting (queued) to run.

You want your CPU load to stay below 1.00. You are ok if you get some temporary spikes above 1.00. When you are consistently above 1.00, you need to worry.

Many sysadmins will draw a line at 0.70.

Rules for a single core.

  1. 0.70: time to investigate before things get worse.

  2. 1.00: fix it now, or you will be up in the middle of the night.

  3. 5.00: you are in serious trouble.

The load is relative to the number of processor cores available. 100% utilization mark is 1.00 on a single core, 2.00 on a dual-core, 4.00 on a quad core, etc.

Rules of Thumb

  1. number of cores = max load
  2. cores is cores. two quad-cores == four dual-cores == eight single-cores.
  $ uptime
  load averages: 1.51 1.30 1.24

load averages: [average over last minute] [average over last 5 minutes] [average over last 15 minutes]

Focus on the 15 minute average.

  $ cat /proc/cpuinfo
  $ grep 'model name' cat /proc/cpuinfo | wc -l