ChessUSA.com TalkChess.com
Hosted by Your Move Chess & Games
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Lazy SMP >4 Thread Slowdown
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions Flat
View previous topic :: View next topic  
Author Message
Can Cetin



Joined: 15 Sep 2017
Posts: 13

PostPost subject: Re: Lazy SMP >4 Thread Slowdown    Posted: Wed Nov 29, 2017 6:20 pm Reply to topic Reply with quote

Dann Corbit wrote:
nitrocan wrote:
I have recently implemented lazy smp and it works remarkably well with up to 4 cores. One weird thing that I did notice though is that as soon as I start using 8/16 cores, the nps actually starts decreasing instead of increasing. Same with the depth that it searches per unit time. Any ideas on why this might be happening? Could it be that too many threads are contending for the transposition table? All ideas are very welcome, thanks!


Perhaps there is a shared variable that is a bottleneck.

E.g. an eval hash (if global) might be better as a thread local storage so that each thread gets its own.

Besides the main hash table, what else is a public object in your program?


That was pretty much exactly it. After making:

-Node counter
-Killer moves
-Counter moves
-History

thread specific, the scalability of threads is now working as intended. I'm sure there are other things I should look into as well but so far so good! Thanks everyone!

If anyone's interested, here's the pull request that I have made that addresses this issue:

https://github.com/nitrocan/sctr/pull/24/files
Back to top
View user's profile Send private message
Display posts from previous:   
Subject Author Date/Time
Lazy SMP >4 Thread Slowdown Can Cetin Wed Nov 29, 2017 1:41 am
      Re: Lazy SMP >4 Thread Slowdown...NUMA? Srdja Matovic Wed Nov 29, 2017 6:41 am
            Re: Lazy SMP >4 Thread Slowdown...NUMA? Can Cetin Wed Nov 29, 2017 6:46 am
      Re: Lazy SMP >4 Thread Slowdown Richard Delorme Wed Nov 29, 2017 6:41 am
      Re: Lazy SMP >4 Thread Slowdown Ronald de Man Wed Nov 29, 2017 10:20 am
      Re: Lazy SMP >4 Thread Slowdown Dann Corbit Wed Nov 29, 2017 4:02 pm
            Re: Lazy SMP >4 Thread Slowdown Can Cetin Wed Nov 29, 2017 6:20 pm
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
Enhanced with Moby Threads