Re: apache 2.4 with MPM Event recommend config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 26, 2013 at 3:41 PM, Mike Franon <kongfranon@xxxxxxxxx> wrote:
> Hi,
>
> I recently moved to apache 2.4.4 with php-fpm, mod_fastcgi, and MPM Event.
>
> I was curious what values do I need to change to optimize apache?
>
> I remember in 2.4 prefork I had to change several like MaxClients and
> MaxRequestsPerChild
>
>
>
> The server I am running it on has 30 GB Ram, and 8 Cores
>
>
> I know usually the defaults are not great out of the box and curious if you
> have any recommendations to get the best performance possible for apache 2.4
>
> Thanks
>
>

What are your average and max concurrent requests per second that you
want to achieve? Simply tune to that - you will find apache with event
MPM (and without language interpreters embedded in httpd, eg using
php-fcgi) does not use much memory or CPU at all.

Eg, for our moderately loaded proxies, which use apache 2.2 with event
MPM, we have average of around 50 RPS (per proxy, there are a few of
them), with peaks of around 500 RPS. We configure the server:

    StartServers 8
    MaxClients 1024
    MinSpareThreads 128
    MaxSpareThreads 768
    ThreadsPerChild 64
    MaxRequestsPerChild 0

So we start 8 servers, each with 64 threads, giving us 512 request
slots immediately. Whenever there are less than 128 spare slots, we
start an extra server, up to a maximum of 1024 slots (16 servers), and
we reap a server whenever there are more than 768 spare slots. We also
trust that Apache without interpreters does not leak RAM, so don't
bother reaping servers after a certain number of handled requests.

Our normal and peak usage fits in to the slots started initially, with
scope to grow if needed. These servers only serve static files off
disk, or proxy requests to backend servers. Memory usage and load
remain steady on each proxy, apache uses less than 1 GB of RAM, load
average has never been above 1.

Hope that helps

Cheers

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux