<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=us-ascii" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
Maxwell Spangler wrote:
<blockquote cite="mid:1280985886.28695.109.camel@localhost.localdomain"
 type="cite">
  <pre wrap="">On Wed, 2010-08-04 at 14:31 -0600, Jim Ockers wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">The problem is that when the cooling fails (failed fan or clogged heat
sink), we get a significant performance hit, so we need to know right
away if that happens and we don't always get good information about
the cooling.  The thing we see right away is slow system performance
but it manifests itself in a variety of weird and non-obvious ways.
We have determined that we need maximum performance and nothing less
is OK so we were trying to detect failures right away.
    </pre>
    <blockquote type="cite">
      <pre wrap="">So you can use a 2.4 kernel for cooling measurements.
  
      </pre>
    </blockquote>
    <pre wrap="">A 2.6 kernel with SMP turned off behaves the same, scheduler-wise, as
the 2.4 kernel (and I'm sure that was not a SMP kernel either) on the
hyperthreading P4.
    </pre>
    <blockquote type="cite">
      <pre wrap="">Can you measure/detect CPU temperature (which ought to relate somehow to throttling)?
  
      </pre>
    </blockquote>
    <pre wrap="">Yes but not reliably enough in our 2004-vintage hardware.
    </pre>
    <blockquote type="cite">
      <pre wrap="">Can you measure power consumption (which ought to decrease when throttling)?
  
      </pre>
    </blockquote>
    <pre wrap="">Good idea, but unfortunately no in our old hardware.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Is this proprietary hardware or some old 2004 era x86 PC motherboard?
  </pre>
</blockquote>
They are old Intel motherboards.<br>
<blockquote cite="mid:1280985886.28695.109.camel@localhost.localdomain"
 type="cite">
  <pre wrap="">
If it's the latter I would think you could probe for the CPU speed and
use that (assuming that high temperatures means lowered Mhz speed equals
poor performance?).
  </pre>
</blockquote>
The Intel P4 CPU thermal throttling lowers the duty cycle of the CPU.&nbsp;
No indication is given to the OS (including lowered reported CPU
speeds) that this is happening.&nbsp; When we get a thermal failure the
overall system starts failing in really weird ways but they do not at
first glance point to thermal throttling.<br>
<br>
The dd test was a quick &amp; dirty way of telling if the CPU was on a
lowered duty cycle.&nbsp; It may be that if we could use the "P4 thermal
throttling interrupt" Linux kernel feature then that would expose this
problem.<br>
<blockquote cite="mid:1280985886.28695.109.camel@localhost.localdomain"
 type="cite">
  <pre wrap="">
I'm still really curious about your dd issue.

dd if=/dev/zero of=/dev/null

in my mind is

1) execute the dd command which simply reads in one channel and outputs
to another
2) the input channel of /dev/zero should be so simple and fast that it
can push a CPU at full speed (no i/o wait on calculating zeros, etc)
3) the output channel of /dev/null should be so simple and fast that it
can push a CPU at full speed (no i/o wait on writes, etc)

So why does a command that should be so simple take a performance hit in
a hyperthreading environment?  It bothers me, although I'm sure not as
much as you.

  </pre>
</blockquote>
Well trust me it bothers me a lot.&nbsp; I agree with you that it should not
take a performance hit under HT.&nbsp; It doesn't seem to be affected by
true SMP - there is no performance hit.&nbsp; We have now spent a lot of
time trying to figure this out and aren't much closer.&nbsp; The nearest I
can come to an explanation about the possibilities for why it's slow is
this:<br>
<br>
1.&nbsp;&nbsp;&nbsp; Linux kernel scheduler is not optimized for HT.&nbsp; Or, certain
tasks have negative optimization, but maybe other tasks are positively
optimized.<br>
2.&nbsp;&nbsp;&nbsp; Architectural issue with Intel P4 HT, which makes some things
slower but maybe makes other things faster.<br>
<br>
Since we can disable HT in the BIOS we are going to run some overall
system benchmark tests to try to figure out if the system as a whole
(including all services &amp; daemons, mysql, etc) is faster or slower
with HT disabled or enabled.<br>
<br>
Thanks for thinking about this everyone,<br>
Jim<br>
<pre class="moz-signature" cols="72">-- 
Jim Ockers, P.Eng. (<a class="moz-txt-link-abbreviated" href="mailto:ockers@ockers.net">ockers@ockers.net</a>)
Contact info: <a class="moz-txt-link-freetext" href="http://www.ockers.ca/pason.html">http://www.ockers.ca/pason.html</a>

</pre>
</body>
</html>