From: "Mathieu Gagné" <mgagne@iweb.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [PATCH 3 of 4] xl: add support for vif rate limiting
Date: Tue, 20 Mar 2012 13:58:02 -0400 [thread overview]
Message-ID: <4F68C52A.3060102@iweb.com> (raw)
In-Reply-To: <1332242491.9223.210.camel@zakaz.uk.xensource.com>
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.
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
--
Mathieu
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2012-03-20 17:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-20 1:28 [PATCH 0 of 4] xl: add support for vif rate limiting Mathieu Gagné
2012-03-20 1:28 ` [PATCH 1 of 4] xl: cleanup indentation Mathieu Gagné
2012-03-20 10:58 ` Ian Campbell
2012-03-20 11:07 ` Stefano Stabellini
2012-03-20 1:28 ` [PATCH 2 of 4] xl: xl network-attach -N (dry run) option Mathieu Gagné
2012-03-20 10:58 ` Ian Campbell
2012-03-20 11:09 ` Stefano Stabellini
2012-03-20 1:28 ` [PATCH 3 of 4] xl: add support for vif rate limiting Mathieu Gagné
2012-03-20 11:16 ` Stefano Stabellini
2012-03-20 11:26 ` Ian Campbell
2012-03-20 18:40 ` Mathieu Gagné
2012-03-21 10:23 ` Ian Campbell
2012-03-20 11:21 ` Ian Campbell
2012-03-20 17:58 ` Mathieu Gagné [this message]
2012-03-21 10:04 ` Ian Campbell
2012-03-20 18:25 ` Mathieu Gagné
2012-03-21 10:12 ` Ian Campbell
2012-03-20 1:28 ` [PATCH 4 of 4] xl: add "check-xl-vif-parse" test script Mathieu Gagné
2012-03-20 11:29 ` Ian Campbell
2012-03-20 11:30 ` [PATCH 0 of 4] xl: add support for vif rate limiting Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F68C52A.3060102@iweb.com \
--to=mgagne@iweb.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).