[clue-tech] 2.6 kernel compile options make Intel CPU slow

David L. Anselmi anselmi at anselmi.us
Tue Aug 3 23:15:34 MDT 2010


Jim Ockers wrote:
> It seems that the slowness (as indicated by the 100GB "dd if=/dev/zero
> of=/dev/null" test) occurs on a system with Intel P4 CPU whenever
> "hyperthreading" is enabled in the BIOS.

Did you ever say which 2.6 version you're using?  Can you experiment with other versions?  Can you 
narrow down your kernel config choices based on those related to hyperthreading?

This sounds like a bug or "not quite finished" feature.

> So my new questions for the group are:
>
> 1. Is the 100GB dd test flawed? Or is it indicating some actual slowness
> in the memory/CPU bandwidth? Or maybe some kernel inefficiency? Recall
> that these are all "fast" with the 2.4 Linux kernel.

Perhaps this test demonstrates some contention between multiple "hyperthreads".  If 2.4 doesn't 
support hyperthreading it wouldn't show up.  If you're exercising a shared resource it would make 
sense that handing that resource off to a thread that you're not measuring would impact your results.

This article looks interesting (don't know if it helps you) http://linuxgazette.net/103/pramode.html

> 2. Does "fastness/slowness" depend on the system workload? Would
> hyperthreading be more efficient in an interactive desktop application
> than for a background server type application with LAMP? Or does it not
> matter?

Obviously.  Didn't you say that dd is slow on a core duo but the desktop is faster?  So dd might be 
good for finding an unexpected bottleneck, but it might not represent your performance concerns very 
well.

> 3. What's up with all the Intel systems (except for Xeon) seeming slow
> but the AMD systems are fast?

Uh...  The AMDs don't hyperthread (at least not the same way that Intel does).

> 4. What might be a better test than this dd test to expose system
> performance issues?

You might look at the O'Reilly performance tuning book (but it may be somewhat dated).  Why do you 
think you have "performance issues?"  You have performance.  It varies on different hardware. 
Measure it and find the hardware that works best for you.  If you're writing your own code, it may 
have performance issues (you used an O(^n) algorithm rather than an O(1) algorithm) but you'd use a 
profiler to find those (but they might be worse on different kinds of hardware).

> 5. Should we leave hyperthreading on or turn it off? We want to try to
> use the same kernel for everything if possible (One Kernel To Rule Them
> All..)

Depends how many workloads you have and how closely they perform across your kernel and hardware 
choices.  Seems like you're in for lots of measuring (unless you can understand how kernel configs 
affect your workloads).

> Recall that the origin of this dd test was to expose the "invisible"
> thermal throttling that Intel CPUs use to protect themselves from
> overheating.

Which has nothing to do with "performance issues" but rather cooling issues, right?  I assume you're 
trying to determine what cooling is needed for various configurations.  It doesn't sound like "dd is 
too slow" is something you need to worry about, except that it interferes with your ability to 
detect cooling problems.

So you can use a 2.4 kernel for cooling measurements.

Can you measure/detect CPU temperature (which ought to relate somehow to throttling)?

Can you measure power consumption (which ought to decrease when throttling)?

Do you understand your real workloads well enough to configure for them?

Sorry I don't have any silver bullets but I hope that helps.

Dave


More information about the clue-tech mailing list