Ideas to improve SMP scaling

Code, algorithms, languages, construction...
Post Reply
lucasart
Posts: 201
Joined: Mon Dec 17, 2012 1:09 pm
Contact:

Ideas to improve SMP scaling

Post by lucasart » Mon Apr 03, 2017 2:28 am

So far, I did the following:
  • Basic Lazy SMP: a thread pool doing a list of jobs (each job is an iteration of the ID loop, inclusive of aspiration windows inner loop). No synchronization.
  • Stop useless work "immediately": when a depth is completed, all other threads working on it (or below) are stopped. They report back to mission control, and find a useful job to work on. This was a clear gain in testing.
  • Find a useful job to do: when a thread is looking for a depth to work on, it looks for how many other threads are working on a given depth or above. If half or more, then move on to a higher depth. This rule is recursive, eventually we find a depth high enough to work on. Also a clear gain in testing.
The only search related data that is shared between threads is the hash table (using lockless hashing). Everything else is thread local (history, node counters).

Any other idea worth trying ?
"Talk is cheap. Show me the code." -- Linus Torvalds.

Post Reply