AMD Dual Core and Ruby

Hi,

does the ruby interpreter use both cores automagically or do I have
to do/program something special ?

Kind regards,
mcc

The ruby interpreter isn't multithreaded, so it won't take advantage of
SMP sytems.

···

On 08/08/06, Meino Christian Cramer <Meino.Cramer@gmx.de> wrote:

Hi,

does the ruby interpreter use both cores automagically or do I have
to do/program something special ?

--
Rasputin :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/

does the ruby interpreter use both cores automagically or do I have
to do/program something special ?

The interpreter doesn't support multithreading itself, so all
ruby-scripts will only use 1 Core, even when they create ruby-threads.
But maybe you can use more than 1 process (e.g. call "fork" instead
creating a thread). Your OS will (hopefully) schedule the second
interpreter on the second core.

best regards,
Matthias

In article <20060808.105503.41655252.Meino.Cramer@gmx.de>,

···

Meino Christian Cramer <Meino.Cramer@gmx.de> wrote:

Hi,

does the ruby interpreter use both cores automagically or do I have
to do/program something special ?

You have to do something special.

check out the slave package from Ara T. Howard:
http://rubyforge.org/frs/?group_id=1024&release_id=5630

Phil

Dick Davies wrote:

The ruby interpreter isn't multithreaded, so it won't take advantage of
SMP sytems.

But you can read your email at the same time :slight_smile:

···

--
Posted via http://www.ruby-forum.com/\.

>Hi,
>
> does the ruby interpreter use both cores automagically or do I have
> to do/program something special ?
>

If you are running JRuby, all threads are native threads, and it will use as
many cores as you have available.

···

Meino Christian Cramer <Meino.Cramer@gmx.de> wrote:

--
Contribute to RubySpec! @ Welcome to headius.com
Charles Oliver Nutter @ headius.blogspot.com
Ruby User @ ruby.mn
JRuby Developer @ www.jruby.org
Application Architect @ www.ventera.com

Actually, most second cores on desktop machines (and Windows servers)
are already too busy processing all your spam and viruses. :wink:

···

On 8/8/06, Dr Nic <drnicwilliams@gmail.com> wrote:

Dick Davies wrote:
> The ruby interpreter isn't multithreaded, so it won't take advantage of
> SMP sytems.

But you can read your email at the same time :slight_smile:

--
Posted via http://www.ruby-forum.com/\.