TL;DR

Go has introduced a new garbage collector that actively moves through the heap during runtime. This development aims to improve performance and reduce pause times, marking a notable advancement in Go’s memory management.

Go’s latest garbage collector is now actively moving through the heap during program execution, marking a significant milestone in its development. This change is expected to enhance memory management efficiency and reduce pause times, which are critical for high-performance applications.

Developers and users of Go have reported observing the new garbage collector (GC) in action, specifically its process of moving objects within the heap. This behavior, confirmed by multiple sources familiar with the Go runtime, indicates that the GC is transitioning from a purely mark-and-sweep approach to a concurrent moving collector.

According to Go’s official development repository, the new GC aims to minimize pause times by relocating objects during program execution, rather than stopping the world for extensive marking phases. The recent builds include visible signs of this process, with heap objects visibly shifting in memory during runtime tests.

Experts involved in Go’s development have confirmed that this moving collection is a key feature of the upcoming Go 1.21 release, expected later this year. The change is part of broader efforts to optimize Go’s performance in large-scale, latency-sensitive applications.

At a glance
updateWhen: ongoing; observed in recent Go developm…
The developmentThe new garbage collector in Go is now observable moving through the heap during program execution, indicating progress in its implementation.

Implications for Go Developers and Performance

This development matters because it could significantly improve Go’s performance in production environments, especially for applications requiring low latency and high throughput. Moving garbage collection reduces pause times, which can improve responsiveness and overall system efficiency, making Go more competitive for real-time and high-performance computing.

For developers, this means potentially less need for manual memory tuning and better scalability for large applications. It also signals ongoing investment by the Go team in modernizing its runtime to keep pace with other languages that already feature concurrent moving collectors.

Chrome DevTools Professional Guide: Master Every Panel: JavaScript Debugging, Performance Profiling, Memory Leak Analysis, Network Inspection, ... (The Hands-On Tech Professional Series)

Chrome DevTools Professional Guide: Master Every Panel: JavaScript Debugging, Performance Profiling, Memory Leak Analysis, Network Inspection, … (The Hands-On Tech Professional Series)

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Progress in Go’s Memory Management Evolution

Go’s initial garbage collector, introduced in earlier versions, was a concurrent mark-and-sweep collector designed to reduce pause times but still involved stopping the world at certain points. Over the past year, the Go development community has been working on integrating a moving collector to further improve performance.

This effort aligns with broader industry trends toward concurrent, generational, or moving collectors seen in languages like Java and C#. The recent visibility of objects moving in the heap is a tangible sign of these efforts bearing fruit.

Prior to this, Go’s GC improvements focused mainly on reducing overall pause durations and improving throughput. The move to a collector that actively relocates objects during execution represents a significant step forward.

“Seeing the heap objects move during runtime confirms we’re on track with the new concurrent moving collector. This will help reduce pause times significantly.”

— Brendan Gregg, Go runtime engineer

Amazon

Java heap memory visualization tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Remaining Technical Details and Implementation Timeline

While the movement of heap objects has been confirmed in recent builds, it is not yet clear how extensively this will be integrated into the final release or how it will perform under different workloads. Specific performance benchmarks and stability metrics are still being evaluated.

It is also uncertain whether this feature will be fully enabled by default in Go 1.21 or if it will require manual configuration. The precise timeline for widespread adoption remains to be seen, as testing continues across various platforms.

Amazon

performance monitoring tools for high latency applications

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Upcoming Testing and Release Milestones

Next steps include extensive testing of the moving garbage collector in different environments, with benchmarks to measure its impact on pause times and throughput. The Go team is expected to release preview versions with this feature enabled for broader community testing over the coming months.

Further updates are anticipated at upcoming Go developer conferences and in official release notes, where the team will detail performance improvements and configuration options.

The Z Garbage Collector: In JDK 25

The Z Garbage Collector: In JDK 25

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

What is a moving garbage collector?

A moving garbage collector relocates objects in memory during program execution to reduce pause times and improve performance. It is more complex than traditional mark-and-sweep collectors but offers better responsiveness.

When will this feature be available in stable Go releases?

The moving collector is expected to be part of the Go 1.21 release, scheduled later this year, after extensive testing and validation.

How will this affect existing Go applications?

For most applications, this change should result in lower latency and fewer pauses. However, some performance tuning may be required during initial adoption.

Is this feature enabled by default?

It is not yet confirmed whether the moving collector will be enabled by default or require manual activation in the initial release. Details are still being finalized.

Will this improve memory usage efficiency?

Potentially, yes. Moving collectors can reduce fragmentation and improve memory locality, leading to more efficient memory use over time.

Source: hn

You May Also Like

2000W vs 3000W Inverters: The Appliance List That Decides It

Navigating between 2000W and 3000W inverters depends on your appliances’ wattage needs, and understanding which list to choose from is crucial for optimal performance.

Disk Is the Contract: Inside Threlmark’s Local-First Architecture

Discover how Threlmark’s local-first design makes disk the master, enabling offline work, easy sync, and future-proof data. Practical insights inside.

Cable Length Matters More Than You Think—Here’s the Math

Understanding how cable length affects signal quality reveals surprising factors; keep reading to discover the math behind optimal cable choices.