Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Feb 2003 09:56:28 +1100
From:      "Peter Marrinon" <peterm@telstra.net>
To:        <freebsd-smp@freebsd.org>
Subject:   How is hyperthreading implemented?
Message-ID:  <001301c2cd69$d23fc550$15008590@GALAXY>

next in thread | raw e-mail | index | archive | help
I have a couple of questions about how hyperthreading works within FreeBSD:

1) Is hyperthreading always a good thing? For instance, I have a CPU-hogging
program that runs as a single process. When I run it on a dual CPU box with
hyperthreading, according to 'top', the process is on one of the 4 virtual
CPU's running at 99% while the other three CPU's sit back twiddling their
thumbs. That indicates that the process is using 49.5% of a physical CPU. Is
that what is really happening or is 'top' too high up in the OS to know
about hyperthreading? What I hope is happening is that my process is
actually using most of the cycles on one of the physical CPU's. Is that
correct?

2) Does the scheduler know about hyperthreading? When running two CPU hungry
programs I often see the processes on CPU0 and CPU1 with CPU2 and CPU3 being
idle. Now as CPU0 and CPU1 are the same physical CPU, would it not be better
that one of the two processes is running on CPU2 or CPU3 - or have I missed
the point somewhere?

3) [Off-topic] What is the second T in HTT for?


Regards,

Peter



---------------------------------------------------------------
Peter Marrinon
Systems Engineer
Internet Development
Global IP Networks
Telstra

+61 2 6208 1684
peterm@telstra.net



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001301c2cd69$d23fc550$15008590>