I did some basic speed test on my rails application. I use Centrino 1.7GHz, WinXP. For simple test I used Apache ''ab -n 100 -c 10 http://url.... '' Running Mongrel 0.3.11 I got: development env. = 4.5 req./sec production env. = 11.5 req./sec Running Webrick I got: development env. = 5.7 req./sec production env. =25.9 req./sec Does anyone know why the webrick is still faster? Mongrel runs without problem but quite slow. Cant see any advantage to webrick. David Marko PS: I run rails edge, Ruby 1.8.4 -- Posted via http://www.ruby-forum.com/.
David Marko wrote:> I did some basic speed test on my rails application. I use Centrino > 1.7GHz, WinXP. > For simple test I used Apache ''ab -n 100 -c 10 http://url.... '' > > Running Mongrel 0.3.11 I got: > development env. = 4.5 req./sec > production env. = 11.5 req./sec > > Running Webrick I got: > development env. = 5.7 req./sec > production env. =25.9 req./sec > > > Does anyone know why the webrick is still faster? Mongrel runs without > problem but quite slow. Cant see any advantage to webrick.Mongrel serializes all requests because Rails isn''t thread safe. Webrick doesn''t have this knowledge. Try hitting them with only one thread (and post those results here also please :-)). Find "Rails" in the Mongrel FAQ: http://mongrel.rubyforge.org/faq.html Br, Morten
Hey David, Interesting results, I''ll have to check it. The 0.3.11 release is mostly to get everything working right now on win32, with uber-tweaking coming soon. It''s possible I slipped something in that is causing this. Zed On 3/16/06 2:40 PM, "David Marko" <dmarko@tcl-digitrade.com> wrote:> I did some basic speed test on my rails application. I use Centrino > 1.7GHz, WinXP. > For simple test I used Apache ''ab -n 100 -c 10 http://url.... '' > > Running Mongrel 0.3.11 I got: > development env. = 4.5 req./sec > production env. = 11.5 req./sec > > Running Webrick I got: > development env. = 5.7 req./sec > production env. =25.9 req./sec > > > Does anyone know why the webrick is still faster? Mongrel runs without > problem but quite slow. Cant see any advantage to webrick. > > David Marko > > PS: I run rails edge, Ruby 1.8.4
Morten, It is true that Mongrel locks the requests to Rails but I believe that WEBrick does something similar. If it didn''t then nobody could run in production at all. Zed A. Shaw http://www.zedshaw.com/ On 3/16/06 3:11 PM, "Morten" <lists@kikobu.com> wrote:> David Marko wrote: >> I did some basic speed test on my rails application. I use Centrino >> 1.7GHz, WinXP. >> For simple test I used Apache ''ab -n 100 -c 10 http://url.... '' >> >> Running Mongrel 0.3.11 I got: >> development env. = 4.5 req./sec >> production env. = 11.5 req./sec >> >> Running Webrick I got: >> development env. = 5.7 req./sec >> production env. =25.9 req./sec >> >> >> Does anyone know why the webrick is still faster? Mongrel runs without >> problem but quite slow. Cant see any advantage to webrick. > > Mongrel serializes all requests because Rails isn''t thread safe. Webrick > doesn''t have this knowledge. Try hitting them with only one thread (and > post those results here also please :-)). > > Find "Rails" in the Mongrel FAQ: http://mongrel.rubyforge.org/faq.html > > Br, > > Morten > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
David Marko
2006-Mar-17 06:49 UTC
[Rails] Re: Re: Mongrel 0.3.11 - speed test ... seems slow
I have updated the tests and ran it once again for both: Mongrel and Webrick. The page I''m accessing in test has no connection from database, so there is not other bottleneck except of rails itself. Not sure why the results are a bit different from what I seen yesterday, but now the speed simillar at least. I did each test 3x for each server and the value is the average. Test1: ''ab -n 500 -c 1 http://url.... '' Running Mongrel 0.3.11 I got: production env. = 32.7 req./sec Running Webrick I got: production env. =28.2 req./sec Test2: ''ab -n 500 -c 10 http://url.... '' Running Mongrel 0.3.11 I got: production env. = 18.5 req./sec Running Webrick I got: production env. = 13.4 req./sec -- Posted via http://www.ruby-forum.com/.