Linux load average is a key metric for measuring CPU performance and operating system performance in Linux. It can also be used to monitor resource usage.

If it’s overloaded, you’ll need to optimize or kill processes as they can consume a lot of power. To balance the workload, you’ll also need to provide more resources.

But how do you determine if your server has enough load capacity? Learn more about Linux system load, examples, and how to calculate it here.

What is Linux Load Average?

Load average is the average system load on a Linux server for a given period of time. That is, the CPU demand of the server that includes both operating and queued threads.

An idle system has a load of 0. Any process that is running or on the waiting list increases the load to 1.

This load, however, does not provide useful information as the load can change within seconds.

Usually the top or uptime instruction will present the average server load with the following output.

Digital ocean

The numbers above show the CPU load average over a period of one, five, and fifteen minutes.

A load of 1 can mean about 100% resource usage on a single core processor system. And this system certainly doesn’t exist today. Unless you haven’t upgraded your system in a decade.

As for dual core processors, a load of 1 means that 1 core is 100% idle, meaning about 50% CPU usage (split into 2). This also applies to quad core processors, where CPU usage is 25%.

Meanwhile, to estimate resource usage, you can use the ratio of load average to the number of processor cores. Although not an exact number, it can help you monitor resources.

How to Check Linux Load Average

Now that you know the definition of Linux load average, you can find the average load using the following three ways to calculate load average.

Uptime

To use the uptime command, you can open the command line using the shortcut key CTRL+ALT+T and type uptime. After that, the output will appear in the form of the amount of time that has been used along with the number of active users and the load average.


From the image above, the load average for the last minute is 0.03, while for five minutes it is 0.03 and 0.01 for the last fifteen minutes.

Top

Apart from the uptime command, you can also use the top command. Simply open the command terminal and type top, so the top interface will appear.

Through this command, you will get a more in-depth overview of system resource usage.

As shown in the box above, the load average for the last minute is 0.34. While the last five minutes is 0.14 and 0.405 for fifteen minutes.

Glances Tools

Finally, utilizing the glances tool.

This tool at first glance provides information like the top command. However, the results are more detailed about the usage of system resources. To use this tool, you can install the package with the command: sudo apt-get install glances.

After the installation is complete, type glances in the terminal. This will bring up an interface that describes the average Linux load and other information.

Here, you’ll find the number of processor cores and the load average.


In the boxed area, it appears that the last minute’s load average is 0.14. At five minutes and fifteen minutes, the load values are 0.12 and 0.05.

Linux load average is an important, easy-to-use metric for monitoring system resources. Keeping it stable will ensure that your system won’t experience problems like crashes or slowdowns.

Source:

https://www.digitalocean.com/community/tutorials/load-average-in-linux

https://www.site24x7.com/blog/load-average-what-is-it-and-whats-the-best-load-average-for-your-linux-servers