From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v3 1/3][xen-netback] add a pseudo pps rate limit Date: Wed, 10 Jul 2013 13:50:59 +0100 Message-ID: <1373460659.5453.112.camel@hastur.hellion.org.uk> References: <1373372649-9029-1-git-send-email-william@gandi.net> <1373372649-9029-2-git-send-email-william@gandi.net> <1483688847.20130709154850@eikelenboom.it> <20130709140117.GN20956@gandi.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130709140117.GN20956@gandi.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: William Dauchy Cc: Ahmed Amamou , Sander Eikelenboom , xen-devel , Wei Liu , Kamel Haddadou List-Id: xen-devel@lists.xenproject.org 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.