[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 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.

         The rate may be specified as "<RATE>/s" or optionally

         <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.

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?

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.

What are the semantics of window? If I say "1MB/s@500ms" then do I get
0.5MB of credit every half second?

See above.

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".

+For example:

Should spell out the meaning of the examples:

Good idea. Will do.

[1] http://lists.xen.org/archives/html/xen-changelog/2006-03/msg00504.html


Xen-devel mailing list



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