Mailing List Archive

CentOS 8 / Apache 2.4.37 / Optimzing
Dear Users,

So I have a fresh installation of CentOS 8 running Apache 2.4.37, and PHP
running with PHP-FPM. I notice that out of the box it comes configured
running with MPM: event as the default. I know in CentOS 7 All the
instances were configured with prefork. I have Googled for what information
I can try to find out about if I have a rather High Volume Wordpress/PHP
website that I need to host what I should do to optimize the configuration?

Should I continue to stay with Event? Do I need to raise any default
settings either for the mpm_event module, or even with php-fpm? I would
like to optimize for Speed and also to take load off the web server as much
as possible.

Any suggestions?

Thanks a lot.

Devin Acosta
Re: CentOS 8 / Apache 2.4.37 / Optimzing [ In reply to ]
Hello,

Prefork was just needed if you are loading a module which is not
thread safe, so do not use it if you are proxying to php-fpm.

mpm_event is probably the best MPM you can use, it is optimized for
threading and quoting the docs it has "dedicated listener thread for
each process to handle both the Listening sockets, all sockets that
are in a Keep Alive state, sockets where the handler and protocol
filters have done their work and the ones where the only remaining
thing to do is send the data to the client", so the idea is to have a
small number of children (processes) and a big number of threads
(workers which depend on the children processes).

So, to give you an idea, if you have 4 processors in your CPU and you
expect a max load of 300 concurrent users with some cushion, you
could, for example, have 4 children with 100 workers each.

Example:
StartServers 1
ServerLimit 4
MinSpareThreads 100
MaxSpareThreads 250
ThreadsPerChild 100
ThreadLimit 100
MaxRequestWorkers 400
MaxConnectionsPerChild 10000000

El vie., 2 oct. 2020 a las 17:08, Devin Acosta
(<linuxguru.co@gmail.com>) escribió:
>
>
> Dear Users,
>
> So I have a fresh installation of CentOS 8 running Apache 2.4.37, and PHP running with PHP-FPM. I notice that out of the box it comes configured running with MPM: event as the default. I know in CentOS 7 All the instances were configured with prefork. I have Googled for what information I can try to find out about if I have a rather High Volume Wordpress/PHP website that I need to host what I should do to optimize the configuration?
>
> Should I continue to stay with Event? Do I need to raise any default settings either for the mpm_event module, or even with php-fpm? I would like to optimize for Speed and also to take load off the web server as much as possible.
>
> Any suggestions?
>
> Thanks a lot.
>
> Devin Acosta



--
Daniel

--
Daniel Ferradal
HTTPD Project
#httpd help at Freenode

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org