
|
View Full Version : Apache Help Please
ReliableServers 01-02-2002, 09:02 PM I have a server p3 1Ghz 1gb ram for a customer. Its running 1000Apache daemons with keepalive on and timeout set to 5 seconds. Apache is using 75-90% of the cpu, 800MB ram, and load average of 5.00-10.00. The server is pushing 14-20Mbit. We are going to offload some of the traffic. But is this normal for apache, any tweaks that can shrink that cpu usage?
Forgot to add this is running Freebsd 4.4.
Thankyou.
Recompile it with only modules that you require. I heard that helps.
ReliableServers 01-02-2002, 09:31 PM Its been compiled with dso modules so I took everything out I didnt need. But I think its the shear volume that is using the cpu up?
Thanks
Planet Z 01-03-2002, 12:27 AM Are you using SCSI drives on that machine?
ReliableServers 01-03-2002, 04:33 AM Yes scsiUltra160 10k drive in the server. I am guessing it is the .htaccess files on the server. There are about 200 domains and .htaccess is checked each time, thats all I can think of. Other than apache is a cpu hog.
Thanks
cperciva 01-03-2002, 04:57 AM 15-20Mbps is a reasonable load for that sort of machine to handle. I'd try cutting the keepalive down to 3 seconds; that will free up some memory which will help vis-a-vis caching.
But if you're pushing terabytes/month I think you can afford a second server. ;)
ReliableServers 01-03-2002, 03:14 PM Originally posted by cperciva
15-20Mbps is a reasonable load for that sort of machine to handle. I'd try cutting the keepalive down to 3 seconds; that will free up some memory which will help vis-a-vis caching.
But if you're pushing terabytes/month I think you can afford a second server. ;)
Ok I will try cutting it down to 3 seconds. And yes the second server will be in next week for this client.
Thanks for the help =)
ckpeter 01-03-2002, 06:08 PM You might also consider change the web server.
Zeus is a commercial one that has very good performence.
Tux, the linux kernel web server, may also be useful if you plug apache as the frontend.
Peter
Synergy 01-04-2002, 12:39 AM Originally posted by ckpeter
You might also consider change the web server.
Zeus is a commercial one that has very good performence.
Tux, the linux kernel web server, may also be useful if you plug apache as the frontend.
Peter
According to my PC MAG magazine,
Apache is better than Zeus :D
ckpeter 01-04-2002, 01:24 AM Originally posted by Synergy
According to my PC MAG magazine,
Apache is better than Zeus :D
Are you sure? I have read many comparsions between Zeus and apache and zeus always(if not mostly) come out first. For the very least I remember the one by eweek.
May be yours' is apache 2.0, or some special brenchmark.
Peter
Synergy 01-04-2002, 01:49 AM I think it was 2.0 because the mag was a few months back and i recycled it.......
Tim Greer 01-04-2002, 03:31 AM Originally posted by Dilhole
I have a server p3 1Ghz 1gb ram for a customer. Its running 1000Apache daemons with keepalive on and timeout set to 5 seconds. Apache is using 75-90% of the cpu, 800MB ram, and load average of 5.00-10.00. The server is pushing 14-20Mbit. We are going to offload some of the traffic. But is this normal for apache, any tweaks that can shrink that cpu usage?
Forgot to add this is running Freebsd 4.4.
Thankyou.
How many hits are you getting per hour/minute, and on what domain? Rather, what domain is generating so much traffic? You don't have the min servers set to 1,000, do you? That's a huge amount of connections and there's either a very high trafic site on your server, or it's your configuration, or there's some rouge script on someone's site that's going nuts. When you said it's running 1,000 Apache deamons, did you mean deamons or "processes"? Or, do you just mean that you have your max connections set to that? Are there literally 1,000 Apache processes running? If so, what do they show as how long they've been running? Or, do you just mean that Apache doesn't have 1,000 processes, but is consuming a lot of resources? If so, how did you determine this? Are you sure that there's not just one or a few processes that are the cause of the great resource consumption? I mean, is this just simply a site on your server that is so large, it's pushing out 1,000 Apache processes at the time?
bobcares 01-04-2002, 04:59 AM Hi!
My feeling is that you have overloaded your server. I would give a simple suggestion. Have more servers don't jam all your clients on one server. It can be a killer. I have seen some servers with 900+ domains which become unreliable....
Also try reducing the number for max servers, start servers, time outs (already discussed)... this may help.... :)
Have a great day :)
regards
amar
I would tend to agree here, its either badly overloaded with sites or you have a rogue script on your hands. Checking ps and top should show you exactly whats taking up the load. If its "http" calls then you could activate server-status for a minute to see what site and path is being called exactly. I recommend you use some alloe,deny directives with server-status to give only yourself access and that you disable it when you no longer need it. Using these tools you should be able to pinpoint the problem.
bitserve 01-04-2002, 02:17 PM 1000 httpds and their children running? Could very well be out of memory, and everything is being swapped. Could slow the server down quite a bit.
ReliableServers 01-04-2002, 04:40 PM This is not my server, it is one of my clients, yes it is definitly overloaded but has not had any problems serving up the pages requested. I have Timeouts set to 15 seconds and keepalive timeouts set to 5 seconds. There are about 100 domains hosted on this server. And when I say 1000 apahce processes being used thats what I mean with total box process at 1020, the Maxlimit is set to 1200 and this has been reached during peaks of 22Mbit. They are open using cpu/ram. Most have a run time of a few seconds, althou others have 1min-7min which Im guessing are downloads of files or persistant requests from users. I have come to conclude that the content the site is loading movies/files/.htaccess requests is the cause and it depends on the site getting the traffic. Anyways thanks for the info, everything I have seen this is normal.
Thankyou
mrjaytee 01-05-2002, 06:26 AM You also might want to try running a lighter daemon like thttpd, something with a smaller footprint for your content that is static. thttpd even does cgi's and PHP if you need it to (i'm pretty sure).
would help you serve things faster IMO
ClusterMania 01-06-2002, 03:10 AM Accelerating Apache Project
http://aap.sourceforge.net/
This might be useful, if you try it PM me and tell me how it works for you =)
|