public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chiluk <chiluk@canonical.com>
To: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Scheduler accounting inflated for io bound processes.
Date: Thu, 20 Jun 2013 14:46:13 -0500	[thread overview]
Message-ID: <51C35C05.1070005@canonical.com> (raw)

Running the below testcase shows each process consuming 41-43% of it's
respective cpu while per core idle numbers show 63-65%, a disparity of
roughly 4-8%.  Is this a bug, known behaviour, or consequence of the
process being io bound?

1. run sudo taskset -c 0 netserver
2. run taskset -c 1 netperf -H localhost -l 3600 -t TCP_RR & (start
netperf with priority on cpu1)
3. run top, press 1 for multiple CPUs to be separated

The below output is the top output notice the cpu0 idle at 67% when the
processes claim 42% usage a roughly 9% discrepancy.

------------------------------------------------
top - 19:27:38 up  4:08,  2 users,  load average: 0.45, 0.19, 0.13
Tasks:  85 total,   2 running,  83 sleeping,   0 stopped,   0 zombie
%Cpu0  :  0.8 us, 15.4 sy,  0.0 ni, 66.7 id,  0.0 wa,  0.0 hi, 17.1 si,
 0.0 st
%Cpu1  :  0.8 us, 17.3 sy,  0.0 ni, 63.1 id,  0.0 wa,  0.0 hi, 18.8 si,
 0.0 st
KiB Mem:   4049180 total,   252952 used,  3796228 free,    23108 buffers
KiB Swap:        0 total,        0 used,        0 free,   132932 cached

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND

 6150 root      20   0  9756  700  536 R  42.6  0.0   0:48.90 netserver

 6149 ubuntu    20   0 11848 1056  852 S  42.2  0.0   0:48.92 netperf
------------------------------------------------

The above testcase was run on 3.10-rc6.

So is this a bug or can someone explain to me why this isn't a bug?

The related ubuntu bug is
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1193073

             reply	other threads:[~2013-06-20 19:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20 19:46 Dave Chiluk [this message]
2013-06-25 16:01 ` Scheduler accounting inflated for io bound processes Mike Galbraith
2013-06-25 17:48   ` Mike Galbraith
2013-06-26  9:37     ` Ingo Molnar
2013-06-26 10:42       ` Peter Zijlstra
2013-06-26 15:50         ` Ingo Molnar
2013-06-26 16:01           ` Mike Galbraith
2013-06-26 16:04           ` David Ahern
2013-06-26 16:10             ` Ingo Molnar
2013-06-26 16:13               ` David Ahern

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=51C35C05.1070005@canonical.com \
    --to=chiluk@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.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