# Mongrel 0.3.11 - speed test ... seems slow

**URL:** <https://www.ruby-forum.com/t/mongrel-0-3-11-speed-test-seems-slow/55072>\
**Category:** Rails\
**Created:** [March 16, 2006, 8:40pm UTC](https://www.ruby-forum.com/t/mongrel-0-3-11-speed-test-seems-slow/55072 "2006-03-16T20:40:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@dgm](https://www.ruby-forum.com/u/dgm)\
**Post date:** [March 16, 2006, 8:40pm UTC](https://www.ruby-forum.com/t/mongrel-0-3-11-speed-test-seems-slow/55072/1 "2006-03-16T20:40:57Z")

</div>

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](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 M.

PS: I run rails edge, Ruby 1.8.4

---

<div class="post-metadata">

**Author:** ![dgm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@dgm](https://www.ruby-forum.com/u/dgm)\
**Post date:** [March 16, 2006, 9:14pm UTC](https://www.ruby-forum.com/t/mongrel-0-3-11-speed-test-seems-slow/55072/2 "2006-03-16T21:14:01Z")

</div>

David M. 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](http://mongrel.rubyforge.org/faq.html)

Br,

Morten

---

<div class="post-metadata">

**Author:** ![dgm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@dgm](https://www.ruby-forum.com/u/dgm)\
**Post date:** [March 17, 2006, 6:45am UTC](https://www.ruby-forum.com/t/mongrel-0-3-11-speed-test-seems-slow/55072/3 "2006-03-17T06:45:54Z")

</div>

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

> **[Zed A. shaw](https://zedshaw.com/)**
>
> Personal essays and writings by Zed A. Shaw.

---

<div class="post-metadata">

**Author:** ![dgm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@dgm](https://www.ruby-forum.com/u/dgm)\
**Post date:** [March 17, 2006, 7:49am UTC](https://www.ruby-forum.com/t/mongrel-0-3-11-speed-test-seems-slow/55072/4 "2006-03-17T07:49:05Z")

</div>

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](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](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

---

<div class="post-metadata">

**Author:** ![dgm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@dgm](https://www.ruby-forum.com/u/dgm)\
**Post date:** [March 17, 2006, 6:45am UTC](https://www.ruby-forum.com/t/mongrel-0-3-11-speed-test-seems-slow/55072/5 "2006-03-17T06:45:53Z")

</div>

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
