From: Patrick McHardy <kaber@trash.net>
To: Anton <anton.vazir@gmail.com>
Cc: netfilter-devel <netfilter-devel@vger.kernel.org>
Subject: Re: iptables performance and alternatives
Date: Thu, 15 May 2008 15:46:36 +0200 [thread overview]
Message-ID: <482C3EBC.8090301@trash.net> (raw)
In-Reply-To: <200805151421.23862.anton.vazir@gmail.com>
Anton wrote:
> Regarding the performance of the lookup of the iptables
> rules for match inside the kernel, is there any plans to
> improve the behaviour or no plans in this area yet?
>
> For example on the transit gateway I have ~500 rules which
> mark the packet, according to the client source IP - with
> unique mark per client IP - so I have 500 unique marks
> there, and so cannot use IPSET, and only IPTABLES - but
> it's known that iptables insert/lookup is very slow on huge
> rulesets (atleat with iptables 1.3.x) and slowness
> progresses approximatelly exponentially on growth of rules
> number.
>
> Do I miss anything?
Use conntrack to avoid doing the full lookup for every packet.
I'm working on improving things, its slowly progressing.
The successor of iptablse will use netlink, so it will be
able to insert and delete single rules without having to
transfer the entire ruleset again and again. Additionally
it natively supports sets, bitmaps and hashes, so your
500 source IP rules can be represented as a single rule
with, depending on how the IPs are distributed, either
O(1) or O(n) lookup time.
Its unfortunately still not in a publishable state, my
current plan is to have something for other people to
play with and work on by the next workshop. Maybe even
sooner.
prev parent reply other threads:[~2008-05-15 13:47 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-15 9:21 iptables performance and alternatives Anton
2008-05-15 9:26 ` Jan Engelhardt
2008-05-15 10:35 ` Anton
2008-05-15 10:43 ` Jan Engelhardt
2008-05-15 10:57 ` Anton
2008-05-15 11:18 ` Jan Engelhardt
2008-05-15 11:29 ` Anton
2008-05-15 12:01 ` Jan Engelhardt
2008-05-15 12:46 ` Anton VG
2008-05-15 13:19 ` Thomas Jacob
2008-05-18 21:15 ` Jesper Dangaard Brouer
2008-05-19 7:51 ` Thomas Jacob
2008-05-19 10:00 ` Jesper Dangaard Brouer
2008-05-15 12:32 ` Henrik Nordstrom
2008-05-15 12:34 ` Anton VG
2008-05-15 9:34 ` Eric Leblond
2008-05-15 9:58 ` Jan Engelhardt
2008-05-15 11:18 ` Krzysztof Oledzki
2008-05-15 11:58 ` Jan Engelhardt
2008-05-15 11:04 ` Anton
2008-05-15 11:20 ` Jan Engelhardt
2008-05-15 12:28 ` Henrik Nordstrom
2008-05-20 7:42 ` KOVACS Krisztian
2008-05-20 23:53 ` Henrik Nordstrom
2008-05-15 13:46 ` Patrick McHardy [this message]
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=482C3EBC.8090301@trash.net \
--to=kaber@trash.net \
--cc=anton.vazir@gmail.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.