[#25936] [Bug:1.9] [rubygems] $LOAD_PATH includes bin directory — Nobuyoshi Nakada <nobu@...>

Hi,

10 messages 2009/10/05

[#25943] Disabling tainting — Tony Arcieri <tony@...>

Would it make sense to have a flag passed to the interpreter on startup that

16 messages 2009/10/05

[#26028] [Bug #2189] Math.atanh(1) & Math.atanh(-1) should not raise an error — Marc-Andre Lafortune <redmine@...>

Bug #2189: Math.atanh(1) & Math.atanh(-1) should not raise an error

14 messages 2009/10/10

[#26222] [Bug #2250] IO::for_fd() objects' finalization dangerously closes underlying fds — Mike Pomraning <redmine@...>

Bug #2250: IO::for_fd() objects' finalization dangerously closes underlying fds

11 messages 2009/10/22

[#26244] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context fails — Suraj Kurapati <redmine@...>

Bug #2258: Kernel#require inside rb_require() inside rb_protect() inside SysV context fails

24 messages 2009/10/22

[#26361] [Feature #2294] [PATCH] ruby_bind_stack() to embed Ruby in coroutine — Suraj Kurapati <redmine@...>

Feature #2294: [PATCH] ruby_bind_stack() to embed Ruby in coroutine

42 messages 2009/10/27

[#26371] [Bug #2295] segmentation faults — tomer doron <redmine@...>

Bug #2295: segmentation faults

16 messages 2009/10/27

[ruby-core:26275] [Bug #2264] Kernel#sleep thrashes the CPU on Windows

From: Romulo Ceccon <redmine@...>
Date: 2009-10-24 16:23:10 UTC
List: ruby-core #26275
Bug #2264: Kernel#sleep thrashes the CPU on Windows
http://redmine.ruby-lang.org/issues/show/2264

Author: Romulo Ceccon
Status: Open, Priority: Normal
Category: core, Target version: Ruby 1.8.7
ruby -v: ruby 1.8.7 (2009-06-12 patchlevel 174) [i386-mswin32_90]

The attached script demonstrates a problem with Kernel#sleep: calling it while other threads are running severely interferes on performance. (You don't see a diference if there are only idle threads, though.) These are the results on a P4 3.2GHz with Windows XP (SP 3):

  before:
    0.047000   0.000000   0.047000 (  0.046875)
    0.062000   0.000000   0.062000 (  0.062500)
    0.063000   0.000000   0.063000 (  0.062500)
  after:
    9.359000  10.391000  19.750000 ( 20.109375)
    9.438000  10.094000  19.532000 ( 19.859375)
    9.890000  10.250000  20.140000 ( 20.468750)

I get similar results with ruby 1.8.7-p160, and it looks like the problem was introduced after Ruby 1.8.7-p72. Other branches are unaffected:

  > ruby -v
  ruby 1.8.6 (2009-08-04 patchlevel 383) [i386-mswin32_90]
  
  > ruby test_sleep.rb
  before:
    0.062000   0.000000   0.062000 (  0.062500)
    0.063000   0.000000   0.063000 (  0.062500)
    0.078000   0.000000   0.078000 (  0.078125)
  after:
    0.062000   0.000000   0.062000 (  0.062500)
    0.047000   0.000000   0.047000 (  0.046875)
    0.063000   0.000000   0.063000 (  0.062500)
  
  
  > ruby -v
  ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-mswin32]
  
  > ruby test_sleep.rb
  before:
    0.047000   0.000000   0.047000 (  0.047000)
    0.062000   0.000000   0.062000 (  0.062000)
    0.047000   0.000000   0.047000 (  0.047000)
  after:
    0.047000   0.000000   0.047000 (  0.063000)
    0.062000   0.000000   0.062000 (  0.062000)
    0.063000   0.000000   0.063000 (  0.063000)
    
  
  > ruby -v
  ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32]
  
  > ruby test_sleep.rb
  before:
    0.031000   0.000000   0.031000 (  0.031250)
    0.031000   0.000000   0.031000 (  0.031250)
    0.031000   0.000000   0.031000 (  0.031250)
  after:
    0.047000   0.000000   0.047000 (  0.046875)
    0.032000   0.000000   0.032000 (  0.031250)
    0.031000   0.000000   0.031000 (  0.031250)


----------------------------------------
http://redmine.ruby-lang.org

In This Thread

Prev Next