To hyperthread or not to hyperthread (Crafty tested)

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.
Post Reply
Martin Thoresen
Posts: 1833
Joined: Wed Jun 21, 2006 10:07 pm

To hyperthread or not to hyperthread (Crafty tested)

Post by Martin Thoresen » Sun Oct 24, 2010 1:44 am

Hello,

I'm in the final stages of finishing the TCEC hardware upgrade.
I got a mail from a computer chess fan asking about why I was disabling hyperthreading. I have done so because "I've read it's not beneficial for computer chess".

Well, here's my tests (12 threads & 6 threads run twice each with the same results).

The hyperthreaded version gives higher np/s, 33.6 Mnps vs 31.3 Mnps... so why don't we want to use hyperthreading?

1 result posted for 6 threads and 12 threads:

Code: Select all

Crafty v23.3 JA (6 cpus)

White(1): setboard 4r1k1/pnbq1pp1/1p5p/2pP1b2/2P5/1PQ1BN1P/P2N1PP1/3R2K1 b -
Black(1): display

       +---+---+---+---+---+---+---+---+
    8  |   | . |   | . |<R>| . |<K>| . |
       +---+---+---+---+---+---+---+---+
    7  |<P>|<N>|<B>|<Q>| . |<P>|<P>|   |
       +---+---+---+---+---+---+---+---+
    6  |   |<P>|   | . |   | . |   |<P>|
       +---+---+---+---+---+---+---+---+
    5  | . |   |<P>|-P-| . |<B>| . |   |
       +---+---+---+---+---+---+---+---+
    4  |   | . |-P-| . |   | . |   | . |
       +---+---+---+---+---+---+---+---+
    3  | . |-P-|-Q-|   |-B-|-N-| . |-P-|
       +---+---+---+---+---+---+---+---+
    2  |-P-| . |   |-N-|   |-P-|-P-| . |
       +---+---+---+---+---+---+---+---+
    1  | . |   | . |-R-| . |   |-K-|   |
       +---+---+---+---+---+---+---+---+
         a   b   c   d   e   f   g   h

Black&#40;1&#41;&#58; st 180
search time set to 180.00.
Black&#40;1&#41;&#58; display stats
display statistics at end of each search.
Black&#40;1&#41;&#58;
Black&#40;1&#41;&#58; go
              time surplus   0.00  time limit 3&#58;00 (+0.00&#41; &#40;3&#58;00&#41;
              depth   time  score   variation &#40;1&#41;
starting thread 1
starting thread 2
starting thread 3
starting thread 4
starting thread 5
                9->   0.01   0.71   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Bd2 Bd6 5. Kf1 Qf5 &#40;s=4&#41;
               10     0.03   0.70   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Nd2 Be5 5. Qc1 Bd3 6. Nf3 &#40;s=3&#41;
               10->   0.03   0.70   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Nd2 Be5 5. Qc1 Bd3 6. Nf3
               11     0.04   0.72   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Bc1 Bd6 5. Bb2 f6 6. Kf1 Qf5
               11->   0.04   0.72   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Bc1 Bd6 5. Bb2 f6 6. Kf1 Qf5 &#40;s=2&#41;
               12     0.06   0.72   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Kh1
               12->   0.08   0.72   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Kh1
               13     0.09   0.74   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Kh1
                                    Bf5
               13->   0.11   0.74   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Kh1
                                    Bf5
               14     0.12   0.71   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    Qc1 Bd3 5. Nhf3 Qf5 6. Qc3 h5 7. Kh1
                                    Kh8 8. a3
               14->   0.14   0.71   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    Qc1 Bd3 5. Nhf3 Qf5 6. Qc3 h5 7. Kh1
                                    Kh8 8. a3
               15     0.25   0.68   1. ... Nd6 2. Re1 Bh7 3. Nf1 Nf5 4.
                                    Bd2 Rxe1 5. Bxe1 Bd6 6. Ne3 Qe7 7.
                                    Bd2 Qe4 8. Nxf5 Qb1+ 9. Bc1 Bxf5
               15->   0.28   0.68   1. ... Nd6 2. Re1 Bh7 3. Nf1 Nf5 4.
                                    Bd2 Rxe1 5. Bxe1 Bd6 6. Ne3 Qe7 7.
                                    Bd2 Qe4 8. Nxf5 Qb1+ 9. Bc1 Bxf5
               16     0.39   0.63   1. ... Nd6 2. Re1 Bh7 3. Nf1 Nf5 4.
                                    Bc1 Rxe1 5. Qxe1 Nd4 6. Nxd4 cxd4 7.
                                    Bb2 d3 8. Nd2 Bd6 9. Be5
               16->   0.43   0.63   1. ... Nd6 2. Re1 Bh7 3. Nf1 Nf5 4.
                                    Bc1 Rxe1 5. Qxe1 Nd4 6. Nxd4 cxd4 7.
                                    Bb2 d3 8. Nd2 Bd6 9. Be5
               17     0.65   0.68   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    f4 Ne4 5. Qb2 Bd6 6. Nhf3 f6 7. Kh2
                                    Nxd2 8. Qxd2 Be4 9. Qf2 Qf5
               17->   0.73   0.68   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    f4 Ne4 5. Qb2 Bd6 6. Nhf3 f6 7. Kh2
                                    Nxd2 8. Qxd2 Be4 9. Qf2 Qf5
               18     1.03   0.63   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    f4 Ne4 5. Qc1 Bd6 6. Nhf3 Bg6 7. Ne5
                                    Bxe5 8. fxe5 Rxe5 9. Bf4 Re8 10. Nxe4
                                    Bxe4
               18->   1.10   0.63   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    f4 Ne4 5. Qc1 Bd6 6. Nhf3 Bg6 7. Ne5
                                    Bxe5 8. fxe5 Rxe5 9. Bf4 Re8 10. Nxe4
                                    Bxe4
               19     2.26   0.74   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Qb2
                                    Bd3 8. Qc3 Bf5 9. Kh1 Bg6 10. Qb2 Bf5
               19->   2.56   0.74   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Qb2
                                    Bd3 8. Qc3 Bf5 9. Kh1 Bg6 10. Qb2 Bf5
               20     3.12   0.72   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Kh1
                                    Bh5 8. Re2 Bg6 9. Qa4 Kf8 10. Re1 Bd3
                                    11. Qb5
               20     4.54     -1   1. ... Bxh3!
               20     5.91  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               20->   5.91  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1 &#40;s=2&#41;
               21     6.47  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               21->   6.61  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               22     7.58  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               22->   7.73  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               23     9.65  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               23->   9.87  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               24    13.29  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               24->  13.74  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               25    19.95  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               25->  20.70  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               26    32.73  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               26->  34.11  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               27    56.19  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               27->   1&#58;00  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               28     1&#58;45  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               28->   1&#58;49  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
              time=3&#58;00  mat=1  n=5642234513  fh=90%  nps=31.3M
              extensions=92.6M qchecks=228.7M reduced=803.6M pruned=1934.2M
              predicted=0  evals=1429.7M  50move=0  EGTBprobes=0  hits=0
              SMP->  splits=392566  aborts=38532  data=37/65536  elap=3&#58;00
terminating SMP processes.
Black&#40;1&#41;&#58; Bxh3
              time used&#58;   3&#58;00              

Code: Select all

Crafty v23.3 JA &#40;12 cpus&#41;

White&#40;1&#41;&#58; setboard 4r1k1/pnbq1pp1/1p5p/2pP1b2/2P5/1PQ1BN1P/P2N1PP1/3R2K1 b -
Black&#40;1&#41;&#58; display

       +---+---+---+---+---+---+---+---+
    8  |   | . |   | . |<R>| . |<K>| . |
       +---+---+---+---+---+---+---+---+
    7  |<P>|<N>|<B>|<Q>| . |<P>|<P>|   |
       +---+---+---+---+---+---+---+---+
    6  |   |<P>|   | . |   | . |   |<P>|
       +---+---+---+---+---+---+---+---+
    5  | . |   |<P>|-P-| . |<B>| . |   |
       +---+---+---+---+---+---+---+---+
    4  |   | . |-P-| . |   | . |   | . |
       +---+---+---+---+---+---+---+---+
    3  | . |-P-|-Q-|   |-B-|-N-| . |-P-|
       +---+---+---+---+---+---+---+---+
    2  |-P-| . |   |-N-|   |-P-|-P-| . |
       +---+---+---+---+---+---+---+---+
    1  | . |   | . |-R-| . |   |-K-|   |
       +---+---+---+---+---+---+---+---+
         a   b   c   d   e   f   g   h

Black&#40;1&#41;&#58; st 180
search time set to 180.00.
Black&#40;1&#41;&#58; display stats
display statistics at end of each search.
Black&#40;1&#41;&#58; go
              time surplus   0.00  time limit 3&#58;00 (+0.00&#41; &#40;3&#58;00&#41;
              depth   time  score   variation &#40;1&#41;
starting thread 1
starting thread 2
starting thread 3
starting thread 4
starting thread 5
starting thread 6
starting thread 7
starting thread 8
starting thread 9
starting thread 10
starting thread 11
                9->   0.23   0.71   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Bd2 Bd6 5. Kf1 Qf5 &#40;s=4&#41;
               10     0.23   0.70   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Nd2 Be5 5. Qc1 Bd3 6. Nf3 &#40;s=3&#41;
               10->   0.24   0.70   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Nd2 Be5 5. Qc1 Bd3 6. Nf3
               11     0.26   0.72   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Bc1 Bd6 5. Bb2 f6 6. Kf1 Qf5
               11->   0.28   0.72   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Bc1 Bd6 5. Bb2 f6 6. Kf1 Qf5
               12     0.29   0.72   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Kh1
               12->   0.31   0.72   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Kh1
               13     0.34   0.74   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Kh1
                                    Bf5
               13->   0.35   0.74   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Kh1
                                    Bf5
               14     0.39   0.71   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    Qc1 Bd3 5. Nhf3 Qf5 6. Qc3 h5 7. Kh1
                                    Kh8 8. a3
               14->   0.40   0.71   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    Qc1 Bd3 5. Nhf3 Qf5 6. Qc3 h5 7. Kh1
                                    Kh8 8. a3
               15     0.54   0.78   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    Qc1 Bd3 5. Nhf3 Bf5 <HT>
               15->   0.70   0.78   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    Qc1 Bd3 5. Nhf3 Bf5 <HT>
               16     0.82   0.73   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N3d2 Nf6 6. Qa3 a5 7. Ng3
                                    Bd3 8. Nf3 Kh8 9. Kh1
               16->   0.87   0.73   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N3d2 Nf6 6. Qa3 a5 7. Ng3
                                    Bd3 8. Nf3 Kh8 9. Kh1
               17     1.13   0.63   1. ... Nd6 2. Re1 Bg6 3. Nf1 Nf5 4.
                                    Bd2 Rxe1 5. Bxe1 Qe8 6. Ne3 Bd6 7.
                                    Bd2 Qe4 8. Nxf5 Qb1+ 9. Qc1 Qxc1+ 10.
                                    Bxc1 Bxf5
               17->   1.18   0.63   1. ... Nd6 2. Re1 Bg6 3. Nf1 Nf5 4.
                                    Bd2 Rxe1 5. Bxe1 Qe8 6. Ne3 Bd6 7.
                                    Bd2 Qe4 8. Nxf5 Qb1+ 9. Qc1 Qxc1+ 10.
                                    Bxc1 Bxf5
               18     1.52   0.64   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    f4 Re7 5. a3 Ne4 6. Qb2 Bd6 7. Nhf3
                                    Nxd2 8. Qxd2 Be4 9. Ne5 Qf5 10. Qc3
                                    Bxe5 11. fxe5 Rxe5
               18->   1.62   0.64   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    f4 Re7 5. a3 Ne4 6. Qb2 Bd6 7. Nhf3
                                    Nxd2 8. Qxd2 Be4 9. Ne5 Qf5 10. Qc3
                                    Bxe5 11. fxe5 Rxe5
               19     1.96   0.68   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    f4 Re7 5. a3 Ne4 6. Nxe4 Bxe4 7. Bd2
                                    Bd6 8. Nf3 Qc7 9. Ne5 Bxe5 10. fxe5
                                    Rxe5
               19->   2.26   0.68   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    f4 Re7 5. a3 Ne4 6. Nxe4 Bxe4 7. Bd2
                                    Bd6 8. Nf3 Qc7 9. Ne5 Bxe5 10. fxe5
                                    Rxe5 &#40;s=2&#41;
               20     3.40   0.72   1. ... Nd6 2. Re1 Bg6 3. Nf1 Nf5 4.
                                    Bc1 Rxe1 5. Qxe1 Nd4 6. N1d2 Nc2 7.
                                    Qe2 Nd4 8. Nxd4 cxd4 9. Bb2 d3 10.
                                    Qg4 Qxg4 11. hxg4
               20     5.63     -1   1. ... Bxh3!
               20     6.70  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               20->   6.70  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1 &#40;s=2&#41;
               21     7.45  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               21->   7.76  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               22     8.89  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               22->   9.00  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               23    11.17  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               23->  11.40  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               24    15.07  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               24->  15.47  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               25    23.22  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               25->  23.89  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               26    39.60  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               26->  40.76  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               27     1&#58;06  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               27->   1&#58;08  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               28     1&#58;50  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               28->   1&#58;57  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
              time=3&#58;00  mat=1  n=6063685482  fh=89%  nps=33.6M
              extensions=117.0M qchecks=296.0M reduced=786.2M pruned=2007.2M
              predicted=0  evals=1597.7M  50move=0  EGTBprobes=0  hits=0
              SMP->  splits=1802696  aborts=205825  data=116/65536  elap=3&#58;00
terminating SMP processes.
Black&#40;1&#41;&#58; Bxh3
              time used&#58;   3&#58;00

bob
Posts: 20916
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: To hyperthread or not to hyperthread (Crafty tested)

Post by bob » Sun Oct 24, 2010 4:02 am

Martin Thoresen wrote:Hello,

I'm in the final stages of finishing the TCEC hardware upgrade.
I got a mail from a computer chess fan asking about why I was disabling hyperthreading. I have done so because "I've read it's not beneficial for computer chess".

Well, here's my tests (12 threads & 6 threads run twice each with the same results).

The hyperthreaded version gives higher np/s, 33.6 Mnps vs 31.3 Mnps... so why don't we want to use hyperthreading?
For the same reason you don't drive your car everywhere in low gear, even though the tachometer will read higher there than in any other gear...

For Crafty, simply run a few test positions to fixed depth using mt=6 with hyperthreading disabled. Then enable it and use mt=12. You will find, in general, that the time to reach the same depth will be a little longer with 12 threads than with 6, even though the NPS might go up by almost 10%. Each additional thread incurs about 30% in extra search overhead. 30% loss, 10% gain, is not a good trade.



1 result posted for 6 threads and 12 threads:

Code: Select all

Crafty v23.3 JA &#40;6 cpus&#41;

White&#40;1&#41;&#58; setboard 4r1k1/pnbq1pp1/1p5p/2pP1b2/2P5/1PQ1BN1P/P2N1PP1/3R2K1 b -
Black&#40;1&#41;&#58; display

       +---+---+---+---+---+---+---+---+
    8  |   | . |   | . |<R>| . |<K>| . |
       +---+---+---+---+---+---+---+---+
    7  |<P>|<N>|<B>|<Q>| . |<P>|<P>|   |
       +---+---+---+---+---+---+---+---+
    6  |   |<P>|   | . |   | . |   |<P>|
       +---+---+---+---+---+---+---+---+
    5  | . |   |<P>|-P-| . |<B>| . |   |
       +---+---+---+---+---+---+---+---+
    4  |   | . |-P-| . |   | . |   | . |
       +---+---+---+---+---+---+---+---+
    3  | . |-P-|-Q-|   |-B-|-N-| . |-P-|
       +---+---+---+---+---+---+---+---+
    2  |-P-| . |   |-N-|   |-P-|-P-| . |
       +---+---+---+---+---+---+---+---+
    1  | . |   | . |-R-| . |   |-K-|   |
       +---+---+---+---+---+---+---+---+
         a   b   c   d   e   f   g   h

Black&#40;1&#41;&#58; st 180
search time set to 180.00.
Black&#40;1&#41;&#58; display stats
display statistics at end of each search.
Black&#40;1&#41;&#58;
Black&#40;1&#41;&#58; go
              time surplus   0.00  time limit 3&#58;00 (+0.00&#41; &#40;3&#58;00&#41;
              depth   time  score   variation &#40;1&#41;
starting thread 1
starting thread 2
starting thread 3
starting thread 4
starting thread 5
                9->   0.01   0.71   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Bd2 Bd6 5. Kf1 Qf5 &#40;s=4&#41;
               10     0.03   0.70   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Nd2 Be5 5. Qc1 Bd3 6. Nf3 &#40;s=3&#41;
               10->   0.03   0.70   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Nd2 Be5 5. Qc1 Bd3 6. Nf3
               11     0.04   0.72   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Bc1 Bd6 5. Bb2 f6 6. Kf1 Qf5
               11->   0.04   0.72   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Bc1 Bd6 5. Bb2 f6 6. Kf1 Qf5 &#40;s=2&#41;
               12     0.06   0.72   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Kh1
               12->   0.08   0.72   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Kh1
               13     0.09   0.74   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Kh1
                                    Bf5
               13->   0.11   0.74   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Kh1
                                    Bf5
               14     0.12   0.71   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    Qc1 Bd3 5. Nhf3 Qf5 6. Qc3 h5 7. Kh1
                                    Kh8 8. a3
               14->   0.14   0.71   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    Qc1 Bd3 5. Nhf3 Qf5 6. Qc3 h5 7. Kh1
                                    Kh8 8. a3
               15     0.25   0.68   1. ... Nd6 2. Re1 Bh7 3. Nf1 Nf5 4.
                                    Bd2 Rxe1 5. Bxe1 Bd6 6. Ne3 Qe7 7.
                                    Bd2 Qe4 8. Nxf5 Qb1+ 9. Bc1 Bxf5
               15->   0.28   0.68   1. ... Nd6 2. Re1 Bh7 3. Nf1 Nf5 4.
                                    Bd2 Rxe1 5. Bxe1 Bd6 6. Ne3 Qe7 7.
                                    Bd2 Qe4 8. Nxf5 Qb1+ 9. Bc1 Bxf5
               16     0.39   0.63   1. ... Nd6 2. Re1 Bh7 3. Nf1 Nf5 4.
                                    Bc1 Rxe1 5. Qxe1 Nd4 6. Nxd4 cxd4 7.
                                    Bb2 d3 8. Nd2 Bd6 9. Be5
               16->   0.43   0.63   1. ... Nd6 2. Re1 Bh7 3. Nf1 Nf5 4.
                                    Bc1 Rxe1 5. Qxe1 Nd4 6. Nxd4 cxd4 7.
                                    Bb2 d3 8. Nd2 Bd6 9. Be5
               17     0.65   0.68   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    f4 Ne4 5. Qb2 Bd6 6. Nhf3 f6 7. Kh2
                                    Nxd2 8. Qxd2 Be4 9. Qf2 Qf5
               17->   0.73   0.68   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    f4 Ne4 5. Qb2 Bd6 6. Nhf3 f6 7. Kh2
                                    Nxd2 8. Qxd2 Be4 9. Qf2 Qf5
               18     1.03   0.63   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    f4 Ne4 5. Qc1 Bd6 6. Nhf3 Bg6 7. Ne5
                                    Bxe5 8. fxe5 Rxe5 9. Bf4 Re8 10. Nxe4
                                    Bxe4
               18->   1.10   0.63   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    f4 Ne4 5. Qc1 Bd6 6. Nhf3 Bg6 7. Ne5
                                    Bxe5 8. fxe5 Rxe5 9. Bf4 Re8 10. Nxe4
                                    Bxe4
               19     2.26   0.74   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Qb2
                                    Bd3 8. Qc3 Bf5 9. Kh1 Bg6 10. Qb2 Bf5
               19->   2.56   0.74   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Qb2
                                    Bd3 8. Qc3 Bf5 9. Kh1 Bg6 10. Qb2 Bf5
               20     3.12   0.72   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Kh1
                                    Bh5 8. Re2 Bg6 9. Qa4 Kf8 10. Re1 Bd3
                                    11. Qb5
               20     4.54     -1   1. ... Bxh3!
               20     5.91  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               20->   5.91  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1 &#40;s=2&#41;
               21     6.47  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               21->   6.61  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               22     7.58  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               22->   7.73  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               23     9.65  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               23->   9.87  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               24    13.29  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               24->  13.74  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               25    19.95  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               25->  20.70  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               26    32.73  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               26->  34.11  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               27    56.19  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               27->   1&#58;00  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               28     1&#58;45  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
               28->   1&#58;49  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
                                    4. Qc1 Qg4+ 5. Kf1 Qh3+ 6. Kg1
              time=3&#58;00  mat=1  n=5642234513  fh=90%  nps=31.3M
              extensions=92.6M qchecks=228.7M reduced=803.6M pruned=1934.2M
              predicted=0  evals=1429.7M  50move=0  EGTBprobes=0  hits=0
              SMP->  splits=392566  aborts=38532  data=37/65536  elap=3&#58;00
terminating SMP processes.
Black&#40;1&#41;&#58; Bxh3
              time used&#58;   3&#58;00              

Code: Select all

Crafty v23.3 JA &#40;12 cpus&#41;

White&#40;1&#41;&#58; setboard 4r1k1/pnbq1pp1/1p5p/2pP1b2/2P5/1PQ1BN1P/P2N1PP1/3R2K1 b -
Black&#40;1&#41;&#58; display

       +---+---+---+---+---+---+---+---+
    8  |   | . |   | . |<R>| . |<K>| . |
       +---+---+---+---+---+---+---+---+
    7  |<P>|<N>|<B>|<Q>| . |<P>|<P>|   |
       +---+---+---+---+---+---+---+---+
    6  |   |<P>|   | . |   | . |   |<P>|
       +---+---+---+---+---+---+---+---+
    5  | . |   |<P>|-P-| . |<B>| . |   |
       +---+---+---+---+---+---+---+---+
    4  |   | . |-P-| . |   | . |   | . |
       +---+---+---+---+---+---+---+---+
    3  | . |-P-|-Q-|   |-B-|-N-| . |-P-|
       +---+---+---+---+---+---+---+---+
    2  |-P-| . |   |-N-|   |-P-|-P-| . |
       +---+---+---+---+---+---+---+---+
    1  | . |   | . |-R-| . |   |-K-|   |
       +---+---+---+---+---+---+---+---+
         a   b   c   d   e   f   g   h

Black&#40;1&#41;&#58; st 180
search time set to 180.00.
Black&#40;1&#41;&#58; display stats
display statistics at end of each search.
Black&#40;1&#41;&#58; go
              time surplus   0.00  time limit 3&#58;00 (+0.00&#41; &#40;3&#58;00&#41;
              depth   time  score   variation &#40;1&#41;
starting thread 1
starting thread 2
starting thread 3
starting thread 4
starting thread 5
starting thread 6
starting thread 7
starting thread 8
starting thread 9
starting thread 10
starting thread 11
                9->   0.23   0.71   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Bd2 Bd6 5. Kf1 Qf5 &#40;s=4&#41;
               10     0.23   0.70   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Nd2 Be5 5. Qc1 Bd3 6. Nf3 &#40;s=3&#41;
               10->   0.24   0.70   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Nd2 Be5 5. Qc1 Bd3 6. Nf3
               11     0.26   0.72   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Bc1 Bd6 5. Bb2 f6 6. Kf1 Qf5
               11->   0.28   0.72   1. ... Nd6 2. Re1 Ne4 3. Nxe4 Bxe4
                                    4. Bc1 Bd6 5. Bb2 f6 6. Kf1 Qf5
               12     0.29   0.72   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Kh1
               12->   0.31   0.72   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Kh1
               13     0.34   0.74   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Kh1
                                    Bf5
               13->   0.35   0.74   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N1d2 Nf6 6. Qa3 a5 7. Kh1
                                    Bf5
               14     0.39   0.71   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    Qc1 Bd3 5. Nhf3 Qf5 6. Qc3 h5 7. Kh1
                                    Kh8 8. a3
               14->   0.40   0.71   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    Qc1 Bd3 5. Nhf3 Qf5 6. Qc3 h5 7. Kh1
                                    Kh8 8. a3
               15     0.54   0.78   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    Qc1 Bd3 5. Nhf3 Bf5 <HT>
               15->   0.70   0.78   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    Qc1 Bd3 5. Nhf3 Bf5 <HT>
               16     0.82   0.73   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N3d2 Nf6 6. Qa3 a5 7. Ng3
                                    Bd3 8. Nf3 Kh8 9. Kh1
               16->   0.87   0.73   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
                                    Qc1 Qd6 5. N3d2 Nf6 6. Qa3 a5 7. Ng3
                                    Bd3 8. Nf3 Kh8 9. Kh1
               17     1.13   0.63   1. ... Nd6 2. Re1 Bg6 3. Nf1 Nf5 4.
                                    Bd2 Rxe1 5. Bxe1 Qe8 6. Ne3 Bd6 7.
                                    Bd2 Qe4 8. Nxf5 Qb1+ 9. Qc1 Qxc1+ 10.
                                    Bxc1 Bxf5
               17->   1.18   0.63   1. ... Nd6 2. Re1 Bg6 3. Nf1 Nf5 4.
                                    Bd2 Rxe1 5. Bxe1 Qe8 6. Ne3 Bd6 7.
                                    Bd2 Qe4 8. Nxf5 Qb1+ 9. Qc1 Qxc1+ 10.
                                    Bxc1 Bxf5
               18     1.52   0.64   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    f4 Re7 5. a3 Ne4 6. Qb2 Bd6 7. Nhf3
                                    Nxd2 8. Qxd2 Be4 9. Ne5 Qf5 10. Qc3
                                    Bxe5 11. fxe5 Rxe5
               18->   1.62   0.64   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    f4 Re7 5. a3 Ne4 6. Qb2 Bd6 7. Nhf3
                                    Nxd2 8. Qxd2 Be4 9. Ne5 Qf5 10. Qc3
                                    Bxe5 11. fxe5 Rxe5
               19     1.96   0.68   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    f4 Re7 5. a3 Ne4 6. Nxe4 Bxe4 7. Bd2
                                    Bd6 8. Nf3 Qc7 9. Ne5 Bxe5 10. fxe5
                                    Rxe5
               19->   2.26   0.68   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
                                    f4 Re7 5. a3 Ne4 6. Nxe4 Bxe4 7. Bd2
                                    Bd6 8. Nf3 Qc7 9. Ne5 Bxe5 10. fxe5
                                    Rxe5 &#40;s=2&#41;
               20     3.40   0.72   1. ... Nd6 2. Re1 Bg6 3. Nf1 Nf5 4.
                                    Bc1 Rxe1 5. Qxe1 Nd4 6. N1d2 Nc2 7.
                                    Qe2 Nd4 8. Nxd4 cxd4 9. Bb2 d3 10.
                                    Qg4 Qxg4 11. hxg4
               20     5.63     -1   1. ... Bxh3!
               20     6.70  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               20->   6.70  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1 &#40;s=2&#41;
               21     7.45  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               21->   7.76  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               22     8.89  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               22->   9.00  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               23    11.17  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               23->  11.40  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               24    15.07  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               24->  15.47  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               25    23.22  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               25->  23.89  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               26    39.60  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               26->  40.76  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               27     1&#58;06  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               27->   1&#58;08  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               28     1&#58;50  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
               28->   1&#58;57  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
                                    4. Re1 Bd6 5. b4 Qg4+ 6. Kf1 f4 7.
                                    Bxc5 Qh3+ 8. Kg1 Qg4+ 9. Kf1
              time=3&#58;00  mat=1  n=6063685482  fh=89%  nps=33.6M
              extensions=117.0M qchecks=296.0M reduced=786.2M pruned=2007.2M
              predicted=0  evals=1597.7M  50move=0  EGTBprobes=0  hits=0
              SMP->  splits=1802696  aborts=205825  data=116/65536  elap=3&#58;00
terminating SMP processes.
Black&#40;1&#41;&#58; Bxh3
              time used&#58;   3&#58;00

User avatar
Houdini
Posts: 1471
Joined: Mon Mar 15, 2010 11:00 pm
Contact:

Re: To hyperthread or not to hyperthread (Crafty tested)

Post by Houdini » Sun Oct 24, 2010 10:23 am

Martin,

For Houdini my recommendation is to run *without* hyper-threading. Best search results with Houdini are obtained with a number of threads equal to the number of physical cores.
If one uses more threads than the number of physical cores the nps may increase slightly, but this will be more than offset by the overhead of the larger number of threads.

Robert

User avatar
hgm
Posts: 24656
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: To hyperthread or not to hyperthread (Crafty tested)

Post by hgm » Sun Oct 24, 2010 11:26 am

Martin Thoresen wrote:The hyperthreaded version gives higher np/s, 33.6 Mnps vs 31.3 Mnps... so why don't we want to use hyperthreading?
You answered your own question, not? To reach, e.g., 20 ply the hyperthreaded version needs 6.7 sec, the 6-cpu version 5.91. For 26 ply it is 40.76 vs 34.11 sec. People prefer to have a Chess engine that thinks fast. So they prefer to switch hyper-threading off.

Code: Select all

Crafty v23.3 JA &#40;6 cpus&#41;
               16->   0.43   0.63   1. ... Nd6 2. Re1 Bh7 3. Nf1 Nf5 4.
               17->   0.73   0.68   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
               18->   1.10   0.63   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
               19->   2.56   0.74   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
               20->   5.91  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
               21->   6.61  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
               22->   7.73  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
               23->   9.87  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
               24->  13.74  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
               25->  20.70  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
               26->  34.11  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
               27->   1&#58;00  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5
               28->   1&#58;49  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Re1 f5

Code: Select all

Crafty v23.3 JA &#40;12 cpus&#41;
               16->   0.87   0.73   1. ... Nd6 2. Re1 Bg6 3. Nf1 Ne4 4.
               17->   1.18   0.63   1. ... Nd6 2. Re1 Bg6 3. Nf1 Nf5 4.
               18->   1.62   0.64   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
               19->   2.26   0.68   1. ... Nd6 2. Re1 Bg6 3. Nh4 Bh7 4.
               20->   6.70  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
               21->   7.76  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
               22->   9.00  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
               23->  11.40  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
               24->  15.47  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
               25->  23.89  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
               26->  40.76  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
               27->   1&#58;08  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
               28->   1&#58;57  -0.01   1. ... Bxh3 2. gxh3 Qxh3 3. Qa1 f5
[/quote]

Jouni
Posts: 2138
Joined: Wed Mar 08, 2006 7:15 pm

Re: To hyperthread or not to hyperthread (Crafty tested)

Post by Jouni » Sun Oct 24, 2010 1:07 pm

Why on earth has Intel developed system, which make prosessor slower :shock:
Bob, can't we test HT benefit with Crafty bench?

Jouni

User avatar
hgm
Posts: 24656
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: To hyperthread or not to hyperthread (Crafty tested)

Post by hgm » Sun Oct 24, 2010 1:30 pm

It does not make it slower, does it? The Mnps goes up from 31.3 to 33.6. That is 7% _faster_. And almost free in terms of silicon real-estate. And some applications even speed up by 100% (i.e. a factor 2).

You cannot blame Intel that Bob's algorithm involves 30% overhead when it tries to use the HT in a single search, so that he cannot use the 7% extra speed that Intel offers.

bob
Posts: 20916
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: To hyperthread or not to hyperthread (Crafty tested)

Post by bob » Mon Oct 25, 2010 3:50 pm

Jouni wrote:Why on earth has Intel developed system, which make prosessor slower :shock:
Bob, can't we test HT benefit with Crafty bench?

Jouni
The bench should work. It searches a set of positions to fixed depth, so the faster it completes, the better.

HT works for some applications. However, I have greatly tuned Crafty to try to minimize random memory accesses (except for hashing). Having one thread wait on memory while another computes is the primary gain in HT. And in Crafty, that gain is minimal. And the cost of the extra thread is significant.

bob
Posts: 20916
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: To hyperthread or not to hyperthread (Crafty tested)

Post by bob » Mon Oct 25, 2010 3:51 pm

hgm wrote:It does not make it slower, does it? The Mnps goes up from 31.3 to 33.6. That is 7% _faster_. And almost free in terms of silicon real-estate. And some applications even speed up by 100% (i.e. a factor 2).

You cannot blame Intel that Bob's algorithm involves 30% overhead when it tries to use the HT in a single search, so that he cannot use the 7% extra speed that Intel offers.
I agree. Alpha/Beta is not an optimal parallel algorithm. One can do a pure minmax search and get a perfect speedup, and HT will help. But with alpha/beta, there is overhead since move ordering is not perfect, and that is a hang-up for HT.

Post Reply