Within caches, memory is stored in contiguous chunks called cache lines, which are always a power of two in length. If two CPUs write to two separate variables that share the same cache line, they are forced to take turns. This phenomenon is called False Sharing.

To prevent it, pad cache lines with empty data to ensure each independently-written variable occupies its own cache line.

TAKEAWAY: check if any data structure is being written to by multiple threads and check for false sharing.

See also

References