> > Thanks for the input. You are right that the values of the parameters
> > do not make sense. The correct values are:
> > StartServers 100
> > ServerLimit 100
> > MaxClients 6400
> > MinSpareThreads 10
> > MaxSpareThreads 100
> > ThreadsPerChild 64
> > MaxRequestsPerChild 0
> > However the problem is not so much with the configuration of the
> > worker threads but the performance in general. Apache 2 performance
> > is still a long way from Apache 1. Note that with the above
> > configuration the machine has around 70MBytes free memory, and CPU
> > utilisation is low (20-30 %). I get the feeling that I am missing
> > something.
> I am not an expert in high-performance web serving, but I can make a
> couple comments:
> 1. If apache 1.3 can handle around 1024 clients in your setup, expecting
> apache 2 to handle 6400 seems unreasonable. Just the context switching
> alone could be deadly. Try bringing that back down to the 1024 range
> and then increasing it slowly.
> 2. Unless this server is instantly hit with 6400 clients the moment it
> starts, you are asking for a ton of thrashing at start-up. The
> server starts 6400 threads, and then must kill them all until only
> 100 are free. I'd suggest setting StartServers much lower and
> MaxSpareThreads much higher.
> 3. To figure out what is really going wrong, you may need to do
> substantially more analysis. Just saying "performance is 35-50% lower"
> is practically meaningless. Are you talking about hits/second? With
> the same number of simultaneous clients? What kind of load? What
> kind of content? What kind of network? What does your server-status
> display look like? etc...
Thanks again for your input. In response to your comments I have the
following to contribute.
The network consists of 4 identical machines that are being used to
host a live sports site, the site provides information about current
games in progress. The machines only serve up the same static html.
All machines are behind a load balancer. All machines have been TCP
tuned in the same way.
1. Setting Apache 2 to handle 6400 clients was based on the same logic
as for sizing Apache 1. Increase MaxClients until almost all of the
physical memory is used up. We want to be able to handle as many
clients as possible.
2. The machine only serves up information when live games are on. And
when games are on the load is large, so we start at the maximum.
3. Saying that the load is 35-50% lower is not really meaningless, as
the machine is being load balanced with 3 other identical machines.
The figures are based on log file analysis on the 4 machines. And the
machine running Apache 2 services 35-50% fewer clients than the Apache
1 machines. The content being served is identical on all 4 machines.
Memory and CPU usage on the Apache 2 machine do not appear to be an
issue (using 'top' and 'vmstat'). Logic, says that if the machine
(Apache 2) is not swapping and there is spare CPU around then it
should be able to service more clients. This does not appear to be
the case. It appears to me that I am missing something?
I hope this is clear enough?