|
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, 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 for the last 1 minute, the Average server load was 0.01. For the last 5 minutes, the average server load was 0.05 and for the last 15 minutes, the average server load was 0.09.
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.
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.
In Internet servers, High loads are caused by diverse reasons, each
requiring a different approach for correction.
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.
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.
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.
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.
Sangeetha is a Computer Engineer based in India and has over 7 years of experience in the Hosting industry. Her articles have been published both online as well as in print. She can be contacted via Contact us form
|