logoalt Hacker News

ls65536 • today at 12:55 PM • 0 replies • view on HN

It can often still be worthwhile to keep SMT enabled (if available), and very often it is for many general use cases, but it definitely depends on the workload.

Modern cores have become exceptionally good at extracting instruction-level parallelism from a single thread, so SMT becomes relatively less useful all else being equal. At the same time, modern cores also have much wider and more numerous internal resources where a single thread will be more likely to leave more of these resources idle (which could be useful to another simultaneously executing thread).

It seems that if you have two threads that tend to each saturate or bottleneck on the same internal CPU resources (execution resources, various buffers, caches, etc.), then SMT is more likely to reduce overall performance compared to just running a single thread at a time sequentially. But you need to measure to be sure.

As a fun anecdote, one of the best relative improvements I've seen in leaving SMT enabled (vs. disabled) was on one of the earliest (in-order!) Intel Atom CPUs. I suppose getting good ILP out of a single thread was simply not possible there, so even with the tiny execution resources available in that CPU there was still plenty to allow another thread to benefit from substantially.