- Dec 21, 2015
- 916
- 256
- 136
I've been trying to determine if there is some way to determine when disabling hyperthreading will help performance? I assume it depends on what is running and how many cores the CPU has?
on Linux, leaving half of the logical CPUs unused while HT/SMT is enabled gives you practically the same result as if you disabled HT/SMT in the BIOS.disabling hyperthreading
The only workloads that I use that I really need maximum CPU performance are gaming and Handbrake. This is mostly in relationhip to XEON's. They are all quad channel memory so I assume memory bandwidth is not a limiting factor. I can test Handbrake. I know it uses 8 cores at 100% but not 12. Neither my E5-2695 V2 or 5900x scale unless I do two encodes at the same time. Is there software that can tell me the number of threads something is using? Unfortunately, my E5-2695 V2 Windows install decided to get corrupted so I have to fix that before I can bench it with hyperthreading disabled.Benchmarking your particular workload on your particular hardware would be the ideal way.
Given a parallel workload, consisting of several processes/ several program instances (maybe, but not necessarily, in several containers or VMs), a first question would be if the available RAM bandwidth is enough for all the instances, or even better, if the present CPU cache size is enough for the number of instances. If not, run fewer concurrent instances if you can; obviously.
Then, if each workload instance is multi-threaded, next questions would be (a) on the software side/ data side, to which thread count the instance can scale without incurring unacceptable overhead, (b) how many threads are needed in order to sustain good utilization of your CPUs' execution units.
And then we are, en passant, getting to the topic of HyperThreading or SMT. After the points made above, it depends on the instruction profile of your workload on the one hand, and on the architecture of your CPUs on the other hand — and sometimes on whether performance or power efficiency is your priority — whether or not HyperThreading or SMT is beneficial in your workload–hardware combo.
(By "hardware" I also am implying its particular settings, e.g. fixed clock or fixed power limit, and at what levels.)
Spreadsheet people are insane.vlookup of 70k records
in this case? probably sqlite.What's the alternative?
1.) Total utilization is shown to be 67%. Xeon Gold 6248R is a 24c/48t processor. 67% utilization is most likely caused by your program's spawning exactly 32 worker threads (not counting I/O threads, GUI threads...). 32 happens to be a power of 2, so that's not completely arbitrary or coincidental. Programmers tend to love powers of 2. Especially those who program machines which are based on "bit"-wise dataprocessing. A traditional "bit" can have 2 states. And from there, a lot of power-of-2 based math starts... :-)Funny that the HT thread isn't getting utilized over 30%.
Not a custom program. It's Librecalc, the last version in the 7 series. The current 2024 series branch has multithreading borked (my guess) as it won't utilize more than 3 threads during vlookups.If your program could be taught to spawn either 24 or 48 workers instead of 32 workers, and your dataset is amenable to that, your program *might* work more efficient on this 6248R in one of these alternative cases.
Your powers of 2 explanation makes sense since it will load 4C/8T i7-4770 to 100%.67% utilization is most likely caused by your program's spawning exactly 32 worker threads (not counting I/O threads, GUI threads...). 32 happens to be a power of 2, so that's not completely arbitrary or coincidental.