Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 13A2D18F56 for ; Tue, 12 Jan 2016 19:27:26 +0000 (UTC) Received: (qmail 78425 invoked by uid 500); 12 Jan 2016 19:27:23 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 78386 invoked by uid 500); 12 Jan 2016 19:27:23 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 78376 invoked by uid 99); 12 Jan 2016 19:27:23 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jan 2016 19:27:23 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 2C5F01805E8 for ; Tue, 12 Jan 2016 19:27:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.801 X-Spam-Level: * X-Spam-Status: No, score=1.801 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id gpG5f7O52rbK for ; Tue, 12 Jan 2016 19:27:10 +0000 (UTC) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0112.outbound.protection.outlook.com [207.46.100.112]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 9F20F31AC9 for ; Tue, 12 Jan 2016 19:27:09 +0000 (UTC) Received: from BY1PR02MB1274.namprd02.prod.outlook.com (10.162.109.16) by BY1PR02MB1258.namprd02.prod.outlook.com (10.162.109.12) with Microsoft SMTP Server (TLS) id 15.1.361.13; Tue, 12 Jan 2016 19:27:01 +0000 Received: from BY1PR02MB1273.namprd02.prod.outlook.com (10.162.109.15) by BY1PR02MB1274.namprd02.prod.outlook.com (10.162.109.16) with Microsoft SMTP Server (TLS) id 15.1.361.13; Tue, 12 Jan 2016 19:27:00 +0000 Received: from BY1PR02MB1273.namprd02.prod.outlook.com ([10.162.109.15]) by BY1PR02MB1273.namprd02.prod.outlook.com ([10.162.109.15]) with mapi id 15.01.0361.006; Tue, 12 Jan 2016 19:27:00 +0000 From: "Rose, John B" To: "users@httpd.apache.org" Thread-Topic: [users@httpd] Circumstances when mod_php would run faster than PHP-FPM? Thread-Index: AQHRSw/P9yr68nD01E6WyLlIfztDGJ74JQ6AgAAczQX//7KbAA== Date: Tue, 12 Jan 2016 19:26:59 +0000 Message-ID: References: <569535E0.8050206@rcbowen.com> <56954E07.2040806@rcbowen.com> In-Reply-To: <56954E07.2040806@rcbowen.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.5.9.151119 authentication-results: spf=none (sender IP is ) smtp.mailfrom=jbrose@utk.edu; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [160.36.80.190] x-microsoft-exchange-diagnostics: 1;BY1PR02MB1274;5:wD64RrY2qkDwH5oNarw743TND6dTopC83RUtpsCFOlgiNPC9Um67V7WjUR6GnLPKaEfI9fACfZhPNuPIF3JBdP4/Vhg5f30U/r0aXG0mdr13tF/ZLcz2pwtLsi+Mr6mc4tyVPoLaevchOmsoENTCOA==;24:maC5OeYmoISMiIsKAaGIiqPYRvcL6Ebe9sTIIhU276tIFxT0iuYNV8w16/f+7wLyf2O/KXPS6+nbWEZcqKPDXL0C5oLdTpTuRqCPJd2/2Sg= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(42134001)(42139001);SRVR:BY1PR02MB1274; x-ms-office365-filtering-correlation-id: f17b4b49-998c-49d9-ce63-08d31b8657bd x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(106206368328234); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(10201501046)(3002001);SRVR:BY1PR02MB1274;BCL:0;PCL:0;RULEID:;SRVR:BY1PR02MB1274; x-forefront-prvs: 081904387B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(377454003)(189002)(24454002)(479174004)(252514010)(199003)(102836003)(1096002)(89122001)(2501003)(15395725005)(3846002)(2950100001)(5001960100002)(189998001)(54356999)(97736004)(2906002)(16799955002)(76176999)(110136002)(107886002)(81156007)(15975445007)(99286002)(86362001)(66066001)(1220700001)(50986999)(88552001)(2351001)(10400500002)(19580405001)(106356001)(11100500001)(5008740100001)(92566002)(77096005)(6116002)(4001350100001)(36756003)(19580395003)(2900100001)(93886004)(75432002)(586003)(90282001)(40100003)(105586002)(106116001)(87936001)(83506001)(5002640100001)(5004730100002)(101416001)(450100001)(122556002)(24704002)(220923002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR02MB1274;H:BY1PR02MB1273.namprd02.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: utk.edu does not designate permitted sender hosts) spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="Windows-1252" Content-ID: <086F5349032E6240B4736E27E3CD202A@namprd02.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jan 2016 19:26:59.9902 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 515813d9-717d-45dd-9eca-9aa19c09d6f9 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR02MB1274 X-Microsoft-Exchange-Diagnostics: 1;BY1PR02MB1258;2:CGSA0LWYH1k9jx+MqZL/zqXNuPbwfcftPFukdLa/YPDKkvF/GG/msPLFWEi8GzTxLXVd2gOKw6UmuwDgP7WedO2J1hFzNXRIZVyb5ce65+mBQsWxb471O4Ib2ICCFZJUuzHQRZiwA2mPXEEpcf6bvA==;23:wrSkk0lZ+QIEJPZCy5rWqJ0MurL2/B+EmDb6xsvKlByODeFxlD4rgBDVIFQCorRuvTO6saxZewi16h4EmUlgrPztatpN1JpKuJwo8N7FV+VplXyg+Sonv3CwB2eHdYKQUjuk5AEWB2h/h+QHRANqKxnFwSKC1PYYY55cz4kUld1WujIzhfbE37K35knH+Ase X-OriginatorOrg: utk.edu Subject: Re: [users@httpd] Circumstances when mod_php would run faster than PHP-FPM? Is there a guide to properly matching your apache and PHP-FPM configs? Looking here =8A https://wiki.apache.org/httpd/PHP-FPM I am not seeing that information On 1/12/16 2:03 PM, "Rich Bowen" wrote: > > >On 01/12/2016 01:58 PM, Rose, John B wrote: >> Can you elaborate on this a bit? >>=20 >> "..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. > > >>=20 >>=20 >>=20 >> On 1/12/16 12:20 PM, "Rich Bowen" wrote: >>=20 >>> >>> >>> 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 >>> > >>>> Reply-To: "users@httpd.apache.org " >>>> > >>>> Date: Saturday, January 9, 2016 1:58 PM >>>> To: "users@httpd.apache.org " >>>> > >>>> Subject: Re: [users@httpd] 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" >>> > 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 >>>> >>> >>> >>> --=20 >>> Rich Bowen - rbowen@rcbowen.com - @rbowen >>> http://apachecon.com/ - @apachecon >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org >>> For additional commands, e-mail: users-help@httpd.apache.org >>> >>=20 >>=20 >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org >> For additional commands, e-mail: users-help@httpd.apache.org >>=20 > > >--=20 >Rich Bowen - rbowen@rcbowen.com - @rbowen >http://apachecon.com/ - @apachecon > >--------------------------------------------------------------------- >To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org >For additional commands, e-mail: users-help@httpd.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org