public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bill Davidsen <davidsen@tmr.com>
To: Phil Endecott <phil_wueww_endecott@chezphil.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: nice and hyperthreading on atom
Date: Sun, 07 Sep 2008 21:09:29 -0400	[thread overview]
Message-ID: <48C47B49.9050804@tmr.com> (raw)
In-Reply-To: <1220795888167@dmwebmail.dmwebmail.chezphil.org>

Phil Endecott wrote:
> Phil Endecott wrote:
>> Dear Experts,
>>
>> I have an ASUS Eee with an Atom processor, which has hyperthreading 
>> enabled.  If I have two processes, one nice and the other normal, they 
>> each get 50% of the CPU time.  Of course this is what you'd expect if 
>> the scheduler didn't understand that the two virtual processors are 
>> not really independent.  I'd like to fix it.
> 
> I thought I'd try to quantify the effect with real processes.  My 
> "foreground" task is a compilation and my "background" task is a tight 
> loop at nice -9.  No doubt you would get different results with 
> different tasks (amount of I/O, cache hit rate, different nice level etc.).
> 
> With no background task running, the foreground task takes 86s whether 
> or not HT is enabled.  With the background task running, the foreground 
> task takes 97s with HT off and 104s with HT on.  104s is better than I 
> was expecting; in fact it's close enough to 97s that the problem can be 
> overlooked in this case.
> 
> I made a number of other measurements, of which the most significant is 
> that the run time with no background task comes down to 63s with -j2 
> when HT is on.  So for this compilation, hyperthreading makes the CPU 
> perform like 1.36 uniprocessors (in some sense).  I'll have to try to 
> remember how to make -j2 the default...

Phil, I got about the same improvement when CFS was being evaluated from 
patches, so I think you can trust your result, HT really does help in 
the 1.30..1.35 range depending on the application. It also seems to help 
when processes or threads are running data through a pipe, and my check 
at the time showed that this also showed a decrease in context switches.
> 
> Anyway, can I take it that the previous patches to improve this 
> behaviour have never been merged?
> 
Just to provide a confirmation of the magnitude of the benefit, no real 
new information, although you might have a real piped operation to 
track, noting the real time, CPU time, and ctx rate.

I believe that there were reports on this list of unithreaded processes 
running faster with HT on, and some of lower core temp with HT on. The 
lower core temp was at my limit of measurement, so I can only say "I 
think so," 1-3 C is too small to really trust as a power saver test.

-- 
Bill Davidsen <davidsen@tmr.com>
   "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot

      reply	other threads:[~2008-09-08  1:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-06 15:43 nice and hyperthreading on atom Phil Endecott
2008-09-06 16:31 ` Peter Zijlstra
2008-09-06 16:42 ` Arjan van de Ven
2008-09-06 18:24   ` Phil Endecott
2008-09-06 18:30   ` Ulrich Drepper
2008-09-07  9:34     ` Peter Zijlstra
2008-09-07 13:58 ` Phil Endecott
2008-09-08  1:09   ` Bill Davidsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48C47B49.9050804@tmr.com \
    --to=davidsen@tmr.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phil_wueww_endecott@chezphil.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox