xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jian Wen <wenjianhn@gmail.com>
To: Sander Eikelenboom <linux@eikelenboom.it>
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH v3 1/3][xen-netback] add a pseudo pps rate limit
Date: Thu, 18 Dec 2014 18:16:34 +0800	[thread overview]
Message-ID: <CAMXzGWKcuoiPvW6QvDbQBVy1c-ZX1sQ9RHO7=10YbeswXGi7zw@mail.gmail.com> (raw)
In-Reply-To: <17310344164.20141218110040@eikelenboom.it>

AFAIK, TC doesn't support limiting packets per second.

2014-12-18 18:00 GMT+08:00 Sander Eikelenboom <linux@eikelenboom.it>:
>
> Thursday, December 18, 2014, 9:13:18 AM, you wrote:
>
>>>On Tue, 2013-07-09 at 16:01 +0200, William Dauchy wrote:
>>>> On Jul09 15:48, Sander Eikelenboom wrote:
>>>> > Just wondering, why should this be done in the drivers ?
>>>> > Couldn't this also be achieved with netfilter and the recent/limit modules ?
>>>> > The limit module can already handle bursts.
>>>>
>>>> We indeed forgot to talk about it since we already got the question from
>>>> Wei.
>>>> The first thing is that your comment is also true for bandwidth which is
>>>> already present. Moreover PPS is linked to bandwidth.
>>>> By using netfilter, PPS shaping is done on backend level, once packet
>>>> has left the VM; which means after using an additional memory transaction
>>>> to copy packet from frontend. IMHO, at scale, shaping in this way should
>>>> save some memory transactions comparing to netfilter.
>>>
>>>Have you tried the netfilter approach and found it to be insufficient in
>>>practice?
>>>
>>>I'm not sure how netfilter recent/limit is implemented but if it queues
>>>rather than drops you would naturally find that you end up with back
>>>pressure onto the netback device where the ring would fill with
>>>in-progress requests and therefore netback would have to stop processing
>>>more packets.
>>>
>>>Ian.
>>>
>
>> The maximum limit rate of the netfilter limit module is 10000/s that is too
>>  small nowadays. Even if the size of the packet is 1500, the bandwidth is
>> as small as 14 MiB. So it is not a good practise to use the limit module.
>
>> $  sudo iptables -I INPUT -m limit --limit 10001/s --limit-burst 100 -j RETURN
>> iptables v1.4.19.1: Rate too fast "10001/s"
>
>
> And using TC / qdisc ? (http://lartc.org/manpages/tc.txt)
>



-- 
Best,

Jian

  reply	other threads:[~2014-12-18 10:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-18  8:13 [PATCH v3 1/3][xen-netback] add a pseudo pps rate limit Jian Wen
2014-12-18 10:00 ` Sander Eikelenboom
2014-12-18 10:16   ` Jian Wen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-07-09 12:24 [PATCH v3 0/3][xen-netback][toolstack] add a pseudo pps limit to netback William Dauchy
2013-07-09 12:24 ` [PATCH v3 1/3][xen-netback] add a pseudo pps rate limit William Dauchy
2013-07-09 13:48   ` Sander Eikelenboom
2013-07-09 14:01     ` William Dauchy
2013-07-09 14:42       ` Sander Eikelenboom
2013-07-09 15:19         ` William Dauchy
2013-07-10 12:50       ` Ian Campbell
2013-07-10 13:59         ` Sander Eikelenboom
2013-07-10  8:51   ` Wei Liu

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='CAMXzGWKcuoiPvW6QvDbQBVy1c-ZX1sQ9RHO7=10YbeswXGi7zw@mail.gmail.com' \
    --to=wenjianhn@gmail.com \
    --cc=linux@eikelenboom.it \
    --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).