[#87467] [Ruby trunk Bug#14841] Very rarely IO#readpartial does not raise EOFError — mofezilla@...
Issue #14841 has been reported by hirura (Hiroyuki URANISHI).
3 messages
2018/06/10
[#87515] [Ruby trunk Bug#14841] Very rarely IO#readpartial does not raise EOFError — hirura@...
Issue #14841 has been updated by hirura (Hiroyuki URANISHI).
7 messages
2018/06/19
[#87516] Re: [Ruby trunk Bug#14841] Very rarely IO#readpartial does not raise EOFError
— Eric Wong <normalperson@...>
2018/06/19
[email protected] wrote:
[#87517] Re: [Ruby trunk Bug#14841] Very rarely IO#readpartial does not raise EOFError
— Eric Wong <normalperson@...>
2018/06/19
Sorry, I left this out: If you can reproduce it again, can you
[#87519] Re: [Ruby trunk Bug#14841] Very rarely IO#readpartial does not raise EOFError
— hirura <hirura@...>
2018/06/19
Hi Eric,
[#87521] Re: [Ruby trunk Bug#14841] Very rarely IO#readpartial does not raise EOFError
— Eric Wong <normalperson@...>
2018/06/19
hirura <[email protected]> wrote:
[#87541] [Ruby trunk Feature#14859] [PATCH] implement Timeout in VM — normalperson@...
Issue #14859 has been reported by normalperson (Eric Wong).
4 messages
2018/06/21
[#87570] [Ruby trunk Feature#14859] [PATCH] implement Timeout in VM — eregontp@...
Issue #14859 has been updated by Eregon (Benoit Daloze).
4 messages
2018/06/21
[#87605] [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process — takashikkbn@...
Issue #14867 has been reported by k0kubun (Takashi Kokubun).
3 messages
2018/06/23
[#87614] [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process — normalperson@...
Issue #14867 has been updated by normalperson (Eric Wong).
4 messages
2018/06/23
[#87631] [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process — takashikkbn@...
Issue #14867 has been updated by k0kubun (Takashi Kokubun).
5 messages
2018/06/25
[#87635] Re: [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process
— Eric Wong <normalperson@...>
2018/06/25
[email protected] wrote:
[#87665] [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process — eregontp@...
Issue #14867 has been updated by Eregon (Benoit Daloze).
4 messages
2018/06/28
[#87710] [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process — Greg.mpls@...
Issue #14867 has been updated by MSP-Greg (Greg L).
3 messages
2018/06/30
[ruby-core:87350] [Ruby trunk Feature#14739] Improve fiber yield/resume performance
From:
samuel@...
Date:
2018-06-01 23:21:34 UTC
List:
ruby-core #87350
Issue #14739 has been updated by ioquatix (Samuel Williams). I've made a new branch with the new implementation above. It shows a slightly improved performance improvement over `libcoro`. Here is without the PR: ``` ^_^ > ./build/bin/ruby ./fiber_benchmark.rb 10000 1000 setup time for 10000 fibers: 0.161763 execution time for 1000 messages: 14.018874 setup time for 10000 fibers: 1.572869 execution time for 1000 messages: 13.778874 setup time for 10000 fibers: 0.917040 execution time for 1000 messages: 13.942525 setup time for 10000 fibers: 1.616929 execution time for 1000 messages: 13.991115 setup time for 10000 fibers: 1.623587 execution time for 1000 messages: 14.281334 ``` And here it is with the PR, on macOS (the same system used in previous benchmarks): ``` ^_^ > ./build/bin/ruby ./fiber_benchmark.rb 10000 1000 setup time for 10000 fibers: 0.160637 execution time for 1000 messages: 6.009332 setup time for 10000 fibers: 0.244175 execution time for 1000 messages: 6.246711 setup time for 10000 fibers: 0.242718 execution time for 1000 messages: 6.142166 setup time for 10000 fibers: 0.233410 execution time for 1000 messages: 5.994752 setup time for 10000 fibers: 0.288830 execution time for 1000 messages: 6.216617 ``` Performance is about 2~2.5x faster depending on your analysis. Both creation and execution time is improved. But remember this is micro-benchmark. I was also interested in mjit performance: Without PR, enabled mjit: ``` ^_^ > ./build/bin/ruby --jit ./fiber_benchmark.rb 10000 1000 setup time for 10000 fibers: 0.172145 execution time for 1000 messages: 25.176702 setup time for 10000 fibers: 1.654751 execution time for 1000 messages: 14.729177 setup time for 10000 fibers: 1.016810 execution time for 1000 messages: 15.154141 setup time for 10000 fibers: 1.726305 execution time for 1000 messages: 14.797269 setup time for 10000 fibers: 2.025997 execution time for 1000 messages: 15.124753 ``` With PR, enabled mjit: ``` x_x > ./build/bin/ruby --jit ./fiber_benchmark.rb 10000 1000 setup time for 10000 fibers: 0.179744 execution time for 1000 messages: 13.793318 setup time for 10000 fibers: 0.354717 execution time for 1000 messages: 10.664870 setup time for 10000 fibers: 0.308818 execution time for 1000 messages: 6.956352 setup time for 10000 fibers: 0.378568 execution time for 1000 messages: 6.553922 setup time for 10000 fibers: 0.295583 execution time for 1000 messages: 7.274086 ``` We can see it still needs a bit of work. I will try to isolate some interesting results from higher level frameworks. The updated branch is here: https://github.com/ioquatix/ruby/tree/native-fiber It only work on Darwin x84 at the moment, because changes to autoconf do not cover all platforms yet. I'll fix this soon. ---------------------------------------- Feature #14739: Improve fiber yield/resume performance https://bugs.ruby-lang.org/issues/14739#change-72339 * Author: ioquatix (Samuel Williams) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- I am interested to improve Fiber yield/resume performance. I've used this library before: http://software.schmorp.de/pkg/libcoro.html and handled millions of HTTP requests using it. I'd suggest to use that library. As this is used in many places in Ruby (e.g. enumerable) it could be a big performance win across the board. Here is a nice summary of what was done for RethinkDB: https://rethinkdb.com/blog/making-coroutines-fast/ Does Ruby currently reuse stacks? This is also a big performance win if it's not being done already. -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>