geots wrote:lucasart wrote:Thank you Mike for this interesting analysis. This is also what I experienced in testing. For most practical purposes HT cores are like real cores, and it's a waste of CPU resources to limit yourself to the real cores only.
Here's the setup that I would recommend, assuming you have N cores, including the HT ones:
=> SMP capable engines
- pondering off: N-1 threads
- pondering on: (N-1)/2 threads
=> non SMP engines
- pondering off: play N-1 games concurrently
- pondering on: play (N-1)/2 games concurrently
The reason for N-1 is that you need to leave some CPU power to the operating system and other things running in the background, otherwise you introduce a significant amount of noise in the results.
That's for playing games. For analyzing a position, you should use N threads, of course.
Heading to get some sleep, but thought I would ask you this before I did. I have in transit a new i7 6-core system that has HT. But it can be completely disabled in the bios. Would you please repeat your above comments for me in English (meaning layman's terms) and how I should handle it in testing- HT disabled or not?
Best,
george
Regardless of urban legend, I have NEVER seen one example where using hyper threading improves the performance of a chess engine. Not a single one.
You don't need to disable HT, but if you have 6 cores, you should not run more than 6 processes in a parallel chess engine.
The reason for this is as follows.
In a good implementation of parallel search (most seem to use some flavor of the Crafty parallel search) each additional thread used adds about 30% overhead, meaning a new thread improves performance by only 70%. But with hyperthreading, you take a physical core and divide it into two equal halves.
With one core, if your tree search searches exactly 100M nodes, then on a hyper-threaded (two threads, only one physical core) each thread will search about 50M nodes in the same amount of time. Unfortunately, one of those cores will have that 30% overhead, which means you only searched the equivalent of 85M nodes as opposed to your original 100M. The search is slower. The dual threads might speed it up a bit, but nowhere near enough to offset that 30% loss.
Bottom line is to NOT use hyper threading when playing chess. You don't have to disable it as new operating system process schedulers understand the issues and will make sure each thread runs on a physical core, unless you run more threads than physical cores. At that point, you start to hurt performance.