6 cores vs 1 core surprised me

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

Moderator: Ras

Jouni
Posts: 3854
Joined: Wed Mar 08, 2006 8:15 pm
Full name: Jouni Uski

6 cores vs 1 core surprised me

Post by Jouni »

Because playing takes too much time I tried Arasan test suite with 6 and 1 cores. 200 positions checked to be correct. With 6 cores 15 sec limit, but with 1 core 90 sec. So similar CPU time. Results:
Stockfish17 6 cores 181 and 1 core 189
Obsidian14 6 cores 177 and 1 core 184
Jouni
Paloma
Posts: 1225
Joined: Thu Dec 25, 2008 9:07 pm
Full name: Herbert L

Re: 6 cores vs 1 core surprised me

Post by Paloma »

A surprising result.
Maybe the hashtables slow down the 6 cores?

Very good investigation!
User avatar
Steve Maughan
Posts: 1319
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Re: 6 cores vs 1 core surprised me

Post by Steve Maughan »

Hi Jouni,

Isn't this what you'd expect? If I've understood correctly, you're giving the 1 core run six times the amount of time to solve the problems than the six core. Multi-core engines get (severely) diminishing marginal benefit from additional cores, so one would expect the single-core engine to out-perform the six-core engine if time per cores is equal.

— Steve
Jouni wrote: Thu Dec 12, 2024 9:12 pm Because playing takes too much time I tried Arasan test suite with 6 and 1 cores. 200 positions checked to be correct. With 6 cores 15 sec limit, but with 1 core 90 sec. So similar CPU time. Results:
Stockfish17 6 cores 181 and 1 core 189
Obsidian14 6 cores 177 and 1 core 184
http://www.chessprogramming.net - Juggernaut & Maverick Chess Engine
Werewolf
Posts: 2084
Joined: Thu Sep 18, 2008 10:24 pm
Full name: Carl Bicknell

Re: 6 cores vs 1 core surprised me

Post by Werewolf »

Steve Maughan wrote: Thu Dec 12, 2024 11:12 pm Hi Jouni,

Isn't this what you'd expect? If I've understood correctly, you're giving the 1 core run six times the amount of time to solve the problems than the six core. Multi-core engines get (severely) diminishing marginal benefit from additional cores, so one would expect the single-core engine to out-perform the six-core engine if time per cores is equal.

— Steve
Jouni wrote: Thu Dec 12, 2024 9:12 pm Because playing takes too much time I tried Arasan test suite with 6 and 1 cores. 200 positions checked to be correct. With 6 cores 15 sec limit, but with 1 core 90 sec. So similar CPU time. Results:
Stockfish17 6 cores 181 and 1 core 189
Obsidian14 6 cores 177 and 1 core 184
Exactly. I'm surprised people are surprised.
Vinvin
Posts: 5320
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: 6 cores vs 1 core surprised me

Post by Vinvin »

Yes, if I remember well, 4 CPUs system is about the same strength as 1 CPU speed x3 or 3 times longer thinking (without permanent brain). So, for 6 CPUs, my guess is around 4 times longer thinking with 1 CPU.
Steve Maughan wrote: Thu Dec 12, 2024 11:12 pm Hi Jouni,

Isn't this what you'd expect? If I've understood correctly, you're giving the 1 core run six times the amount of time to solve the problems than the six core. Multi-core engines get (severely) diminishing marginal benefit from additional cores, so one would expect the single-core engine to out-perform the six-core engine if time per cores is equal.

— Steve
Jouni wrote: Thu Dec 12, 2024 9:12 pm Because playing takes too much time I tried Arasan test suite with 6 and 1 cores. 200 positions checked to be correct. With 6 cores 15 sec limit, but with 1 core 90 sec. So similar CPU time. Results:
Stockfish17 6 cores 181 and 1 core 189
Obsidian14 6 cores 177 and 1 core 184
Werewolf
Posts: 2084
Joined: Thu Sep 18, 2008 10:24 pm
Full name: Carl Bicknell

Re: 6 cores vs 1 core surprised me

Post by Werewolf »

Vinvin wrote: Fri Dec 13, 2024 9:17 pm Yes, if I remember well, 4 CPUs system is about the same strength as 1 CPU speed x3 or 3 times longer thinking (without permanent brain). So, for 6 CPUs, my guess is around 4 times longer thinking with 1 CPU.
Steve Maughan wrote: Thu Dec 12, 2024 11:12 pm Hi Jouni,

Isn't this what you'd expect? If I've understood correctly, you're giving the 1 core run six times the amount of time to solve the problems than the six core. Multi-core engines get (severely) diminishing marginal benefit from additional cores, so one would expect the single-core engine to out-perform the six-core engine if time per cores is equal.

— Steve
Jouni wrote: Thu Dec 12, 2024 9:12 pm Because playing takes too much time I tried Arasan test suite with 6 and 1 cores. 200 positions checked to be correct. With 6 cores 15 sec limit, but with 1 core 90 sec. So similar CPU time. Results:
Stockfish17 6 cores 181 and 1 core 189
Obsidian14 6 cores 177 and 1 core 184
Are you sure you're not remembering YBWC? In Rybka days - pre Lazy - the formula gain for cores was CORES^0.76
So 6 cores would be 3.9x faster than one core.

I would hope Lazy SMP would beat that, certainly as core counts rise, Lazy would win.
JohnWoe
Posts: 529
Joined: Sat Mar 02, 2013 11:31 pm

Re: 6 cores vs 1 core surprised me

Post by JohnWoe »

There's nothing surprising since in multi threaded search. The extra cores just populate hash tables which helps the main thread to see deeper.
You just launch extra objects to search the tree. You will get slowdown since you need to avoid corrupting data via various locking mechanisms etc.
Ciekce
Posts: 206
Joined: Sun Oct 30, 2022 5:26 pm
Full name: Conor Anstey

Re: 6 cores vs 1 core surprised me

Post by Ciekce »

JohnWoe wrote: Sat Dec 14, 2024 1:33 am There's nothing surprising since in multi threaded search. The extra cores just populate hash tables which helps the main thread to see deeper.
wider, rather - or "better", most accurately
JohnWoe wrote: Sat Dec 14, 2024 1:33 am You will get slowdown since you need to avoid corrupting data via various locking mechanisms etc.
in practice no one actually does any locking
Jouni
Posts: 3854
Joined: Wed Mar 08, 2006 8:15 pm
Full name: Jouni Uski

Re: 6 cores vs 1 core surprised me

Post by Jouni »

Stockfish wiki says threading efficiency is 82-83%. But tested before NNUE. Maybe this confirms just that?
Jouni
Ciekce
Posts: 206
Joined: Sun Oct 30, 2022 5:26 pm
Full name: Conor Anstey

Re: 6 cores vs 1 core surprised me

Post by Ciekce »

Jouni wrote: Sat Dec 14, 2024 9:29 am Maybe this confirms just that?
it confirms literally nothing, you are looking at test positions

may the gods one day grant you understanding of proper esting, as has been explained to you in any number of fora infinite times