Server Load - The Basics

Load, in computing, is a measure of the amount of processing a computer system is currently performing, usually in the form of a scalar and as some variation on a percentage. - Wikipedia definition.

In a *Nix variant, Server load can be calculated by the uptime or the w command.


[[email protected] ~]# uptime
15:33:18 up 1:33, 3 users, load average: 0.01, 0.05, 0.09 
 

The last 3 values show the server load for 1 , 5 and 15 minutes, in that order. This means that 1 minute back, the server load was 0.01, 5 minutes back it was 0.05 and 15 minutes back it was 0.09.

How much server load is ok.

What people usually call Server Load or Load is basically CPU load. This value shows how well the CPU is coping up with the tasks it needs to do. The server load is however a poor measure of a server's performance. Yet it can give the administrator an indication if things are going wrong somewhere.

The ideal load for a single processor server is 1. A server load of 1 means that the CPU is doing all the tasks one after the other in a well oiled manner. There is no waiting Queue of processes.

The higher the server load goes, processes get Queued. That doesn't mean that the moment the server load goes over 1, services will start failing. A server load of under 10 will result in sluggishness, may not result in failure. A Double digit server load may result in failure, especially if it sustains for a long time.

Multiple processors and server load.

For Servers with multiple processors, load is calculated by dividing the Load with the number of processors.

Actual load = Total load(as shown in uptime) / no. of CPUs

When there are multiple processors, the load gets evenly distributed among the CPUs. If one processor is busy, the task can choose another processor to perform the computation.

High load - How does this happen

In Internet servers, High loads are caused by diverse reasons, each requiring a different approach for correction.

Power users

In a virtual hosting environment, there are many users who use the servers for maintaining websites. Some websites are simple, and some are Processor hungry, bandwidth hungry eCommerce applications. If you or your clients have big ecommerce sites with a lot of visitors, your load may shoot up.

Many users have Database driven sites. When such sites have lot of visitors, the number of Database connections increases and results in high load.

Ideally an Internet server shouldn't have more than 300-400 small to medium websites. If any of these users turn out to be power hungry, they could destabilise all the other users operations by hogging all the resources.

Script kiddies and attacks

Many times high loads are caused because the server wasn't secure enough and got cracked. The cracker started running IRC scripts or eggdrops. Sometimes spamming could be reason.

In some cases, a valid user turns into a monster and starts illegally abusing the system by spamming or running insecure scripts.

The first indication of a problem is high load. That should give the server administrator enough hints that something is wrong somewhere.

Run ``top'' on *Nix systems to see which processes are causing the load. Kill such processes and check out where they originated from. You may discover that something is up. Be suspicious about anything that you see that is causing load.

Running backup on the server, daily stats, server tasks

Sometimes high load is caused due to valid maintenance tasks such as Daily Backups, Daily stats updates and Cron schedulers. It is normal that the server loads shoot up during these times. There is nothing to worry during this time, provided that high load doesn't sustain for long. Therefore schedule such tasks during non Business hours when the users are minimum and therefore less likely to be affected.

Overselling

Irresponsible Overselling by Web Hosts is a major reason why web Hosts have Server load problems. In overselling what happens is that the web host sells more resources(like space, bandwidth) than is present. The Web Host assumes that all users are not going to be using the space or bandwidth they purchased. For example, the government builds roads thinking that all the people aren't going to use them at the same time. If the entire population were to step out of their houses, the roads would be totally inadequate.

Overselling is not all that bad, provided the Web Host is responsible in checking server load and acting upon it. Even if a Web host decides to oversell, the load has to be constantly monitored 24/7. If it reaches 2 or 3 fairly regularly, maybe it is time to move some websites to new servers.



Got something to add? Send me email.





(OLDER) <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> Server Load - The Basics


4 comments



Increase ad revenue 50-250% with Ezoic


More Articles by © Sangeetha Naik







Mon Nov 26 23:22:00 2012: 11437   Barry

gravatar


Hi,



I've been looking for some simple software to monitor CPU load on a Unix server and curb the number of processes being created or at least to e-mail me when the CPU load goes over a predetermined level. Can't seem to find anything that can just sit on the server and run in the background. I would have thought that someone would have come up with something like this by now. Do you know of anything available?



Mon Nov 26 23:37:46 2012: 11438   TonyLawrence

gravatar


Thats simple to do in a shell script.



Tue Nov 27 00:43:37 2012: 11439   Barry

gravatar


Hi Tony,

Yes I assume it probably would be for someone who knows how to do a shell script. But for the rest of us, is there anything out there that's already been written?



Tue Nov 27 00:48:51 2012: 11440   TonyLawrence

gravatar


Im sure there is, but I do not have a link for you. Google "monitor Linux script"

------------------------
Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us





Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. (Arthur Conan Doyle)

I'm sure the universe is full of intelligent life. It's just been too intelligent to come here. (Arthur C. Clarke)








This post tagged: