A long while back, I experimented with making a Go web server behave differently based on its heap utilization. I used runtime.ReadMemStats, but I didn’t run ReadMemStats on every request because it stops the world. More recently, I started getting curious about logging memory utilization, against a production system, where we found that it was important to see the memory in use for each and every web request. I thought back to my old friend ReadMemStats, but I was frightened of stopping the world.