[Nottingham] Intel HT performance and OS idle process

Martin martin at ml1.co.uk
Thu Apr 12 16:22:16 BST 2007


Folks,

Here's a good deep question for the kernel and CPU fiends from a
discussion on seti at home ("s at h"):


[For a question of whether, on a CPU with "Hyperthreading" enabled, a
busy-wait idle loop of NOPs on one CPU thread will slow down processing
of the simultaneous second CPU thread that is trying to do useful work...]

>From various surfings round on the question, the general notes are that
there can be up to a 16% slowdown due to CPU cache poisoning or FSB
bandwidth limits for a multithreaded application running on a HT P4. One
good example is Divx. Another more serious example is with running
databases under heavy load where they may perform much better with HT
turned off!

There is also, for contrast, the example with s at h whereby the overall
processing throughput is increased by running two processes on a HT P4
over that of running the two processes sequentially on a P4 with the HT
off. For this example, likely the CPU cache poisoning isn't happening.

And then we are back to the question of whether a Windows "idle loop
process" on one thread of a HT P4 will slow down whatever else is
running on the other HT thread for that CPU...


Does Windows (which ones) always run one idle process per physical (or
'logical/virtual') CPU?

What do other OSes do with the Intel HT when idle, such as Mac OSX, BSD,
and Linux?

Can anyone benchmark a HT system to see what the timing difference is for:

1: HT on, one s at h WU (or whatever) processed (and the second logical CPU
remains 'idle')?
2: HT off, one s at h WU (or whatever) processed?

My suggestion is that for some OSes at least, case "1" will run slower
than case "2" due to idle loop interference...


Two interesting links about this are:

Be aware: To Hyper or not to Hyper
http://blogs.msdn.com/slavao/archive/2005/11/12/492119.aspx

Platform Benchmarking Part 2: Intel Pentium 4 Platforms
http://www.digit-life.com/articles2/rmma/rmma-p4.html



Anyone here know?...

Cheers,
Martin

-- 
----------------
Martin Lomas
martin at ml1.co.uk
----------------



More information about the Nottingham mailing list