2008/10/14 Bryan Richardson <btrichardson / gmail.com>:
> Does anyone know if it's possible to force multiple Ruby applications to
> run on different processors?  I've got a dual quad-core machine that is
> running Windows XP 64-bit and I'd like to run multiple Ruby applications
> on it.  However, when running multiple applications, it looks like they
> are sharing the same processor -- one application will do some work for
> a while, then another one will, then another.  They aren't all doing
> work at the same time.

The default for the OS scheduler (even on Windows) is to distribute
runnable processes across all processors. Did you accidentally set
affinity to a single CPU?

> Any ideas?!

What makes you sure it's a CPU issue?  For example, a common
bottleneck is the file system.  So if all your Ruby programs are IO
intensive and read / write on the same FS they will likely suffer from
this bottleneck.

You could easily check what the OS does by running a CPU only script,
e.g. on a bash prompt you can do a 30 second test with this:

for i in 1 2 3 4; do ruby -e "t=Time.now + 30; 1 while Time.now < t;
puts 'done $i'"& done

Kind regards

robert

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