From: "Anirban Sinha" <ASinha@zeugmasystems.com>
To: <linux-kernel@vger.kernel.org>, "Ingo Molnar" <mingo@elte.hu>
Subject: question on sched-rt group allocation cap: sched_rt_runtime_us
Date: Fri, 4 Sep 2009 17:55:15 -0700 [thread overview]
Message-ID: <DDFD17CC94A9BD49A82147DDF7D545C501F0F575@exchange.ZeugmaSystems.local> (raw)
Hi Ingo and rest:
I have been playing around with the sched_rt_runtime_us cap that can be
used to limit the amount of CPU time allocated towards scheduling rt
group threads. I am using 2.6.26 with CONFIG_GROUP_SCHED disabled (we
use only the root user in our embedded setup). I have no other CPU
intensive workloads (RT or otherwise) running on my system. I have
changed no other scheduling parameters from /proc.
I have written a small test program that:
(a) forks two threads, one SCHED_FIFO and one SCHED_OTHER (this thread
is reniced to -20) and ties both of them to a specific core.
(b) runs both the threads in a tight loop (same number of iterations for
both threads) until the SCHED_FIFO thread terminates.
(c) calculates the number of completed iterations of the regular
SCHED_OTHER thread against the fixed number of iterations of the
SCHED_FIFO thread. It then calculates a percentage based on that.
I am running the above workload against varying sched_rt_runtime_us
values (200 ms to 700 ms) keeping the sched_rt_period_us constant at
1000 ms. I have also experimented a little bit by decreasing the value
of sched_rt_period_us (thus increasing the sched granularity) with no
apparent change in behavior.
My observations are listed in tabular form:
Ratio of # of completed iterations of reg thread /
sched_rt_runtime_us / # of iterations of RT thread (in %)
sched_rt_runtime_us
0.2 100 % (regular thread completed all its
iterations).
0.3 73 %
0.4 45 %
0.5 17 %
0.6 0 % (SCHED_OTHER thread completely throttled.
Never ran)
0.7 0 %
This result kind of baffles me. Even when we cap the RT group to a
fraction of 0.6 of overall CPU time, the rest 0.4 \should\ still be
available for running regular threads. So my SCHED_OTHER \should\ make
some progress as opposed to being completely throttled. Similarly, with
any fraction less than 0.5, the SCHED_OTHER should complete before
SCHED_FIFO.
I do not have an easy way to verify my results over the latest kernel
(2.6.31). Was there any regressions in the scheduling subsystem in
2.6.26? Can this behavior be explained? Do we need to tweak any other
/proc parameters?
Cheers,
Ani
next reply other threads:[~2009-09-05 0:55 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Acotv57vW6nkRxQOQLuBf8W5yfJIlwAAtMAw>
2009-09-05 0:55 ` Anirban Sinha [this message]
2009-09-05 17:43 ` Lucas De Marchi
2009-09-05 20:40 ` Fabio Checconi
2009-09-05 22:40 ` Lucas De Marchi
[not found] ` <DDFD17CC94A9BD49A82147DDF7D545C54DC481@exchange.ZeugmaSystems.local>
2009-09-06 0:47 ` Anirban Sinha
2009-09-06 13:21 ` Fabio Checconi
[not found] ` <DDFD17CC94A9BD49A82147DDF7D545C54DC484@exchange.ZeugmaSystems.local>
2009-09-07 0:26 ` Anirban Sinha
2009-09-08 17:26 ` Anirban Sinha
2009-09-08 21:37 ` Anirban Sinha
2009-09-05 17:13 Anirban Sinha
[not found] <dgRNo-3uc-5@gated-at.bofh.it>
[not found] ` <dhb9j-1hp-5@gated-at.bofh.it>
[not found] ` <dhcf5-263-13@gated-at.bofh.it>
2009-09-06 2:32 ` Ani
2009-09-06 6:32 ` Mike Galbraith
2009-09-06 10:18 ` Mike Galbraith
[not found] ` <DDFD17CC94A9BD49A82147DDF7D545C54DC482@exchange.ZeugmaSystems.local>
2009-09-06 15:09 ` Mike Galbraith
2009-09-07 0:41 ` Anirban Sinha
[not found] ` <DDFD17CC94A9BD49A82147DDF7D545C54DC483@exchange.ZeugmaSystems.local>
[not found] ` <DDFD17CC94A9BD49A82147DDF7D545C54DC485@exchange.ZeugmaSystems.local>
2009-09-07 0:28 ` Anirban Sinha
2009-09-07 6:54 ` Mike Galbraith
[not found] ` <DDFD17CC94A9BD49A82147DDF7D545C54DC489@exchange.ZeugmaSystems.local>
2009-09-08 7:10 ` Anirban Sinha
2009-09-08 9:26 ` Mike Galbraith
2009-09-07 7:59 ` Peter Zijlstra
2009-09-07 8:24 ` Mike Galbraith
[not found] ` <DDFD17CC94A9BD49A82147DDF7D545C54DC487@exchange.ZeugmaSystems.local>
2009-09-08 7:08 ` Anirban Sinha
2009-09-08 8:42 ` Peter Zijlstra
2009-09-08 14:41 ` Anirban Sinha
[not found] ` <DDFD17CC94A9BD49A82147DDF7D545C54DC48B@exchange.ZeugmaSystems.local>
2009-09-08 17:41 ` Anirban Sinha
2009-09-08 19:06 ` Mike Galbraith
2009-09-08 19:34 ` Anirban Sinha
2009-09-09 4:10 ` Mike Galbraith
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=DDFD17CC94A9BD49A82147DDF7D545C501F0F575@exchange.ZeugmaSystems.local \
--to=asinha@zeugmasystems.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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®