- To: Rev Simon Rumble <simon@xxxxxxxxxx>, slug@xxxxxxxxxxx
- Subject: Re: [SLUG] Hyperthreading
- From: Peter Chubb <peterc@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 04 Jul 2008 13:19:18 +1000
- Organization: Gelato@UNSW
- User-agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 MULE XEmacs/21.4 (patch 21) (Educational Television) (x86_64-linux-gnu)
>>>>> "Simon" == Simon Rumble <Rev> writes:
Simon> I have an Intel Xeon 3 gig CPU and have hyperthreading turned
Simon> on in the BIOS. I've been trying to work out what the
Simon> advantages and disadvantages of this are.
Simon> The CPU appears as two CPUs to the machine, which means that
Simon> non-threaded apps don't appear to use the whole CPU. Is this a
Simon> correct assumption? For example, using Devede to convert
Simon> video, the transcode process only uses 50% of CPU in top. If I
Simon> run another CPU-intensive process, the CPU usage in top goes
Simon> close to 100%.
This is an incorrect assumption. Linux treats each thread for the purposes of
calculating CPU usage as a separate core. So even if one (hyper)thread
is using 100% of the processor, it'll show up as 50% usage.
If you have more than one running thread/process, hyperthreading
typically gives between 1 and 30% increase in throughput (compared
with the same processor with SMT turned off). If you have
a single thread, then there should be no performance penalty (except
that you can probably gain performance by configuring ou kernel a a
uniprocessor kernel, and avoiding all the locking overhead).
--
Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au
http://www.ertos.nicta.com.au ERTOS within National ICT Australia