mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Nikhil Rao <ncrao@google.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org,
	Venkatesh Pallipadi <venki@google.com>,
	Ken Chen <kenchen@google.com>, Paul Turner <pjt@google.com>
Subject: Re: [PATCH 0/6] [RFC] Large weight differential leads to inefficient load balancing
Date: Fri, 30 Jul 2010 15:32:19 +0200	[thread overview]
Message-ID: <1280496739.10435.10.camel@marge.simson.net> (raw)
In-Reply-To: <1280467146-32218-1-git-send-email-ncrao@google.com>

On Thu, 2010-07-29 at 22:19 -0700, Nikhil Rao wrote:
> Hi all,
> 
> We have observed that a large weight differential between tasks on a runqueue
> leads to sub-optimal machine utilization and poor load balancing. For example,
> if you have lots of SCHED_IDLE tasks (sufficient number to keep the machine 100%
> busy) and a few SCHED_NORMAL soaker tasks, we see that the machine has
> significant idle time.
> 
> The data below highlights this problem. The test machine is a 4 socket quad-core
> box (16 cpus). These experiemnts were done with v2.6.25-rc6. We spawn 16
> SCHED_IDLE soaker threads (one per-cpu) to completely fill up the machine. CPU
> utilization numbers gathered from mpstat for 10s are:
> 
> 03:30:24 PM  CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal   %idle    intr/s
> 03:30:25 PM  all   99.94    0.00    0.06    0.00    0.00    0.00    0.00    0.00  16234.65
> 03:30:26 PM  all   99.88    0.06    0.06    0.00    0.00    0.00    0.00    0.00  16374.00
> 03:30:27 PM  all   99.94    0.00    0.06    0.00    0.00    0.00    0.00    0.00  16392.00
> 03:30:28 PM  all   99.94    0.00    0.06    0.00    0.00    0.00    0.00    0.00  16612.12
> 03:30:29 PM  all   99.88    0.00    0.12    0.00    0.00    0.00    0.00    0.00  16375.00
> 03:30:30 PM  all   99.94    0.06    0.00    0.00    0.00    0.00    0.00    0.00  16440.00
> 03:30:31 PM  all   99.81    0.00    0.19    0.00    0.00    0.00    0.00    0.00  16237.62
> 03:30:32 PM  all   99.94    0.00    0.06    0.00    0.00    0.00    0.00    0.00  16360.00
> 03:30:33 PM  all   99.94    0.00    0.06    0.00    0.00    0.00    0.00    0.00  16405.00
> 03:30:34 PM  all   99.38    0.06    0.50    0.00    0.00    0.00    0.00    0.06  18881.82
> Average:     all   99.86    0.02    0.12    0.00    0.00    0.00    0.00    0.01  16628.20
> 
> We then spawn one SCHED_NORMAL while-1 task (the absolute number does not matter
> so long as we introduce some large weight differential).
> 
> 03:40:57 PM  CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal   %idle    intr/s
> 03:40:58 PM  all   83.06    0.00    0.06    0.00    0.00    0.00    0.00   16.88  14555.00
> 03:40:59 PM  all   78.25    0.00    0.06    0.00    0.00    0.00    0.00   21.69  14527.00
> 03:41:00 PM  all   82.71    0.06    0.06    0.00    0.00    0.00    0.00   17.17  14879.00
> 03:41:01 PM  all   87.34    0.00    0.06    0.00    0.00    0.00    0.00   12.59  15466.00
> 03:41:02 PM  all   80.80    0.06    0.19    0.00    0.00    0.00    0.00   18.95  14584.00
> 03:41:03 PM  all   82.90    0.00    0.06    0.00    0.00    0.00    0.00   17.04  14570.00
> 03:41:04 PM  all   79.45    0.00    0.06    0.00    0.00    0.00    0.00   20.49  14536.00
> 03:41:05 PM  all   86.48    0.00    0.07    0.00    0.00    0.00    0.00   13.46  14577.00
> 03:41:06 PM  all   76.73    0.06    0.06    0.00    0.00    0.06    0.00   23.10  14594.00
> 03:41:07 PM  all   86.48    0.00    0.07    0.00    0.00    0.00    0.00   13.45  14703.03
> Average:     all   82.31    0.02    0.08    0.00    0.00    0.01    0.00   17.59  14699.10

What happens with s/SCHED_IDLE/nice 19?

	-Mike


  parent reply	other threads:[~2010-07-30 13:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-30  5:19 Nikhil Rao
2010-07-30  5:19 ` [PATCH 1/6] sched: account SCHED_IDLE tasks on rq->idle_nr_running Nikhil Rao
2010-07-30  5:19 ` [PATCH 2/6] sched: add SD_IDLE_LOAD_BALANCE to sched domain flags Nikhil Rao
2010-07-30  5:19 ` [PATCH 3/6] sched: add moving average of time spent servicing SCHED_NORMAL tasks Nikhil Rao
2010-07-30  5:19 ` [PATCH 4/6] sched: add sched_idle_balance argument to lb functions Nikhil Rao
2010-07-30  5:19 ` [PATCH 5/6] sched: add SCHED_IDLE load balancer Nikhil Rao
2010-07-30  5:19 ` [PATCH 6/6] sched: enable SD_IDLE_LOAD_BALANCE on MC, CPU and NUMA (x86) domains Nikhil Rao
2010-07-30 13:32 ` Mike Galbraith [this message]
2010-07-30 18:59   ` [PATCH 0/6] [RFC] Large weight differential leads to inefficient load balancing Nikhil Rao
2010-07-30 19:03   ` Paul Turner
2010-08-02 11:39 ` Peter Zijlstra
2010-08-03 21:28   ` Nikhil Rao
2010-08-04 10:18     ` Peter Zijlstra

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=1280496739.10435.10.camel@marge.simson.net \
    --to=efault@gmx.de \
    --cc=kenchen@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=ncrao@google.com \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=venki@google.com \
    /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

all inboxes | Powered by JetHome®