What is server load?

Started by Jason, August 30, 2007, 03:47:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jason

I've received a number of questions lately about what "Server Load" actually represents.

From Wikipedia:  "The system load is a UNIX computing term that describes the amount of work that a computer system is doing. The load average is the system load over a period of time. It is conventionally given as three numbers that represent the system load during the last one, five, and fifteen minute periods."

I found a great article that goes into details but is yet still understandable on WHReviews.com  (Thanks goes to the author for his permission to repost!)

(http://whreviews.com/server-load.htm)

Here are the key takeaways from his post:

Quote
Knowing what the value of the server load is not very important though. Knowing how to interpret the value is what counts. Unfortunately, there's a lot of debate on how to actually interpret it, even among web hosting company owners.

One thing is sure however: all of them consider a server load of 0.xx as safe. As long as most of the time the server load is under 1.00, you should not notice any problems like your website being slow (unless there are some networking related problems somewhere between your computer and the server).

The uncertainties come when the server load has values over 1.00. Most web hosting company owners apply the following rule: if the server has a single CPU (central processing unit), a server load higher than 1.00 is not good; if the server has two CPUs, a server load over 2.00 is not good and so on.

You have to understand that these are average server loads. All web servers get busy from time to time, either because of an user's abuse of resources, or because the server makes some backups etc. Usually the tasks requiring lots of resources are programmed by the host to be run during weekends when the traffic is lower so they won't affect the users much.

Things however are not as black and white as you might think by now. With the powerful processors of today even single processor servers might cope quite well with a server load of 2.00.

Also, remember the definition: the server load represents the number of processes waiting to access the CPU. But not all processes are the same! If the processes are low priority, when a new server request (page request) appears, it can still be handled almost instantly. That request will not be postponed at all, it will be dealt with immediately, while the lower priority processes will wait.

As usual, and as many people directly implicated in the hosting business say, it all comes down to real-life behavior. Are the pages loading fast? Does a process such as searching through a database take a reasonable time? Then you don't really have a problem, whatever the server load is.

Not to mention that the server load is just one factor out of many others (memory usage, CPU usage, size of swap file) and it's often influenced by them. I'll give you an example. If the server has insufficient internal memory it will use a swap file. This means it will work intensely with the hard drive, which will increase CPU usage and in turn result in a higher server load which will make the server respond slowly to requests.

That may help shed some light on what server loads mean.  It's important to note that as he states above, a load under 1 is viewed as acceptable for a single-cpu server.  Despite this, some of the higher-powered single-cpu servers in use today may be very capable of supporting loads over 1.0 effectively. 

All of our servers have two (2x) dual-threaded cpu's that function to the operating system as if we had 4 processors.  Whereas hyperthreading doesn't necessarily equate to what four physical chips would do, it's safe to say that any of our servers should be well suited to handle loads significantly beyond the single-cpu standard of 1.0.

Typically we maintain loads below 1.0 regardless.   8)

Lots of other factors weigh-in on determing the load value so a load of x.x on one server may not equal what a load of the same value would on another server. 

Some other articles I found that were useful:
http://bobcares.com/article6.html
http://en.wikipedia.org/wiki/Load_%28computing%29

Jason

Here's a nice article:  http://www.webhostingtalk.com/news/?p=3441

unedited:
Quote
Server Load - The Basics

By Sangeetha Naik

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.

In a *nix variant, Server load can be calculated by the uptime, top or the w command.
[root@localhost ~]# 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.

About the Author

Sangeetha Naik heads Bobcares.com. She is the co-founder of Poornam Info Vision Ltd., Software and IT services company specializing in Linux based solutions for Webhosts and ISPs. Poornam Info Vision is an ISO 9001:2000 certified company with a team of over 140 engineers.