From: Avi Kivity <avi@redhat.com>
To: balbir@linux.vnet.ibm.com
Cc: bharata@linux.vnet.ibm.com, linux-kernel@vger.kernel.org,
Dhaval Giani <dhaval@linux.vnet.ibm.com>,
Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
Gautham R Shenoy <ego@in.ibm.com>,
Srivatsa Vaddagiri <vatsa@in.ibm.com>,
Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Pavel Emelyanov <xemul@openvz.org>,
kvm@vger.kernel.org,
Linux Containers <containers@lists.linux-foundation.org>,
Herbert Poetzl <herbert@13thfloor.at>
Subject: Re: [RFC] CPU hard limits
Date: Fri, 05 Jun 2009 08:16:21 +0300 [thread overview]
Message-ID: <4A28AA25.4050206@redhat.com> (raw)
In-Reply-To: <20090605044946.GA11755@balbir.in.ibm.com>
Balbir Singh wrote:
>>> How, it works out fine in my calculation
>>>
>>> 50 + 40 for G2 and G3, make sure that G1 gets 10%, since others are
>>> limited to 90%
>>> 50 + 40 for G1 and G3, make sure that G2 gets 10%, since others are
>>> limited to 90%
>>> 50 + 50 for G1 and G2, make sure that G3 gets 0%, since others are
>>> limited to 100%
>>>
>>>
>> It's fine in that it satisfies the guarantees, but it is deeply
>> suboptimal. If I ran a cpu hog in the first group, while the other two
>> were idle, it would be limited to 50% cpu. On the other hand, if it
>> consumed all 100% cpu it would still satisfy the guarantees (as the
>> other groups are idle).
>>
>> The result is that in such a situation, wall clock time would double
>> even though cpu resources are available.
>>
>
> But then there is no other way to make a *guarantee*, guarantees come
> at a cost of idling resources, no? Can you show me any other
> combination that will provide the guarantee and without idling the
> system for the specified guarantees?
>
Suppose in my example cgroup 1 consumed 100% of the cpu resources and
cgroup 2 and 3 were completely idle. All of the guarantees are met (if
cgroup 2 is idle, there's no need to give it the 10% cpu time it is
guaranteed).
If your only tool to achieve the guarantees is a limit system, then
yes, the equation yields the correct results. But given that it yields
such inferior results, I think we need to look for a more involved solution.
I think the limits method fits cases where it is difficult to evict a
resource (say, disk quotas -- if you want to guarantee 10% of space to
cgroups 1, you must limit all others to 90%). But for processor usage,
you can evict a cgroup instantly, so nothing prevents a cgroup from
consuming all available resources as long as others do not contend for them.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
next prev parent reply other threads:[~2009-06-05 5:18 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-04 5:36 [RFC] CPU hard limits Bharata B Rao
2009-06-04 12:19 ` Avi Kivity
2009-06-04 21:32 ` Mike Waychison
2009-06-05 3:03 ` Bharata B Rao
2009-06-05 3:33 ` Avi Kivity
2009-06-05 4:37 ` Balbir Singh
2009-06-05 4:44 ` Avi Kivity
2009-06-05 4:49 ` Balbir Singh
2009-06-05 5:09 ` Chris Friesen
2009-06-05 5:13 ` Balbir Singh
2009-06-05 5:10 ` Balbir Singh
2009-06-05 5:21 ` Avi Kivity
2009-06-05 5:27 ` Balbir Singh
2009-06-05 5:31 ` Bharata B Rao
2009-06-05 6:01 ` Avi Kivity
2009-06-05 8:16 ` Bharata B Rao
2009-06-07 6:04 ` Avi Kivity
2009-06-07 16:14 ` Bharata B Rao
2009-06-05 9:39 ` Balbir Singh
2009-06-05 13:14 ` Avi Kivity
2009-06-05 13:42 ` Balbir Singh
2009-06-07 6:09 ` Avi Kivity
2009-06-05 14:54 ` Chris Friesen
2009-06-07 6:10 ` Avi Kivity
2009-06-05 9:24 ` Balbir Singh
2009-06-05 6:03 ` Avi Kivity
2009-06-05 6:32 ` Bharata B Rao
2009-06-05 12:57 ` Avi Kivity
2009-06-05 5:16 ` Avi Kivity [this message]
2009-06-05 5:20 ` Balbir Singh
2009-06-05 3:07 ` Balbir Singh
2009-06-05 8:53 ` Paul Menage
2009-06-05 9:27 ` Bharata B Rao
2009-06-05 9:32 ` Paul Menage
2009-06-05 9:48 ` Dhaval Giani
2009-06-05 9:51 ` Paul Menage
2009-06-05 9:59 ` Dhaval Giani
2009-06-05 10:03 ` Paul Menage
2009-06-08 8:50 ` Pavel Emelyanov
2009-06-05 9:36 ` Balbir Singh
2009-06-05 9:48 ` Paul Menage
2009-06-05 9:55 ` Balbir Singh
2009-06-05 9:57 ` Paul Menage
2009-06-05 10:02 ` Paul Menage
2009-06-05 11:32 ` Srivatsa Vaddagiri
2009-06-05 12:18 ` Paul Menage
2009-06-07 10:11 ` Srivatsa Vaddagiri
2009-06-07 15:35 ` Balbir Singh
2009-06-08 4:37 ` Srivatsa Vaddagiri
2009-06-05 14:44 ` Chris Friesen
2009-06-05 13:02 ` Avi Kivity
2009-06-05 13:43 ` Dhaval Giani
2009-06-05 14:45 ` Chris Friesen
2009-06-05 9:02 ` Reinhard Tartler
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=4A28AA25.4050206@redhat.com \
--to=avi@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=balbir@linux.vnet.ibm.com \
--cc=bharata@linux.vnet.ibm.com \
--cc=containers@lists.linux-foundation.org \
--cc=dhaval@linux.vnet.ibm.com \
--cc=ego@in.ibm.com \
--cc=herbert@13thfloor.at \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=svaidy@linux.vnet.ibm.com \
--cc=vatsa@in.ibm.com \
--cc=xemul@openvz.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