Hi all, Starting out with load testing for one of my rails apps and am pretty confused about what the ''best'' way to do this is. I read the tuning article at http://mongrel.rubyforge.org/docs/how_many_mongrels.html but am getting some weird numbers from the tests recommended at the bottom: httperf --server www.theserver.com --port 80 --uri /tested --num-conns <10 second count> httperf --server www.theserver.com --port 80 --uri /tested --num-conns <10 second count> --rate <reported req/sec> I''m running this with 1 mongrel behind nginx with 6 workers. Serving up static files seems fine, about 50 reqs/sec with 240 requests at a rate of 120 for a small gif. When running the first line, I started with 10 connections to my rails page, which ran around 7-8 seconds (1.4 reqs/s). With 20 connections it was up to 29 (0.7 reqs/s). Something seems wrong here. Tried some heavier loads. With 100 requests and a rate of 50 it''s at 20 seconds and 4.9 reqs/s. With 240 requests and a rate of 120 I get 54 seconds and 4.4 reqs/s. I tested with 2 mongrels and brought the last test up to 25.4 reqs/sec, but AFAIK one mongrel should be able to handle up to 120, right? Any and all advice will be much appreciated. Thanks, Ben
Check if you aren''t running that Mongrel in development mode. Before testing with various concurrent loads, tune the request-response time of all your pages first by timing them WITHOUT any concurrency. Until you have reasonably fast pages, concurrent load just complicates the picture. Use ab (Apache Benchmark) to do the timing, like this: ab2 -c 1 -n 10 <url> This will send the same request 10 times, one request at a time. If the mean time is not as fast as you want it to be, look at the logs to see if you have any slow queries, and if that doesn''t help, use script/performance/profiler to figure out where is the time wasted. Alex Verkhovsky -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070324/d7eb5fda/attachment.html
> Use ab (Apache Benchmark) to do the timing, like this: > ab2 -c 1 -n 10 <url> > > This will send the same request 10 times, one request at a time. > > If the mean time is not as fast as you want it to be, look at the logs to > see if you have any slow queries, and if that doesn''t help, use > script/performance/profiler to figure out where is the time wasted.How fast should I shoot for the mean time to be for a normal homepage on a VPS? I''m getting 2.27 reqs/sec for the rails page and 2.11 for the static image with 10 requests each. Thanks, Ben