From: Regis d'Aubarede Date: 2010-12-14T22:34:24+09:00 Subject: Ruby 1.9.2 : Io performance when application use multithread Hello, The file attachment is an simple script for measure performance between client TCP and server, in Mbyte/s. With Ruby 1.9.2, when the server run in multi thread ( Thread.new(serv.accept()) {...} ) the script give a very poor transfer rate ( 3Mbyte on connection on localhost ). When none-multi thread, performance is good : same as jruby and MRI ( 470 Mbyte/s ) (ironRuby give a stange 110 Mbyte/s). Usage : >ruby gbits.rb server 4040 # server (monothread) >ruby gbits.rb server 4040 t # server (multihread) >ruby gbits.rb client 127.0.0.1 4040 10 # 10=> 10 MB data length OS: Windows 7 Proc: core i7, 1 Gbps ethernet Ruby: 1.9.2dev (2010-07-02) [i386-mingw32] jruby: 1.5.0 ir: 1.1.0.0 on .NET 4.0.30319.1 ruby: 1.8.6 Tested on Linux Ubuntu 10.4 (same machine with Virtalbox) ruby 1.9.1p378 (2010-01-10 revision 26273) [i486-linux] server threaded : 844 MB/s server non-threaded: 989 MB/s same delta with jruby thanks Regis Attachments: http://www.ruby-forum.com/attachment/5547/gbits.rb -- Posted via http://www.ruby-forum.com/.