From: Jesper Dangaard Brouer <jdb@comx.dk>
To: Netfilter Developers <netfilter-devel@vger.kernel.org>,
Harald Welte <laforge@netfilter.org>
Cc: "Paul C. Diem" <PCDiem@FoxValley.net>,
Martin Josefsson <gandalf@netfilter.org>
Subject: [PATCH 0/2] Scalability performance work on iptables/libiptc
Date: Mon, 26 Nov 2007 14:56:22 +0100 [thread overview]
Message-ID: <1196085382.3866.56.camel@localhost.localdomain> (raw)
There are scalability/performance issues with iptables in libiptc.c,
when parsing/pulling-out the ruleset blob. As I discussed shortly with
Harald and Martin during the workshop.
These patches performance optimize two scalability issues.
1) Sorting chain during pull-out give worst-case runtime O(Chains^2),
reduced to O(Chains) only when creating a new chain.
2) Finding jump chains is suboptimal O(Chain*Rules), reduced to O(R)
and chain offset lookup to O(1).
The idea behind these fixes are based upon patches posted by Paul
C. Diem <PCDiem@FoxValley.net> back in June+Oct 2006.
These performance issues will only be noticed when the rule set is
large enough. For me, in real life, its actually a real performance
issue. On one production system (Rules=26209 and Chains=6233) it takes
10 seconds to create a new chain by calling "iptables -N test", with
these patches its reduced to 0.145 second.
--
Med venlig hilsen / Best regards
Jesper Brouer
ComX Networks A/S
Linux Network developer
Cand. Scient Datalog / MSc.
Author of http://adsl-optimizer.dk
LinkedIn: http://www.linkedin.com/in/brouer
reply other threads:[~2007-11-26 13:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1196085382.3866.56.camel@localhost.localdomain \
--to=jdb@comx.dk \
--cc=PCDiem@FoxValley.net \
--cc=gandalf@netfilter.org \
--cc=laforge@netfilter.org \
--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 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).