From: Regis d'Aubarede Date: 2010-06-30T01:15:41+09:00 Subject: Re: Multi-cpu and ruby Threading Roger Pack wrote: > I've seen a bit of slowdown on jruby when using multiple threads, as > well. Result seem different on Linux.Here same test, on same machine, on ubunbtu 10.4/virtualbox with 8 processor affinity ; regis@regis-desktop:~/Ruby/local$ java -version java version "1.6.0_18" OpenJDK Runtime Environment (IcedTea6 1.8) (6b18-1.8-0ubuntu1) OpenJDK Server VM (build 14.0-b16, mixed mode) regis@regis-desktop:~/Ruby/local$ jruby -v jruby 1.5.1 (ruby 1.8.7 patchlevel 249) (2010-06-06 f3a3480) (OpenJDK Client VM 1.6.0_18) [i386-java] regis@regis-desktop:~/Ruby/local$ jruby thread_bench.rb 1.8.7, java, 2010-06-06 1000 iterations by 1 threads , Duration = 3930 ms 500 iterations by 2 threads , Duration = 3723 ms 333 iterations by 3 threads , Duration = 3490 ms 250 iterations by 4 threads , Duration = 3470 ms 200 iterations by 5 threads , Duration = 3353 ms 166 iterations by 6 threads , Duration = 3378 ms 142 iterations by 7 threads , Duration = 3455 ms 125 iterations by 8 threads , Duration = 4032 ms regis@regis-desktop:~/Ruby/local$ ir -v IronRuby 0.9.0.0 on .NET 2.0.0.0 regis@regis-desktop:~/Ruby/local$ ir thread_bench.rb 1.8.6, i386-mswin32, 2008-05-28 1000 iterations by 1 threads , Duration = 11091 ms 500 iterations by 2 threads , Duration = 7676 ms 333 iterations by 3 threads , Duration = 12243 ms 250 iterations by 4 threads , Duration = 7728 ms 200 iterations by 5 threads , Duration = 7767 ms 166 iterations by 6 threads , Duration = 7749 ms 142 iterations by 7 threads , Duration = 8184 ms 125 iterations by 8 threads , Duration = 8069 ms regis@regis-desktop:~/Ruby/local$ -- Posted via http://www.ruby-forum.com/.