Website owners, users and network admins will be familiar with the computing term “Server Load” and they should be thorough how to check the server load in linux. The server load is an average of the amount of computational work that a computer system performs. The load describes the average system load over a period of time. It reports in the pattern of three numbers which denote the system load through the last one to fifteen minute periods.
It is a necessary task to check load average on your server for its better and stable performance. In a Linux server/system, we can check load by different ways.
The frequently used command to view the server load is ‘top‘ but the ‘top‘ command demonstrates the processes that run dynamically. It requires support a little more compared to other methods. So usually, when a server is under unusual load, the usage of ‘top‘ command is not sustained. We can see the server loads by using the commands ‘w‘ and ‘uptime‘. Still, the most obvious and regulated way how to check server load in Linux is to run the commands described below in a terminal. For instance – Uptime, Top and Vmstat.
Uptime- How to Check Server Load With Uptime Command?
15:16:45 up 41 days, 2:35, 2 users, load average: 0.01, 3.01, 2.70
Here is an example that displays the yield from ‘uptime’. When the command was operated at the exact measure of 15:16:45, the server showed an up time for 41 days 2 hours and 35 minutes. It also displayed two users being logged on and the load averages were 0.01, 3.01 and 2.70.
The load average represents the work being done by the system. The three numbers show the load averages for the last minute, 5 minutes and 15 minutes, sequentially. A load average of 1 shows the full workload of a single processor on the system. A load of 2 on a system with two CPUs means that those CPUs were running at peak. On a system with four CPUs, that 2 reflects a workload using about half of the usable processing power. Under normal conditions you will want the load average being 70% of your total CPU usage or less.
Linux ‘top’ command is a performance monitoring program which can check server load. The ‘top’ command employed to make all the running and active real-time processes in the assigned list and updates it regularly. It displays CPU usage, Buffer Size, Memory usage, Cache Size, User, Swap Memory Commands, Process PID, etc. It also yields high memory and CPU utilization of a running process. The top command takes restorative action when needed.
The bulk of memory in a system or server is one major constraining factor. There is an area called swap area where hard drive data is moved to free up physical memory (RAM) for a process to use (not all servers have swap space configured). A system utilizing its swap area does not have to be low on memory, but if most of your system’s swap is being used it could mean that your server is trying to do more than the memory permits.
If swap space is configured and you suspect your server is running out of standard memory, you can use command ‘stat’ to check how much swapping is happening.
If top and vmstat designate that the server is handling all its resources you need to look at optimising your prevailing set up; this can involve running any processing jobs outside maximum hours, stopping any processes no longer needed and reconfiguring processes so they need fewer resources. You may also need to study the need to increase the size of your server to properly meet the demands.