All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Leblond <eric@regit.org>
To: Ed W <lists@wildgooses.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: How to modify conntrack accounting?
Date: Wed, 03 Apr 2013 11:05:15 +0200	[thread overview]
Message-ID: <1364979915.9791.6.camel@tiger2> (raw)
In-Reply-To: <515B5FA7.3090902@wildgooses.com>

Hi,

On Tue, 2013-04-02 at 23:45 +0100, Ed W wrote:
> On 02/04/2013 21:46, Eric Leblond wrote:
> > Hello,
> >
> > Le mardi 02 avril 2013 à 20:11 +0100, Ed W a écrit :
> >> Hi, I have a requirement to account for "bytes I pay for" over some
> >> link, and conntrack very nearly gives me the right answer...  This link
> >> uses accounting somewhat like ATM, where the IP data is sliced into
> >> fixed size cells and you have to pay for the overhead per cell, plus the
> >> wasted space in the extra cell.
> > I'm not sure I really understood your ATM comparison but why not use the
> > new accounting system like described here:
> >
> > https://home.regit.org/2012/07/flow-accounting-with-netfilter-and-ulogd2/
> >
> 
> Thanks - I really need the raw conntrack detail so that I can do my own 
> aggregations (its quite a complex requirement for accounting)
> 
> Apologies for the ATM assumptions.  OK, ATM works by encapsulating the 
> data into small fixed sized packets of 48 bytes with a 5 byte header.  
> So for example if you send a 1000 byte IP packet then it will consume 21 
> ATM cells, which means a total bandwidth you pay for of 21 x (48+5) = 
> 1,113 bytes.   Annoyingly even the last (part filled) packet still has 
> to be 48 bytes, plus you have that 5 byte header on each packet.
> 
> The above is how ADSL connections work, and why using standard QOS fails 
> to work as expected when you have a bunch of small packets (ATM 
> bandwidth becomes large compared with IP bandwidth).

OK that is what I was fearing. You want to do ATM accounting at the IP
level ;)

> I believe newer kernels have some options to correctly compute the 
> overheads for ATM encapsulation, effectively I need to implement 
> something similar for conntrack
> 
> Thanks for further thoughts

You said you want a per-interface accounting but conntrack is not
interface aware. So a better solution may be to update nfacct modue to
increment counter with ATM-rounded value at each packet. Given the type
of patch this will require, it should be easy to maintain other time.
This will provide a more performant and easy to use framework.

By the way, if you want consulting time, I've got some available ;)

BR,
> 
> Ed W
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Eric Leblond <eric@regit.org>
Blog: https://home.regit.org/

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2013-04-03  9:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-02 19:11 How to modify conntrack accounting? Ed W
2013-04-02 20:46 ` Eric Leblond
2013-04-02 22:45   ` Ed W
2013-04-03  9:05     ` Eric Leblond [this message]
2013-04-03  9:58       ` Ed W

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=1364979915.9791.6.camel@tiger2 \
    --to=eric@regit.org \
    --cc=lists@wildgooses.com \
    --cc=netfilter-devel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.