Ryzen 9 7900X: Speed test of Stockfish compiles

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

Moderator: Ras

User avatar
Ras
Posts: 2701
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Ryzen 9 7900X: Speed test of Stockfish compiles

Post by Ras »

CornfedForever wrote: Sun Jul 16, 2023 8:05 amIf you used half your cores (4), would you get roughly 11,162,474 and 5.581.237 pm 2 cores?
Here the NPS measurements for different thread counts:
16: 22324947 (x1.31)
8: 16937908 (x1.82)
4: 9286272 (x2.00)
2: 4642347 (x2.11)
1: 2199671

The sharp scaling drop when going from 8 to 16 threads is because I have 8 physical cores, so it's hyperthreading with 16 cores. However, one hyperthreaded core is worth only about 1.5 physical cores, not 2 cores.

Otherwise, you see the scaling going down already between 1 and 8, and that's because all cores are using the same system RAM, so the memory bandwidth gets shared. Desktop CPUs have only dual channel (even if equipped with 4 sticks). That's also why AMD doesn't release consumer desktop CPUs with more than 16 threads, because the memory bandwidth isn't there to support that.
Rasmus Althoff
https://www.ct800.net
CornfedForever
Posts: 648
Joined: Mon Jun 20, 2022 4:08 am
Full name: Brian D. Smith

Re: Ryzen 9 7900X: Speed test of Stockfish compiles

Post by CornfedForever »

Ras wrote: Sun Jul 16, 2023 8:55 am
CornfedForever wrote: Sun Jul 16, 2023 8:05 amIf you used half your cores (4), would you get roughly 11,162,474 and 5.581.237 pm 2 cores?
Here the NPS measurements for different thread counts:
16: 22324947 (x1.31)
8: 16937908 (x1.82)
4: 9286272 (x2.00)
2: 4642347 (x2.11)
1: 2199671

The sharp scaling drop when going from 8 to 16 threads is because I have 8 physical cores, so it's hyperthreading with 16 cores. However, one hyperthreaded core is worth only about 1.5 physical cores, not 2 cores.

Otherwise, you see the scaling going down already between 1 and 8, and that's because all cores are using the same system RAM, so the memory bandwidth gets shared. Desktop CPUs have only dual channel (even if equipped with 4 sticks). That's also why AMD doesn't release consumer desktop CPUs with more than 16 threads, because the memory bandwidth isn't there to support that.
Thanks for that!
User avatar
Ras
Posts: 2701
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Ryzen 9 7900X: Speed test of Stockfish compiles

Post by Ras »

Ras wrote: Sun Jul 16, 2023 8:55 amThat's also why AMD doesn't release consumer desktop CPUs with more than 16 threads.
Mistyped: 16 cores, not 16 threads.
Rasmus Althoff
https://www.ct800.net
bnst
Posts: 88
Joined: Tue Sep 11, 2007 12:16 pm

Re: Ryzen 9 7900X: Speed test of Stockfish compiles

Post by bnst »

Ras wrote: Sun Jul 16, 2023 8:55 am
CornfedForever wrote: Sun Jul 16, 2023 8:05 amIf you used half your cores (4), would you get roughly 11,162,474 and 5.581.237 pm 2 cores?
Here the NPS measurements for different thread counts:
16: 22324947 (x1.31)
8: 16937908 (x1.82)
4: 9286272 (x2.00)
2: 4642347 (x2.11)
1: 2199671

The sharp scaling drop when going from 8 to 16 threads is because I have 8 physical cores, so it's hyperthreading with 16 cores. However, one hyperthreaded core is worth only about 1.5 physical cores, not 2 cores.

Otherwise, you see the scaling going down already between 1 and 8, and that's because all cores are using the same system RAM, so the memory bandwidth gets shared. Desktop CPUs have only dual channel (even if equipped with 4 sticks). That's also why AMD doesn't release consumer desktop CPUs with more than 16 threads, because the memory bandwidth isn't there to support that.
It is important to note that the NPS with multiple threads doesn't show the speed-up since there is a significant overlap between the threads.
It is difficult to measure the real speed-up, but using test positions gives you an approximation.
Regards anst
Modern Times
Posts: 3752
Joined: Thu Jun 07, 2012 11:02 pm

Re: Ryzen 9 7900X: Speed test of Stockfish compiles

Post by Modern Times »

Not to mention that the clock speed is probably changing as different loads are put on the CPU.
syzygy
Posts: 5749
Joined: Tue Feb 28, 2012 11:56 pm

Re: Ryzen 9 7900X: Speed test of Stockfish compiles

Post by syzygy »

Ras wrote: Sun Jul 16, 2023 8:55 amOtherwise, you see the scaling going down already between 1 and 8, and that's because all cores are using the same system RAM, so the memory bandwidth gets shared. Desktop CPUs have only dual channel (even if equipped with 4 sticks). That's also why AMD doesn't release consumer desktop CPUs with more than 16 threads, because the memory bandwidth isn't there to support that.
It might also be shared caches that prevent linear scaling. Or a combination.

Memory bandwidth shouldn't be that much of a problem, and moderm memory systems seem to be able to process many simultaneous reads and writes.

But I am not an AMD engineer :-)