I just installed Mongrel for my prototype rails application (running in development mode). I was surprised to see that page accesses to my application are now noticeably slower (e.g. browser load times of 4s instead of 2s for one very large and complicated page with lots of data). For mongrel, the completed line for this request often looks like: Completed in 2.34842 (0 reqs/sec) | Rendering: 1.15833 (49%) | DB: 1.17297 (49%) | 200 OK while for WEBrick it is more commonly: Completed in 1.12065 (0 reqs/sec) | Rendering: 0.47532 (42%) | DB: 0.59432 (53%) | 200 OK Is this kind of thing to be expected for development mode? I've read that Mongrel is faster than WEBrick, which is why I was surprised. Perhaps it is only faster in production mode, or after some tuning? Thanks, --Paul p.s. I'm running under RedHat Enterprise Linux, which I see someone else had performance issues with, although I don't think they noticed a difference based on which web server was used. I think I'm running the latest versions of everything -- ruby 1.8.5, rails 1.2.2, mongrel 1.0.1.
on 2007-03-16 18:00
on 2007-03-16 18:16
I think I have just found the problem. Unlike WEBrick, Mongrel appears to echo to the console most of the output going to the development log, which in my case has hundreds of SQL statements. I found that if I start mongrel with: script/server >/dev/null (so that the output no longer goes to the console) the performance issue I was having goes away. (The browser load time is now back to about 2s.) --Paul