From: Ilya Maximets <i.maximets@ovn.org>
To: Ilya Maximets <i.maximets@ovn.org>, jean.tourrilhes@hpe.com
Cc: Tonghao Zhang <xiangxia.m.yue@gmail.com>,
Pravin B Shelar <pshelar@ovn.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Andy Zhou <azhou@ovn.org>,
Linux Kernel Network Developers <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
ovs dev <dev@openvswitch.org>, William Tu <u9012063@gmail.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Davide Caratti <dcaratti@redhat.com>
Subject: Re: [PATCH net] openvswitch: meter: remove rate from the bucket size calculation
Date: Thu, 29 Apr 2021 23:15:06 +0200 [thread overview]
Message-ID: <94576ef8-76b3-67bc-7b55-c1d9513ec31c@ovn.org> (raw)
In-Reply-To: <22e48984-e0f3-b7d7-9f65-68e93c846c73@ovn.org>
On 4/28/21 8:59 PM, Ilya Maximets wrote:
> On 4/28/21 6:31 PM, Jean Tourrilhes wrote:
>> On Wed, Apr 28, 2021 at 01:22:12PM +0200, Ilya Maximets wrote:
>>>
>>> I didn't test it, but I looked at the implementation in
>>> net/sched/act_police.c and net/sched/sch_tbf.c, and they should work
>>> in a same way as this patch, i.e. it's a classic token bucket where
>>> burst is a burst and nothing else.
>>
>> Actually, act_police.c and sch_tbf.c will behave completely
>> differently, even if they are both based on the token bucket
>> algorithm.
>> The reason is that sch_tbf.c is applied to a queue, and the
>> queue will smooth out traffic and avoid drops. The token bucket is
>> used to dequeue the queue, this is sometime called leaky bucket. I've
>> personally used sch_tbf.c with burst size barely bigger than the MTU,
>> and it works fine.
>
> Makes sense. Thanks for the clarification!
>
>> This is why I was suggesting to compare to act_police.c, which
>> does not have a queue to smooth out traffic and can only drop
>> packets.
>
> I see. Unfortunately, due to the fact that act_police.c uses time
> instead of bytes as a measure for tokens, we will still see a difference
> in behavior. Probably, not so big, but it will be there and it will
> depend on a line rate.
I found my mistake in calculations (see another reply). So, there
should not be significant difference with OVS meters, indeed.
>
>> I believe OVS meters are similar to policers, so that's why
>> they are suprising for people used to queues such as TBF and HTB.
>>
>> Regards,
>>
>> Jean
>>
next prev parent reply other threads:[~2021-04-29 21:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 13:57 [PATCH net] openvswitch: meter: remove rate from the bucket size calculation Ilya Maximets
2021-04-23 20:10 ` patchwork-bot+netdevbpf
2021-04-28 6:24 ` Tonghao Zhang
2021-04-28 6:45 ` Jean Tourrilhes
2021-04-28 11:22 ` Ilya Maximets
2021-04-28 16:31 ` Jean Tourrilhes
2021-04-28 18:59 ` Ilya Maximets
2021-04-29 21:15 ` Ilya Maximets [this message]
2021-04-29 21:12 ` Ilya Maximets
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=94576ef8-76b3-67bc-7b55-c1d9513ec31c@ovn.org \
--to=i.maximets@ovn.org \
--cc=azhou@ovn.org \
--cc=davem@davemloft.net \
--cc=dcaratti@redhat.com \
--cc=dev@openvswitch.org \
--cc=jean.tourrilhes@hpe.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pshelar@ovn.org \
--cc=u9012063@gmail.com \
--cc=xiangxia.m.yue@gmail.com \
--cc=xiyou.wangcong@gmail.com \
/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).