optimization - LEMP Nginx + php-fpm high load timeouts then fine -
i'm pretty new of i'm ocd optimization.
i'm trying optimize web server running lemp setup wordpress.
i'm using wp hypercache instead of w3 total cache seems perform phenomenaly in comparison setup
i'm using blitz.io test , throw 450 users @ domain 60 seconds starting full 450.
this results: spike @ 5 sec errors , timeouts http://i.imgur.com/cdpbz.png
htop during spike: http://i.imgur.com/oheys.png
it's vps w/ 2 cpu @ 2.5ghz , 2.5gb memory, can see memory usage low.
nginx: worker_processes 1; worker_connections 1024;
php-fpm: dynamic, pm.max_children = 10, pm.start_servers = 2, pm.max_spare_servers = 2, ;pm.max_requests = 500 default value = 0
i've increased nginx worker_processes 2 no change, , i've messed php-fpm settings no change. ideas should looking at?
this not bad. ~40 timeouts out of 19k requests normal. got similar results.
as tuning:
look http://wiki.nginx.org/httpfastcgimodule#fastcgi_cache - using avoids touching php @ , nginx caching. can @ batcache (http://evansolomon.me/notes/faster-wordpress-multisite-nginx-batcache/)
look apc/memcached object caching. makes non-cached requests faster , backend more responsive. apc reduces memory footprint of php. day day use makes more of difference. helps if lot of requests not cacheable (e.g. lot's of new comments).
consider using php5.4 it's lot of faster , requires less memory
enable mysql query cache. http://mysqltuner.com nice little script configure server.
measuring peak transfers not indicator scalability of time. real users behave different.
edit: try blitz.io on static nginx page. if there still timeouts problem @ blitz.io or somehwere else. activate gzip compression pages.
Comments
Post a Comment