On 01/12/2016 04:21 PM, Rose, John B wrote: > So for example using the default "event" mpm values > (http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/extra/httpd-mp > m.conf.in) below in Apache then PHP-FPM would be the same ... > > StartServers 3 -> pm.start_servers = 3 > MinSpareThreads 75 -> pm.min_spare_servers = 75 > MaxSpareThreads 250 -> pm.max_spare_servers = 250 > MaxRequestWorkers 400 -> pm.max_requests = 400 > > I am not seeing any PHP-FPM equiv settings for ... > > ThreadsPerChild 25 > > MaxConnectionsPerChild 0 > > > > Correct? > Seems reasonable. What was it set to before? > > On 1/12/16 3:41 PM, "Rich Bowen" <rbowen@xxxxxxxxxxx> wrote: > >> >> >> On 01/12/2016 02:26 PM, Rose, John B wrote: >>> Is there a guide to properly matching your apache and PHP-FPM configs? >>> >>> Looking here Š >>> >>> https://wiki.apache.org/httpd/PHP-FPM >>> >>> >> I am not seeing that information >>> >> >> php-fpm is documented in the PHP docs at >> http://php.net/manual/en/install.fpm.php I'm far from an expert on it, >> but the rule would be that if you're proxing from A to B, then B needs >> to be able to handle as much traffic as A is forwarding to it. So I'd >> expect that what you want is at least as many servers/workers/threads on >> the php-fpm end as you are likely to proxy from the httpd end. >> >> --Rich >> >>> On 1/12/16 2:03 PM, "Rich Bowen" <rbowen@xxxxxxxxxxx> wrote: >>> >>>> >>>> >>>> On 01/12/2016 01:58 PM, Rose, John B wrote: >>>>> Can you elaborate on this a bit? >>>>> >>>>> "..the server pool is smaller than Apache's server pool, causing >>>>> too much thrashing. (See the pm.min_spare_servers and so on)" >>>> >>>> >>>> Sure. The way that php-fpm works is that there's a php-fpm daemon, and >>>> requests for whatever.php are proxypass'ed over to it. So there must be >>>> at least as many threads over on the php-fpm side as you have active >>>> over on the httpd side, or there will be thrash in creating those >>>> threads when the time comes. >>>> >>>> So basically you need to line up the php-fpm config with your httpd >>>> config, or at least have more threads on the fpm side. >>>> >>>> pm.min_spare_servers (and max_spare and start_servers) are php-fpm >>>> configurations, which you'll find somewhere in /etc/php-fpm.d or >>>> whatever your particular distro calls it. >>>> >>>> >>>>> >>>>> >>>>> >>>>> On 1/12/16 12:20 PM, "Rich Bowen" <rbowen@xxxxxxxxxxx> wrote: >>>>> >>>>>> >>>>>> >>>>>> On 01/11/2016 04:51 PM, Rose, John B wrote: >>>>>>> After switching to mod_php from php-fpm we are told the site is >>>>>>> working >>>>>>> 4x faster using mod_php instead of php-fpm. >>>>>>> >>>>>>> Any explanation? >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> The cynic in me things that this is a case of old dogs being >>>>>> unwilling >>>>>> to learn new tricks. >>>>>> >>>>>> Other things that come to mind is that fpm is grossly misconfigured - >>>>>> perhaps they allocated insufficient memory to it? Or are running it >>>>>> on >>>>>> another machine that has a faulty network connection between them? Or >>>>>> possibly the server pool is smaller than Apache's server pool, >>>>>> causing >>>>>> too much thrashing. (See the pm.min_spare_servers and so on) >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>> Thanks >>>>>>> >>>>>>> From: William A Rowe Jr <wrowe@xxxxxxxxxxxxx >>>>>>> <mailto:wrowe@xxxxxxxxxxxxx>> >>>>>>> Reply-To: "users@xxxxxxxxxxxxxxxx <mailto:users@xxxxxxxxxxxxxxxx>" >>>>>>> <users@xxxxxxxxxxxxxxxx <mailto:users@xxxxxxxxxxxxxxxx>> >>>>>>> Date: Saturday, January 9, 2016 1:58 PM >>>>>>> To: "users@xxxxxxxxxxxxxxxx <mailto:users@xxxxxxxxxxxxxxxx>" >>>>>>> <users@xxxxxxxxxxxxxxxx <mailto:users@xxxxxxxxxxxxxxxx>> >>>>>>> Subject: Re: Circumstances when mod_php would run >>>>>>> faster >>>>>>> than PHP-FPM? >>>>>>> >>>>>>> Mod_proxy_fcgi + php-fpm or mod_fcgid with php fcgi sapi should both >>>>>>> be >>>>>>> equivalent when tuned correctly. >>>>>>> >>>>>>> Your only option for running php in process efficiently is to use >>>>>>> the >>>>>>> non-threadsafe php in the httpd preform module. Your only option >>>>>>> for >>>>>>> running httpd efficiently is the event, or at least the worker mpm. >>>>>>> >>>>>>> Since usually only a subset of the http requests are to a php >>>>>>> resource, >>>>>>> the answer is almost always 'no'. >>>>>>> >>>>>>> On Jan 8, 2016 16:48, "Rose, John B" <jbrose@xxxxxxx >>>>>>> <mailto:jbrose@xxxxxxx>> wrote: >>>>>>> >>>>>>> Apache 2.4 >>>>>>> >>>>>>> On the same system, same web site, are there circumstances when >>>>>>> Apache using mod_php would run faster than Apache using PHP-FPM? >>>>>>> >>>>>>> Thanks >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Rich Bowen - rbowen@xxxxxxxxxxx - @rbowen >>>>>> http://apachecon.com/ - @apachecon >>>>>> >>>>>> --------------------------------------------------------------------- >>>>>> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx >>>>>> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx >>>>>> >>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx >>>>> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx >>>>> >>>> >>>> >>>> -- >>>> Rich Bowen - rbowen@xxxxxxxxxxx - @rbowen >>>> http://apachecon.com/ - @apachecon >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx >>>> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx >>>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx >>> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx >>> >> >> >> -- >> Rich Bowen - rbowen@xxxxxxxxxxx - @rbowen >> http://apachecon.com/ - @apachecon >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx >> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx > -- Rich Bowen - rbowen@xxxxxxxxxxx - @rbowen http://apachecon.com/ - @apachecon --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx