Project

General

Profile

Actions

Feature #22630

open

GC improvements

Feature #22630: GC improvements

Added by fuzzyrichie-gusto (Richard Desmarais) 3 days ago. Updated 1 day ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:127682]

Description

I was playing around with options to reduce GC time/cost. It seems to be one of the biggest things we hit in our app.

In doing so, Claude was able to find 4 changes that could dramatically reduce GC time on a warmed up host (it pointed to an 80x win, which I'm dubious about). I'll link them below as I open the PRs.

https://github.com/ruby/ruby/pull/20097

  • improvements to gc_mark, with 4 changes that help with the fixed per-call costs

https://github.com/ruby/ruby/pull/20098

  • prefetch the gc_update_weak_references for 32 references ahead

https://github.com/ruby/ruby/pull/20099

  • prefetching children during full marks

https://github.com/ruby/ruby/pull/20100

  • opt-in RUBY_GC_PERMANENT_GENERATION setting, making full_mark GCs much faster
Actions

Also available in: PDF Atom