What happens with my hyperthreading?

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

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
smatovic
Posts: 1463
Joined: Wed Mar 10, 2010 9:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic
Contact:

Re: What happens with my hyperthreading?

Post by smatovic » Fri Aug 07, 2020 9:34 am

You could do a plain NPS experiment with zero hashtable, just to figure out
what kind of impact memory latencies have on nowadays SF.

--
Srdja

Milos
Posts: 3832
Joined: Wed Nov 25, 2009 12:47 am

Re: What happens with my hyperthreading?

Post by Milos » Fri Aug 07, 2020 10:14 am

Laskos wrote:
Fri Aug 07, 2020 7:51 am
Milos wrote:
Fri Aug 07, 2020 3:50 am
Laskos wrote:
Thu Aug 06, 2020 7:26 pm
60% speedup from hyperthreading using SF NNUE at longer TC, pretty crazy. What's that?

4 physical cores, 8 logical

Code: Select all

Games Completed = 100 of 100 (Avg game length = 60.676 sec)
Settings = Gauntlet/128MB/15000ms+250ms/M 700cp for 3 moves, D 120 moves/EPD:C:\LittleBlitzer\2moves_80_100.epd(1749)
Time = 6115 sec elapsed, 0 sec remaining
 1.  SFNNUE 0633 8 threads    	58.0/100	29-13-58  	(L: m=0 t=0 i=0 a=13)	(D: r=31 i=10 f=3 s=0 a=14)	(tpm=436.9 d=24.20 nps=7969609)
 2.  SFNNUE 0633 4 threads    	42.0/100	13-29-58  	(L: m=0 t=0 i=0 a=29)	(D: r=31 i=10 f=3 s=0 a=14)	(tpm=440.3 d=23.83 nps=4991558)
It's pretty obvious. Your cpu (being Haswell) has 2 8-wide FMA instructions per clock cycle, i.e. 2 FMA units per core. Meaning with 2 threads it can run one instruction per thread per clock cycle. By running 2 threads per core, you are able to hide instruction and operand fetch latency while with only 1 thread per core there would be thread stalling and you wouldn't be able to use both FMA units effectively.
Wasn't this valid 3-4-5 years ago too for my CPU? I was always getting a mere 30% from hyperthreading.
You used FMA vector instructions couple a years ago? Really, what for? C'mon at least try to understand what I wrote. I mean what's the purpose if you can't even put the minimum effort?

User avatar
Laskos
Posts: 10620
Joined: Wed Jul 26, 2006 8:21 pm
Full name: Kai Laskos

Re: What happens with my hyperthreading?

Post by Laskos » Fri Aug 07, 2020 10:37 am

Milos wrote:
Fri Aug 07, 2020 10:14 am
Laskos wrote:
Fri Aug 07, 2020 7:51 am
Milos wrote:
Fri Aug 07, 2020 3:50 am
Laskos wrote:
Thu Aug 06, 2020 7:26 pm
60% speedup from hyperthreading using SF NNUE at longer TC, pretty crazy. What's that?

4 physical cores, 8 logical

Code: Select all

Games Completed = 100 of 100 (Avg game length = 60.676 sec)
Settings = Gauntlet/128MB/15000ms+250ms/M 700cp for 3 moves, D 120 moves/EPD:C:\LittleBlitzer\2moves_80_100.epd(1749)
Time = 6115 sec elapsed, 0 sec remaining
 1.  SFNNUE 0633 8 threads    	58.0/100	29-13-58  	(L: m=0 t=0 i=0 a=13)	(D: r=31 i=10 f=3 s=0 a=14)	(tpm=436.9 d=24.20 nps=7969609)
 2.  SFNNUE 0633 4 threads    	42.0/100	13-29-58  	(L: m=0 t=0 i=0 a=29)	(D: r=31 i=10 f=3 s=0 a=14)	(tpm=440.3 d=23.83 nps=4991558)
It's pretty obvious. Your cpu (being Haswell) has 2 8-wide FMA instructions per clock cycle, i.e. 2 FMA units per core. Meaning with 2 threads it can run one instruction per thread per clock cycle. By running 2 threads per core, you are able to hide instruction and operand fetch latency while with only 1 thread per core there would be thread stalling and you wouldn't be able to use both FMA units effectively.
Wasn't this valid 3-4-5 years ago too for my CPU? I was always getting a mere 30% from hyperthreading.
You used FMA vector instructions couple a years ago? Really, what for? C'mon at least try to understand what I wrote. I mean what's the purpose if you can't even put the minimum effort?
The fact is, aside SF NNUE, Sf_dev, Komodo have this "new" speed-up. Where did it came from as of now and was not there 2 years ago?

Milos
Posts: 3832
Joined: Wed Nov 25, 2009 12:47 am

Re: What happens with my hyperthreading?

Post by Milos » Fri Aug 07, 2020 10:54 am

Laskos wrote:
Fri Aug 07, 2020 10:37 am
Milos wrote:
Fri Aug 07, 2020 10:14 am
Laskos wrote:
Fri Aug 07, 2020 7:51 am
Milos wrote:
Fri Aug 07, 2020 3:50 am
Laskos wrote:
Thu Aug 06, 2020 7:26 pm
60% speedup from hyperthreading using SF NNUE at longer TC, pretty crazy. What's that?

4 physical cores, 8 logical

Code: Select all

Games Completed = 100 of 100 (Avg game length = 60.676 sec)
Settings = Gauntlet/128MB/15000ms+250ms/M 700cp for 3 moves, D 120 moves/EPD:C:\LittleBlitzer\2moves_80_100.epd(1749)
Time = 6115 sec elapsed, 0 sec remaining
 1.  SFNNUE 0633 8 threads    	58.0/100	29-13-58  	(L: m=0 t=0 i=0 a=13)	(D: r=31 i=10 f=3 s=0 a=14)	(tpm=436.9 d=24.20 nps=7969609)
 2.  SFNNUE 0633 4 threads    	42.0/100	13-29-58  	(L: m=0 t=0 i=0 a=29)	(D: r=31 i=10 f=3 s=0 a=14)	(tpm=440.3 d=23.83 nps=4991558)
It's pretty obvious. Your cpu (being Haswell) has 2 8-wide FMA instructions per clock cycle, i.e. 2 FMA units per core. Meaning with 2 threads it can run one instruction per thread per clock cycle. By running 2 threads per core, you are able to hide instruction and operand fetch latency while with only 1 thread per core there would be thread stalling and you wouldn't be able to use both FMA units effectively.
Wasn't this valid 3-4-5 years ago too for my CPU? I was always getting a mere 30% from hyperthreading.
You used FMA vector instructions couple a years ago? Really, what for? C'mon at least try to understand what I wrote. I mean what's the purpose if you can't even put the minimum effort?
The fact is, aside SF NNUE, Sf_dev, Komodo have this "new" speed-up. Where did it came from as of now and was not there 2 years ago?
For SF-NNUE it makes total sense for others I have no clue. Looks like numbers are a bit high, but only 30% extra you had before also looks too low. Maybe you didn't use AVX2 based compiles before?

User avatar
Laskos
Posts: 10620
Joined: Wed Jul 26, 2006 8:21 pm
Full name: Kai Laskos

Re: What happens with my hyperthreading?

Post by Laskos » Fri Aug 07, 2020 11:02 am

smatovic wrote:
Fri Aug 07, 2020 9:34 am
You could do a plain NPS experiment with zero hashtable, just to figure out
what kind of impact memory latencies have on nowadays SF.

--
Srdja
The same speed-up, only at some 15% lower NPS than using hashtable.

User avatar
Laskos
Posts: 10620
Joined: Wed Jul 26, 2006 8:21 pm
Full name: Kai Laskos

Re: What happens with my hyperthreading?

Post by Laskos » Fri Aug 07, 2020 11:16 am

Milos wrote:
Fri Aug 07, 2020 10:54 am
Laskos wrote:
Fri Aug 07, 2020 10:37 am
Milos wrote:
Fri Aug 07, 2020 10:14 am
Laskos wrote:
Fri Aug 07, 2020 7:51 am
Milos wrote:
Fri Aug 07, 2020 3:50 am
Laskos wrote:
Thu Aug 06, 2020 7:26 pm
60% speedup from hyperthreading using SF NNUE at longer TC, pretty crazy. What's that?

4 physical cores, 8 logical

Code: Select all

Games Completed = 100 of 100 (Avg game length = 60.676 sec)
Settings = Gauntlet/128MB/15000ms+250ms/M 700cp for 3 moves, D 120 moves/EPD:C:\LittleBlitzer\2moves_80_100.epd(1749)
Time = 6115 sec elapsed, 0 sec remaining
 1.  SFNNUE 0633 8 threads    	58.0/100	29-13-58  	(L: m=0 t=0 i=0 a=13)	(D: r=31 i=10 f=3 s=0 a=14)	(tpm=436.9 d=24.20 nps=7969609)
 2.  SFNNUE 0633 4 threads    	42.0/100	13-29-58  	(L: m=0 t=0 i=0 a=29)	(D: r=31 i=10 f=3 s=0 a=14)	(tpm=440.3 d=23.83 nps=4991558)
It's pretty obvious. Your cpu (being Haswell) has 2 8-wide FMA instructions per clock cycle, i.e. 2 FMA units per core. Meaning with 2 threads it can run one instruction per thread per clock cycle. By running 2 threads per core, you are able to hide instruction and operand fetch latency while with only 1 thread per core there would be thread stalling and you wouldn't be able to use both FMA units effectively.
Wasn't this valid 3-4-5 years ago too for my CPU? I was always getting a mere 30% from hyperthreading.
You used FMA vector instructions couple a years ago? Really, what for? C'mon at least try to understand what I wrote. I mean what's the purpose if you can't even put the minimum effort?
The fact is, aside SF NNUE, Sf_dev, Komodo have this "new" speed-up. Where did it came from as of now and was not there 2 years ago?
For SF-NNUE it makes total sense for others I have no clue. Looks like numbers are a bit high, but only 30% extra you had before also looks too low. Maybe you didn't use AVX2 based compiles before?
57% speed-up using an old SF_8 binary.

smatovic
Posts: 1463
Joined: Wed Mar 10, 2010 9:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic
Contact:

Re: What happens with my hyperthreading?

Post by smatovic » Fri Aug 07, 2020 11:28 am

Hmm, so what's left? Windows SMT and maybe some kind of CPU micro-code update?

--
Srdja

User avatar
towforce
Posts: 10346
Joined: Wed Mar 08, 2006 11:57 pm
Location: Birmingham UK

Re: What happens with my hyperthreading?

Post by towforce » Fri Aug 07, 2020 11:42 am

smatovic wrote:
Fri Aug 07, 2020 11:28 am
Hmm, so what's left? Windows SMT and maybe some kind of CPU micro-code update?

--
Srdja

Any possibility that before, other processes were consuming threads?

Maybe if the older machine was slower, Windows itself needed more thread time. Or maybe it was a different installation, with more crap (Microsoft or another software company) running under Windows? Maybe a worse virus shield, or more or less anything.
The future is more important than the past.

User avatar
Laskos
Posts: 10620
Joined: Wed Jul 26, 2006 8:21 pm
Full name: Kai Laskos

Re: What happens with my hyperthreading?

Post by Laskos » Fri Aug 07, 2020 2:42 pm

smatovic wrote:
Fri Aug 07, 2020 11:28 am
Hmm, so what's left? Windows SMT and maybe some kind of CPU micro-code update?

--
Srdja
Some nonsense is left. I will restart my PC after I finish today my project.

Milos
Posts: 3832
Joined: Wed Nov 25, 2009 12:47 am

Re: What happens with my hyperthreading?

Post by Milos » Fri Aug 07, 2020 2:59 pm

Laskos wrote:
Fri Aug 07, 2020 2:42 pm
smatovic wrote:
Fri Aug 07, 2020 11:28 am
Hmm, so what's left? Windows SMT and maybe some kind of CPU micro-code update?

--
Srdja
Some nonsense is left. I will restart my PC after I finish today my project.
Did you check HT off nps numbers are they the same as before or maybe lower?
Maybe something is screwed with your HT off in OS?

Post Reply