Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49688 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64074 invoked from network); 16 Sep 2010 04:16:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Sep 2010 04:16:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 74.125.83.170 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 74.125.83.170 mail-pv0-f170.google.com Received: from [74.125.83.170] ([74.125.83.170:33803] helo=mail-pv0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2C/12-48270-D0A919C4 for ; Thu, 16 Sep 2010 00:16:14 -0400 Received: by pvg16 with SMTP id 16so292789pvg.29 for ; Wed, 15 Sep 2010 21:16:11 -0700 (PDT) Received: by 10.114.137.13 with SMTP id k13mr3080134wad.18.1284610571150; Wed, 15 Sep 2010 21:16:11 -0700 (PDT) Received: from Rasmus-Lerdorfs-MacBook-Pro.local (c-98-234-184-167.hsd1.ca.comcast.net [98.234.184.167]) by mx.google.com with ESMTPS id d39sm3611826wam.4.2010.09.15.21.16.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 15 Sep 2010 21:16:10 -0700 (PDT) Message-ID: <4C919A06.50804@lerdorf.com> Date: Wed, 15 Sep 2010 21:16:06 -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: <4C910E9C.7040004@lerdorf.com> <4C9182FE.7000905@lerdorf.com> 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 8:13 PM, J Ravi Menon wrote: > On Wed, Sep 15, 2010 at 7:37 PM, Rasmus Lerdorf wrote: >> On 9/15/10 7:13 PM, J Ravi Menon wrote: >>> On Wed, Sep 15, 2010 at 12:40 PM, J Ravi Menon wrote: >>>> On Wed, Sep 15, 2010 at 11:21 AM, Rasmus Lerdorf wrote: >>>>> 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. >>>>> >>>> Ah good to know. >>>> >>> So with this mod_php like behavior, do we also need to have apc >>> enabled in this setup for the opcode cache? As a cli daemon, I am >>> assuming this is not necessary? >> >> APC works perfectly out of the box with this setup. It is no different >> from something like Apache where you have a root process that creates >> the mmap segment which then forks children that inherit the pointer to >> that segment. >> > > Sorry I meant to ask if the opcode cache is necessary to avoid the > compilation step even if the same php-fcgi daemon has seen the same > script before? My guess is that these fcgi hooks emulate a basic > mod_php behavior without apc? An opcode cache is still necessary, yes. fcgi doesn't persist the compiled opcodes. -Rasmus