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

Jim Ockers ockers at ockers.net
Tue Aug 3 13:33:21 MDT 2010


Hi CLUEbies,

I'm replying to my own posting.  I did get replies from Dave and Maxwell 
and I have some more information about this issue.

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.  If we disable hyperthreading, 
the system is as fast as it "should" be.  We have some servers with 
Intel P4 Xeon and they are "fast" whereas the plain P4 with 
hyperthreading enabled is "slow" and with hyperthreading disabled is 
"fast."  All of our AMD systems are "fast" including those with "AMD 
Athlon X2 Dual Core" CPU and the AMD Phenom X4.

We are not quite sure what to make of this.  Also, we have tested an 
Intel "core duo" system and it's "slow" but it is running an interactive 
desktop app which is provably faster with the SMP/hyperthreading 
enabled, regardless of the "slow" indication from the dd test.

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.
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?
3. What's up with all the Intel systems (except for Xeon) seeming slow 
but the AMD systems are fast?
4. What might be a better test than this dd test to expose system 
performance issues?
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..)

Recall that the origin of this dd test was to expose the "invisible" 
thermal throttling that Intel CPUs use to protect themselves from 
overheating.  It worked pretty well for that until the 2.6 kernel 
started making it artificially "slow."

Thanks,
Jim

Jim Ockers wrote:
> Hi CLUEbies,
>
> I have a curious problem.  We compiled a custom 2.6 Linux kernel for 
> an embedded platform.  The target hardware is Intel P4 or AMD.  The 
> hardware used to run a 2.4 Linux kernel.  Here is the fast/slowness 
> matrix:
>
>        Intel      AMD
> 2.4    fast       fast
> 2.6    slow       fast
>
> Of course you want to know what "slow" means.  We have a test which we 
> use to expose thermal throttling of the Intel CPU, since without 
> "special" software there is no easy way to tell if the CPU is 
> undergoing thermal throttling.  Here is the test:
>
> [root]# time dd if=/dev/zero of=/dev/null bs=1024k count=100000
> 100000+0 records in
> 100000+0 records out
> 104857600000 bytes (105 GB) copied, 6.60495 seconds, 15.9 GB/s
>
> On a "fast" system (per the matrix above) that command returns in 
> about 2-2.5 seconds.  On a "slow" system (even without any thermal 
> throttling) that command returns in 7-9 seconds.  With thermal 
> throttling it is much worse, anywhere from 10-180 seconds depending on 
> the level of thermal throttling.
>
> Here is the cpuinfo for the affected processor:
>
> [root]# cat /proc/cpuinfo
> processor       : 0
> vendor_id       : GenuineIntel
> cpu family      : 15
> model           : 4
> model name      : Intel(R) Pentium(R) 4 CPU 3.00GHz
> stepping        : 1
> cpu MHz         : 2992.760
> cache size      : 1024 KB
> physical id     : 0
> siblings        : 2
> core id         : 0
> cpu cores       : 1
> fdiv_bug        : no
> hlt_bug         : no
> f00f_bug        : no
> coma_bug        : no
> fpu             : yes
> fpu_exception   : yes
> cpuid level     : 5
> wp              : yes
> flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca 
> cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe 
> constant_tsc pni monitor ds_cpl cid xtpr
> bogomips        : 5987.38
>
>
> I could attach or send the .config file from which the 2.6 kernel is 
> compiled but it is big and noisy.  Does anyone have suggestions about 
> what CPU options we should try to change in the kernel configuration 
> to make it "fast" with a 2.6 kernel on this Intel P4 CPU? There is a 
> dizzying number of config categories that might be related, in 
> categories like these:
>
> # Processor type and features
> # ACPI (Advanced Configuration and Power Interface) Support
> # CPU Frequency scaling
> # CPUFreq processor drivers
>
> We need to fix this because it is causing a lot of our systems to be 
> unnecessarily slow.  Any ideas, anyone?  What other information might 
> you need about this?
>
> Thanks,
> Jim
> -- 
> Jim Ockers, P.Eng. (ockers at ockers.net)
> Contact info: http://www.ockers.ca/pason.html
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue-tech/attachments/20100803/078caed6/attachment.html 


More information about the clue-tech mailing list