Forum: Ruby on Rails Why is Ruby on Linux so much faster than on Windows?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Aa9467ff6b698dce20d0d7252e5a268f?d=identicon&s=25 Joram (Guest)
on 2007-03-31 12:59
(Received via mailing list)
Hi List,

I'm currently investigating some possibilities for deplyong my Rails
app.
I developed it on Windows XP, but I thought I should give linux a run
too.
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:

PC-WINXP LAPTOP-WINXP LAPTOP-UBUNTU
(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?
E0ffb3df640bdfc20a10ee433268cea4?d=identicon&s=25 PaÅ­lo Geyer (Guest)
on 2007-03-31 14:14
(Received via mailing list)
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
design.

here is a text talking about Linux vs. Windows performance.
http://blogs.ittoolbox.com/linux/locutus/archives/...

you can find more with google
A45f650cce5746dd89aafb3176b47b02?d=identicon&s=25 DyingToLearn (Guest)
on 2007-03-31 18:16
(Received via mailing list)
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.
4375b4aca04b8d72482fd409fb6d0b47?d=identicon&s=25 Roderick van Domburg (roderickvd)
on 2007-03-31 19:25
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
slowdown.

Roderick
Aafa8848c4b764f080b1b31a51eab73d?d=identicon&s=25 Phlip (Guest)
on 2007-03-31 22:08
(Received via mailing list)
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
> slowdown.

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...

--
  Phlip
  http://flea.sourceforge.net/PiglegToo_1.html
4375b4aca04b8d72482fd409fb6d0b47?d=identicon&s=25 Roderick van Domburg (roderickvd)
on 2007-03-31 22:55
Phlip wrote:
> 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?

Usually, flash memory has lower read latency (which is good) but also
lower throughput and higher read latency. Separate from these physical
characteristics you also need to figure in the overhead from the USB
port that usually is fairly CPU costly.

So it depends. Rails performs a lot of smallish reads but also does a
fair amount of log writes.
In all I'd still prefer the hard drive performance-wise, but I don't
have the numbers to back it up.

Roderick
This topic is locked and can not be replied to.