From: Robert Klemme Date: 2011-10-22T02:08:04+09:00 Subject: Re: Creating threads can be slow? On Fri, Oct 21, 2011 at 6:52 PM, Tony Arcieri wrote: > On Fri, Oct 21, 2011 at 8:41 AM, wam r. wrote: > >> I have put a "timer" around these few lines. I know it is completely >> dependent on the system but just to give an idea it can take more than >> 20s for <> 100 threads. Just the code above. I am using 1.8.7 and the >> standard MRI. > > Something's wrong if it takes 20s to create 100 threads. I develop a > threading library for Ruby (Celluloid) and benchmark thread creation speed > on Ruby regularly. Thread creation time should be in the realm of 500-1000 > threads/sec on modern hardware. He said "under load" - which is pretty unspecific. If a system is under serious load, almost anything can take ages. Pierre, can you be more specific about the nature of the load etc.? If you are on a Linux system, you could use dstat to monitor various aspects of load. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/