From: Sam Vilain <sam@vilain.net>
To: "Björn Steinbrink" <B.Steinbrink@gmx.de>
Cc: Mike Galbraith <efault@gmx.de>,
Peter Williams <pwil3058@bigpond.net.au>,
Con Kolivas <kernel@kolivas.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Kingsley Cheung <kingsley@aurema.com>,
Ingo Molnar <mingo@elte.hu>,
Rene Herman <rene.herman@keyaccess.nl>,
Herbert Poetzl <herbert@13thfloor.at>,
Kirill Korotaev <dev@sw.ru>
Subject: Re: [RFC 0/5] sched: Add CPU rate caps
Date: Mon, 29 May 2006 10:46:43 +1200 [thread overview]
Message-ID: <447A2853.2080901@vilain.net> (raw)
In-Reply-To: <20060526161148.GA23680@atjola.homenet>
Björn Steinbrink wrote:
>>The killer problem I see with this approach is that it doesn't address
>>the divide and conquer problem. If a task is capped, and forks off
>>workers, each worker inherits the total cap, effectively extending same.
>>
>>
Yes, although the current thinking is that you need to set a special
clone() flag (which may be restricted via capabilities such as
CAP_SYS_RESOURCE) to set a new CPU scheduling namespace, so the workers
will inherit the same scheduling ns and therefore be accounted against
the one resource.
Sorry if I'm replying out of context, I'll catch up on this thread
shortly. Thanks for including me.
>>IMHO, per task resource management is too severely limited in it's
>>usefulness, because jobs are what need managing, and they're seldom
>>single threaded. In order to use per task limits to manage any given
>>job, you have to both know the number of components, and manually
>>distribute resources to each component of the job. If a job has a
>>dynamic number of components, it becomes impossible to manage.
>>
>>
>
>Linux-VServer uses a token bucket scheduler (TBS) to limit cpu ressources
>for processes in a "context". All processes in a context share one token
>bucket, which has a set of parameters to tune scheduling behaviour.
>As the token bucket is shared by a group of processes, and inherited by
>child processes/threads, management is quite easy. And the parameters
>can be tuned to allow different scheduling behaviours, like allowing a
>process group to burst, ie. use as much cpu time as is available, after
>being idle for some time, but being limited to X % cpu time on average.
>
>
This is correct. Basically I read the LARTC.org (which explains Linux
network schedulers etc) and the description of the Token Bucket
Scheduler inspired me to write the same thing for CPU resources. It was
originally developed for the 2.4 Alan Cox series kernels. The primary
design guarantee of the scheduler is a low total performance impact -
maximum CPU utilisation prioritisation and fairness a secondary
concern. It was built with the idea that people wanting different sorts
of scheduling policies could at least get a set of userland controls to
implement their approach - to the limit of the effectiveness of task
priorities.
I most recently described this at http://lkml.org/lkml/2006/3/29/59, a
lot of that thread is probably worth catching up on.
It would be nice if we could somehow re-use the scheduling algorithms in
use in the network space here, if it doesn't impact on performance.
For instance, the "CBQ" network scheduler is the same approach as used
in OpenVZ's CPU scheduler, and the classful Token Bucket Filter is the
approach used in VServer. The "Sched_prio" and "Sched_hard" distinction
in vserver could probably be compared to "Ingres Policing", where
available CPU that could run a process instead sits idle - similar to
the network world where data that has arrived is dropped to try to
convince the application to throttle its network activity.
As in the network space (http://lkml.org/lkml/2006/5/19/216) in this
space we have a continual scale of possible implementations, marked by a
highly efficient solution akin to "binding" at one end, and a
virtualisation at the other. Each deliver guarantees most applicable to
certain users or workloads.
Sam.
>I'm CC'ing Herbert and Sam on this as they can explain the whole thing a
>lot better and I'm not familiar with implementation details.
>
>Regards
>Björn
>
>
next prev parent reply other threads:[~2006-05-28 22:47 UTC|newest]
Thread overview: 95+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-26 4:20 [RFC 0/5] sched: Add CPU rate caps Peter Williams
2006-05-26 4:20 ` [RFC 1/5] sched: Fix priority inheritence before CPU rate soft caps Peter Williams
2006-05-26 4:20 ` [RFC 2/5] sched: Add " Peter Williams
2006-05-26 10:48 ` Con Kolivas
2006-05-26 11:15 ` Mike Galbraith
2006-05-26 11:17 ` Con Kolivas
2006-05-26 11:30 ` Mike Galbraith
2006-05-26 13:55 ` Peter Williams
2006-05-27 6:31 ` Balbir Singh
2006-05-27 7:03 ` Peter Williams
2006-05-28 0:11 ` Peter Williams
2006-05-28 7:38 ` Balbir Singh
2006-05-28 13:35 ` Peter Williams
2006-05-28 14:42 ` Balbir Singh
2006-05-28 23:27 ` Peter Williams
2006-05-31 13:17 ` Kirill Korotaev
2006-05-31 23:39 ` Peter Williams
2006-06-01 8:09 ` Kirill Korotaev
2006-06-01 23:38 ` Peter Williams
2006-06-02 1:35 ` Peter Williams
2006-05-26 4:20 ` [RFC 3/5] sched: Add CPU rate hard caps Peter Williams
2006-05-26 6:58 ` Kari Hurtta
2006-05-27 1:00 ` Peter Williams
2006-05-26 11:00 ` Con Kolivas
2006-05-26 13:59 ` Peter Williams
2006-05-26 14:12 ` Con Kolivas
2006-05-26 14:23 ` Mike Galbraith
2006-05-27 0:16 ` Peter Williams
2006-05-27 9:28 ` Mike Galbraith
2006-05-28 2:09 ` Peter Williams
2006-05-27 6:48 ` Balbir Singh
2006-05-27 8:44 ` Peter Williams
2006-05-31 13:10 ` Kirill Korotaev
2006-05-31 15:59 ` Balbir Singh
2006-05-31 18:09 ` Mike Galbraith
2006-06-01 7:41 ` Kirill Korotaev
2006-06-01 8:34 ` Balbir Singh
2006-06-01 18:43 ` [ckrm-tech] " Chandra Seetharaman
2006-06-01 23:26 ` Peter Williams
2006-06-02 2:02 ` Chandra Seetharaman
2006-06-02 3:21 ` Peter Williams
2006-06-02 8:32 ` Balbir Singh
2006-06-02 13:30 ` Peter Williams
2006-06-02 18:58 ` Balbir Singh
2006-06-02 23:49 ` Peter Williams
2006-06-03 4:59 ` Balbir Singh
2006-06-02 19:06 ` Chandra Seetharaman
2006-06-03 0:04 ` Peter Williams
2006-06-02 0:36 ` Con Kolivas
2006-06-02 2:03 ` [ckrm-tech] " Chandra Seetharaman
2006-06-02 5:55 ` [ckrm-tech] [RFC 3/5] " Peter Williams
2006-06-02 7:47 ` Kirill Korotaev
2006-06-02 13:34 ` Peter Williams
2006-06-05 22:11 ` Sam Vilain
2006-06-06 8:24 ` Kirill Korotaev
2006-06-06 9:13 ` Con Kolivas
2006-06-06 9:28 ` Kirill Korotaev
2006-06-02 8:46 ` Mike Galbraith
2006-06-02 13:18 ` Peter Williams
2006-06-02 14:47 ` Mike Galbraith
2006-06-03 0:08 ` Peter Williams
2006-06-03 6:02 ` Mike Galbraith
2006-06-03 11:03 ` Peter Williams
2006-06-06 11:26 ` Srivatsa Vaddagiri
2006-06-02 7:34 ` Kirill Korotaev
2006-06-02 21:23 ` Shailabh Nagar
2006-06-01 23:47 ` Sam Vilain
2006-06-01 23:43 ` Peter Williams
2006-05-31 23:28 ` Peter Williams
2006-06-01 7:44 ` Kirill Korotaev
2006-06-01 23:21 ` Peter Williams
2006-05-26 4:21 ` [RFC 4/5] sched: Add procfs interface for CPU rate soft caps Peter Williams
2006-05-26 4:21 ` [RFC 5/5] sched: Add procfs interface for CPU rate hard caps Peter Williams
2006-05-26 8:04 ` [RFC 0/5] sched: Add CPU rate caps Mike Galbraith
2006-05-26 16:11 ` Björn Steinbrink
2006-05-28 22:46 ` Sam Vilain [this message]
2006-05-28 23:30 ` Peter Williams
2006-05-29 3:09 ` Sam Vilain
2006-05-29 3:41 ` Peter Williams
2006-05-29 21:16 ` Sam Vilain
2006-05-29 23:12 ` Peter Williams
2006-05-30 2:07 ` Sam Vilain
2006-05-30 2:45 ` Peter Williams
2006-05-30 22:05 ` Sam Vilain
2006-05-30 23:22 ` Peter Williams
2006-05-30 23:25 ` Peter Williams
2006-06-05 23:56 ` Peter Williams
2006-05-27 0:16 ` Peter Williams
2006-05-26 10:41 ` Con Kolivas
2006-05-27 1:28 ` Peter Williams
2006-05-27 1:42 ` Con Kolivas
2006-05-26 11:09 ` Con Kolivas
2006-05-26 14:00 ` Peter Williams
2006-05-26 11:29 ` Balbir Singh
2006-05-27 1:40 ` Peter Williams
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=447A2853.2080901@vilain.net \
--to=sam@vilain.net \
--cc=B.Steinbrink@gmx.de \
--cc=dev@sw.ru \
--cc=efault@gmx.de \
--cc=herbert@13thfloor.at \
--cc=kernel@kolivas.org \
--cc=kingsley@aurema.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=pwil3058@bigpond.net.au \
--cc=rene.herman@keyaccess.nl \
/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;
as well as URLs for NNTP newsgroup(s).