From: Peter Williams <peterw@aurema.com>
To: MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>
Cc: Peter Williams <pwil3058@bigpond.net.au>,
Kirill Korotaev <dev@openvz.org>, Srivatsa <vatsa@in.ibm.com>,
CKRM <ckrm-tech@lists.sourceforge.net>,
Balbir Singh <bsingharora@gmail.com>,
Mike Galbraith <efault@gmx.de>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Con Kolivas <kernel@kolivas.org>, Sam Vilain <sam@vilain.net>,
Kingsley Cheung <kingsley@aurema.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Ingo Molnar <mingo@elte.hu>,
Rene Herman <rene.herman@keyaccess.nl>
Subject: Re: [ckrm-tech] [RFC 0/4] sched: Add CPU rate caps (improved)
Date: Fri, 09 Jun 2006 16:38:07 +1000 [thread overview]
Message-ID: <4489174F.4090305@aurema.com> (raw)
In-Reply-To: <448909F2.2060306@jp.fujitsu.com>
MAEDA Naoaki wrote:
> Peter Williams wrote:
>
>> This behaviour is caused by the "make clean" being a short lived CPU
>> intensive task. It was made worse by the facts that my simplifications
>> to the sinbin duration calculation which assumed a constant CPU burst
>> size based on the time slice and that exiting tasks could still have
>> caps enforced. (The simplification was done to avoid 64 bit divides.)
>>
>> I've put in a more complex sinbin calculation (and don't think the 64
>> bit divides will matter too much as they're on an infrequently travelled
>> path. Exiting tasks are now excluded from having caps enforced on the
>> grounds that it's best for system performance to let them get out of the
>> way as soon as possible. A patch is attached and I would appreciate it
>> if you could see if it improves the situation you are observing.
>
> Sorry for my late reply.
>
> The followings are the results of patched kernel. Unfortunately,
> the patch doesn't seem to help my situation.
>
> $ ~/withcap.sh -C 900 /usr/bin/time make clean
> 1.61user 0.29system 1:33.94elapsed 2%CPU
>
> $ ~/withcap.sh -C 100 /usr/bin/time make clean
> 1.68user 0.27system 3:34.45elapsed 0%CPU
I don't see anything that bad here. E.g.
[peterw@heathwren SMP]$ /usr/bin/time make clean
make -C /home/peterw/KERNELS/PlugSched/MM-2.6.17-rc4-mm1
O=/kbuild/Plugsched/MM-2.6.17-rc4-mm1/SMP clean
1.18user 0.81system 0:01.98elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+140353minor)pagefaults 0swaps
[peterw@heathwren SMP]$ withcap -C 900 /usr/bin/time make clean
make -C /home/peterw/KERNELS/PlugSched/MM-2.6.17-rc4-mm1
O=/kbuild/Plugsched/MM-2.6.17-rc4-mm1/SMP clean
1.19user 0.80system 0:03.07elapsed 65%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+140322minor)pagefaults 0swaps
[peterw@heathwren SMP]$ withcap -C 100 /usr/bin/time make clean
make -C /home/peterw/KERNELS/PlugSched/MM-2.6.17-rc4-mm1
O=/kbuild/Plugsched/MM-2.6.17-rc4-mm1/SMP clean
1.21user 0.82system 0:05.03elapsed 40%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+140374minor)pagefaults 0swaps
[peterw@heathwren SMP]$
These are worse than predicted by my tests for single processes leading
me to the opinion that the make clean actually consists of a number or
serially executed CPU intensive tasks whose total usage adds up to the
reported times. My tests (starting a background task before and another
after running "make clean" and using the difference in their reported
pids as an estimate of how many tasks were involved in the "make clean")
indicate that there were about 660. This gives them each an average
duration of about 3 milliseconds (based on a total elapsed time of 1.98
seconds). Even with HZ of 1000 that's only about 3 jiffies and is well
and truly in the "too short to do reasonable capping" basket.
Peter
--
Dr Peter Williams, Chief Scientist <peterw@aurema.com>
Aurema Pty Limited
Level 2, 130 Elizabeth St, Sydney, NSW 2000, Australia
Tel:+61 2 9698 2322 Fax:+61 2 9699 9174 http://www.aurema.com
prev parent reply other threads:[~2006-06-09 6:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20060606023708.2801.24804.sendpatchset@heathwren.pw.nest>
2006-06-07 8:05 ` [ckrm-tech] [RFC 0/4] sched: Add CPU rate caps (improved) MAEDA Naoaki
2006-06-07 12:44 ` Peter Williams
2006-06-08 7:50 ` Peter Williams
2006-06-09 0:57 ` Peter Williams
2006-06-09 5:50 ` MAEDA Naoaki
2006-06-09 6:05 ` Peter Williams
2006-06-09 5:41 ` MAEDA Naoaki
2006-06-09 6:38 ` Peter Williams [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=4489174F.4090305@aurema.com \
--to=peterw@aurema.com \
--cc=bsingharora@gmail.com \
--cc=ckrm-tech@lists.sourceforge.net \
--cc=dev@openvz.org \
--cc=ebiederm@xmission.com \
--cc=efault@gmx.de \
--cc=kernel@kolivas.org \
--cc=kingsley@aurema.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maeda.naoaki@jp.fujitsu.com \
--cc=mingo@elte.hu \
--cc=pwil3058@bigpond.net.au \
--cc=rene.herman@keyaccess.nl \
--cc=sam@vilain.net \
--cc=vatsa@in.ibm.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