A piece of Ruby on a Windows or a Linux plate?

ruby Some time ago I overheard a conversation about performance of Ruby applications on Windows or more precisely it’s lack. I don’t usually believe this kind of conversation until I see something with my own eyes. I saw it today.

I am a Linux enthusiast. I use Linux on my desktop and usually deploy applications on Linux servers. I know that Linux is fast and reliable. I don’t need proof for that. But I thought that Ruby will perform somehow similar on both platforms. Wrong.

I wrote a little application that is pooling a lot of XML content (RSS feeds) from web sites, parses it and extracts a data. It also updates MySQL database with new content.

Running application on Windows took me 24 minutes (something about 2000 web sites). Dual core machine with empty MySQL database and without any intense processes in a background (excluding Windows itself hehe 🙂 .

Then I run it on Linux with same configuration, same network connection, empty database and no intense processes in a background. It took 7 minutes. I know that maybe server that the sites were requested from could respond slower but COME ON. How much slower it could be.

I never trusted Windows when it came to a production environment. Now I don’t trust it even more. Where is the 17 minutes that Linux didn’t need it? Is it MySQL performance on Linux or I/O operations or maybe networking?

I’m looking forward for Ubuntu Hardy to install it as I did some damage to my old installation and I am to lazy to fix it. Developing on Linux was always much faster and more flexible for me. Plus I do get my favourite tool, powerful command line 🙂


3 thoughts on “A piece of Ruby on a Windows or a Linux plate?

  1. Not trying to start a flame war here, but I just wanted to say that it is not fair to judge the Windows platform by the performance of a language that was ported to Windows. I believe if you compare an application written in .NET running on windows and the same application running in Mono on Linux, you would see the Windows version is faster.

    Also, if you want a powerful command line on Windows, you might want to look at PowerShell, which is an object oriented command line.

    Of course, in the end, its what you are comfortable with (to each their own and all that…)


  2. Hm … that is actually a good point. I will have to write an app and compare it’s performance on both platforms 🙂

    By saying that I like a powerful command line I probably meant free tools that comes with it as well.

    I think I’m comfortable with both Platforms but more with Linux. It’s much flexible for me. Pity all the big software houses are just starting to realize that. Probably are afraid that will loose a big part of a market.

    Cheers for comment Robin

  3. Interesting thought. I feel that a lot of it has to do with the windows file system implementation.

    IO on windows is really slow, and to some extent, the response time of the OS to service an incoming request and hand it off to the application.

    I’ve myself observed build time (compile + testing of webservices) much faster on a linux than on windows with much higher configuration.

    I see the same on when I’m Twisting, and just copying files and extracting eclipse instances a couple of times during the build takes ages on windows, and is blazing fast on linux.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s