How is hyperthreading handled on amd64?

John Baldwin jhb at freebsd.org
Mon Mar 13 15:52:08 UTC 2006


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.

-- 
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 mailing list