If I am reading this right, you set 1024 works…..which means you have a 1024 core system. In newer versions of NGINX, just set "worker_processes" to auto.
http://wiki.nginx.org/CoreModule#worker_processes From: Łukasz Mierzwa <[email protected]<mailto:[email protected]>> Reply-To: uWSGI developers and users list <[email protected]<mailto:[email protected]>> Date: Wednesday, September 25, 2013 8:15 AM To: uWSGI developers and users list <[email protected]<mailto:[email protected]>> Subject: Re: [uWSGI] PHP and concurrency > I set nginx to 200 processes 1024 workers, btw no difference if 1 process > 1024 workers or 200 processes 1024 workers. AFAIR nginx doesn't have any direct support for php apps, only by fcgi sockets. So regardless how many nginx processes you will have, they won't do much, only forward requests to php processes using fcgi socket. Am I missing something here? 2013/9/25 Aarni Koskela <[email protected]<mailto:[email protected]>> Using something like the PHP-APC module in PHP itself to cache the compiled Zend Engine bytecode will probably make a large difference, especially with framework-backed apps that require tons of files to be accessed. Just my 2c, I luckily don’t have to do much with PHP anymore. :P / Aarni From:[email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Darko Luketic Sent: Wednesday, September 25, 2013 4:00 PM To: uWSGI developers and users list Subject: Re: [uWSGI] PHP and concurrency You were right. Thank you very much Łukasz. This sheds a completely different light. It also explains why the first 9k requests passed so quickly and the last 1k took longer. I did the same with node.js and the express framework, raw node and node+nginx. The results blow me away. requests/second ~3k for node/express ~200 more w/o nginx raw php <?php echo "Hello World"; ?> ~7.2k symfony 2.3.4, not a hello world app but no db queries ~20 , yes 20 not 20k The same thing on Ubuntu with apache 2.2.22 and php-fpm, no failed requests, same machine, a while back. ~14.4k raw php ~580 sf 2.2.1 hello world app ~6.1k php with phalcon hello world ~6.7k spring on tomcat 7.0.39 vanilla hello world app This is weird. How can there be such a big difference? I set nginx to 200 processes 1024 workers, btw no difference if 1 process 1024 workers or 200 processes 1024 workers. The only thing that is different is that the projects are on a striped zfs drive vs a lvm ext4 single partition and well php frameworks do a lot of reading of files because of autoloading, many files - many files accessed. Are there other options to make the php plugin perform better? I know it sounds like a lazy question, I'm also reading the docs and trying to find something. It seems like uwsgi was written primarily for python, I can't tell which option affects php and which doesn't. For instance would threads work with php? If yes php would have to be compiled with zts. Of course I'm aware ab isn't a ... realistic load and concurrency testing tool it only serves as an indicator. _______________________________________________ uWSGI mailing list [email protected]<mailto:[email protected]> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi -- Łukasz Mierzwa
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
