Re: Very High Load, kernel 2.4.18, apache/mysql

Marco Colombo (marco@esi.it)
Thu, 26 Sep 2002 22:02:41 +0200 (CEST)


On Thu, 26 Sep 2002, Rik van Riel wrote:

> On Thu, 26 Sep 2002, Marco Colombo wrote:
> > On Thu, 26 Sep 2002, Ernst Herzberg wrote:
> >
> > > MaxClients 256 # absolute minimum, maybe you have to recompile apache
> > > MinSpareServers 100 # better 150 to 200
> > > MaxSpareServers 200 # bring it near MaxClients
> >
> > KeepAlive On
> > MaxKeepAliveRequests 1000
>
> That sounds like an extraordinarily bad idea. You really
> don't want to have ALL your apache daemons tied up with
> keepalive requests.

[this is sliding OT]

# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to -1 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

(what "high" means is the question here, I believe)

> Personally I never have MaxKeepAliveRequests set to more
> than 2/3 of MaxClient.

There's a timeout (15 sec, by default), which kicks idle clients away.

I guess it depends on the kind of load. If you're serving just static pages,
I agree. If you're serving dynamic pages via SQL queries (expecially with
authenticated connection), "session" setup cost may dominate.

Anyway, it's the "extraordinarily bad" part that I don't get.

Say we set MaxKeepAliveRequests to 190 (~2/3 of 256) instead of 1000.

How many requests does a client perform before it hits the 15 sec idle
timer? Is it 189? The apache process is stuck in the timeout phase
anyway. Is it 191? Then the first apache process drops the keepalive
connection, the client reconnects to a second server process, which
is stuck again in the timeout phase. Or am I missing something?

>
> Rik
>

.TM.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/