Author: Tom Kerrigan
Date: 19:27:45 10/04/03
Go up one level in this thread
On October 04, 2003 at 21:59:43, Gian-Carlo Pascutto wrote: >On October 04, 2003 at 21:53:17, Tom Kerrigan wrote: > >>Well, let's say I have the latest version of Windows. > >Including new bugs? :-) > >>>>Given that, HT would have to be providing a 50% speedup for my program if it >>>>were only running on one processor, which seems unrealistically high, and that >>>>also means my program should run 100% faster with 4 threads (vs. 2) but in >>>>reality it only runs 15% faster. >>> >>>I don't get your math. >> >>Put another way, if 2 threads are spending a bunch of time on just 1 processor, >>that means the 2nd processor has a bunch of idle processing power. So if I run 4 >>threads, it should use the extra processing power and run a lot faster, but it >>doesn't. The conclusion is that when running 2 threads, each thread gets its own >>CPU. > >Assuming things are scheduled randomly, you have a 1/3 chance of getting >the thread on the wrong cpu, or 66% efficiency over the second CPU. > >Fixing this brings you to 100% efficiency on the second CPU, or a 33%/2=16% >increase in efficiency overall. > >This perfectly in line with what you measured, if I understand your post >and my math at 4am isn't totally broken. You're right, the #s do work out pretty well, but that must mean both threads are bouncing around different logical processors frequently, otherwise there'd be a disparity in the node counts of each thread. This doesn't seem likely to me but I guess it's not impossible. I wonder if there's a way to keep track of which thread is running on which processor. -Tom
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.