[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Ruby on Solaris 10 performance problems

Colin Mackenzie

1/28/2009 7:36:00 PM

We just installed ruby on a
Sun T1000, 6 core UltraSPARC T1 cpu, 4G memory , Solaris 10

Right now Windows is out performing an Ultra SPARC by 25 seconds! Does
anyone know why this would be the case. I have downloaded ruby and
compiled it on the hardware, i have tried the binaries from sunfreeware
and the results are the same. Actually, the results from my compile were
a second or two worse than the binaries from SUN!


This is the program ran for the bench mark. I called it t.rb

require 'benchmark'

array = (1..1000000).map { rand }

Benchmark.bmbm do |x|
x.report("sort!") { array.dup.sort! } #this sorts the array.
x.report("sort") { array.dup.sort } #this makes a copy of the
array and sorts it.
end


###########################################

Solaris v10
# ruby t.rb
Rehearsal -----------------------------------------
sort! 29.450000 0.020000 29.470000 ( 29.458899)
sort 29.760000 0.010000 29.770000 ( 29.772163)
------------------------------- total: 59.240000 sec

user system total real
sort! 29.060000 0.010000 29.070000 ( 29.064410)
sort 29.070000 0.000000 29.070000 ( 29.076217)
#

Windows

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\cmackenzie>ruby t.rb
Rehearsal -----------------------------------------
sort! 4.735000 0.000000 4.735000 ( 4.813000)
sort 4.359000 0.000000 4.359000 ( 4.390000)
-------------------------------- total: 9.094000 sec
user system total real
sort! 4.313000 0.000000 4.313000 ( 4.375000)
sort 4.297000 0.015000 4.312000 ( 4.422000)

C:\Documents and Settings\cmackenzie>

Ubuntu Linux

colmac@sideshowbob: ruby t.rb
Rehearsal -----------------------------------------
sort! 3.310000 0.010000 3.320000 ( 3.317860)
sort 3.250000 0.020000 3.270000 ( 3.270037)
-------------------------------- total: 6.5890000 sec

user system total real
sort! 3.280000 0.030000 3.10000 ( 3.318575)
sort 3.250000 0.020000 3.270000 ( 3.269284)
colmac@sideshowbob:
--
Posted via http://www.ruby-....

17 Answers

Daniel Berger

1/28/2009 8:57:00 PM

0



On Jan 28, 12:36=A0pm, Colin Mackenzie <col...@gmail.com> wrote:
> We just installed ruby on a
> Sun T1000, 6 core UltraSPARC T1 cpu, 4G memory =A0, Solaris 10
>
> Right now Windows is out performing an Ultra SPARC by 25 seconds! Does
> anyone know why this would be the case.

<snip>

What version of Ruby?
Which compiler?
What flags did you build with?
Have you seen http://tinyurl.... ?

Regards,

Dan

Colin Mackenzie

1/29/2009 12:02:00 PM

0


> What version of Ruby?
ruby 1.8.7 (2008-08-11 patchlevel 72) [sparc-solaris2.10]

> Which compiler?
gcc (GCC) 3.4.6

> What flags did you build with?
I ran configure , what ever default flags it used.

> Have you seen http://tinyurl.... ?
no I will check it out.

# uname -a
SunOS tk3 5.10 Generic_137137-09 sun4v sparc SUNW,Sun-Fire-T1000

btw, downloaded binaries from blastwave.org and the results are even
worse..
#./ruby --version
ruby 1.8.7 (2008-06-20 patchlevel 22) [sparc-solaris2.8]uname
# ./ruby t.rb
Rehearsal -----------------------------------------
sort! 34.080000 0.020000 34.100000 ( 34.098341)
sort 33.430000 0.010000 33.440000 ( 33.443781)
------------------------------- total: 67.540000sec
--
Posted via http://www.ruby-....

Robert Klemme

1/29/2009 12:13:00 PM

0

2009/1/28 Colin Mackenzie <colmac@gmail.com>:
> We just installed ruby on a
> Sun T1000, 6 core UltraSPARC T1 cpu, 4G memory , Solaris 10
>
> Right now Windows is out performing an Ultra SPARC by 25 seconds! Does
> anyone know why this would be the case.

SPARC processors are slow, raw CPU speed is not among the strengths of
those beasts - especially since Ruby does not use native threads.
You're putting the load on a single core only (well, your test does
not contain any concurrency anyway :-) ).

It's pretty easy to see why: RISC has fewer machine instructions which
take one clock to execute. Nowadays CISC processors come close to
taking one clock as well by using pipelining, branch prediction and
what not. But CISC processor commands are more powerful, so you need
multiple RISC commands to do the same amount of work. And since clock
speeds slowly reach physical limits RISC cannot compensate with higher
clock rates. That's why RISK is falling behind. IMHO it's a dead
technology.

Kind regards

robert

--
remember.guy do |as, often| as.you_can - without end

Colin Mackenzie

1/29/2009 12:18:00 PM

0

Robert Klemme wrote:
...snip... IMHO it's a dead technology.

Thanks, Robert, I had a bad feeling about that.

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

Robert Klemme

1/29/2009 12:31:00 PM

0

2009/1/29 Colin Mackenzie <colmac@gmail.com>:
> Robert Klemme wrote:
> ...snip... IMHO it's a dead technology.
>
> Thanks, Robert, I had a bad feeling about that.

:-)

I don't say that Sparc machines or Solaris operating systems do not
have their merits. It's just that raw CPU speed is not among them.

Cheers

robert

--
remember.guy do |as, often| as.you_can - without end

Mark Thomas

1/29/2009 8:43:00 PM

0

On Jan 28, 2:36 pm, Colin Mackenzie <col...@gmail.com> wrote:
> We just installed ruby on a
> Sun T1000, 6 core UltraSPARC T1 cpu, 4G memory  , Solaris 10
>
> Right now Windows is out performing an Ultra SPARC by 25 seconds! Does
> anyone know why this would be the case. I have downloaded ruby and
> compiled it on the hardware, i have tried the binaries from sunfreeware
> and the results are the same. Actually, the results from my compile were
> a second or two worse than the binaries from SUN!

I wonder what kind of performance you'd get if you used JRuby 1.1.6+

Simon Krahnke

1/30/2009 12:42:00 AM

0

* Colin Mackenzie <colmac@gmail.com> (2009-01-28) schrieb:

What machine are

> Microsoft Windows XP [Version 5.1.2600]

and

> Ubuntu Linux

running on?

mfg, simon .... l

Colin Mackenzie

1/30/2009 1:20:00 AM

0

Mark Thomas wrote:
> On Jan 28, 2:36�pm, Colin Mackenzie <col...@gmail.com> wrote:
>> We just installed ruby on a
>> Sun T1000, 6 core UltraSPARC T1 cpu, 4G memory �, Solaris 10
>>
>> Right now Windows is out performing an Ultra SPARC by 25 seconds! Does
>> anyone know why this would be the case. I have downloaded ruby and
>> compiled it on the hardware, i have tried the binaries from sunfreeware
>> and the results are the same. Actually, the results from my compile were
>> a second or two worse than the binaries from SUN!
>
> I wonder what kind of performance you'd get if you used JRuby 1.1.6+

java runs 7 times slower on this RISC platform, just going to drop it.
Every thing runs slow
--
Posted via http://www.ruby-....

Colin Mackenzie

1/30/2009 1:21:00 AM

0

Simon Krahnke wrote:
> * Colin Mackenzie <colmac@gmail.com> (2009-01-28) schrieb:
>
> What machine are
>
>> Microsoft Windows XP [Version 5.1.2600]
>
> and
>
>> Ubuntu Linux
>
> running on?
>
> mfg, simon .... l

at this point it does not matter. really the only question was why it is
running so slow on Solaris platform. Robert gave me the answer. Thanks
though.
If you are interested
Ubuntu is on an intel E4500@2.2GHz
Windows is on a Dell LapTop D630
--
Posted via http://www.ruby-....

Peter Booth

1/30/2009 7:29:00 AM

0

[Note: parts of this message were removed to make it a legal post.]


Colin,

You have an answer, but it isn't the right answer.

An Ultrasparc T1 processor is a little more powerful than either of
the Core 2 Duo CPUs you tested. You can see this from the published
results for the SPECjbb2005 or the specweb benchmarks.

The confusion when using your application as a benchmark, you only
make use of 5% of the CPU resources of the Sun box. The T1 processor
only runs at a clock speed of 1GHz but, being both multithreaded and
multi-core, it gives you a total of 24 threads to push work through.
If you used a benchmark that ran 24 or more instances of your
application you could expect to see greater throughput from the Sun
host than the Intel hosts.

This is a great example of the "End of Moore's Law" issue. We are at
the cusp of a change in hardware technology that could force all
developers to learn about concurrency and parallelizing workloads. The
difference between these two architectures is that Sun embraced the
issue a little earlier than Intel.

I agree with Robert that RISC has had its day in the sun (pun not
intended), but I disagree with the suggestion that this is due to
technical inferiority. The reality is that Sun sat pretty earning
great margins for their hardware for more than a decade. No longer
commercially relevant its ironic that they are now, perhaps for the
first time, competitive on a performance vs price basis. But it's too
lae. It doesn't matter that Solaris on a Sun server is, in some ways,
technically superior to a Linux on Intel platform.

I would never choose Solaris today because it would be like buying a
Beta VCR, or a NeXT cube in the 1980s. Its sad that a company
responsible for so many technical innovations isn't succeeding
economically but that's life. Linux on Intel is the safe corporate
choice today. Funny to remember that installing Slackware on a 386 in
1996 made me feel like a revolutionary.

Peter

On Jan 29, 2009, at 8:21 PM, Colin Mackenzie wrote:

> Simon Krahnke wrote:
>> * Colin Mackenzie <colmac@gmail.com> (2009-01-28) schrieb:
>>
>> What machine are
>>
>>> Microsoft Windows XP [Version 5.1.2600]
>>
>> and
>>
>>> Ubuntu Linux
>>
>> running on?
>>
>> mfg, simon .... l
>
> at this point it does not matter. really the only question was why
> it is
> running so slow on Solaris platform. Robert gave me the answer. Thanks
> though.
> If you are interested
> Ubuntu is on an intel E4500@2.2GHz
> Windows is on a Dell LapTop D630
> --
> Posted via http://www.ruby-....
>