From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bharata B Rao Subject: Re: [RFC] CPU hard limits Date: Fri, 5 Jun 2009 14:57:33 +0530 Message-ID: <20090605092733.GA27486@in.ibm.com> References: <20090604053649.GA3701@in.ibm.com> <6599ad830906050153i1afd104fqe70f681317349142@mail.gmail.com> Reply-To: bharata@linux.vnet.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, Dhaval Giani , Balbir Singh , Vaidyanathan Srinivasan , Gautham R Shenoy , Srivatsa Vaddagiri , Ingo Molnar , Peter Zijlstra , Pavel Emelyanov , Avi Kivity , kvm@vger.kernel.org, Linux Containers , Herbert Poetzl To: Paul Menage Return-path: Received: from e1.ny.us.ibm.com ([32.97.182.141]:36588 "EHLO e1.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751316AbZFEJ2a (ORCPT ); Fri, 5 Jun 2009 05:28:30 -0400 Content-Disposition: inline In-Reply-To: <6599ad830906050153i1afd104fqe70f681317349142@mail.gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Jun 05, 2009 at 01:53:15AM -0700, Paul Menage wrote: > On Wed, Jun 3, 2009 at 10:36 PM, Bharata B > Rao wrote: > > - Hard limits can be used to provide guarantees. > > > > This claim (and the subsequent long thread it generated on how limits > can provide guarantees) confused me a bit. > > Why do we need limits to provide guarantees when we can already > provide guarantees via shares? shares design is proportional and hence it can't by itself provide guarantees. > > Suppose 10 cgroups each want 10% of the machine's CPU. We can just > give each cgroup an equal share, and they're guaranteed 10% if they > try to use it; if they don't use it, other cgroups can get access to > the idle cycles. Now if 11th group with same shares comes in, then each group will now get 9% of CPU and that 10% guarantee breaks. Regards, Bharata.