Apex › Systems & OS

False sharing

The performance bug where two cores fight over a cache line even though their threads touch different variables. Because caches move memory in 64-byte lines, two counters that happen to share a line ping-pong between cores on every write — no shared data, yet a 10×+ slowdown. Toggle packed vs padded layout and watch the coherence traffic vanish.

More in Systems & OS