Web Hosting Talk







View Full Version : how to "trace" high load?


Lem0nHead
04-15-2004, 04:49 PM
my server is up for 11 days now and the load wasn't a problem for all this time (below 1.0 except on doing backups, or while i was compiling something)

now it jumped to 3.0~5.0 average

i'm scheduling a reboot this night to see if something get solved, but i'd like to know how can i trace what's making it get high

root@server01 [/]# free
total used free shared buffers cached
Mem: 1027996 997816 30180 0 137228 561608
-/+ buffers/cache: 298980 729016
Swap: 2040212 99780 1940432

root@server01 [/]# w
17:47:14 up 11 days, 23:37, 1 user, load average: 4.47, 3.59, 3.76

I don't have an idea on how to interpret those points/K/W, but I guess that's the problem:
Current Time: Thursday, 15-Apr-2004 17:46:58 BRT
Restart Time: Thursday, 15-Apr-2004 14:53:46 BRT
Parent Server Generation: 17
Server uptime: 2 hours 53 minutes 12 seconds
Total accesses: 148109 - Total Traffic: 1.1 GB
CPU Usage: u14.26 s2.4 cu.31 cs.15 - .165% CPU load
14.3 requests/sec - 106.0 kB/second - 7.4 kB/request
35 requests currently being processed, 12 idle servers
KKWK_K__WWK__KK_W_KWKKKG_K_KKWWKWK_KKKWW_K_KRW...............W..
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................

there's probably some site sending too much requests?
if so, any ideas on how to find out which one?

thanks in advance

Lem0nHead
04-15-2004, 04:51 PM
BTW,

httpd.conf
KeepAlive On
MaxKeepAliveRequests 1000
KeepAliveTimeout 5
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 250

but i don't a tweak is necessary in here, since the server runned ok for the last 10 days
so that's probably a "temporary" situation (some site receiving many visits)

ozzy_cow
04-15-2004, 06:28 PM
theres this really cool program that comes with almost all distro's - its called 'top'

run top from the console then pres P (shift+p) to sort by cpu usage

q to quit, h for help :-)

Lem0nHead
04-15-2004, 07:17 PM
Originally posted by ozzy_cow
theres this really cool program that comes with almost all distro's - its called 'top'

run top from the console then pres P (shift+p) to sort by cpu usage

q to quit, h for help :-)

yes, i know...

but 'top' shows "httpd" (nobody) and that doesn't give me any information about which site/account/user is generating this load/use

senseidru
04-15-2004, 08:06 PM
if you have cpanel you can see the users using the most resources on the machine

Bashar
04-16-2004, 12:34 AM
Originally posted by Lem0nHead
my server is up for 11 days now and the load wasn't a problem for all this time (below 1.0 except on doing backups, or while i was compiling something)

now it jumped to 3.0~5.0 average

i'm scheduling a reboot this night to see if something get solved, but i'd like to know how can i trace what's making it get high





I don't have an idea on how to interpret those points/K/W, but I guess that's the problem:


there's probably some site sending too much requests?
if so, any ideas on how to find out which one?

thanks in advance

if this is cpanel try https://ur.server.xxx:2087/scripts2/apachestatus it will show the sites and repeated requests etc..

Lem0nHead
04-16-2004, 08:56 AM
thanks

it seens the server was needing a reboot :mad:

load is back to normal now after the reboot

ozzy_cow
04-16-2004, 12:55 PM
i know that there is a way to check what apache process is doing what, what script is it running and to who is it serving etc. i cant find it anywhere in the docs though...