I run a site as a service for the statewide high school swimming community. I do this for love of the sport, so I can't spend a ridiculous sum on hosting, etc. Nor do I need to - except for one day a year.
The coaches all submit their regional entries through my site, and in typical fashion all wait until the due date to do it. That was yesterday, and my site which never fell over all season ground to an unresponsive halt at least 4 times throughout the day. It was never gone for more than an hour, and it always came back. (I issued apache restarts just to be sure).
My question is: how can I tune Apache to handle a one day surge of users? It makes no sense to pay for more hardware for an entire year when I only need to caox one day of increased performance. I've tried reading about prefork.c and worker.c but I just don't understand it well enough. Here's my current config:
<IfModule prefork.c>
StartServers 1
MinSpareServers 1
MaxSpareServers 5
ServerLimit 10
MaxClients 10
MaxRequestsPerChild 4000
</IfModule>
<IfModule worker.c>
StartServers 1
MaxClients 10
MinSpareThreads 1
MaxSpareThreads 4
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
The most users I would ever expect at once would be 400. Likely much less than that though. I only had about 70 yesterday and it didn't perform very well. Any suggestions?
UPDATE:
728 root 20 0 317m 20m 7752 S 0.0 2.7 0:49.58 httpd
19700 webuser 20 0 489m 37m 6792 S 0.0 4.9 0:00.72 httpd
19737 webuser 20 0 493m 42m 6624 S 0.0 5.5 0:00.59 httpd
19756 webuser 20 0 494m 43m 6604 S 0.0 5.7 0:00.58 httpd
19758 webuser 20 0 495m 44m 6780 S 0.0 5.8 0:00.97 httpd
19777 webuser 20 0 493m 42m 6620 S 0.0 5.5 0:01.08 httpd
Took a look at the resources, and I'm not sure what I'm looking at. The process owned by root should be the one that runs Apache. Are those owned by webuser spawned by Apache itself? Why are they so big? Server has about 3/4G RAM, if I figure 1/2 for Apache, and processes are holding 40M, how can i estimate the number of simultaneous users possible?