Most Common Cache Line Size: 64 Bytes Dominance
The vast majority of modern CPU architectures, including x86_64 and ARM64, utilize a 64-byte cache line size as the standard unit for data transfer between memory and cache. However, some specialized architectures like Apple's M-series chips and IBM's POWER processors can use larger lines, such as 128 or even 256 bytes.
The top 3
- The 64-Byte Cache Line's Historical Roots: The prevalence of 64-byte cache lines stems from a historical balance between memory bus width, access latency, and data transfer efficiency, effectively leveraging spatial locality to reduce main memory accesses. This size became a self-reinforcing standard as both hardware and software optimized around it.
- 64-Byte Cache Line's Performance Impact: False Sharing & Prefetching: The 64-byte cache line size critically impacts performance, particularly through 'false sharing' where unrelated data from different threads sharing a line causes unnecessary cache invalidations and reloads. Conversely, this size enhances hardware prefetching efficiency, allowing the CPU to proactively load contiguous 64-byte blocks, improving performance for spatially local data access patterns.
- Optimal Cache Line Size: Trade-offs of Larger vs. Smaller: The 64-byte cache line represents a critical trade-off: smaller lines reduce wasted data but increase tag overhead and require more main memory accesses for sequential data, while larger lines reduce tag overhead and improve sequential access but increase memory traffic for random access and exacerbate false sharing.
Sources
Open the full topic