KNOWNHOST KNOWLEDGE BASE

Hosting Question? Find the Solution - Browse our Guides, Articles, and How-To's

Load Averages, what are they?

In this article we’ll be going over the server metric ‘Load Averages’ that you may see within WHM, cPanel Server Stats, DirectAdmin Server Stats and programs such as uptime or top. Being aware of this value and what it should and shouldn’t be within your server is important. It will help protect yourself and your hardware from unnecessary downtime. This allows you be be aware you of knowing what to look out for.

Applicable services:

  • Virtual Private Servers
  • Cloud Servers
  • Dedicated Servers

This article will cover the usage of programs such as top and nproc when attempting to determine your servers CPU core count.

  • top: A command line program to provide detailed statistics of the current operating processes of the server showing information such as: uptime, current processes, load averages, available memory and CPU utilization.
  • nproc: A command line program to show how many CPU cores a server has to utilize.

Finding your core count

In order to understand the load averages, we first need to find out the number of CPU cores available. To do this, you’ll need to have root access and be able to access/login over SSH.

Once you’re logged into your server you can run the nproc command which will provide you with a single or double digit number (depending on your CPU type)

Here in our example shows how many CPU cores this server has:

[root@yourserverhere]# nproc
2

According to nproc – this server as 2 available CPU Cores for processing information. Great, this will serve as the baseline for the guide when talking about load averages.

Checking load averages

Now that we know, we’ll want to check the the current load averages by running top in the command line, it’ll give us output such as:

top - 11:32:02 up 98 days, 23:47,  2 users,  load average: 1.10, 3.14, 5.18                                                                                                                                                                                                       
Tasks: 108 total,   1 running, 107 sleeping,   0 stopped,   0 zombie                                                                                                                                                                                                              
%Cpu(s):  0.1 us,  0.1 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st                                                                                                                                                                                                   
KiB Mem :  4194304 total,  1669384 free,  1278944 used,  1245976 buff/cache
KiB Swap:        0 total,        0 free,        0 used.  2794300 avail Mem 

In this output we see things such as uptime, cpu load, memory availability, running processes and load averages – the load averages value is what we’re interested in here as that’s going to provide us with a general understanding of how our server is performing.

The load average is broken down into three parts. This translates into: 1 minute averages, 5 minute averages and 15 minute averages.

  • If the load average shows as 0.00 – the server is idle.
  • When the 1 minute load is larger than the 5 minute, 15 minute load times – load is increasing
  • When the 1 minute load is smaller than the 5 minute, 15 minute load times – load is decreasing
  • Should the values be higher than the available CPU count (nproc) then the server may be experiencing performance issues (server configurations for example)
    • Apache
    • PHP
    • MySQL
    • Disk issues

Within Linux the load averages attempt to be a understanding of system load as a whole measurement. Meaning that this is taking the number of threads that are working or waiting to work. With CPU’s only being able to handle so many processes at one time, this number is meant to act as an overall value of the server work currently being performed.

Okay, but how do I read this?

Let’s break this down into an easy to understand format.

If a server is only a two core server like what we saw when we used nproc then think of this like a highway. This highway only has two lanes to handle the vehicles operating on this highway. If this highway is operating at capacity (100%) we can expect to see a value of 2.00. If the highway is operating at half capacity then we would see 1.00.

A value over 2.00 would mean the highway is congested and as such it takes longer time for processes to complete. (Such as it would for traffic to get through a congested highway)

Consistently busy highway could indicate an issue which you would want to have investigated.

A server spiking over the allocated CPU Core count on the server is OK every once in awhile. Should you see this value consistently higher than the available core count could indicate a problem. You or your server management company would then want to evaluate the issue. The average values (1, 5, 15) allow for this metric to be checked to determine if there is an issue, for example if the 15 minute average persists higher than 2.00 you know that something is awry.

Servers with larger core counts will have more highway lanes to handle the processes(vehicles) on the network. A result of this is seeing the values of the 1, 5 and 15 minute time frames report larger.

An example would be a 32 core server could have values of 1.00, 2.00, 15.00 or 24.00 for periodic times longer than 15 minutes and that would be correct within that servers capability.

Conclusion

We hope that this has been a helpful explanation of load averages and what they are. Understanding load averages is a good way to be aware of the way that your server is performing. Whether it be from active work load or just general traffic. Load averages help determine what sort of state your server is in. As such it’s an important metric to be aware of.

KnownHost offers 365 days a year, 24 hours a day, all 7 days of the week best in class technical support. A dedicated team is ready to help you should you need our assistance. You’re not using KnownHost for the best web hosting experience? Well, why not? Check with our Sales team to see what can KnownHost do for you in improving your web hosting experience.