Received: from eggs.gnu.org ([2001:4830:134:3::10]:41042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VF6Vr-0008F5-9T for qemu-devel@nongnu.org; Thu, 29 Aug 2013 14:00:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VF6Vl-0007KQ-Ak for qemu-devel@nongnu.org; Thu, 29 Aug 2013 14:00:07 -0400 Received: from nodalink.pck.nerim.net ([62.212.105.220]:57330 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VF6Vl-0007Jg-1i for qemu-devel@nongnu.org; Thu, 29 Aug 2013 14:00:01 -0400 Date: Thu, 29 Aug 2013 20:01:58 +0200 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20130829180158.GB5241@irqsave.net> References: <1377702441-22236-1-git-send-email-benoit@irqsave.net> <20130829090945.GA31923@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20130829090945.GA31923@stefanha-thinkpad.redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V7 0/5] Continuous Leaky Bucket Throttling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com > Here is my understanding of how the algorithm works: >=20 > There is a "max" burst value which is a guaranteed allowance. If max i= s > 100 units then you can always use up to 100 units without being > throttled. >=20 > After the max burst value has been exceeded, requests are throttled dow= n > to the "avg" rate value. The way it works is like this: >=20 > 1. If the max hasn't been reached, allow the request through. > 2. If the max has been reached, schedule a timer for when the bucket > level comes back down to max. > 3. Increment bucket level when the request is allowed through. > 4. Drain bucket level according to avg rate as time passes. Another point is that the initial ability to burst replenish when the gue= st does not do any I/Os. One usage of this is compute intensive tasks where slice of time are dedi= cated to computations and separated by a flush to disk of the resulting data. Best regards Beno=EEt