views:

52

answers:

1

So I have tried this out on multiple computers with multiple setups (servers/apps) and I seem to consistently get Rails completing 8-15 requests per second even for doing selects on empty tables with 1 field. I think I'm doing something wrong here because I've read a lot of stats online where people are getting 60-200 with mongrel. So being down at 8 seems just awful. The first app I tested this on was a little more involved and had 2 queries in 1 controller but they were just selecting a few rows, not a big deal.

Is there some trick to this I don't realize? Ruby.exe is taking up nearly 50% of my cpu cycles but still this is pretty bad. I feel like I've tried this when messing with rails last year and have gotten something like 50 requests per second. Is it possible that routing is screwed up some how?

Any advice would be greatly appreciated. Even info as far as profiling tools go so I could at least figure out WHERE the problem is occurring.

Thanks ahead of time.

+1  A: 

If you're on windows then that seems about right. Rails runs terribly slow on windows. Try running it on a linux box, or a mac if you have one. You could also try heroku. They have a free starter plan you can use for development.

If you must run in a windows environment you could try jruby for some extra speed.

Seth Archer
Hey Seth thanks a ton for answering. I was totally confused till I saw this. ON linux it was about 20-30 per second vs 8 or so. I cleaned up my queries a bit and got 45 per second. Still it was only 1 join but yeah. Thanks for that, allows me to keep my sanity.
John Baker
No prob. I was in a similar situation and I tried optimizing everything for a week until I realized windows was to blame.
Seth Archer