« All posts

Go 1.25'e Deneysel Green Tea Çöp Toplayıcısı Geldi

Go 1.25'teki deneysel Green Tea GC, bazı iş yüklerinde çöp toplama süresini %40'a kadar azaltıyor; Google'da üretimde kullanılıyor ve Go 1.26'da varsayılan olması planlanıyor.

The Go team introduced Green Tea, a new experimental garbage collector available in Go 1.25 via the GOEXPERIMENT=greenteagc build flag. Already tested in Google's own production workloads, it reduces time spent in garbage collection by around 10% on average, with some workloads seeing reductions of up to 40%. The team acknowledges that gains vary across workloads and is actively soliciting feedback, with plans to make Green Tea the default collector in Go 1.26 based on current data.

The accompanying blog post revisits the fundamentals of Go's existing mark-sweep collector to set context: objects and pointers form a graph traced from root variables, marked as visited, then swept to reclaim unreachable memory. It highlights that this simple algorithm runs concurrently and in parallel with the program, organizes memory into fixed-size pages, and tracks per-object 'seen' bits as metadata—details that underpin the optimizations Green Tea introduces.

For engineers, the significance is straightforward: lower GC pauses and CPU overhead translate into real performance and cost benefits, particularly for allocation-heavy Go services. Being available behind an experimental flag lets teams validate the improvements against real workloads before it becomes the default.

» SourceThe Go Blog