<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi CLUEbies,<br>
<br>
I'm replying to my own posting.&nbsp; I did get replies from Dave and
Maxwell and I have some more information about this issue.<br>
<br>
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.&nbsp; If we disable hyperthreading,
the system is as fast as it "should" be.&nbsp; 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."&nbsp; All of our AMD systems are "fast" including those with "AMD
Athlon X2 Dual Core" CPU and the AMD Phenom X4.<br>
<br>
We are not quite sure what to make of this.&nbsp; 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.<br>
<br>
So my new questions for the group are:<br>
<br>
1. Is the 100GB dd test flawed?&nbsp; Or is it indicating some actual
slowness in the memory/CPU bandwidth?&nbsp; Or maybe some kernel
inefficiency?&nbsp; Recall that these are all "fast" with the 2.4 Linux
kernel.<br>
2. Does "fastness/slowness" depend on the system workload?&nbsp; Would
hyperthreading be more efficient in an interactive desktop application
than for a background server type application with LAMP?&nbsp; Or does it
not matter?<br>
3. What's up with all the Intel systems (except for Xeon) seeming slow
but the AMD systems are fast?<br>
4. What might be a better test than this dd test to expose system
performance issues?<br>
5. Should we leave hyperthreading on or turn it off?&nbsp; We want to try to
use the same kernel for everything if possible (One Kernel To Rule Them
All..)<br>
<br>
Recall that the origin of this dd test was to expose the "invisible"
thermal throttling that Intel CPUs use to protect themselves from
overheating.&nbsp; It worked pretty well for that until the 2.6 kernel
started making it artificially "slow."<br>
<br>
Thanks,<br>
Jim<br>
<br>
Jim Ockers wrote:
<blockquote cite="mid:4C44C45E.2090508@ockers.net" type="cite"><font
 size="+1"><tt>Hi CLUEbies,<br>
  <br>
I have a curious problem.&nbsp; We compiled a custom 2.6 Linux kernel for an
embedded platform.&nbsp; The target hardware is Intel P4 or AMD.&nbsp; The
hardware used to run a 2.4 Linux kernel.&nbsp; Here is the fast/slowness
matrix:<br>
  <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Intel&nbsp;&nbsp; &nbsp;&nbsp; AMD<br>
2.4&nbsp;&nbsp;&nbsp; fast&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fast<br>
2.6&nbsp;&nbsp;&nbsp; slow&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fast<br>
  <br>
Of course you want to know what "slow" means.&nbsp; 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.&nbsp; Here is the test:<br>
  <br>
[root]# time dd if=/dev/zero of=/dev/null bs=1024k count=100000<br>
100000+0 records in<br>
100000+0 records out<br>
104857600000 bytes (105 GB) copied, 6.60495 seconds, 15.9 GB/s<br>
  <br>
On a "fast" system (per the matrix above) that command returns in about
2-2.5 seconds.&nbsp; On a "slow" system (even without any thermal
throttling) that command returns in 7-9 seconds.&nbsp; With thermal
throttling it is much worse, anywhere from 10-180 seconds depending on
the level of thermal throttling.<br>
  <br>
Here is the cpuinfo for the affected processor:<br>
  <br>
[root]# cat /proc/cpuinfo<br>
processor&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0<br>
vendor_id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : GenuineIntel<br>
cpu family&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 15<br>
model&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 4<br>
model name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Intel(R) Pentium(R) 4 CPU 3.00GHz<br>
stepping&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 1<br>
cpu MHz&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 2992.760<br>
cache size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 1024 KB<br>
physical id&nbsp;&nbsp;&nbsp;&nbsp; : 0<br>
siblings&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 2<br>
core id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0<br>
cpu cores&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 1<br>
fdiv_bug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : no<br>
hlt_bug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : no<br>
f00f_bug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : no<br>
coma_bug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : no<br>
fpu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : yes<br>
fpu_exception&nbsp;&nbsp; : yes<br>
cpuid level&nbsp;&nbsp;&nbsp;&nbsp; : 5<br>
wp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : yes<br>
flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 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<br>
bogomips&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 5987.38<br>
  <br>
  <br>
I could attach or send the .config file from which the 2.6 kernel is
compiled but it is big and noisy.&nbsp; 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:<br>
  <br>
# Processor type and features<br>
# ACPI (Advanced Configuration and Power Interface) Support<br>
# CPU Frequency scaling<br>
# CPUFreq processor drivers<br>
  <br>
We need to fix this because it is causing a lot of our systems to be
unnecessarily slow.&nbsp; Any ideas, anyone?&nbsp; What other information might
you need about this?<br>
  <br>
Thanks,<br>
Jim<br>
  </tt></font>
  <pre class="moz-signature" cols="72">-- 
Jim Ockers, P.Eng. (<a moz-do-not-send="true"
 class="moz-txt-link-abbreviated" href="mailto:ockers@ockers.net">ockers@ockers.net</a>)
Contact info: <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.ockers.ca/pason.html">http://www.ockers.ca/pason.html</a>

  </pre>
</blockquote>
<br>
</body>
</html>