From: Ludwig Nussel <ludwig.nussel@suse.de>
To: netfilter-devel@lists.netfilter.org
Subject: Re: Optimizing rule loading, iptables-1.3.0 and iptables-batch
Date: Wed, 8 Sep 2004 18:49:42 +0200 [thread overview]
Message-ID: <20040908164942.GA19802@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.61.0409072117010.11902@vortex.int.webcon.net>
Robert Hardy wrote:
> On Tue, 7 Sep 2004, Henrik Nordstrom wrote:
> >On Tue, 7 Sep 2004, Robert Hardy wrote:
> >>iptables-restore still only allows you to save and restore whole tables.
> >
> >Not entirely true. There is the --noflush (-n) option to iptables-restore
> >which allows you to do any kinds of operations you please.
>
> >Load a user chain:
> >
> >iptables-restore --noflush << EOF
> >*filter
> >-F userchain
> >-A userchain .....
> >COMMIT
> >EOF
>
> Ah Good! I obviously missed that somehow....
>
> As a side note for the same ~30000 rules:
>
> Time to load rules via iptables-batch using CIDR syntax: 23 mins 13 secs
>
> Time to load rules via iptables-batch using IPRANGE syntax: 26 mins 36 secs
>
> Time to load rules via iptables-restore (originally using CIDR syntax): 4
> mins 25 secs
>
> The time to process the rules set isn't linear with size. In general if you
> double a rule set it takes four times longer to load.
>
> At 30000 rules iptables-restore is still 5 times faster than iptables-batch.
Wow, when I said 'lot' I for sure didn't think about that many :-) I
was thinking in the order of like saving two seconds out of four
when using the plain iptables command. The reason why iptables-batch
takes longer most probably is because it commits after every rule
whereas iptables-restore usually only does that once for each table.
It can do so because rules are grouped by table and are not mixed.
Maybe it's possible to reuse the handles in iptables-batch and do
the commit at the end. I'll check that.
cu
Ludwig
--
(o_ Ludwig Nussel
//\ SUSE LINUX AG, Development
V_/_ http://www.suse.de/
next prev parent reply other threads:[~2004-09-08 16:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-07 4:45 Optimizing rule loading, iptables-1.3.0 and iptables-batch Robert Hardy
2004-09-07 11:15 ` Henrik Nordstrom
2004-09-08 1:30 ` Robert Hardy
2004-09-08 16:49 ` Ludwig Nussel [this message]
2004-09-26 19:24 ` Robert Hardy
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=20040908164942.GA19802@suse.de \
--to=ludwig.nussel@suse.de \
--cc=netfilter-devel@lists.netfilter.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.