<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Apache + mod_php compared to Nginx + php-fpm</title>
	<atom:link href="http://blog.a2o.si/2009/06/24/apache-mod_php-compared-to-nginx-php-fpm/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.a2o.si/2009/06/24/apache-mod_php-compared-to-nginx-php-fpm/</link>
	<description>Un*x system engineering</description>
	<lastBuildDate>Mon, 01 Mar 2010 23:02:46 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Sergiy</title>
		<link>http://blog.a2o.si/2009/06/24/apache-mod_php-compared-to-nginx-php-fpm/comment-page-1/#comment-959</link>
		<dc:creator>Sergiy</dc:creator>
		<pubDate>Sun, 14 Feb 2010 08:47:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.a2o.si/?p=65#comment-959</guid>
		<description>Hi, Eran
 somaxconn by default is too small
if you have Linux you should encrease:
somaxconn (try 4000 or more), tw_buckets and backlog in /etc/sysctl.conf   (don&#039;t forget to do #sysctl -p /etc/sysctl.conf )
nofile and nproc in /etc/security/limits.conf for user which start nginx (read about ulimit)
in nginx config you may try use:
listen          80 default backlog=4000(or more) sndbuf=32k rcvbuf=8k deferred; 

for freebsd do netstat -Lan, check queue to port 80 and change same parameters

&gt;I see that nginx has problems with spawn-cgi or php-fpm, it is not stable / reliable solution – 502 error.
&gt;So, is there a solution to it?</description>
		<content:encoded><![CDATA[<p>Hi, Eran<br />
 somaxconn by default is too small<br />
if you have Linux you should encrease:<br />
somaxconn (try 4000 or more), tw_buckets and backlog in /etc/sysctl.conf   (don&#8217;t forget to do #sysctl -p /etc/sysctl.conf )<br />
nofile and nproc in /etc/security/limits.conf for user which start nginx (read about ulimit)<br />
in nginx config you may try use:<br />
listen          80 default backlog=4000(or more) sndbuf=32k rcvbuf=8k deferred; </p>
<p>for freebsd do netstat -Lan, check queue to port 80 and change same parameters</p>
<p>&gt;I see that nginx has problems with spawn-cgi or php-fpm, it is not stable / reliable solution – 502 error.<br />
&gt;So, is there a solution to it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eran</title>
		<link>http://blog.a2o.si/2009/06/24/apache-mod_php-compared-to-nginx-php-fpm/comment-page-1/#comment-839</link>
		<dc:creator>eran</dc:creator>
		<pubDate>Tue, 12 Jan 2010 17:43:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.a2o.si/?p=65#comment-839</guid>
		<description>http://drupal.org/node/681735</description>
		<content:encoded><![CDATA[<p><a href="http://drupal.org/node/681735" rel="nofollow">http://drupal.org/node/681735</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eran</title>
		<link>http://blog.a2o.si/2009/06/24/apache-mod_php-compared-to-nginx-php-fpm/comment-page-1/#comment-833</link>
		<dc:creator>eran</dc:creator>
		<pubDate>Sun, 10 Jan 2010 20:25:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.a2o.si/?p=65#comment-833</guid>
		<description>Hi

I see that nginx has problems with spawn-cgi  or php-fpm,  it is not stable / reliable solution - 502 error.

So, is there a solution to it?

--------------------

Can I run apache with MaxClients set to small number and solve the memory issue of apache?

After reading for hourssss  in forums , I can&#039;t decide what to use,  apache or nginx ?

It is for a     drupal + vps .



Thanks</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>I see that nginx has problems with spawn-cgi  or php-fpm,  it is not stable / reliable solution &#8211; 502 error.</p>
<p>So, is there a solution to it?</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Can I run apache with MaxClients set to small number and solve the memory issue of apache?</p>
<p>After reading for hourssss  in forums , I can&#8217;t decide what to use,  apache or nginx ?</p>
<p>It is for a     drupal + vps .</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boštjan Škufca</title>
		<link>http://blog.a2o.si/2009/06/24/apache-mod_php-compared-to-nginx-php-fpm/comment-page-1/#comment-832</link>
		<dc:creator>Boštjan Škufca</dc:creator>
		<pubDate>Sun, 10 Jan 2010 17:00:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.a2o.si/?p=65#comment-832</guid>
		<description>I&#039;ve just completed a set of preliminary benchmarking test with Magento and Wordpress. 

Magento has proved itself as incapable of performing steadily under high loads. I believe it is some sort of file-cache locking issue because with concurrency=1 it&#039;s performance was flawless.

Wordpress results are on par with results of &quot;Custom application frontpage&quot; benchmark from this article, only scaled down with a factor of around 0.25 (75% the performance of &quot;Custom application frontpage&quot;). Will publish complete results soon.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve just completed a set of preliminary benchmarking test with Magento and Wordpress. </p>
<p>Magento has proved itself as incapable of performing steadily under high loads. I believe it is some sort of file-cache locking issue because with concurrency=1 it&#8217;s performance was flawless.</p>
<p>Wordpress results are on par with results of &#8220;Custom application frontpage&#8221; benchmark from this article, only scaled down with a factor of around 0.25 (75% the performance of &#8220;Custom application frontpage&#8221;). Will publish complete results soon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boštjan Škufca</title>
		<link>http://blog.a2o.si/2009/06/24/apache-mod_php-compared-to-nginx-php-fpm/comment-page-1/#comment-721</link>
		<dc:creator>Boštjan Škufca</dc:creator>
		<pubDate>Wed, 23 Dec 2009 10:32:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.a2o.si/?p=65#comment-721</guid>
		<description>Yes, I am thinking about that, but a standard dataset (database content) must also be available so that test becomes realy repeatable. I found that Magento has such a starting dataset. 

Can someone recommend anything else? Thanks.</description>
		<content:encoded><![CDATA[<p>Yes, I am thinking about that, but a standard dataset (database content) must also be available so that test becomes realy repeatable. I found that Magento has such a starting dataset. </p>
<p>Can someone recommend anything else? Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zeznania programisty &#187; Bajki o FastCGI w PHP</title>
		<link>http://blog.a2o.si/2009/06/24/apache-mod_php-compared-to-nginx-php-fpm/comment-page-1/#comment-720</link>
		<dc:creator>Zeznania programisty &#187; Bajki o FastCGI w PHP</dc:creator>
		<pubDate>Wed, 23 Dec 2009 09:48:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.a2o.si/?p=65#comment-720</guid>
		<description>[...] a na zużycie pamięci. Czyli może działać szybciej, ale nie musi zależy od sposobu mierzenia. Tutaj jest porównanie szybkości mod_php i php-fpm. Brodaci i brzuchaci programiści, tacy jak ja, którzy pamiętają jeszcze czasy Perla, [...]</description>
		<content:encoded><![CDATA[<p>[...] a na zużycie pamięci. Czyli może działać szybciej, ale nie musi zależy od sposobu mierzenia. Tutaj jest porównanie szybkości mod_php i php-fpm. Brodaci i brzuchaci programiści, tacy jak ja, którzy pamiętają jeszcze czasy Perla, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Antoni Jakubiak</title>
		<link>http://blog.a2o.si/2009/06/24/apache-mod_php-compared-to-nginx-php-fpm/comment-page-1/#comment-719</link>
		<dc:creator>Antoni Jakubiak</dc:creator>
		<pubDate>Tue, 22 Dec 2009 11:04:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.a2o.si/?p=65#comment-719</guid>
		<description>It would be interesting to test  typical PHP application, like Wordpress for example.</description>
		<content:encoded><![CDATA[<p>It would be interesting to test  typical PHP application, like Wordpress for example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Using Nginx as a reverse proxy for Apache</title>
		<link>http://blog.a2o.si/2009/06/24/apache-mod_php-compared-to-nginx-php-fpm/comment-page-1/#comment-222</link>
		<dc:creator>Using Nginx as a reverse proxy for Apache</dc:creator>
		<pubDate>Wed, 28 Oct 2009 11:44:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.a2o.si/?p=65#comment-222</guid>
		<description>[...] We all know that Apache is a great software and it cannot be replaced every time. Also, Apache shown great performance serving dynamic php content whether it&#8217;s running mod_php or fastcgi. Boštjan Škufca made an excellent comparison between Apache + mod_php and Nginx + php-fpm. [...]</description>
		<content:encoded><![CDATA[<p>[...] We all know that Apache is a great software and it cannot be replaced every time. Also, Apache shown great performance serving dynamic php content whether it&#8217;s running mod_php or fastcgi. Boštjan Škufca made an excellent comparison between Apache + mod_php and Nginx + php-fpm. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boštjan Škufca</title>
		<link>http://blog.a2o.si/2009/06/24/apache-mod_php-compared-to-nginx-php-fpm/comment-page-1/#comment-101</link>
		<dc:creator>Boštjan Škufca</dc:creator>
		<pubDate>Fri, 21 Aug 2009 20:02:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.a2o.si/?p=65#comment-101</guid>
		<description>As you can notice above, the HelloWorld.php gives better results with Apache than with NginX. I repeat, this is a synthetic test, which only proves that proxying requests to another server (in this case php-fpm) creates some latency and/or overhead.

The answer to you question about Nginx in front and Apache behind: if you are only going to forward ALL the requests to Apache, then you will have static file serving performance penalty. If you serve static files with NginX, then it really does not matter that much which application server is in the back, Apache or php-fpm. If you are familiar with Apache and it does not seem too much hassle to configure, go with it then. Single tool that you are familiar with can always serve you better than 100 different tools you briefly know. And you can always switch to php-fpm later. But, php-fpm is very easy to set up - apply patch, compile php, modify config file and voila.</description>
		<content:encoded><![CDATA[<p>As you can notice above, the HelloWorld.php gives better results with Apache than with NginX. I repeat, this is a synthetic test, which only proves that proxying requests to another server (in this case php-fpm) creates some latency and/or overhead.</p>
<p>The answer to you question about Nginx in front and Apache behind: if you are only going to forward ALL the requests to Apache, then you will have static file serving performance penalty. If you serve static files with NginX, then it really does not matter that much which application server is in the back, Apache or php-fpm. If you are familiar with Apache and it does not seem too much hassle to configure, go with it then. Single tool that you are familiar with can always serve you better than 100 different tools you briefly know. And you can always switch to php-fpm later. But, php-fpm is very easy to set up &#8211; apply patch, compile php, modify config file and voila.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aco</title>
		<link>http://blog.a2o.si/2009/06/24/apache-mod_php-compared-to-nginx-php-fpm/comment-page-1/#comment-100</link>
		<dc:creator>Aco</dc:creator>
		<pubDate>Fri, 21 Aug 2009 17:55:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.a2o.si/?p=65#comment-100</guid>
		<description>Sorry, I forgot that you DID in fact use a op-cacher: eaccelerator.  Disregard my last paragraph.</description>
		<content:encoded><![CDATA[<p>Sorry, I forgot that you DID in fact use a op-cacher: eaccelerator.  Disregard my last paragraph.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
