[CALUG] CPU/core/threads
Bryan J Smith
b.j.smith at ieee.org
Sun Feb 27 22:38:40 EST 2011
From: Jim Bauer <jfbauer at comcast.net>
> For the most part 1 CPU with 1 core and hyperthreading (2 threads)
> looks a lot like a plain old dual CPU system (1 core each, not
> hyperthreaded).
Looks, yes. Acts, no. It's _not_ an extra core that actually exists. ;)
> The kernel (and userspace) can see tell if the CPU cores have
> hyperthreadig enabled. The scheduler is (I think) using this knowledge,
> but most of the kernel just thinks there are more CPUs available.
The kernel just acts as if there was a second set of control, arithmetic,
floating-point and SIMD registers, units and other goodies per core. But there
is _not_ a set that actual that exists, it's still only one set of
registers/units per core. This is very, very important to understand, because
it can give you a little extra performance, and it can bite you with worse
performance as well (yes, worse than if it acted like it's same, real, single
set of registers/units per core).
In general it's safe to leave on for general desktop usage unless you run into
some applications or usage where it degrades performance continually. If you
are doing real-time or need more certain timing and execution, it's typically
better to turn off HyperThreading. It all depends.
More information about the CALUG
mailing list