qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 08/13] throttle: Add support for burst periods


From: Alberto Garcia
Subject: Re: [Qemu-devel] [PATCH 08/13] throttle: Add support for burst periods
Date: Tue, 16 Feb 2016 15:24:21 +0100
User-agent: Notmuch/0.13.2 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu)

On Tue 16 Feb 2016 11:45:32 AM CET, Kevin Wolf <address@hidden> wrote:

>> +    /* If the bucket is not full yet we have to make sure that we
>> +     * fulfill the goal of bkt->max units per second. */
>> +    if (bkt->burst_length > 1) {
>> +        /* We use 1/10 of the max value to smooth the throttling.
>> +         * See throttle_fix_bucket() for more details. */
>> +        extra = bkt->burst_level - bkt->max / 10;
>
> I don't understand the connection between throttle_fix_bucket() and
> this.
>
> throttle_fix_bucket() seems to set a default rate for bursts, which
> kind of makes sense to me (but what's the point when this is lower
> than the average rate?)

The point is to smoothen the throttling: if you request a max rate of
2000 operations per second, what you actually get is a rate of 200
operations per tenth of a second.

With the current code, if you set bkg->avg to 1000 but not bkt->max
you'll get exactly this. I'm just applying the same logic to bursts.

Berto



reply via email to

[Prev in Thread] Current Thread [Next in Thread]