Forum: Ruby on Rails Mongrel 0.3.11 - speed test ... seems slow

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A5b8b720efd929c118a4bdf00d2cbfed?d=identicon&s=25 David Marko (Guest)
on 2006-03-16 20:40
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
350b7c39d2973b5ae483c65729a5bfcc?d=identicon&s=25 Morten (Guest)
on 2006-03-16 21:14
(Received via mailing list)
David Marko wrote:
> 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
8c43ed7f065406bf171c0f3eb32cf615?d=identicon&s=25 Zed Shaw (Guest)
on 2006-03-17 06:45
(Received via mailing list)
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
8c43ed7f065406bf171c0f3eb32cf615?d=identicon&s=25 Zed Shaw (Guest)
on 2006-03-17 06:45
(Received via mailing list)
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/
A5b8b720efd929c118a4bdf00d2cbfed?d=identicon&s=25 David Marko (Guest)
on 2006-03-17 07:49
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
This topic is locked and can not be replied to.