[Info-vax] Apache + mod_php performance
Arne Vajhøj
arne at vajhoej.dk
Sat Sep 28 20:55:37 EDT 2024
On 9/28/2024 8:50 PM, Arne Vajhøj wrote:
> With KeepAlive On then we have a performance problem.
>
> The cause is that worker processes are unavailable while
> waiting for next request from client even though client is
> long gone.
>
> That indicates that the cap is:
>
> max throughput (req/sec) = MaxClients / KeepAliveTimeout
>
> The formula holds for low resulting throughput but it does
> not scale and seems to be more like 1/3 of that for higher
> resulting throughput.
>
> But if one wants keep alive enabled, then it is something one
> can work with.
>
> My experiments indicate that:
>
> KeepAlive On
> KeepAliveTimeout 15 -> 1
> MaxSpareServers 50 -> 300
> MaxClients 150 -> 300
>
> is almost acceptable.
>
> nop.txt : 100 req/sec
MaxSpareServers increase is necessary to improve numbers. It seems
like without that then Apache spend too much time killings childs
when not needed and starting them when needed (and process creation
is expensive on VMS).
Downside is obviously that all those processes are kept even
if load is small for a long time.
Arne
More information about the Info-vax
mailing list