How busy is your site?  Have you had a recent spike in traffic?<div><br></div><div>I would suggest looking at the response times from mysql.  In particular, turn on the slow query log and set the long query time to 1 second or even less to see what comes up (you need at least mysql 5.1 to set it to non-integer values).  You can use a tool like &quot;mk-query-digest&quot; from maatkit to summarize the slow log and get a sense of what may be holding up your php processes.</div>
<div><br></div><div>You could also profile your php application using xdebug and view the resulting files using a grind tool to determine where php is spending most of its time.  Profiling will most definitely crash your application, especially since you&#39;re already seeing 100% CPU utilization but you can run it for a short period of time and review the resulting grind files.</div>
<div><br></div><div>Its unlikely that this is an Nginx problem.</div><div><br></div><div><br><br><div class="gmail_quote">On Tue, Oct 26, 2010 at 7:07 AM, Phil Bayfield <span dir="ltr">&lt;<a href="mailto:phil@techlightenment.com">phil@techlightenment.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Your formulas look interesting, will give them a try next time I&#39;m doing some optimising.<div>Normally I would just make a rough guess based off req/sec, execution times etc and fine tune with ab.<div>
<div></div><div class="h5"><br><div><br><div class="gmail_quote">
On 26 October 2010 11:58, SplitIce <span dir="ltr">&lt;<a href="mailto:mat999@gmail.com" target="_blank">mat999@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

ive found that if you have no blocking functions in php, aka its CPU bound then number of  CPU cores+1 is the most efficient. If it has mysql (most likely does) and other IO bound operations then *2 or *3 is fine. values between 20-30 are common in decent scale web servers, in fact on my i7 8gb ram I run 20, on my amd x2 4gb ram I run 15.<br>


<br><div class="gmail_quote"><div><div></div><div>On Tue, Oct 26, 2010 at 9:52 PM, Phil Bayfield <span dir="ltr">&lt;<a href="mailto:phil@techlightenment.com" target="_blank">phil@techlightenment.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>
Sorry didn&#39;t read you config before posting, you already have this. :)<div><br></div><div>You probably need to reduce the number of child processes, more is not better.</div><div><br></div><div>On intensive PHP applications I&#39;ve found lower is better.</div>



<div><br></div><div>For example, if you have 100 concurrent connections, this doesn&#39;t mean you necessarily need 100 PHP-FPM children.</div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




</blockquote></div><br></div>
<br></div></div><div>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
<br></div></blockquote></div><div><div></div><div><br><br clear="all"><br>-- <br><a href="http://thewarezscene.org" target="_blank">Warez Scene</a> <a href="http://www.nexusddl.com" target="_blank">Free Rapidshare Downloads</a><br>

<br>
</div></div><br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
<br></blockquote></div><br></div></div></div></div>
<br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
<br></blockquote></div><br></div>