views:

102

answers:

5

I am doing some initial testing for a Rails app which will be deployed on Windows, but the development server in a VirtualBox is painfully slow. I've never seen anything like this in Linux (but the server platform must be Windows), even in an identical virtual appliance.

Is Rails on Windows viable in terms of speed?

+1  A: 

I started RoR programming in Windows and yes, the server is really slow. It did not matter if Windows was running in a vbox or directly as the OS, the server was slow. I've tried several things to get it faster (one cpu core just for ruby, etc), but nothing really helped so I went to Linux as working was much faster. You just can't work with a good speed if you have to wait for a server response everytime.

stex
+1  A: 

I on the other hand find it to be pretty stable, and don't have any kind of speed problems.

I've been using Rails with Windows and Linux (still to use it with Mac OSX), and have had exactly the same sort of response times.

I prefer to use it on Linux though, because of the terminal and all the Linux goodies, but am pretty happy to use it on Windows.

Update:

Thought it would be nice to complete saying I've used Rails both from a Windows Machine, and from a Linux Machine with a virtual windows install, and as previously stated, i had the same sort of response times.

Marcos Placona
hmmmm... interesting
Yar
+1  A: 

I've tried 18.6, 1.8.7 and 1.9.1 on Window, OS X and Linux. I have found the response time using Windows to be longer than using either OS X or Linux (Webbrick and Mongrel). If I use Windows purely as a server, response time seems as OS X Linux, but much slower if I develop and render result using any browser whilst using the same computer.

Reuben Mallaby
Interesting. Not sure what to make of all this yet. Thanks!
Yar
Response time is much slower in development mode because Rails reloads all your controllers and models (in case they've changed) on every request.
Gdeglin
@Gdeglin, slower yes, but slower than on MacOS or Linux? All development environments should be about the same.
Yar
+1  A: 

I've been developing rails in windows for three years and the performance has been fine actually. My setup is relatively powerful: Dual Core 3.0 GHz, 3 gigs of ram, and it outperforms my coworker's new macbook pros by 20-30%. (When running 1200 integration tests).

That said, I have has ruby crash randomly after moving to 1.9 so I would definitely not recommend running any production server using MRI on windows.

You should strongly consider switching to JRuby if you are going to host your site on windows. Many production rails applications run on JRuby, and it's performance great and does not vary much between platforms. Here's a list of some sites running JRuby: http://kenai.com/projects/jruby/pages/SuccessStories, and the home page for it is: http://jruby.org/

Another option for local development (that I have used on occasion) is to run Rails inside of a CentOS VMWare instance. Though my experience has been that the performance has been about the same or slightly slower, in that environment. You may see a benefit if you run rails in a multithreaded state (instead of just launching script/server).

Good luck!

Gdeglin
Thanks... the last option is not feasible because the point of the app is 100% to access Windows shares directly, so a VMWare would defeat the purpose.
Yar
Yeah it sounds like JRuby really is the best option for you, especially if you are deploying to Windows. This will also allow you to use the Java database connectors instead of ruby's ones (Which are known to have problems on windows).Microsoft has been working on getting their own .NET implementation of Ruby to run rails for some time, so you may want to keep an eye on their progress, but it seems that they still have a long way to go before it is ready.
Gdeglin
A: 

Since I have to do some very light stuff on Windows, I think I'm going to go with Sinatra. It's pretty cool, and since I don't even need DB access it'll be fine.

Yar