https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112021-04-20T13:35:31ZRuby Issue Tracking SystemRuby master - Feature #17816: Move C heap allocations for RVALUE object data into GC heaphttps://bugs.ruby-lang.org/issues/17816?journal_id=916222021-04-20T13:35:31Zpeterzhu2118 (Peter Zhu)peter@peterzhu.ca
<ul></ul><p>This is a feature <a class="user active user-mention" href="https://bugs.ruby-lang.org/users/31800">@eightbitraptor (Matthew Valentine-House)</a>, <a class="user active user-mention" href="https://bugs.ruby-lang.org/users/73">@tenderlovemaking (Aaron Patterson)</a>, and I have been working on. We're hoping to add this feature incrementally in small commits. As said in the ticket description, we don't expect anyone to use or maintain this feature while we're working on it.</p> Ruby master - Feature #17816: Move C heap allocations for RVALUE object data into GC heaphttps://bugs.ruby-lang.org/issues/17816?journal_id=916242021-04-20T16:33:32Zjeremyevans0 (Jeremy Evans)merch-redmine@jeremyevans.net
<ul><li><strong>Tracker</strong> changed from <i>Bug</i> to <i>Feature</i></li><li><strong>Backport</strong> deleted (<del><i>2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN</i></del>)</li></ul> Ruby master - Feature #17816: Move C heap allocations for RVALUE object data into GC heaphttps://bugs.ruby-lang.org/issues/17816?journal_id=916362021-04-21T01:21:59Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul></ul><p>Great work!</p>
<p>Slightly off topic but this ticket reminds me Feature <a class="issue tracker-2 status-6 priority-4 priority-default closed" title="Feature: Minimize cache misshit to gain optimal speed (Rejected)" href="https://bugs.ruby-lang.org/issues/9362">#9362</a> I proposed years ago. It was fast, but rejected nonetheless because of memory bloats. Heroku dynos thirsted memory than CPUs back then.</p>
<p>It seems this proposal ultimately aims to relax the current 40 byte restriction of struct RVALUE. I expect it would be at least better than my old one at the end. Am looking forward.</p> Ruby master - Feature #17816: Move C heap allocations for RVALUE object data into GC heaphttps://bugs.ruby-lang.org/issues/17816?journal_id=916402021-04-21T08:48:32Zeightbitraptor (Matthew Valentine-House)matt@eightbitraptor.com
<ul></ul><p>Thanks <a class="user active user-mention" href="https://bugs.ruby-lang.org/users/10">@shyouhei (Shyouhei Urabe)</a> I'll read through that ticked and the associated patch.</p>
<p>We're also seeing memory bloat when this feature is enabled at the moment. This is primarily because our naive allocator allows new pages to be allocated at the earliest opportunity. We're confident that we're going to be able to reduce the memory usage with a combination of a better allocation strategy and GC compaction.</p>
<p>As for the second point. That is correct - our intention is to eventually relax the current 40 byte restriction. We aim to do this iteratively. We'll get all required data into the eden heap first so that changing the <code>RVALUE</code> boundaries is less of a "big bang" change.</p> Ruby master - Feature #17816: Move C heap allocations for RVALUE object data into GC heaphttps://bugs.ruby-lang.org/issues/17816?journal_id=916762021-04-23T18:09:34Ztenderlovemaking (Aaron Patterson)tenderlove@ruby-lang.org
<ul></ul><p>Is it ok if we commit this behind a compiler flag? I think it would help push development forward. If it doesn't work out, we can revert. <a class="user active user-mention" href="https://bugs.ruby-lang.org/users/17">@ko1 (Koichi Sasada)</a> any thoughts?</p> Ruby master - Feature #17816: Move C heap allocations for RVALUE object data into GC heaphttps://bugs.ruby-lang.org/issues/17816?journal_id=916862021-04-26T00:54:59Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul></ul><p>I read the patch this weekend. LGTM so far. But I want another +1 from someone else (hopefully from <a class="user active user-mention" href="https://bugs.ruby-lang.org/users/17">@ko1 (Koichi Sasada)</a>)</p> Ruby master - Feature #17816: Move C heap allocations for RVALUE object data into GC heaphttps://bugs.ruby-lang.org/issues/17816?journal_id=918842021-05-07T13:18:00Zpeterzhu2118 (Peter Zhu)peter@peterzhu.ca
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Closed as PR has been merged.</p> Ruby master - Feature #17816: Move C heap allocations for RVALUE object data into GC heaphttps://bugs.ruby-lang.org/issues/17816?journal_id=931152021-08-05T00:56:45Zduerst (Martin Dürst)duerst@it.aoyama.ac.jp
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/18045">Feature #18045</a>: Variable Width Allocation Phase II</i> added</li></ul>