Author: Robert Hyatt
Date: 08:12:24 04/10/03
Go up one level in this thread
On April 10, 2003 at 00:39:24, Anthony Cozzie wrote: >On April 09, 2003 at 23:00:58, Robert Hyatt wrote: > >>On April 09, 2003 at 21:46:19, Anthony Cozzie wrote: >> >>>Crafty seems to be unique in that it gets a lot from hyperthreading - Fritz does >>>not, as Charles' benchmarks show. >>> >>>SMT is not a guaranteed win. For SMT to accelerate a chess program, the >>>following inequality must be true: >>> >>>(1+S)*1.7/2 > 1 >>> >>>=> S >= 17% (approximately: SMP speedup varies a lot over various positions) >>> >>>In other words, Crafty on a PIV will get 30% from hyperthreading and a positive >>>speedup, Fritz on a PIV will get 10% from hyperthreading and a relative slowdown >>>in search (even as NPS go down). >>> >>>anthony >> >> >>I do _not_ follow a discussion which talks about a slowdown. >> >>If a program produces _any_ speedup on two cpus, then it should produce a >>speedup using less than two cpus, but more than one cpu (SMT in other words). >> >>If your NPS goes up by 10%, then with a 1.7x multiplier on two real cpus, >>the program should run 1.07X faster using SMT. >> >>If the NPS goes _down_ with SMT on, something else is broken, either in the >>software or the hardware. > >My understanding of SMT is as follows. The processor divides its resources >(issue queue, functional units, cache, etc) among two threads. Now, I *think* >that said threads are equal, that is, that they both get 50% of the CPU. >Otherwise, special OS code would have to be written to support SMT. Correct so far, although in reality both threads get considerably less than 50% each as much of the time finds both threads waiting for something from memory or cache, or waiting on a result from a previous instruction. > >Therefore, suppose fritz on a PIV gets 1000 knps, while with SMT enabled it gets >1100 knps. That would mean that each "virtual cpu" is creating 550 knps. >1.7x550 = 935 equivalent -> slower. So while NPS goes up, time to solution goes >down. The increased raw speed doesn't compensate for the SMP inefficiencies. >Now with *crafty*, the NPS increase is so big that it is worthwhile. You are assuming the 50% split. That's not a given. However, I have posted some results for Crafty using two real cpus, and then four logical cpus. If it were to go slower, I would be concerned. At the moment there is a problem somewhere in Crafty that only shows up on PIV systems, but that will be found. But I don't buy the 50% stuff, the cpu is not that simple internally. One thread will run at nearly full speed and the other gets slipped into the gaps, which is what I see (at least) when running Crafty. And, when you get down to it, this is what should be expected because of how the threads get intermixed. A single thread almost _never_ runs at "full speed". In fact, most run well below 50% of max cpu speed, for obvious reasons. SMT simply moves that up a bit... > >anthony
This page took 0.04 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.