How is hyperthreading handled on amd64?
jhb at freebsd.org
Mon Mar 13 19:05:42 UTC 2006
On Monday 13 March 2006 13:45, Bill Moran wrote:
> On Mon, 13 Mar 2006 10:52:28 -0500
> John Baldwin <jhb at freebsd.org> wrote:
> > On Monday 13 March 2006 08:54, Bill Moran wrote:
> > >
> > > We've got some dell servers (Poweredge 2850 is specifically what
> > > the following tests were run on). Some of the behaviour we're
> > > seeing was unexpected. In particular, I'm rather fuzzy as to
> > > how an amd64 kernel handles hyperthreading. (Personally, I'm also
> > > a little fuzzy on whether this really is hyperthreading under amd64
> > > at all)
> > >
> > > After building a kernel with SMP, I do see 2 logical processors,
> > > and top(1) shows both of them doing their thing. However,
> > > machdep.hypterthreading_allowed is set to 0. Is the amd64 kernel
> > > ignoring this value, or is top(1) reporting incorrectly?
> > >
> > > Additionally, I'm not seeing the performance I'm accustomed to on
> > > hypterthreaded machines. Usually, throughput scales when hyperthreading
> > > is enabled and more than one process are fighting for CPU. In my
> > > tests, it seems as if there is no scaling whatsoever. i.e.: On
> > > a standard hyperthreaded machine, running 1 ubench might yield a
> > > CPU value of 100,000. Running two ubench simultaneously will usually
> > > result in each of them returning ~90,000 or so. With the amd64, I
> > > end up with each one around 50,000 - as if there were no second
> > > logical CPU (despite the fact that top(1) shows both in use).
> > >
> > > dmesg attached. I can provide more information on request.
> > Your dmesg is from a kernel that doesn't include 'options SMP' and is
> > thus only using 1 CPU.
> Really? I've triple-checked at this point and:
> 1) The kernel config file has "options SMP"
> 2) The running kernel was made from #1
> 3) top(1) shows cpus 0 and 1
> I can't argue that the boot messages don't seem to show anything to
> indicate that a second logical CPU was found.
Grab the dmesg from /var/run/dmesg.boot rather than /var/log/messages
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the freebsd-amd64