[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Speed issue on Windows

Larry Kelly

3/25/2006 2:46:00 PM

What progress is being made to improve Ruby's speed on Windows
platforms. I'm finding much slower on Windows, especially Windows 2003
Server.

--
Posted via http://www.ruby-....


20 Answers

Daniel Berger

3/25/2006 7:38:00 PM

0

Larry Kelly wrote:
> What progress is being made to improve Ruby's speed on Windows
> platforms. I'm finding much slower on Windows, especially Windows 2003
> Server.
>
> --
> Posted via http://www.ruby-....

What exactly are you finding slow? Also, I've noticed that I/O in
general is slower on Windows compared with other platforms, for
example. In addition, what version of Ruby are you using? Did you
build it yourself? If so, with what compiler and what options?

Regards,

Dan

M. Edward (Ed) Borasky

3/25/2006 8:33:00 PM

0

Daniel Berger wrote:
> Larry Kelly wrote:
>
>> What progress is being made to improve Ruby's speed on Windows
>> platforms. I'm finding much slower on Windows, especially Windows 2003
>> Server.
>>
>> --
>> Posted via http://www.ruby-....
>>
>
> What exactly are you finding slow? Also, I've noticed that I/O in
> general is slower on Windows compared with other platforms, for
> example.
OK, *my* turn to ask detailed questions. :) How specifically is "I/O in
general" on Windows slower than, say, Linux or BSD? Remember, NTFS is a
journaling filesystem and is tunable, so you should compare Windows
(server??) I/O performance with, say, Linux, using properly tuned
journaling filesystems and identical (RAIDed) hardware. I think you'll
find that if you give a Windows performance engineer a chance to tune
the Windows server and a Linux performance engineer a chance to tune
the Linux server, the two platforms will be competitive.

Come back to me in a couple of weeks; I'm taking a Windows internals
course and I expect to learn the Windows piece of that performance
engineering toolset. I've already got the Linux piece pretty well under
control, and I don't know anything about BSD.

--
M. Edward (Ed) Borasky

http://linuxcapacitypl...



Brad Tilley

3/26/2006 1:53:00 AM

0

Larry Kelly wrote:
> What progress is being made to improve Ruby's speed on Windows
> platforms. I'm finding much slower on Windows, especially Windows 2003
> Server.
>

How are you using Ruby? I find its performance acceptable on XP and
2003. I use both Python and Ruby for many common systems administration
and automation tasks. IMO, Python and Ruby perform about the same. In
some areas, Ruby is faster... I've found this to be especially true when
working with WMI.

Wilson Bilkovich

3/26/2006 2:49:00 AM

0

On 3/25/06, rtilley <rtilley@vt.edu> wrote:
> Larry Kelly wrote:
> > What progress is being made to improve Ruby's speed on Windows
> > platforms. I'm finding much slower on Windows, especially Windows 2003
> > Server.
> >
>
> How are you using Ruby? I find its performance acceptable on XP and
> 2003. I use both Python and Ruby for many common systems administration
> and automation tasks. IMO, Python and Ruby perform about the same. In
> some areas, Ruby is faster... I've found this to be especially true when
> working with WMI.
>

I've found Ruby IO and database connectivity to be significantly
slower on Windows (identical and near-identical hardware) than on
Linux. Even IRB takes a noticeably longer time to reach a usable
state. A particularly nasty test is timing a script using ruby
-rprofile. The profiling overhead seems to be much greater in
Windows, which points at some kind of underlying problem.
Sadly, I don't know enough about instrumenting compiled code to point
at the problem.


M. Edward (Ed) Borasky

3/26/2006 8:42:00 AM

0



Wilson Bilkovich wrote:
> On 3/25/06, rtilley <rtilley@vt.edu> wrote:
>
>> Larry Kelly wrote:
>>
>>> What progress is being made to improve Ruby's speed on Windows
>>> platforms. I'm finding much slower on Windows, especially Windows 2003
>>> Server.
>>>
>>>
>> How are you using Ruby? I find its performance acceptable on XP and
>> 2003. I use both Python and Ruby for many common systems administration
>> and automation tasks. IMO, Python and Ruby perform about the same. In
>> some areas, Ruby is faster... I've found this to be especially true when
>> working with WMI.
>>
>>
>
> I've found Ruby IO and database connectivity to be significantly
> slower on Windows (identical and near-identical hardware) than on
> Linux. Even IRB takes a noticeably longer time to reach a usable
> state. A particularly nasty test is timing a script using ruby
> -rprofile. The profiling overhead seems to be much greater in
> Windows, which points at some kind of underlying problem.
> Sadly, I don't know enough about instrumenting compiled code to point
> at the problem.
>
Hmmm ... I'm not sure how many different versions of the Ruby
interpreter there are for Windows. Are you using Curt Hibbs' One Click
Installer, which, IIRC, was compiled with the native Microsoft Visual
Studio? Some of the older versions may have been compiled with CygWin.
>
>

--
M. Edward (Ed) Borasky

http://linuxcapacitypl...



M. Edward (Ed) Borasky

3/26/2006 8:50:00 AM

0

P.S.: I have a P4/1 GB/SATA disk workstation that's dual-booted Gentoo
Linux and XP Professional, and I've got CygWin on the Windows side. If
there are some reasonable benchmarks in Ruby, I could run them with the
CygWin Ruby (1.8.4 IIRC), Curt Hibbs' One Click and the stock Gentoo
Ruby (compiled with gcc 3.4 and optimized O3 with march=pentium4). To
keep things fair, I'll stick to processor-bound benchmarks; I'm not sure
it's valid to compare NTFS with ext2 filesystems.

Anybody here have any favorite Ruby benchmarks? In the absence of any
other ideas, I'll probably do a 100x100 matrix factorization using the
standard Matrix/Mathn/Rational/Complex packages. That should give the
interpreter a pretty good workout.

Wilson Bilkovich wrote:
> On 3/25/06, rtilley <rtilley@vt.edu> wrote:
>
>> Larry Kelly wrote:
>>
>>> What progress is being made to improve Ruby's speed on Windows
>>> platforms. I'm finding much slower on Windows, especially Windows 2003
>>> Server.
>>>
>>>
>> How are you using Ruby? I find its performance acceptable on XP and
>> 2003. I use both Python and Ruby for many common systems administration
>> and automation tasks. IMO, Python and Ruby perform about the same. In
>> some areas, Ruby is faster... I've found this to be especially true when
>> working with WMI.
>>
>>
>
> I've found Ruby IO and database connectivity to be significantly
> slower on Windows (identical and near-identical hardware) than on
> Linux. Even IRB takes a noticeably longer time to reach a usable
> state. A particularly nasty test is timing a script using ruby
> -rprofile. The profiling overhead seems to be much greater in
> Windows, which points at some kind of underlying problem.
> Sadly, I don't know enough about instrumenting compiled code to point
> at the problem.
>
>
>

--
M. Edward (Ed) Borasky

http://linuxcapacitypl...



Wilson Bilkovich

3/26/2006 7:49:00 PM

0

On 3/26/06, M. Edward (Ed) Borasky <znmeb@cesmail.net> wrote:
>
>
> Wilson Bilkovich wrote:
> > On 3/25/06, rtilley <rtilley@vt.edu> wrote:
> >
> >> Larry Kelly wrote:
> >>
> >>> What progress is being made to improve Ruby's speed on Windows
> >>> platforms. I'm finding much slower on Windows, especially Windows 2003
> >>> Server.
> >>>
> >>>
> >> How are you using Ruby? I find its performance acceptable on XP and
> >> 2003. I use both Python and Ruby for many common systems administration
> >> and automation tasks. IMO, Python and Ruby perform about the same. In
> >> some areas, Ruby is faster... I've found this to be especially true when
> >> working with WMI.
> >>
> >>
> >
> > I've found Ruby IO and database connectivity to be significantly
> > slower on Windows (identical and near-identical hardware) than on
> > Linux. Even IRB takes a noticeably longer time to reach a usable
> > state. A particularly nasty test is timing a script using ruby
> > -rprofile. The profiling overhead seems to be much greater in
> > Windows, which points at some kind of underlying problem.
> > Sadly, I don't know enough about instrumenting compiled code to point
> > at the problem.
> >
> Hmmm ... I'm not sure how many different versions of the Ruby
> interpreter there are for Windows. Are you using Curt Hibbs' One Click
> Installer, which, IIRC, was compiled with the native Microsoft Visual
> Studio? Some of the older versions may have been compiled with CygWin.
> >
> >
>

I've had this experience with both the one-click, and with versions
I've built myself using Visual Studio 2K3 and 6.0.
Until I saw this thread, I assumed this was common knowledge. If
that's not the case, I can stage some kind of benchmark between Linux
and Windows on identical hardware.

--Wilson.


Wilson Bilkovich

3/26/2006 8:04:00 PM

0

Try running the built-in sample "cal.rb" with ruby -rprofile.
I don't have two identical boxes right next to each other right now, but:
WinXP SP2, dual Xeon 2.8GHz, 2GB of RAM: 5.031 seconds.
Ubuntu 5.10, single P4 3.0GHz, 1GB of RAM: 2.110 seconds.

Obviously the hardware isn't the same, but they should be much, much
closer than that.
cal.rb is a good choice (in my opinion) because it creates and
compares a very large number of Rational and Fixnum objects.

On 3/26/06, M. Edward (Ed) Borasky <znmeb@cesmail.net> wrote:
> P.S.: I have a P4/1 GB/SATA disk workstation that's dual-booted Gentoo
> Linux and XP Professional, and I've got CygWin on the Windows side. If
> there are some reasonable benchmarks in Ruby, I could run them with the
> CygWin Ruby (1.8.4 IIRC), Curt Hibbs' One Click and the stock Gentoo
> Ruby (compiled with gcc 3.4 and optimized O3 with march=pentium4). To
> keep things fair, I'll stick to processor-bound benchmarks; I'm not sure
> it's valid to compare NTFS with ext2 filesystems.
>
> Anybody here have any favorite Ruby benchmarks? In the absence of any
> other ideas, I'll probably do a 100x100 matrix factorization using the
> standard Matrix/Mathn/Rational/Complex packages. That should give the
> interpreter a pretty good workout.
>
> Wilson Bilkovich wrote:
> > On 3/25/06, rtilley <rtilley@vt.edu> wrote:
> >
> >> Larry Kelly wrote:
> >>
> >>> What progress is being made to improve Ruby's speed on Windows
> >>> platforms. I'm finding much slower on Windows, especially Windows 2003
> >>> Server.
> >>>
> >>>
> >> How are you using Ruby? I find its performance acceptable on XP and
> >> 2003. I use both Python and Ruby for many common systems administration
> >> and automation tasks. IMO, Python and Ruby perform about the same. In
> >> some areas, Ruby is faster... I've found this to be especially true when
> >> working with WMI.
> >>
> >>
> >
> > I've found Ruby IO and database connectivity to be significantly
> > slower on Windows (identical and near-identical hardware) than on
> > Linux. Even IRB takes a noticeably longer time to reach a usable
> > state. A particularly nasty test is timing a script using ruby
> > -rprofile. The profiling overhead seems to be much greater in
> > Windows, which points at some kind of underlying problem.
> > Sadly, I don't know enough about instrumenting compiled code to point
> > at the problem.
> >
> >
> >
>
> --
> M. Edward (Ed) Borasky
>
> http://linuxcapacitypl...
>
>
>


Joel VanderWerf

3/26/2006 8:38:00 PM

0

Wilson Bilkovich wrote:
> Try running the built-in sample "cal.rb" with ruby -rprofile.
> I don't have two identical boxes right next to each other right now, but:
> WinXP SP2, dual Xeon 2.8GHz, 2GB of RAM: 5.031 seconds.
> Ubuntu 5.10, single P4 3.0GHz, 1GB of RAM: 2.110 seconds.
>
> Obviously the hardware isn't the same, but they should be much, much
> closer than that.
> cal.rb is a good choice (in my opinion) because it creates and
> compares a very large number of Rational and Fixnum objects.

4.94 sec WinXP SP2, single Pentium M, 1.7GHz, 512MB
1-click installer

2.32 sec Ubuntu 5.10, single Pentium M, 1.7GHz, 512MB
built with default build options

I took the best run out of 10 or so on each platform. Not building the
windows version with architecture specific options might account for
some of the difference.

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407


Larry Kelly

3/27/2006 3:49:00 AM

0

Daniel Berger wrote:
> Larry Kelly wrote:
>> What progress is being made to improve Ruby's speed on Windows
>> platforms. I'm finding much slower on Windows, especially Windows 2003
>> Server.
>>
>> --
>> Posted via http://www.ruby-....
>
> What exactly are you finding slow? Also, I've noticed that I/O in
> general is slower on Windows compared with other platforms, for
> example. In addition, what version of Ruby are you using? Did you
> build it yourself? If so, with what compiler and what options?
>
> Regards,
>
> Dan

One example.
Webrick on Fedorora C5. starts up in 3 to 5 seconds.
Webrick on Windows 2003 Server takes 30 to 40 seconds on the same
hardware.

I've tried this on 700mhz and 3ghz machines. Results are about the same.
In all cases, OS was installed with normal defaults, no attempt made to
tune anything.
-Larry

--
Posted via http://www.ruby-....