Code RoomMutex contention plateaus throughput
HardPrep Room Coding #2961

Mutex contention plateaus throughput

On-callConcurrencySenior–Staff~40 min

A Go in-memory metrics-aggregation service can't keep up at 16 cores: throughput plateaus around the same number whether you give it 4 cores or 16, and per-request latency rises with load. A CPU profile shows a large fraction of time in `sync.(*Mutex).Lock`/runtime futex; the mutex protects a single global `map[string]*counter` that every request reads-modify-writes under one lock. `GOMAXPROCS` is set correctly and the box isn't CPU-starved overall. Adding cores didn't help throughput. Triage and explain why more cores don't help.

What a strong answer looks like

Stop the bleeding first (mitigate), then form hypotheses from real signals. Separate root cause from symptom, communicate status as you go, and close with what prevents a repeat.

0:00 of about 40 min
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.