From owner-freebsd-net Fri Feb 2 7: 8:45 2001 Delivered-To: freebsd-net@freebsd.org Received: from syncopation-01.iinet.net.au (syncopation-01.iinet.net.au [203.59.24.37]) by hub.freebsd.org (Postfix) with SMTP id 9CD7437B401 for ; Fri, 2 Feb 2001 07:08:23 -0800 (PST) Received: (qmail 16535 invoked by uid 666); 2 Feb 2001 15:15:40 -0000 Received: from reggae-14-13.nv.iinet.net.au (HELO elischer.org) (203.59.77.13) by mail.m.iinet.net.au with SMTP; 2 Feb 2001 15:15:40 -0000 Message-ID: <3A7ACD4B.155B2657@elischer.org> Date: Fri, 02 Feb 2001 07:07:55 -0800 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Luigi Rizzo Cc: "Rogier R. Mulhuijzen" , erwan@netvalue.com, roman@IPricot.com, freebsd-ipfw@FreeBSD.ORG, freebsd-net@FreeBSD.ORG Subject: Re: bandwidth analyser References: <200101292359.f0TNxOU48488@iguana.aciri.org> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Luigi Rizzo wrote: > > > There's one downside though. You can get statistics from the bridge node on > > packets and octects passed through the different parts of the bridge > > setyup, but it's not IP based. Also using that bridging code there's no > > bandwidth throttling or IPFW rule matching yet. > > > > Vitaly Belekhov wrote BW throttling and ipfw netgraph nodes for 3.X, and I > > will be porting those to 5.X-CURRENT over the next few weeks. The new ethernet node netgrpah interface (with 'upper' and 'lower') may influence this. also the ipfw he used is very old now. > > > > Using those you could get statistics really quickly by using libnetgraph > > and querying the nodes yourself with some C code instead of shell/perl > > scripting. > > the real problem with any approach is that if you have very many > flows, you have to fetch all the info every time you want to update > your statistics. The ipfw implementation which is in the kernel > now really does not help you there, because the stats are spread > over lists and hash tables, and on top of this the data structure > evolves dynamically as pkts come in, so you need to hold a lock > while navigating on it. > > This is why you do not want to download the stats 10-20 times per > second, at least with this architecture. > > I do not have a good solution in mind other than maybe > change the data structures so that the flow descriptors > (at least the part with the flow identifier and the stats) > are in a contiguous chunk of memory whose only variable > part is the size. This way you can either mmap the block, > or copyout() it without having to get a lock. > > cheers > luigi > ----------------------------------+----------------------------------------- > Luigi RIZZO, luigi@iet.unipi.it . ACIRI/ICSI (on leave from Univ. di Pisa) > http://www.iet.unipi.it/~luigi/ . 1947 Center St, Berkeley CA 94704 > Phone: (510) 666 2927 > ----------------------------------+----------------------------------------- > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000-2001 ---> X_.---._/ v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message