Web Hosting Talk







View Full Version : Whats wrong with this Top?


raqman
12-19-2001, 07:57 AM
Please give the below top printout a gander.
My server is a raq 4i from rackshack with 512mb of ram. It's web server crawls during the evening for some unknown reason. During the day we fly, but at night, our ram is stuffed. We've been searching for a way to speed up the web serving, and would appreciate any ideas. We have tried top sorted by memory usage, and see a bunch of httpd processes. Are there any good ways to optimize our server? We need here to fly.

Thanks.


5:48am up 1:12, 1 user, load average: 0.37, 0.25, 0.36
335 processes: 334 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: 3.9% user, 18.0% system, 0.0% nice, 77.9% idle
Mem: 517188K av, 510040K used, 7148K free, 2442832K shrd, 38100K buff
Swap: 131532K av, 24K used, 131508K free 275652K cached

PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND
5142 root 11 0 1056 1056 680 R 0 11.4 0.2 0:13 top
4970 httpd 1 0 8796 8796 8492 S 0 0.6 1.7 0:00 httpd
2861 httpd 1 0 8188 8188 7868 S 0 0.5 1.5 0:00 httpd
2687 httpd 1 0 8236 8236 7912 S 0 0.5 1.5 0:00 httpd
4518 httpd 0 0 8600 8600 8304 S 0 0.5 1.6 0:00 httpd
5052 httpd 0 0 8188 8188 7892 S 0 0.5 1.5 0:00 httpd
2013 httpd 0 0 8792 8792 8448 S 0 0.3 1.6 0:00 httpd
2080 httpd 1 0 8592 8592 8264 S 0 0.3 1.6 0:00 httpd
3316 httpd 0 0 8184 8184 7884 S 0 0.3 1.5 0:00 httpd
3434 httpd 0 0 8532 8532 8216 S 0 0.3 1.6 0:00 httpd
4610 httpd 0 0 8124 8124 7828 S 0 0.3 1.5 0:00 httpd
4615 httpd 1 0 8640 8640 8348 S 0 0.3 1.6 0:00 httpd
4927 httpd 0 0 8192 8192 7904 S 0 0.3 1.5 0:00 httpd
5070 httpd 0 0 8632 8632 8340 S 0 0.3 1.6 0:00 httpd
5209 httpd 0 0 8180 8180 7888 S 0 0.3 1.5 0:00 httpd
5210 httpd 0 0 8228 8228 7952 S 0 0.3 1.5 0:00 httpd
2144 httpd 0 0 8164 8164 7804 S 0 0.1 1.5 0:00 httpd
2165 httpd 1 0 8192 8192 7892 S 0 0.1 1.5 0:00 httpd

ffeingol
12-19-2001, 08:16 AM
Is there a specific time at night that it slows down? The stats run daily at 4:00 am. That could be killing your box if you have very large logs to process.

Frank

allera
12-19-2001, 08:39 AM
Originally posted by raqman
335 processes: 334 sleeping, 1 running, 0 zombie, 0 stopped
Wow! What kind of site are you running that requires 335 processes to be running (on a Raq!)? What happens if you restart Apache during the slowdowns? Does your traffic hit the roof during these slowdowns or is the server not serving as much as during the day (when it is fast)?

microsol
12-19-2001, 09:40 AM
First try to tune apache. If you don't know how, a good start is http://thingy.kcilink.com/modperlguide/performance/Performance_Tuning_by_Tweaking_A.html
Second, if this doesn't help install IPCHAINS (you should install them anyway). Check this url for ipchains http://list.cobalt.com/pipermail/cobalt-security/2001-June/002630.html
Good luck :)

raqman
12-19-2001, 06:01 PM
I was unable to locate IPChains at the link you provided.
Wow! What kind of site are you running that requires 335 processes to be running (on a Raq!)? What happens if you restart Apache during the slowdowns? Does your traffic hit the roof during these slowdowns or is the server not serving as much as during the day (when it is fast)?
We are running a free web host, during the day we see less than 200 apache processes. We're not sure if it's our traffic doing it.

-Sterling

microsol
12-19-2001, 09:52 PM
Originally posted by raqman
I was unable to locate IPChains at the link you provided.


In the new window which opens delete the dot behind the .html and it will work, but i'll fix this right now.

microsol
12-19-2001, 09:55 PM
Originally posted by raqman
We are running a free web host, during the day we see less than 200 apache processes. We're not sure if it's our traffic doing it.

-Sterling

Again, i highly recommend playing around with MaxRequestsPerChild, StartServers, MinSpareServers, MaxSpareServers.

raqman
12-20-2001, 01:06 AM
Any suggested settings for us to try out?

skylab
12-20-2001, 10:11 AM
there are many good posts about tweaking around here and at rackshack, search around a little and you'll find some good advice.

http://thingy.kcilink.com/modperlguide/performance/Performance_Tuning_by_Tweaking_A.html

is a neat little apache tweak page, but for mod_perl, but still, you'll learn a little from it.