Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Odd hyperthreading behavior

Author: Robert Hyatt

Date: 20:42:01 10/04/03

Go up one level in this thread


On October 04, 2003 at 21:00:34, Tom Kerrigan wrote:

>I had the chance to run my program on a dual P4 Xeon (with hyperthreading).
>
>First off, there have been some involved arguments about the design and
>performance of hyperthreading on this board in the past. I'd like to settle one
>argument, namely that single threaded programs do not slow down when
>hyperthreading is on. Actually, my program did slow down by 1.3% but I think
>this is marginal and easily attributed to the scheduler, not hyperthreading.
>
>The odd part is that hyperthreading DOES slow down my program when running 2
>threads. With HT off, my program searches 90% more NPS with a 2nd thread. With
>HT on, it only searches 53% more NPS. The idle time reported by each thread is
>low and the nodes are split evenly, so it seems both processors are slowed down
>equally. What must be happening is that HT is activated some (or all?) of the
>time while searching but I have no idea what might be activating it.


Your explanation is not very clear.  You have a dual.  Did you run two
threads with HT on?  Which means that the two threads might run on two
different physical processors or two logical processors on the same
physical CPU.

process schedulers are not yet doing this right.  There are patches for linux
that I have tried and which work, but current stable kernels do not handle SMT
correctly when you have two physical processors, four logical processors, and
you run two threads.  It should run two threads on two different physical
processors but current schedulers don't do this, linux or windows.




>
>Also odd is that HT seems to be decreasing the efficiency of the search. With HT
>off, my program's time-to-ply is 64% faster with 2 threads but with HT on, it's
>only 21% faster. The time-to-ply:NPS ratios are 0.86 and 0.79 respectively.
>
>Running 4 threads with HT on results in a 15% NPS/6% time-to-ply speedup over 2
>threads.
>
>In other words, there's no contest between running 2 threads (HT off) vs.
>running 4 threads (HT on). The former wins hands down for my program.
>
>-Tom


That's different from my results.  4 threads SMT on is 20-30% faster for me.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.