Top 3 Common Cache Line Sizes in Modern CPUs

While 64-byte cache lines are standard for most x86-64 and ARM64 processors, some architectures like Apple's M-series use 128 bytes, and IBM's s390x can use up to 256 bytes, influencing optimal data alignment.

The top 3

  1. 64-Byte Cache: The x86/ARM64 Standard & Its Logic: The 64-byte cache line is the predominant size in modern x86_64 and most ARM64 processors, striking a balance between exploiting spatial locality, minimizing cache tag overhead, and avoiding excessive data transfer for non-sequential accesses. This size has become a de facto standard, influencing both hardware design and software optimization to prevent issues like false sharing.
  2. Apple M-Series & POWER: The 128-Byte Cache Line Advantage: Specific high-performance architectures, notably Apple's M-series chips and some IBM POWER processors, utilize 128-byte cache lines. While this can lead to a higher cache hit rate for applications with highly sequential data access patterns, it carries the trade-off of potentially greater memory bandwidth wastage if fetched data within the larger line is not fully utilized.
  3. Cache Line Trade-offs: Balancing Prefetching & False Sharing: Choosing a cache line size involves a critical trade-off: larger lines boost prefetching for sequential access but increase false sharing, where unrelated data on the same line invalidates caches; smaller lines reduce false sharing but may require more fetches for contiguous data.

Sources

Open the full topic