3 ms·
Are hardware threads really that useful in any scenario? I tend to disable the functionality and use actual cores for capacity planning, especially in virtuali
by SageRaven 14y ago
Are hardware threads really that useful in any scenario? I tend to disable the functionality and use actual cores for capacity planning, especially in virtualization. Running a "make -j<cores>" generally runs faster than "make -j<threads>" on the same hardware in scenarios I've tried.
Is there solid empirical data on the threads vs cores thing?
- sp332 14y agoSorry if this seems unhelpful, but it depends entirely on your workload. And things get even more complicated when you get into "turbo" mode, which only applies if you use < x% of the cores, and then AMD's new architecture with two decode and integer units for each floating-point unit... It's really hard to predict in advance how all that will interact with a particular workload. Sometimes just tweaking the scheduler can give 10-20% boost in throughput.
- zurn 14y agoIt depends even more heavily on the "threading" implementation on your hardware. Some CPUs are designed to run a bunch of threads to keep the chip busy (like the Niagara family Ultrasparcs) and others have SMT bolted on as an afterthought that mostly doesn't help (Pentium 4 "HyperThreading" or whatever Intel calls it). Then there's the AMD Bulldozer approach which is kind of between multicore and SMT, with some shared and some dedicated resources per thread. Then there's the Tera MTA style approach where you basically switch threads on every instruction to hide memory latency. Etc etc.
- kenjackson 14y agoThere's lot of data about this, but as someone else noted it is very workload dependent. It allows you to more effectively hide memory latency, but of course you still have to deal with other issues like the increased register file size. A lot of modern app architectures are effectively 3 threads (UI thread, compute thread, and compositor thread), which seem like good candidates for SMT. Although I don't think many/any mobile architectures use SMT -- I don't know how it effect power efficiency.