Re: nginx+php-fpm question
| From: | Rasmus Lerdorf | Date: | Wed, 15 Sep 2010 18:21:16 +0000 |
| Subject: | Re: nginx+php-fpm question | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-49672@lists.php.net to get a copy of this message | ||
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