---
title: "Garbage Collection"
description: "1 posts about Garbage Collection, summarised, each linking to the original."
---

# Garbage Collection
> 1 posts about Garbage Collection, summarised, each linking to the original.

## Articles

### [Incremental Garbage Collection in Ruby 2.2](https://yomu.fyi/post/incremental-garbage-collection-in-ruby-2-2.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Koichi Sasada
- Published: Feb 4, 2015
- Type: Explainer

Ruby 2.2 introduces RincGC, an incremental garbage collector intended to reduce the long pause times that Ruby 2.1’s generational collector could produce during major GC. The approach splits marking into fine-grained steps interleaved with Ruby execution, while lazy sweeping remains incremental; because CRuby lacks sufficient write barriers, unprotected objects are rescanned before white objects are reclaimed. The article explains the white, grey, and black object model, the write-barrier safety problem, and uses GC::Tracer events with a Rails benchmark simulating 30,000 requests to measure pauses. In the reported measurement, generational GC produced seven large pauses with a maximum of about 15 ms, while incremental GC reduced the maximum to around 2 ms, without reducing total GC time or improving throughput.
