[ovs-discuss] ovs-ofctl add-meter command limit rate can work ?

Andy Zhou azhou at ovn.org
Thu May 25 20:23:42 UTC 2017


On Thu, May 25, 2017 at 2:36 AM, 爬山虎 <cxasm at qq.com> wrote:
>
> hi all:
>
> I am going to implement the meter speed limit. I read the book of
> "ovs-ofctl.pdf " about the  instructions of burst. In this pdf book , the
> instructions of burst is :  If multiple bands' rate is exceeded,then the
> band with the highest rate among the exceeded bands is selected . It's a bit
> confused for me .
>
> I think whether this burst problem is complicated . for example,
> ovs-ofctl add-meter br1 meter=1, kbps,burst, band=type=drop, rate = 3000,
> burst_size=5000 .
>
> That's enough  and also very easy to understand. if download speed is more
> than 3000 kbps, then just discarding the packages.
>
> But the burst is hard to understand. According to my own understanding (just
> think about TC) , we can see burst to be a buffer bucket. If there is nobody
> use bandwidth, or bandwidth rate is less then 3000 kbps , the token will
> accumulate in the bucket, but the maximum value is 5000 kbps. Next time the
> user can use 5000 kbps bandwidth but only in a second.

This sounds correct, only the time period may not be strictly to the
second boundary.

If user can use up
> 3000 kbps bandwidth ,then it will be limited at 3000 kbps.
>
I don't follow this sentence.  DId you mean to say that if a user
sends constant 3000kbps traffic, then
the bandwidth is limited to 3000kbps, without burst allowance? If yes,
then I'd agree.  If no, would
please clarify?

> Now ovs allow to set multiple band values , this is a little worse.
>
> just for example .
> ovs-ofctl add-meter br1 meter=1, kbps,burst, band=type=drop, rate = 3000,
> burst_size=5000 type=drop, rate = 4000, burst_size=6000 .
>
> I cant understand this . if according to ovs-ofctl.pdf , when rate could up
> 5000, then it limit value is 4000. when rate could up 6000, then it limite
> value is 3000 .  This is not very reasonable, we have bein in the case of a
> speed limit . Can be more than 5000 kbps , has a great deal of randomness.

I think we should first determine the rate of current traffic, and use
the rate to select a band. Once the band
is selected, the burst_size can be used to determine the fate the packet.
>
> How to design the burst in here , has some suggestions ?
>
You may find the book of openflow specification helpful.

https://www.opennetworking.org/images/stories/downloads/sdn-resources/onf-specifications/openflow/openflow-switch-v1.5.1.pdf


More information about the discuss mailing list