Join PrimeGrid
Returning Participants
Community
Leader Boards
Results
Other
drummers-lowrise
|
Message boards :
Number crunching :
Is turning on hyper threading better if you still assign number of tasks to only pysical cores?
Author |
Message |
|
All things being equal, if I assign a number of tasks only to the number of physical cores but turn on hyper threading for any kind of "overhead" would you generally expect better performance? | |
|
James Project administrator Volunteer tester Send message
Joined: 19 Sep 14 Posts: 95 ID: 366225 Credit: 523,713,437 RAC: 0
                   
|
These things vary from system to system, from OS to OS, and from subproject to subprojects; only way to know for sure is to try it out for yourself.
That being said, there typically isn't that great of a difference IIRC. | |
|
|
Thanks James! | |
|
streamVolunteer moderator Project administrator Volunteer developer Volunteer tester Send message
Joined: 1 Mar 14 Posts: 834 ID: 301928 Credit: 488,476,972 RAC: 0
                       
|
All things being equal, if I assign a number of tasks only to the number of physical cores but turn on hyper threading for any kind of "overhead" would you generally expect better performance?
It depends on how OS kernel works. Not sure about better performance, but, at least, it does not harm much under Linux - Linux kernel is smart enough to correctly schedule tasks on different physical cores. You may quickly change run mode at will (using real cores only for LLR or all cores for sieving) without need to reboot and go to BIOS to turn HT on/off.
Windows is completely different story. I'm not sure about Windows 10, but early it did not distinguished between real and virtual/hyperthreaded cores, so you may end up running things on half of your real cores in hyperthreaded mode. I think that under Windows you must pin applications (or Boinc.exe itself, so started applications will inherit this setting) to correct set of "real" processor cores.
| |
|
|
My observations on Windows:
If you run single thread LLR tasks, one per core, HT on is ~10% worse than HT off. Windows scheduler is doing something bad here, which I nicknames "core smear" as it moves the threads around and I think it overlaps them at times, hence the performance loss. Can be worked around by manually setting affinity to the boinc process, which gets inherited by tasks it runs subsequently.
If you run multi-thread LLR tasks, one thread per core, HT on is essentially no different than HT off. Something about the MT operation means Windows is less stupid.
If the system is a pure cruncher, turning off HT makes things easier to manage. I don't normally run GPU tasks at the same time so don't know how that changes things.
If you run multi-socket NUMA systems with Windows, I'd go HT off unless you like micro-managing where the tasks end up. | |
|
|
My observations on Windows:
If you run single thread LLR tasks, one per core, HT on is ~10% worse than HT off. Windows scheduler is doing something bad here, which I nicknames "core smear" as it moves the threads around and I think it overlaps them at times, hence the performance loss. Can be worked around by manually setting affinity to the boinc process, which gets inherited by tasks it runs subsequently.
Does the program Project Lasso assist in keeping them on the real cpu cores and away from the HT ones? | |
|
|
My observations on Windows:
If you run single thread LLR tasks, one per core, HT on is ~10% worse than HT off. Windows scheduler is doing something bad here, which I nicknames "core smear" as it moves the threads around and I think it overlaps them at times, hence the performance loss. Can be worked around by manually setting affinity to the boinc process, which gets inherited by tasks it runs subsequently.
Does the program Project Lasso assist in keeping them on the real cpu cores and away from the HT ones?
As I understand it they're the same - with HT on each physical core has 2 virtual cores. | |
|
|
Does the program Project Lasso assist in keeping them on the real cpu cores and away from the HT ones?
As I understand it they're the same - with HT on each physical core has 2 virtual cores.
That's my understanding also, the two threads exposed are not different from each other from that perspective, but are backed by the same core. Neither are "more real" than the other. So in that sense, it doesn't matter which of the two you use, as long as you only use one of them at a time. In the single thread task scenario, I suspect Windows is NOT doing that if left to run by itself.
If I need to intervene that way, I'd just go into Task Manager, select the boinc process (not the manager) and set it to either all odd or all even numbered "processors". Windows seems to balance ok once you do that.
Process Lasso probably can do it also, but I didn't use it outside of a different performance optimisation required for Zen CCX considerations. I've since chose a different solution to that which is not to own any Ryzen CPUs. | |
|
|
(From memory, it's been a while since I checked) windows does something weird like using 7/8 "real" cores when running 8 single threaded tasks on a 16 virtual core system. | |
|
|
I don't normally run GPU tasks at the same time so don't know how that changes things.
I recently tested this with the last challenge and the was no difference running the GPU using the spare threads in run times. ie - Running 16 cores on my 3950X (HT off) then crunching GFN-18 with the GPU, run times were the same as if I was crunching no CPU work and giving the GPU full cores.
At least that's what I found any way with PG.
The same can't be said for other projects where there are performance gains by reserving 1 or more cores.
____________
| |
|
|
I recently tested this with the last challenge and the was no difference running the GPU using the spare threads in run times. ie - Running 16 cores on my 3950X (HT off) then crunching GFN-18 with the GPU, run times were the same as if I was crunching no CPU work and giving the GPU full cores.
I was thinking about it from the opposite perspective, does running a GPU task interfere with the CPU task(s) running speed. For the "low CPU" GPU tasks I'd guess not, but if a GPU tasks needs more CPU time and HT is on, I'd suspect that could cause inefficiency due to uneven balancing. Obviously a "free core" with HT off is a loss in performance. | |
|
Post to thread
Message boards :
Number crunching :
Is turning on hyper threading better if you still assign number of tasks to only pysical cores? |