[#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:26428] [Bug #1325] fiber tests kill windows

From: _ wanabe <redmine@...>
Date: 2009-10-30 03:56:00 UTC
List: ruby-core #26428
Issue #1325 has been updated by _ wanabe.


Thank you, Nobu. I rewrote the patch in accordance with your advise.

And finally, I found which makes disk-swapping.
File.open('large.png', 'r:ascii-8bit') in test/cgi/test_cgi_multipart.rb does.
It does realloc many times and increases malloc_limit in gc.c.
Interestingly, mode 'rb:ascii-8bit' gets rid of the problem.

This is another example that enlargement of malloc_limit obstructs GC.

$ cat test.rb
require 'benchmark'
a = []
10.times do |i|
  ARGV[0].to_i.times do
    a[10000] = nil
    a.clear
  end
end

GC.start
GC::Profiler.enable

Benchmark.bm do |bm|
  bm.report do
    100_000.times do
      Fiber.new{}.resume
    end
  end
end

gc_result = GC::Profiler.result.split(/\n/)
gc_result[4..-3] = "(snip)"
puts nil, gc_result

$ ./ruby -v test.rb 0
ruby 1.9.2dev (2009-10-30 trunk 25566) [i386-mingw32]
      user     system      total        real
  4.516000   1.844000   6.360000 (  7.109375)

GC 294 invokes.
Index    Invoke Time(sec)       Use Size(byte)     Total Size(byte)         Total Object                    GC Time(ms)
    1               0.109                70704               229376                 9548         0.00000000000000000000
    2               0.109                70776               229376                 9548        15.62500000000000000000
(snip)
  292               4.594                70776               229376                 9548         0.00000000000000000000
  293               4.609                70776               229376                 9548         0.00000000000000000000


$ ./ruby -v test.rb 10000
ruby 1.9.2dev (2009-10-30 trunk 25566) [i386-mingw32]
      user     system      total        real
  6.406000   3.406000   9.812000 (108.718750)

GC 6 invokes.
Index    Invoke Time(sec)       Use Size(byte)     Total Size(byte)         Total Object                    GC Time(ms)
    1               5.375                70728               245760                10230         0.00000000000000000000
    2               5.562                70752               425984                17732         0.00000000000000000000
(snip)
    4               6.844                70848              1343488                55924         0.00000000000000000000
    5               9.266                70872              2392064                99572         0.00000000000000000000
----------------------------------------
http://redmine.ruby-lang.org/issues/show/1325

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

In This Thread