Hi All,
I finally migrated all my Apache Web-Servers (9 Web-Servers) to nginx + php-fpm, and it works better now :-). In front of the Web-Servers i have 3 Nginx-Servers as a Reverse-Proxy. I monitor the latency of a page-call using Smokeping with echo-http and send a GET-Request to my index.php.
Since using nginx + php-fpm the latency is slightly higher than with Apache and it "smokes" more. Because of the gathered information, i think there are some more variables i have to optimize, but i don't know which.
I attached my used configuration for a nginx-php-fpm Server.
All Nginx-Servers are running on Freebsd-amd64 (between Version 7.2-RELEASE to 9.0-RELEASE) and is compiled from Ports using gcc 4.7 with optimized CFLAGS, CXXFLAGS and CPPFLAGS. Nginx uses automatically kqueue. The primary work for the Servers is to serve PHP-generated content (99% / 1% is sending static files). Some sysctl variables are optimized according to the "10,000 req/s" articles on the Web (sorry for putting the Code here, but i can't upload more than 3 files :-):
net.inet.ip.portrange.randomized=0
kern.ipc.maxsockets=204800
net.inet.tcp.maxtcptw=163840
kern.maxfiles=204800
kern.ipc.somaxconn=8192
net.inet.tcp.fast_finwait2_recycle=1
net.inet.tcp.finwait2_timeout=5000
net.inet.tcp.msl=5000
Any tips for some more optimizations?
Thanks for you Help :-)
Dirk