Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74070 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22227 invoked from network); 8 May 2014 21:24:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 May 2014 21:24:53 -0000 Authentication-Results: pb1.pair.com header.from=zeev@zend.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=zeev@zend.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zend.com from 209.85.128.177 cause and error) X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 209.85.128.177 mail-ve0-f177.google.com Received: from [209.85.128.177] ([209.85.128.177:54718] helo=mail-ve0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 17/66-15882-426FB635 for ; Thu, 08 May 2014 17:24:53 -0400 Received: by mail-ve0-f177.google.com with SMTP id db11so4025001veb.22 for ; Thu, 08 May 2014 14:24:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:cc:content-type; bh=7hVVvHEKS2LpiGP4Pjarlg3tC2aeHAdmirQ/e0UoMFE=; b=IaRHWsZZVzmWQ8sHVYMNZ5c26AayDws7TaSwqOjPfh5HgjU/C6tPILnlEy06Ukqg9i CVV+hRUBofYnvvBTgUYqTshqVdT5zGXnqlTOvBlziNIAcRM2UOnSsaPsPmNL8fnfga0l AzGF2OD44y09kMmZOHsRyuVjIkH2uE9IKsaF1HyssFqwfN9ZbXzjG7FGT8smXp+XY2YA UmPaXW45IXNxVMk6hpiTCakWIXd+rbSrj2F0SvMzRzspMvotJS+5jNACkEfgTBPV88Um Z3OWqH9rbgmPPz5hJakGVEvFkpckMprFMS9NWZxj0g0OAeCEQ7wihrbl2aDZufkpSAQr mQpg== X-Gm-Message-State: ALoCoQl638v3O1L8Pxq5+i1JMYU0rtt41N8lyv1OXSkGzHHJPZpETwV5qFxbCMkrZStV4LlXuLetJ6C7FL2geaDEYRETLmP5G0L8FTfR+5Fl5/ehEENUrZFZXJf4rvQ2Xz898/HsXbI4 X-Received: by 10.52.18.68 with SMTP id u4mr2295929vdd.58.1399584290173; Thu, 08 May 2014 14:24:50 -0700 (PDT) References: <5369CED9.5010001@php.net> <4339111475046055305@unknownmsgid> <578A5A21-A820-42AD-A218-FB8049F63B82@zend.com> <3A72C770-9A9F-40C9-9DFE-F40478709BA8@ajf.me> <311084565853739035@unknownmsgid> <536BA9FE.1090408@lerdorf.com> In-Reply-To: <536BA9FE.1090408@lerdorf.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQEftMwaGDy2m3QH84O/axsSuTXZAQJQjPokAQyBFxwCma+kwwKeu99vAh3SXOoB6WgWogIOSIbSAs+YOHkBMJHCNgGXweLTAfgxM5eb5MCBYA== Date: Fri, 9 May 2014 00:24:45 +0300 Message-ID: <2c470224f5eca827363a3c5878bc709d@mail.gmail.com> To: Rasmus Lerdorf , Andrea Faulds Cc: Andi Gutmans , Sebastian Bergmann , internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: RE: [PHP-DEV] phpng: Refactored PHP Engine with Big Performance Improvement From: zeev@zend.com (Zeev Suraski) > -----Original Message----- > From: Rasmus Lerdorf [mailto:rasmus@lerdorf.com] > Sent: Thursday, May 08, 2014 7:00 PM > To: Zeev Suraski; Andrea Faulds > Cc: Andi Gutmans; Sebastian Bergmann; internals@lists.php.net > Subject: Re: [PHP-DEV] phpng: Refactored PHP Engine with Big Performance > Improvement > > On 5/8/14, 5:48 AM, Zeev Suraski wrote: > > Again, this is just history/habits. > > Nothing prevents creation of apache-fastcgi-php5 package that'll do > > the exact same thing using FastCGI. > > What you are calling history/habits here is also knows as operational > stability. > Every change to a stack incurs operational costs which has to be balanced > against the benefits of changing a component. Even though it seems like a > trivial > thing to change from Apache/mod_php to Apache/mod_fcgid or nginx+php- > fpm, the operational cost can be quite high. Consider changes to the > Nagios > monitoring setup. Dev VM images all have to be updated. > Startup/shutdown/deploy and logging systems might be affected along with > integration tests. And for most environments changing doesn't actually buy > you > anything. A typical PHP request spends so little time in the web server > compared > to waiting on mysql and memcache replies that even a major performance > boost > doesn't actually give you much. Two things: 1. You're right it buys operational stability; But then, people who'll go on a major PHP version upgrade will expect some level of operational instability (we should hope so at least, because they'll probably get it). App breakages are an order of magnitude (or two or three) more painful than relatively simple changes to monitoring tools or administrative scripts. 2. I never argued that FastCGI/fpm is faster than mod_php; It's probably not (it's roughly as quick from my experience). But it's *a lot* more scalable (in terms of in-machine scalability), since it breaks the 1:1 mapping between Apache processes and PHP processes. Often, for a typical setup of with hundreds of Apache children, you could use just several dozen PHP processes when using FastCGI. With mod_php, after a short while you'd have each Apache process consume a dozen or more megabytes of memory - times hundreds of processes that's a lot of memory; With FastCGI, you'll only have several dozen processes consuming that much memory, while the Apache processes can stay lean. Not to mention you get to use more efficient mpm's, ones mod_php doesn't support - and save even more memory. With requests growing shorter, simpler while also rapidly growing in frequency - this sort of density is very important IMHO. > I fully agree that nginx+php-fpm is a nicer architecture. I like the > process > separation that fastcgi brings and the saner and richer configuration > nginx brings > along with the slight performance boost, but even for my own use those > benefits haven't outweighed the cost of switching for me for systems that > are > running well under mod_php today. The question is whether that cost doesn't become marginal as you assess the cost of moving to the next major version of PHP, as I'm obviously not arguing we do this in 5.x. I don't think people generally expect to just 'yum update' and be done with it when they deal with a major version of PHP. Now, I'll be the first person to admit (and wholeheartedly argue) that compatibility breakage adds up as opposed to being boolean and must be minimized - but I think the benefits here far outweigh the costs. We've done much more painful transitions. I view mod_php as a relic of the past which served its purpose. Same goes to all other server-specific SAPIs. It's time to move on. My 2c. Zeev