You may have come across “Load Average” in your Linux travels. It’s common for it to be misinterpreted but it’s simpler than you might think. In this article, I’ll try to explain it for you.
Knowing the load average may let you know when you need more powerful hardware. It could indicate that there’s a runaway process, or that there has been some sort of hack and you’re now running malware, perhaps mining cryptocurrency in the background. The load average is valuable information, though many folks don’t seem to know what it means.
I also see some load average misconceptions when I travel the ‘net. There are faulty interpretations and faulty implications. For example, it doesn’t necessarily mean that you were hacked or need hardware, it just means you need to start looking into the cause of a high load average. It doesn’t mean definitely anything – it could just be that you had a high load for a while due to a compute-intensive process.
This shouldn’t take very long, or be all that complicated, but we’ll see if I’m able to put it into words. I’ve never tried to put it into words before! Let’s see how that works out.
Linux Load Average:
First, let’s crack open your terminal. Use your keyboard and press
With the terminal open, run this simple command:
You should get an output similar to this:
23:17:21 up 4 days, 9:31, 2 users, load average: 0.76, 0.47, 0.52
So, let’s explain what’s going on here.
Those are the average of CPU usage over the last 1 minute, 5 minutes, and 15 minutes. Each 1 is a CPU (or CPU core) that was waiting because it was busy. It was waiting, unable to process data because it was too busy running existing scheduled jobs. So, you can have some pretty high numbers.
Sometimes, you’ll see like a 1.04 as a result and that means that one CPU/core had a high average load over the past minute. The load average isn’t what the score was at 1, 5, or 15 minute intervals. It’s an average of CPU usage over time.
If you have an 8 core CPU and they’re all busy over a minute, you’ll end up with a load average of 8.x, and you may still have a functioning (perhaps slowed down) computer. At the same time, if you’re on an old dual-core CPU then you may find that 2.x means your computer is entirely unusable due to the lag.
Obviously, most folks are going to want a lower load average but some folks may want a higher average so that they know they’re getting the most out of their hardware. As a general rule, you want your CPU’s load average lower so that you can move data in and out of it quickly. Having a high CPU load can create a bottleneck and that’s less than optimal.
There we go… I think I explained it well enough. If not, just let me know and I’ll try to answer any comments that are questions. If you can think of a better way to describe it, feel free to add that too! Either way, it’s another article for the archives. Pretty soon, the year will be over!
Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.