I can change the number of threads but my question is something completely orthogonal to what you replied.  Why did the two server requests to php-fpm get serialized and not happen in parallel even though there are enough worker threads?<br>
<br><div class="gmail_quote">On Sun, Sep 26, 2010 at 11:17 PM, mat h <span dir="ltr">&lt;<a href="mailto:mat999@gmail.com">mat999@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
nginx doesnt need 100+ threads, it uses an event worker model. Set<br>
your worker_processes to something more reasonable. If you are trying<br>
to handle 150 requests then you really only need a single worker.<br>
<div><div></div><div class="h5"><br>
On Mon, Sep 27, 2010 at 4:05 PM, Ankur Gupta &lt;<a href="mailto:ankur655@gmail.com">ankur655@gmail.com</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; I have a bunch of nginx and php-fpm worker threads.  I am running a<br>
&gt; very simple test with a script doing: &lt;? sleep(20); ?&gt;.  I notice that<br>
&gt; if I make two requests at the same time (from the same IP address), they get<br>
&gt; serialized on the<br>
&gt; php-fpm side and have a twenty second differential.  Why would this<br>
&gt; happen and the two requests not get processed in parallel when there<br>
&gt; are an abundant number of threads?  Here are the two requests in the<br>
&gt; slow log file and they have a twenty second difference:<br>
&gt;<br>
&gt; Sep 26 19:02:38.177091 pid 13597 (pool default)<br>
&gt; script_filename = /var/www/test1/test.php<br>
&gt; [0x00000000095b5280] sleep() /var/www/test1/test.php:2<br>
&gt;<br>
&gt; Sep 26 19:02:58.321560 pid 13609 (pool default)<br>
&gt; script_filename = /var/www/test1/test.php<br>
&gt; [0x000000000942a890] sleep() /var/www/test1/test.php:2<br>
&gt;<br>
&gt; I have 100+ nginx threads<br>
&gt; $ ps -afe | grep nginx | wc -l<br>
&gt; 120<br>
&gt;<br>
&gt; and 150 php-fpm threads<br>
&gt; $ ps -afe | grep php-fpm | wc -l<br>
&gt; 150<br>
&gt;<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Ankur<br>
</div></div>&gt; _______________________________________________<br>
&gt; nginx mailing list<br>
&gt; <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
&gt; <a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
&gt;<br>
&gt;<br>
<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>
</blockquote></div><br>