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

Re: [Xen-devel] [PATCH 3 of 4] xl: add support for vif rate limiting

On Tue, 2012-03-20 at 17:58 +0000, Mathieu Gagnà wrote:
> On 3/20/12 7:21 AM, Ian Campbell wrote:
> > On Tue, 2012-03-20 at 01:28 +0000, Mathieu Gagnà wrote:
> >>
> >> +### rate
> >> +
> >> +Specifies the rate at which the outgoing traffic will be limited to. This
> >> +defaults to unlimited.
> >> +
> >> +The `rate` keyword supports an optional time window parameter for 
> >> specifying
> >> +the granularity of credit replenishment. It determines the frequency at 
> >> which
> >> +the vif transmission credit is replenished. The default window is 50ms.
> >
> > I think this needs to be more explicit/formal about what the syntax is.
> > e.g.:
> >
> >          The rate may be specified as "<RATE>/s" or optionally
> >          "<RATE>/s@<WINDOW>".
> >
> >          <RATE>  is in bytes and can accept suffixes Mb, Kb (list here)
> >
> >          <WINDOW>  is in microseconds and can accept suffixes<list>. The
> >          default is 50ms.
> >
> > Is the "/s" formally required? Does it take any modifiers (e.g. ms)
> It is formally required according to the original code within Xend/xm. 
> Wanting to be 100% backward compatible, I did not change this part.
> <RATE> corresponds to a rate and "/s" is required to correctly express a 
> rate unit. I would therefore disagree about making it optional.

That makes sense to me.

> Should we add support for new modifiers? Would it make sense? Rate speed 
> is mostly expressed in bits per second (bytes in our case), not us or 
> ms. Would there be any use case?

If there are modifiers which make sense then we can add them.

> > Having both "/s" and "@<something>" in a single specification (e.g.
> > "1MB/s@20ms") seems a bit odd, is that right? What does it actually mean
> Vif rate limiting is credit-based. It means that for "1MB/s@20ms", the 
> available credit will be equivalent of the traffic you would have done 
> at "1MB/s" during 20ms. Your credit will be replenished every 20ms.
> For your example:
>    1MB/s => 1,000,000 bytes per sec
>    20ms  => 20,000 us
> This will results in a credit of 20,000 bytes replenished every 20,000 us.
> Should I find a way to explain this concept in the documentation? 
> English is not my mother tongue, I'll have difficulty to explain the 
> concept is a clear and concise way.

Trust me, being a native speaker isn't helping me to come up with a way
to express it either ;-)

I think the paragraphs above, including the example, is a pretty good
way of putting it. You can pretty much just copy that into the docs I

> > The code and xend both seem to use "interval" rather than "window".
> The wording was retaken from the original commit [1] but I forgot to 
> adjust it to its new context.
> What would be the correct wording? The original patch used "window", 
> xend used "interval", another proposed patch used "timeslice", 
> "interval" and "time period".

Personally I prefer interval.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.