Why is Ruby on Linux so much faster than on Windows?

Hi List,

I'm currently investigating some possibilities for deplyong my Rails
I developed it on Windows XP, but I thought I should give linux a run
I expected some performance benefit, but not of this level.

See the table for the measurments, all taken from the log by clicking
5 times on the same method.

PC = old pc, Athlon xp 1800, 512 MB, 7200 rmp HD, Win XP
Laptop-WinXP = Intel Centrino 1.5Ghz, 512MB, 4200 rmp HD, Win XP
Laptop-Ubuntu = same laptop, but now with Ubuntu 7.04 Beta

All tests were run in development mode, with webrick 1.3.1, mysql
configured just the same:

(first test)
0,27 0,5 0,12
0,24 0,49 0,09
0,95 0,26 0,09
0,25 0,68 0,88
1,14 0,28 0,2

(second test)
0,72 0,43 0,29
0,61 0,43 0,14
1,28 0,25 0,25
0,41 0,57 0,25
0,83 0,3 0,13

Can anyone explain me why Rails or Ruby is that much faster on ubuntu?

Some people claim that linux is faster than windows, i don't have
technical base to say that, maybe even those who claim that.

Also, linux doesn't need graphical interface, and grafical interfaces
consume CPU cycles too, Linus and UNIX where created to have simple

here is a text talking about Linux vs. Windows performance.

you can find more with google

Were they both fresh installs of the operating system? If not that
could easily explain it. Because I WinXP primarily it has tons of
'junk' on it. I try to keep my linux stuff as clean as possible
(though I'm not very good at it because I'm still learning linux). I'm
pretty sure that most linux distros are pretty lean after the initial
installation, even Ubuntu. At least they are compared to Windows. I
guess that could explain it too.

Roderick van Domburg wrote:

Ruby in general isn't any noticeable slower on Windows than it is on
Linux, but Windows in general is much slower in file operations, and so
it is with Ruby. A Rails application uses many files, and hence the

Here's a newb question that shows how well I keep with the times.

If I get a flash memory USB stick and mount it (WinXP _or_ Linux), will it read and write files faster than those little spinning platters inside a hard drive?

It seems there are those who put their entire project, Apache, Ruby, Rails, SVN and everything onto those things...