Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Does anyone know of a good source out there - or possibly can answer this in here - that can guide me as to how many Fast-cgi processes and Nginx processes I need to have running to serve a moderatly popular website. Between 75-100k pageview / day, quite intensive PHP-filled pages with decent cache for the heavy queries in mysql.

I'm using Apache mod_php today and is relatively new to running php as cgi but the early setup I've done using APC + Memcache + Nginx + PHP-FPM (fast cgi) on PHP 5.3.0 is very fast and not consuming too much memory under very light load. However, I'm unsure how I could test this under heavy load without moving my most popular site on it but I don't want to do that until I know if my current settings of 5 cgi processes and 5 nginx processes is enough.

Thanks

share|improve this question
    
You could always use apache bench to hit your Nginx server from another machine... set up a copy of your app on the new machine, then use something like ab to do some testing... odd to use something with "apache" in the name to test nginx, but it should do a decent job of getting you the info you need. (I would suggest a couple thousand requests with a moderate concurrency, then increase the concurrency gradually to get a good idea of what kind of load you can handle) –  Ian Selby Jan 12 '10 at 20:52

1 Answer 1

I recommend Siege over ab (Apache Bench).

Also, note that current PHP-FPM releases support Static as well as Dynamic threads (so always 10, vs 5-30, for instance). It would be good to test that while you're at it.

I haven't yet found a magic number, but it seems that the default of 10 static threads is good for 250-300 requests per second, on a single core, 1gb ram instance at SoftLayer, with an availability rate of ~90-95%.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.