Web Hosting Talk







View Full Version : CPU Load


dutchie
04-10-2001, 02:21 PM
Since 2 days (since 4webspace brought my server back up), i get this messages:
Over the past fifteen minutes, the CPU has been heavily loaded.

This will result in noticible performace loss. Consider moving some of the
services to other Cobalt servers, or reduce the complexity of the CGI
scripts running on the Cobalt server itself.

1 minute load average: 0.77
5 minute load average: 11.13
15 minute load average: 10.09

This only happens once a day, the rest of the day the server is almost asleep.
Where can i find the source for this, the raq has 10 sites on them, none of them being that extremly active.
Is there a log file i can look at ?

pyng
04-10-2001, 03:16 PM
You're probably running something (or many things) in cron.daily.

Did you add anything there yourself? Having a load average of 10 for 15 minutes is really quite long.

dutchie
04-10-2001, 04:14 PM
I Installed webalizer, but as before it won't work, so i moved it to apache.

I think cron.daily runs at another time.

I wish i knew where to look for a log file.

compsci
04-10-2001, 05:36 PM
If it happens at the same time every day, you might try logging in while it's happening and running top to see what's using a lot of CPU time.

Ron

dutchie
04-12-2001, 01:37 PM
1 minute load average: 99.37
5 minute load average: 122.23
15 minute load average: 91.66


I look up a log at /home/log/httpd

And i could find there a message saying;
server reached MaxClients setting, consider raising the MaxClients setting

What does that mean ?

dutchie
04-12-2001, 01:45 PM
and more, form the messages at the server:

N 15 MAILER-DAEMON@www.site Mon Apr 9 08:04 106/3498 "Returned mail: Local configuration error"
N 16 admin@www.site.com Mon Apr 9 10:00 21/703 "The CPU is heavily loaded"
N 17 admin@www.site.com Mon Apr 9 10:00 18/826 "the SMTP (mail) server is not responding"
N 18 root@www.site.com Tue Apr 10 04:03 58/1839 "Cron <root@www> run-parts /etc/cron.daily"
N 19 admin@www.site.com Tue Apr 10 09:30 21/691 "The CPU is heavily loaded"
N 20 root@www.site.com Wed Apr 11 04:12 20/740 "Cron <root@www> run-parts /etc/cron.daily"
N 21 root@www.site.com Thu Apr 12 04:08 19/672 "Cron <root@www> run-parts /etc/cron.daily"
N 22 admin@www.site.com Thu Apr 12 09:46 21/693 "The CPU is heavily loaded"

Obviously it is something at cron.daily but why is it running several times a day when it is at cron.daily ?

compsci
04-12-2001, 04:36 PM
The message about the SMTP server not responding that you got right after the email about the heavy load average might be a clue...

The next time this happens, log in and run top and see what process is using a lot of cpu time. When you're in top, hit 'p' to sort by cpu time. My guess is that sendmail is the offending process....

Ron

gertiebeth
04-28-2001, 04:34 PM
OK, I'm havinf this same problem. I ran top during a period where the CPU was healivly loaded and this was the result:

4:39pm up 15:44, 1 user, load average: 5.14, 5.61, 6.85
89 processes: 86 sleeping, 1 running, 2 zombie, 0 stopped
CPU states: 48.1% user, 12.1% system, 0.0% nice, 39.7% idle
Mem: 517368K av, 477412K used, 39956K free, 293820K shrd, 27444K buff
Swap: 131532K av, 4140K used, 127392K free 348516K cached

PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND
2959 root 4 0 920 920 680 R 0 2.3 0.1 0:04 top
3473 httpd 13 0 0 0 0 Z 0 1.1 0.0 0:00 rankem.cgi <
513 httpd 1 0 7996 6744 5388 S 0 0.3 1.3 0:20 httpd
1270 httpd 1 0 0 0 0 Z 0 0.3 0.0 0:00 httpd <defun
498 httpd 1 0 7788 6524 5276 S 0 0.1 1.2 0:23 httpd
506 httpd 5 0 7796 6548 5268 S 0 0.1 1.2 0:23 httpd
516 httpd 1 0 8000 6740 5384 S 0 0.1 1.3 0:22 httpd
524 httpd 11 0 7992 6728 5384 S 0 0.1 1.3 0:20 httpd
20254 httpd 1 0 7788 6524 5308 S 0 0.1 1.2 0:02 httpd
1 root 0 0 120 68 48 S 0 0.0 0.0 0:05 init
2 root 0 0 0 0 0 SW 0 0.0 0.0 0:00 kflushd
3 root 0 0 0 0 0 SW 0 0.0 0.0 0:02 kupdate
4 root 0 0 0 0 0 SW 0 0.0 0.0 0:00 kpiod
5 root 0 0 0 0 0 SW 0 0.0 0.0 0:00 kswapd
6 root -20 -20 0 0 0 SW< 0 0.0 0.0 0:00 mdrecoveryd
330 root 0 0 216 164 116 S 0 0.0 0.0 0:00 syslogd
339 root 0 0 368 0 0 SW 0 0.0 0.0 0:00 klogd


Can anyone put me on the right track as to what is wrong?

allan
04-30-2001, 12:01 AM
Originally posted by dutchie
1 minute load average: 99.37
5 minute load average: 122.23
15 minute load average: 91.66


Holy crushed server Batman :). That's really bad :D

QUOTE]
I look up a log at /home/log/httpd

And i could find there a message saying;
server reached MaxClients setting, consider raising the MaxClients setting

What does that mean ?
[/QUOTE]

Just what it says, there is a setting in the httpd.conf file that sets the maximum number of clients that can connect to your server simultaneously. Each of these clients can be downloading multiple things at once (as when you access a webpage), but the server will only allow 300 unique IP addresses at the same time.

You cna increase that number, but if your server is hosed, I would advise against that. How much RAM is in your RAQ? If you increase the RAM that might help a little bit, but probably not if you are having CPU problems.

allan
04-30-2001, 12:06 AM
Originally posted by gertiebeth

Can anyone put me on the right track as to what is wrong?

First thing, kill your Zombie processes (the ones with a Z in the top output).

There does not appear to be anything out of the ordinary in the output, the site may just being slammed. Is this a server serving a single site (ha! say that three time real fast :)) or multiple sites? If its multiple sites, you may want to get a second and move some of the servers off this RaQ to free up resources.
If it is one site that is just getting slammed you might be better off getting a second server and seeing if your ISP offers any sort of Load Balancing solution.

jeff
04-30-2001, 10:53 PM
what is load average mean?

mozd3v
04-30-2001, 11:12 PM
Load balancing is dividing the amount of work that a computer has to do between two or more computers so that more work gets done in the same amount of time and, in general, all users get served faster.

It can be implemented with hardware, software, or a combination of both. Typically, load balancing is the main reason for computer server clustering.

On the Internet, companies whose Web sites get a great deal of traffic usually use load balancing. For load balancing Web traffic, there are several approaches. For Web serving, one approach is to route each request in turn to a different server host address in a domain name system (DNS) table, round-robin fashion. Usually, if two servers are used to balance a work load, a third server is needed to determine which server to assign the work to. Since load balancing requires multiple servers, it is usually combined with failover and backup services. In some approaches, the servers are distributed over different geographic locations.

LoadBalancing.net includes a brief Load Balancing Primer which will give you more details.

Caio,

moz.

Chicken
05-01-2001, 12:31 AM
Originally posted by dutchie
1 minute load average: 99.37
5 minute load average: 122.23
15 minute load average: 91.66

-and I was getting worried about 7.5x on mine, whooooo.

mozd3v
05-01-2001, 01:02 AM
As per the numerous 'loads' I see listed in these forums - WHAT is normal? Is it based on a scale of 1 - 100, percentage wise?

Any feedback or link to a FaQ/MAN would be appreciated.

moz.

jnestor
05-01-2001, 12:10 PM
The load average is the number of processes wanting to run. There's no normal or max. It's not a percentage but an absolute number.

The load average itself doesn't tell the whole story. If you have 50 processes copying files you can have a load average of 50 and a cpu that's not highly utilized. Look at the % idle in top.

Personally I like to see my load average below 2. Anything above that probably mean I have a process spinning or I'm getting hammered by a wayward spider. If you're consistantly over 2 you need to look at ways to reduce the load or move to a faster machine and/or load balance across several machines.