Stockfish node speed mystery

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Jouni
Posts: 3283
Joined: Wed Mar 08, 2006 8:15 pm

Stockfish node speed mystery

Post by Jouni »

I tested 1 core vs 6 core with this result:

Code: Select all

Games Completed = 100 of 100 (Avg game length = 86.408 sec)
Settings = Gauntlet/640MB/30000ms+300ms/M 450cp for 5 moves, D 100 moves/PGN:Hert500.pgn(500)
Time = 8738 sec elapsed, 0 sec remaining
 1.  SFdev 6th                	63.0/100	26-0-74  	(L: m=0 t=0 i=0 a=0)	(D: r=43 i=12 f=1 s=0 a=18)	(tpm=688.8 d=32.62 nps=14139869)
 2.  SFdev 1th                	37.0/100	0-26-74  	(L: m=0 t=0 i=0 a=26)	(D: r=43 i=12 f=1 s=0 a=18)	(tpm=699.3 d=27.01 nps=2293977)
Do You see something weird? Average node speed with 6 cores in more than 6x single core speed. Ration is 6,16 :!: . Really good scaling with NNUE. With classic evaluation ration is 5,7. Any explanation?
Jouni
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Stockfish node speed mystery

Post by Ras »

Jouni wrote: Mon Mar 01, 2021 4:51 pmAny explanation?
Maybe something with the hardware, frequency scaling, and thermals. Perhaps like this: six cores running, CPU throttling down. One core running, CPU still in the thermal limit, but cooling off. Six cores again, initially enjoying a cooler CPU, ramping up until it hits the thermals again. All of that with 86s game length on average, so the average thinking time would be rather fast so that a delayed thermal effect could even play a role.
Rasmus Althoff
https://www.ct800.net
Jouni
Posts: 3283
Joined: Wed Mar 08, 2006 8:15 pm

Re: Stockfish node speed mystery

Post by Jouni »

Thre is CPU throttling with 6 cores and NNUE. But I don't understand why just 1 core is slower than 6 core. Same test with 4 cores:

Code: Select all

 1.  SFdev 1th                   	8.0/18	0-2-16  	(L: m=0 t=0 i=0 a=2)	(D: r=9 i=3 f=1 s=0 a=3)	(tpm=671.7 d=28.16 nps=2204722)
 2.  SFdev 4th                   	10.0/18	2-0-16  	(L: m=0 t=0 i=0 a=0)	(D: r=9 i=3 f=1 s=0 a=3)	(tpm=686.6 d=32.18 nps=9238251)
Speed ration now 4,19. Maybe LittleBlitzer or SF count node speed wrongly?
Jouni
Raphexon
Posts: 476
Joined: Sun Mar 17, 2019 12:00 pm
Full name: Henk Drost

Re: Stockfish node speed mystery

Post by Raphexon »

Or maybe hybrid eval gets called more with more cores.
syzygy
Posts: 5562
Joined: Tue Feb 28, 2012 11:56 pm

Re: Stockfish node speed mystery

Post by syzygy »

Raphexon wrote: Tue Mar 02, 2021 5:11 pm Or maybe hybrid eval gets called more with more cores.
Or maybe there is less pruning with more cores. Less pruning increases nps.
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Stockfish node speed mystery

Post by Ras »

You could rule out or confirm the previous two postings by starting 1T SF four times in parallel instead of comparing to one instance of 4T SF.
Rasmus Althoff
https://www.ct800.net
Dann Corbit
Posts: 12538
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Stockfish node speed mystery

Post by Dann Corbit »

If hash hits are counted as nodes, then it is explained easily.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
acepoint_de
Posts: 86
Joined: Tue Jun 11, 2013 1:14 am

Re: Stockfish node speed mystery

Post by acepoint_de »

Jouni wrote: Mon Mar 01, 2021 4:51 pmDo You see something weird? Average node speed with 6 cores in more than 6x single core speed. Ration is 6,16 :!: . Really good scaling with NNUE. With classic evaluation ration is 5,7. Any explanation?
When doing benchmarks on my M1 I experienced the same and was laughed at. But I didn't investigate further because regarding the benchmarks I don't see it as that important: https://acepoint.de/benchmarks-with-mor ... -apple-m1/

Ciao

acepoint