Server performance with nginx and mongrel - can you compare?

Hey David-

  Are you running ab from the same machine that you are testing? That can seriously affect your results as ab takes up significant resources to do its thing. Try to run the ab test on another box on the same lan or local network. That being said, for your hardware and a hello world app that just does render :text=> 'hello world' you should get better then 55. You should get closer to 100. Also start with one mongrel backend and get a baseline with concurrency of 10. Then up the concurrency and save the results. Then add another mongrel in and repeat. This way you start to see how much latency you have and how much req/sec you have.

  Also keep in mind that even at 16req/sec you can serve 1,382,400 hits a day with the setup you just tested. Will you need to serve that many requests a day any time soon? :wink: So that is probably ok although it could be better. The other important thing to look at is the latency. How fast does your app *feel* to the user. Concurrency measure your capacity, latency measure how long it takes for one response to complete. You can tweak the latency with some tricks to make the user feel like your site is fast if you need to.

Cheers- -Ezra

What's the exact arguments you are feeding to ab? How many concurrent requests are you testing with?

220 req/s for a static file indicates some general performance problem on the server itself. This number is very low for modern hardware.

Also I have just posted a new nginx.conf file on my blog. Try this one out to see if it helps you. This one has been perfected for rails/mongrel. And it serves all static and rails cached files via nginx *fast* and then proxies the rest thru to mongrel cluster.

http://brainspl.at/articles/2006/09/12/new-nginx-conf-with-rails-caching

  You should get *way way* more then 220req/sec for static files.

Cheers- -Ezra

Hey David-

  Cool! I updated the config on my blog wigth a few more things like correct headers sent to mongrel and it now handles the .js?23129391 timestamped assets that rails makes. I also commented it for folks to know what does what. You should update

http://brainspl.at/nginx.conf.txt

-Ezra