−04 · Category

Runtime internals

The scheduler, the memory allocator, the garbage collector, goroutine stacks, the netpoller, runtime/trace. What actually happens beneath a language feature.

Articles in “Runtime internals”

5 articles

The GOGC I set next to GOMEMLIMIT never fired

GOGC=100 with a 256 MiB limit produced exactly what GOGC=off produced: same collections, same CPU share, same throughput. The tighter rule binds, the other goes quiet.

Runtime internals

GOMAXPROCS is not your thread count

GOMAXPROCS=1 with 200 goroutines blocked in read(2) produced 202 OS threads. Measured on go1.27.0, alongside the container case Go 1.25 changed.

Runtime internals

sync.Pool survives one GC, not two

A pool holding 100 objects lost none across one collection and all 100 across two. Here is the victim cache, and what it costs at 122,000 ops per millisecond.

Runtime internals

Arrow keys to move, Enter to open.