facebook youtube pinterest twitter reddit whatsapp instagram

Understanding Load Average In GNU/Linux

Load average is the average number of processes that is calculated over a period of time, they can either be in a runnable or uninterrupted‐able state. When a process is in a runnable state, it is either using the CPU or waiting to use the CPU, and when a process is in an uninterrupted‐able state, it is waiting for some I/O access, e.g waiting for the disk.

There are a couple of ways you can check the load average, you can either use htop, top, uptime, and even directly from the test file that stores it in the first place (/proc/loadav), I prefer the uptime command, as it gives me one-line information, which is easy on the eye.

To check a load average you simply execute the following command:

uptime

Output

19:40:04 up 89 days,  9:57,  3 users,  load average: 0.07, 0.04, 0.06

The above shows the averages of the load, which are taken over a three-time interval, each representing 1 minute, 5 minutes, and 15 minutes.

In the above output, I have the following load averages: 0.07, 0.04, 0.06, and the output means:

  • load average over the last 1 minute is 0.07
  • load average over the last 5 minutes is 0.04
  • load average over the last 15 minutes is 0.06

This is a bit tricky to understand if you don't know the number of core/CPU on your system, so, if you have a single CPU system, a load average of 1 means it is loaded all the time, this means your system is over hogged & is in full capacity. If you have 4 CPU, a load average of 1 won't overload the system, first, check the number of processing units on your system using the following command:

nproc

This would print the number of processing units available.

To understand it better, let's take a few assumptions with a load average of 0.00, 0.00, 0.00

On a single-core system this would mean:

  • Your CPU was fully idle over the last 1 minute, the last 5 minutes, and over the last 15 minutes, this isn't normal on a working server, so, you might want to investigate why your CPU isn't working, perhaps, some processes aren't starting.

Load average of 0.5, 0.7, 1.35 On a single-core system this would mean (a single-core CPU can only handle one process at a time):

  • The CPU has been idle for 50% on average over the last 1 minute
  • The CPU has been idle for 70% on average over the last 5 minute
  • The CPU was busy all the time, while there was on average one other process waiting for 35% over the last 15 minutes

This is a bit different on a multi-core CPU, I'll explain that in a future guide.

Related Post(s)

  • Send Mail with Attachment Using Mutt in GNU/Linux

    Mutt is a powerful text-based mail client for Unix/Linux operating systems. It features color support, message threading, MIME support...

  • Installing WP-CLI In a GNU/Linux Server

    WP-CLI is a command-line interface for WordPress. It can also be used with ClassicPress, as they are no differences in their usage, maybe just minimal if you are updating or downloading new ClassicPr

  • Mounting and Unmounting Cloud Storage With (Rclone) in GNU/Linux

    Ever wondered if you could mount your preferred cloud storage as a virtual drive on your system? Thanks to Rclone, you can mount and access different kinds of cloud storage from a file manager, I'll

  • Access A Web Page In GNU/Linux Using (Links) [Web Browser in Text Mode]

    Links is a text-mode World Wide Web (WWW) browses that can be used to view a web page either via a local (file://) or remote ((http:// or ftp://) URLs. To get started with Links, install it using the

  • Synchronize File With Cloud Storage Using [Rclone] In (GNU/Linux)

    Rclone is an open-source command-line program to sync files and directories to and from different cloud storage providers. It preserves timestamps, and if you are transferring from local to cloud, it

  • Creating Command Aliases in GNU/Linux (Command Shortcuts)

    As time goes on, you'll need to be super productive with the way you use commands in GNU/Linux, and one example is utilizing alias. Using alias allows you to create an additional equivalent name for