What is the effect of simultaneous multithreading on cache thrashing?

What is the effect of simultaneous multithreading on cache thrashing?

Simultaneous multithreading (SMT) has a mixed and workload-dependent effect on cache thrashingβ€”it can both increase contention and improve utilization, depending on how threads behave.


πŸ”΄ When SMT increases cache thrashing

SMT allows multiple threads to share the same core resources, including L1/L2 caches. This can worsen thrashing when:

1. Working sets don’t fit in cache

  • Each thread brings its own data footprint.
  • Combined working sets exceed cache capacity β†’ frequent evictions.
  • Leads to higher miss rates and reloads from L3 or memory.

2. Poor data locality across threads

  • Threads access unrelated memory regions.
  • Cache lines loaded by one thread are quickly evicted by another.
  • Classic inter-thread conflict misses.

3. False sharing

  • Threads modify different variables on the same cache line.
  • Causes cache line ping-pong (coherency traffic), especially in MESI-like protocols.

4. High memory-level parallelism workloads

  • Multiple threads generate many concurrent cache misses.
  • Can overwhelm cache and memory subsystem β†’ thrash amplification.

🟒 When SMT reduces effective thrashing

Interestingly, SMT can also mask or reduce perceived cache inefficiency:

1. Latency hiding

  • While one thread stalls on a cache miss, another uses the core.
  • Improves overall throughput even if miss rate is high.

2. Better cache line reuse (constructive sharing)

  • Threads working on shared data (e.g., OLTP workloads) may reuse cache lines.
  • Reduces redundant memory fetches.

3. Pipeline utilization

  • Even with cache pressure, SMT keeps execution units busy.
  • So performance loss from thrashing is partially amortized.

βš–οΈ Net Effect (Key Insight)

  • Cache thrashing itself usually increases under SMT due to contention.
  • But system throughput may still improve because:
    • Idle cycles are reduced
    • Memory latency is hidden

πŸ“Š Example in real systems (e.g., IBM POWER / x86)

  • On processors like IBM POWER10 or Intel Xeon:
    • L1 cache is tightly shared β†’ very sensitive to SMT contention
    • L2/L3 caches are larger β†’ absorb some pressure
  • Many enterprise systems dynamically tune SMT level (e.g., SMT-2 vs SMT-8) based on workload:
    • OLTP β†’ often benefits from SMT
    • Cache-sensitive HPC β†’ may disable SMT

🧠 Practical takeaway

  • SMT increases the probability of cache thrashing
  • But whether performance drops depends on:
    • Cache size vs working set
    • Memory access patterns
    • Degree of data sharing between threads
Looking for servers Rental ?

Call Our Expert :


  • (call for rental enquiries)

Email us :