You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Batara Kesuma <bk...@ml.gaijinweb.com> on 2004/07/07 07:52:46 UTC

[users@httpd] KeepAlive and server performance

Hi,
I use Apache Worker MPM to serve all images from site. My setting looks
like:
<IfModule worker.c>
StartServers         2
MaxClients         200
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>

The server-status at some random time looks like:
11 requests currently being processed, 64 idle workers
12 requests currently being processed, 63 idle workers
17 requests currently being processed, 58 idle workers

I read about KeepAlive, and it is said that setting KeepAlive On can
speed up the latency times for HTML with many images. I tried to set
KeepAlive On on my image server, but the result was much much slower.
My setting was like:
KeepAlive Off
KeepAliveTimeout 10
MaxKeepAliveRequests 50

The server-status was full of K (Keepalive Read) signs. Did I do
something wrong?

Thanks in advance,
Batara

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] KeepAlive and server performance

Posted by Joshua Slive <js...@gmail.com>.
On Wed, 7 Jul 2004 14:52:46 +0900, Batara Kesuma
<bk...@ml.gaijinweb.com> wrote:

> I read about KeepAlive, and it is said that setting KeepAlive On can
> speed up the latency times for HTML with many images. I tried to set
> KeepAlive On on my image server, but the result was much much slower.
> My setting was like:
> KeepAlive Off
> KeepAliveTimeout 10
> MaxKeepAliveRequests 50
> 
> The server-status was full of K (Keepalive Read) signs. Did I do
> something wrong?

Try a lower KeepAliveTimeout.  Keepalive can lead to better
performance, because clients don't need to be constantly setting up
and tearing down tcp connections.  But the tradeoff is that processes
can be tied up waiting for additional requests that never arrive.  You
can use KeepAliveTimeout to balance these two effects.

(An Apache developer is working on a patch where the "waiting" part
will be handled asynchronously by another thread.  This should give
the best of both worlds, but is not yet available.)

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org