1 core can be better than 6 cores (Stockfish)

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

Moderator: Ras

Uri Blass
Posts: 10769
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: 1 core can be better than 6 cores (Stockfish)

Post by Uri Blass »

Werewolf wrote: Thu Mar 06, 2025 7:59 pm
Jouni wrote: Thu Mar 06, 2025 7:49 pm Wow excellent video! Clearly current SF don't benefit practically when using over 8 cores :o .
For Elo/playing strength it will. For tactics I can't see any benefit over 2 cores!
For elo all the tests that I know are at short time control when stockfish does not use more than few seconds per move.
I wonder if there is no tactical improvement with more than 2 threads also if you use 2 seconds for every position and not one minute.
gordonr
Posts: 219
Joined: Thu Aug 06, 2009 8:04 pm
Location: UK

Re: 1 core can be better than 6 cores (Stockfish)

Post by gordonr »

2 threads

11 of 20 matching moves Rated time: 12:16
12 of 20 matching moves Rated time: 10:19
12 of 20 matching moves Rated time: 11:06

----

16 threads

18 of 20 matching moves Rated time: 05:01
17 of 20 matching moves Rated time: 06:15
15 of 20 matching moves Rated time: 08:23

5950X, hash 4 GB, 6 man tablebases, Arena 3.5 GUI, Stockfish dev Feb 5th 2025

I know that 20 positions is a small sample but it's significant how all 3 runs with 16 threads are much better than the 3 runs with 2 threads. I'm not feeling that this is just luck. Maybe something to do with the test set? I'm willing to add more positions and repeat. Feel free to tell me which positions to add or remove from my test set (see below - I tried to avoid cooks, etc). Or Carl, can you share the test set the video was based on?

Does anyone have an involved test position that isn't solved too quickly but if repeatedly solved by 2 and then 16 threads, there is no difference in performace with enough runs? Thanks

Code: Select all

3Q4/3p4/P2p4/N2b4/8/4P3/5p1p/5Kbk w - - bm Qa8; 
5k2/7p/4Kp1p/7B/7P/7P/8/8 w - - 0 1 bm Bf7;
2r5/prkpR1p1/2p1ppK1/P1p1N1B1/P1P1P3/8/8/8 w - - 0 1 bm Bf4;
4Q3/4pp2/8/1p5P/1P1p2p1/K7/1p3P2/k7 w - - 0 1 bm Qd8;
8/4nk2/1p3p2/1r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hmvc 0; id "b4!, 114";
Hai
Posts: 665
Joined: Sun Aug 04, 2013 1:19 pm

Re: 1 core can be better than 6 cores (Stockfish)

Post by Hai »

gordonr wrote: Fri Mar 07, 2025 3:54 pm 2 threads

11 of 20 matching moves Rated time: 12:16
12 of 20 matching moves Rated time: 10:19
12 of 20 matching moves Rated time: 11:06

----

16 threads

18 of 20 matching moves Rated time: 05:01
17 of 20 matching moves Rated time: 06:15
15 of 20 matching moves Rated time: 08:23

5950X, hash 4 GB, 6 man tablebases, Arena 3.5 GUI, Stockfish dev Feb 5th 2025

I know that 20 positions is a small sample but it's significant how all 3 runs with 16 threads are much better than the 3 runs with 2 threads. I'm not feeling that this is just luck. Maybe something to do with the test set? I'm willing to add more positions and repeat. Feel free to tell me which positions to add or remove from my test set (see below - I tried to avoid cooks, etc). Or Carl, can you share the test set the video was based on?

Does anyone have an involved test position that isn't solved too quickly but if repeatedly solved by 2 and then 16 threads, there is no difference in performace with enough runs? Thanks

Code: Select all

3Q4/3p4/P2p4/N2b4/8/4P3/5p1p/5Kbk w - - bm Qa8; 
5k2/7p/4Kp1p/7B/7P/7P/8/8 w - - 0 1 bm Bf7;
2r5/prkpR1p1/2p1ppK1/P1p1N1B1/P1P1P3/8/8/8 w - - 0 1 bm Bf4;
4Q3/4pp2/8/1p5P/1P1p2p1/K7/1p3P2/k7 w - - 0 1 bm Qd8;
8/4nk2/1p3p2/1r1p2pp/1P1R1N1P/6P1/3KPP2/8 w - - 0 1 bm Nd3;
k7/p1pR4/1p3p2/2P2rpB/PbP4p/2N1p2p/KP6/8 w - - 0 1 bm Bf3;
8/6pp/1K6/N5P1/3N4/8/npn1P3/k7 w - - 0 1 bm Nab3;
8/k6p/ppp2ppP/3p3R/1K1p3P/1P6/P1P3P1/8 w - - 0 1 bm Re5;
7k/4q1pp/3bP3/3p3P/Bp1P1r2/p2R4/2P3P1/K3Q3 b - - 0 38 bm Qf6;
2b1rk2/5p2/p1P5/2p2P2/2p5/7B/P7/2KR4 w - - 0 1 bm f6;
r1b5/1pk2pr1/1Rp1p1q1/p1PpPp1p/P2P1Q1P/4P1P1/4B1K1/3R4 w - - 0 1 bm e4;
2r2r1k/3qp1bp/2p3p1/1p2P3/pN1P4/4Q1PP/1P3P2/2RR2K1 w - - bm Qe4;
r1b1k2r/2p2pbp/3p2p1/2pPp3/p3P2Q/nP3PN1/P4K1P/3R3R w kq - - bm Nh5;
1r2kb1r/p5p1/1np1p1N1/3pPnB1/1p1P2B1/qP6/2PQ1P1P/1K1R3R b k - bm Nc4; hmvc 0; id "Nc4, 24";
1r3rk1/3bbppp/1qn2P2/p2pP1P1/3P4/2PB1N2/6K1/qNBQ1R2 w - - bm Bxh7+; hmvc 0; id "Bxh7+, 28";
3r2k1/p4pP1/1ppr4/5Bp1/P2qPnQP/4R3/5P2/5RK1 w - - bm e5; hmvc 0; id "e5, 79";
rnbq3r/1p2b1k1/2pp1p1p/pP3pp1/2BP3N/P3P3/2P2PPP/RN1Q1RK1 w - - bm Ng6; hmvc 0; id "Ng6, 93";
8/8/4p1Pk/1rp1K1p1/4P1P1/1nP2Q2/p2b1P2/8 w - - bm Kf6; hmvc 0; id "Kf6, Sochnev 2009, 96";
8/8/3k2p1/5ppb/3P4/1P6/1P3NP1/4K3 w - - bm g4; hmvc 0; id "g4, 98";
5b2/5k1p/1pb2pp1/1r1p4/3P1B1P/P7/1P3PP1/2R3K1 w - - bm b4; hmvc 0; id "b4!, 114";
https://www.mediafire.com/file/cypaz2t0 ... 2.pgn/file
Paloma
Posts: 1201
Joined: Thu Dec 25, 2008 9:07 pm
Full name: Herbert L

Re: 1 core can be better than 6 cores (Stockfish)

Post by Paloma »

gordonr wrote: Fri Mar 07, 2025 3:54 pm 2 threads

11 of 20 matching moves Rated time: 12:16
12 of 20 matching moves Rated time: 10:19
12 of 20 matching moves Rated time: 11:06

----

16 threads

18 of 20 matching moves Rated time: 05:01
17 of 20 matching moves Rated time: 06:15
15 of 20 matching moves Rated time: 08:23

5950X, hash 4 GB, 6 man tablebases, Arena 3.5 GUI, Stockfish dev Feb 5th 2025

I know that 20 positions is a small sample but it's significant how all 3 runs with 16 threads are much better than the 3 runs with 2 threads. I'm not feeling that this is just luck. Maybe something to do with the test set? I'm willing to add more positions and repeat. Feel free to tell me which positions to add or remove from my test set (see below - I tried to avoid cooks, etc). Or Carl, can you share the test set the video was based on?

Does anyone have an involved test position that isn't solved too quickly but if repeatedly solved by 2 and then 16 threads, there is no difference in performace with enough runs? Thanks

Code: Select all

3Q4/3p4/P2p4/N2b4/8/4P3/5p1p/5Kbk w - - bm Qa8; 
5k2/7p/4Kp1p/7B/7P/7P/8/8 w - - 0 1 bm Bf7;
2r5/prkpR1p1/2p1ppK1/P1p1N1B1/P1P1P3/8/8/8 w - - 0 1 bm Bf4;
4Q3/4pp2/8/1p5P/1P1p2p1/K7/1p3P2/k7 w - - 0 1 bm Qd8;
8/4nk2/1p3p2/1r1p2pp/1P1R1N1P/6P1/3KPP2/8 w - - 0 1 bm Nd3;
k7/p1pR4/1p3p2/2P2rpB/PbP4p/2N1p2p/KP6/8 w - - 0 1 bm Bf3;
8/6pp/1K6/N5P1/3N4/8/npn1P3/k7 w - - 0 1 bm Nab3;
8/k6p/ppp2ppP/3p3R/1K1p3P/1P6/P1P3P1/8 w - - 0 1 bm Re5;
7k/4q1pp/3bP3/3p3P/Bp1P1r2/p2R4/2P3P1/K3Q3 b - - 0 38 bm Qf6;
2b1rk2/5p2/p1P5/2p2P2/2p5/7B/P7/2KR4 w - - 0 1 bm f6;
r1b5/1pk2pr1/1Rp1p1q1/p1PpPp1p/P2P1Q1P/4P1P1/4B1K1/3R4 w - - 0 1 bm e4;
2r2r1k/3qp1bp/2p3p1/1p2P3/pN1P4/4Q1PP/1P3P2/2RR2K1 w - - bm Qe4;
r1b1k2r/2p2pbp/3p2p1/2pPp3/p3P2Q/nP3PN1/P4K1P/3R3R w kq - - bm Nh5;
1r2kb1r/p5p1/1np1p1N1/3pPnB1/1p1P2B1/qP6/2PQ1P1P/1K1R3R b k - bm Nc4; hmvc 0; id "Nc4, 24";
1r3rk1/3bbppp/1qn2P2/p2pP1P1/3P4/2PB1N2/6K1/qNBQ1R2 w - - bm Bxh7+; hmvc 0; id "Bxh7+, 28";
3r2k1/p4pP1/1ppr4/5Bp1/P2qPnQP/4R3/5P2/5RK1 w - - bm e5; hmvc 0; id "e5, 79";
rnbq3r/1p2b1k1/2pp1p1p/pP3pp1/2BP3N/P3P3/2P2PPP/RN1Q1RK1 w - - bm Ng6; hmvc 0; id "Ng6, 93";
8/8/4p1Pk/1rp1K1p1/4P1P1/1nP2Q2/p2b1P2/8 w - - bm Kf6; hmvc 0; id "Kf6, Sochnev 2009, 96";
8/8/3k2p1/5ppb/3P4/1P6/1P3NP1/4K3 w - - bm g4; hmvc 0; id "g4, 98";
5b2/5k1p/1pb2pp1/1r1p4/3P1B1P/P7/1P3PP1/2R3K1 w - - bm b4; hmvc 0; id "b4!, 114";
[d]2r5/prkpR1p1/2p1ppK1/P1p1N1B1/P1P1P3/8/8/8 w - - 0 1 bm Bf4;
SF 20250213 only sees 0.00 until the 5th move

SF11 and Crystal 3.1 are much faster
Paloma
Posts: 1201
Joined: Thu Dec 25, 2008 9:07 pm
Full name: Herbert L

Re: 1 core can be better than 6 cores (Stockfish)

Post by Paloma »

btw, it's IQ-Test Nr.68
Jouni
Posts: 3607
Joined: Wed Mar 08, 2006 8:15 pm
Full name: Jouni Uski

Re: 1 core can be better than 6 cores (Stockfish)

Post by Jouni »

I can confirm Werewolf observation: SF17 after 200 testpositions 2 cores scores exactly similar to 6 cores! I am surprised sure :o . This means definitely that hyperthreading is useless for test positions.
Jouni
Jouni
Posts: 3607
Joined: Wed Mar 08, 2006 8:15 pm
Full name: Jouni Uski

Re: 1 core can be better than 6 cores (Stockfish)

Post by Jouni »

Addition: I used 200+ difficult position not Arasan suite.
Jouni
Hai
Posts: 665
Joined: Sun Aug 04, 2013 1:19 pm

Re: 1 core can be better than 6 cores (Stockfish)

Post by Hai »

Jouni wrote: Mon Mar 10, 2025 2:15 pm I can confirm Werewolf observation: SF17 after 200 testpositions 2 cores scores exactly similar to 6 cores! I am surprised sure :o . This means definitely that hyperthreading is useless for test positions.
Exactly.
It's like using a CPU which has no hyperthreading = is -66% slower but has the same strength and same results.
gordonr
Posts: 219
Joined: Thu Aug 06, 2009 8:04 pm
Location: UK

Re: 1 core can be better than 6 cores (Stockfish)

Post by gordonr »

Jouni wrote: Mon Mar 10, 2025 2:15 pm I can confirm Werewolf observation: SF17 after 200 testpositions 2 cores scores exactly similar to 6 cores! I am surprised sure :o . This means definitely that hyperthreading is useless for test positions.
Interesting. Can you post a position where using more than 2 cores doesn't do better, on average, over many runs? Thanks
Uri Blass
Posts: 10769
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: 1 core can be better than 6 cores (Stockfish)

Post by Uri Blass »

It may be interesting to see list of test positions when 6 cores are better in average and list of test position when 6 cores are not better in average than 1 core with specific version number to see if there is something common to positions when 6 cores do not do better.