https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112013-10-18T14:28:14ZRuby Issue Tracking SystemRuby master - Bug #9035: [proposal] new RUBY_GC_HEAP_GROWTH_MAX_OBJ tuning parameterhttps://bugs.ruby-lang.org/issues/9035?journal_id=425142013-10-18T14:28:14Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/42514/diff?detail_id=30771">diff</a>)</li></ul> Ruby master - Bug #9035: [proposal] new RUBY_GC_HEAP_GROWTH_MAX_OBJ tuning parameterhttps://bugs.ruby-lang.org/issues/9035?journal_id=425332013-10-22T03:45:56Ztmm1 (Aman Karmani)ruby@tmm1.net
<ul></ul><p>I would prefer (b) above. Exposing a bytesize based limit is just going to confuse users, who will expect the variable to limit their overall RSS. Since the limit only affects the ruby heap, the impact on overall RSS is quite minimal. For example, a large rails application can be 400MB RSS, but only 30MB of that will be allocated by the ruby heap.</p>
<p>A user might set RUBY_GC_HEAP_GROWTH_MAX_BYTESIZE=1MB to control RSS growth, but this will only limit the number of new slots added to the ruby heap. If the first new slot is occupied by a 100MB String object, then RSS will still grow by 101MB. Using RUBY_GC_HEAP_GROWTH_MAX_OBJS instead makes it more clear what the intention is, and forces the user to tune based on the number of objects their application typically uses.</p>
<p>I have prepared a patch here: <a href="https://github.com/tmm1/ruby/compare/heap-slots-growth-max.diff" class="external">https://github.com/tmm1/ruby/compare/heap-slots-growth-max.diff</a>. If there are no objections, I will merge it.</p> Ruby master - Bug #9035: [proposal] new RUBY_GC_HEAP_GROWTH_MAX_OBJ tuning parameterhttps://bugs.ruby-lang.org/issues/9035?journal_id=425842013-10-24T07:47:32Ztmm1 (Aman Karmani)ruby@tmm1.net
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>This issue was solved with changeset r43409.<br>
Aman, thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<ul>
<li>gc.c: add new initial_growth_max tuning parameter. <a href="https://blade.ruby-lang.org/ruby-core/57928">[ruby-core:57928]</a> [Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: [proposal] new RUBY_GC_HEAP_GROWTH_MAX_OBJ tuning parameter (Closed)" href="https://bugs.ruby-lang.org/issues/9035">#9035</a>]</li>
</ul>