Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49672 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92193 invoked from network); 15 Sep 2010 18:21:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Sep 2010 18:21:24 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.161.170 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.161.170 mail-gx0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:58626] helo=mail-gx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EA/5E-33442-3AE019C4 for ; Wed, 15 Sep 2010 14:21:24 -0400 Received: by gxk25 with SMTP id 25so184459gxk.29 for ; Wed, 15 Sep 2010 11:21:21 -0700 (PDT) Received: by 10.100.165.12 with SMTP id n12mr2322501ane.23.1284574880324; Wed, 15 Sep 2010 11:21:20 -0700 (PDT) Received: from Rasmus-Lerdorfs-MacBook-Pro.local (c-24-7-29-193.hsd1.ca.comcast.net [24.7.29.193]) by mx.google.com with ESMTPS id w6sm2635274anb.3.2010.09.15.11.21.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 15 Sep 2010 11:21:19 -0700 (PDT) Message-ID: <4C910E9C.7040004@lerdorf.com> Date: Wed, 15 Sep 2010 11:21:16 -0700 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.9) Gecko/20100825 Lightning/1.0b2 Thunderbird/3.1.3 MIME-Version: 1.0 To: J Ravi Menon CC: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] nginx+php-fpm question From: rasmus@lerdorf.com (Rasmus Lerdorf) On 9/15/10 10:57 AM, J Ravi Menon wrote: > So my guess is, if we do php-fpm approach, we have to do all these > cleanups manually? Or are there simpler solutions or hook-ups that > does it automatically at the end of the request cycle? No, fastcgi doesn't change this model at all. You have the same end-of-requests cleanups as with mod_php. > 2) My other concern is the extra ipc overhead between > nginx<---->php-fpm servers even on unix sockets. To me in theory > apache+mod_php ( + apc with stat off) should be as efficient as you > can get. Granted nginx might be more efficient in its socket mgmt > (non-blocking event-driven i/o), but can it really outperform the > apache approach given the issues in (1) are resolved? In theory that extra ipc should make the nginx case slower, true. From what I have been able to measure, that is rarely a factor though. You can take a look at this slide from a recent talk of mine: http://talks.php.net/show/drupalconcph/11 That's testing a vanilla Drupal setup on Apache, PHP-FPM-nginx and PHP-FPM-lighttpd. The dashed lines show the latency, the solid lines the requests/sec. -Rasmus