From: Eric Wong Date: 2018-05-21T05:20:02+00:00 Subject: [ruby-core:87210] Re: [Ruby trunk Feature#14767] [PATCH] gc.c: use monotonic counters for objspace_malloc_increase �������� �������������� wrote: > > Eric Wong wrote: > > > > Reverted for now because of regressions in: > > > > bm_array_sample_100k__6k > > bm_array_sample_100k___10k > > bm_array_sample_100k___50k > > > > I think the original unsigned + underflow avoidance code > > prevented us from accounting free() properly, and we were > > triggering GC more as a result. > Why triggerring GC less frequently considered as disadvantage? Memory usage got way high; I think those tests were around 8x more memory AND 15% slower. Of course too-frequent GC is bad, too; because it costs cycles, and hurts locality; so we still need to find the right balance. > I think, real aplications will benefit from it. > Why this benchmarks suffers from it? I think a big problem now is lazy sweeping isn't granular enough and happens too late, increasing the chance of malloc fragmentation. We pay a huge cost for malloc accounting(*) but barely use that data for making GC decisions. (*) https://bugs.ruby-lang.org/issues/10238 Unsubscribe: