All of lore.kernel.org
 help / color / mirror / Atom feed
* [iptables PATCH 00/14] Improve iptables-nft performance with large rulesets
@ 2019-09-16 16:49 Phil Sutter
  2019-09-16 16:49 ` [iptables PATCH 01/14] tests/shell: Make ebtables-basic test more verbose Phil Sutter
                   ` (13 more replies)
  0 siblings, 14 replies; 26+ messages in thread
From: Phil Sutter @ 2019-09-16 16:49 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter-devel

I came up with a bunch of tests to compare nft and legacy performance in
rulesets of varying size, so I could not only compare individual
performance but also scaling ability of each.

Initial results were sobering, current nft performs worse in all tests
and scales much worse in almost all of them. With this series applied,
nft is on par or better in most of the cases, often also scaling much
better. Leftovers are scenarios which require to fetch the large
ruleset, e.g. deleting a rule from a large chain or calling
iptables-restore with --noflush option.

Patches 1-6 are merely fallout, fixing things or improving code.

Patch 7 is the first performance-related one: Simply increasing
mnl_talk() receive buffer size speeds up all cache fetches.

The remaining patches uniformly deal with caching: Either avoiding
the cache entirely or allowing for finer granular cache content
selection.

Phil Sutter (14):
  tests/shell: Make ebtables-basic test more verbose
  tests/shell: Speed up ipt-restore/0004-restore-race_0
  DEBUG: Print to stderr to not disturb iptables-save
  nft: Use nftnl_*_set_str() functions
  nft: Introduce nft_bridge_commit()
  nft: Fix for add and delete of same rule in single batch
  nft Increase mnl_talk() receive buffer size
  xtables-restore: Avoid cache population when flushing
  nft: Rename have_cache into have_chain_cache
  nft: Fetch rule cache only if needed
  nft: Allow to fetch only a specific chain from kernel
  nft: Support fetching rules for a single chain only
  nft: Optimize flushing all chains of a table
  nft: Reduce impact of nft_chain_builtin_init()

 iptables/nft.c                                | 285 +++++++++++++-----
 iptables/nft.h                                |  13 +-
 .../testcases/ebtables/0001-ebtables-basic_0  |  28 +-
 .../ipt-restore/0003-restore-ordering_0       |  18 +-
 .../testcases/ipt-restore/0004-restore-race_0 |   4 +-
 iptables/xshared.h                            |   2 +-
 iptables/xtables-eb-standalone.c              |   2 +-
 iptables/xtables-restore.c                    |  11 +-
 iptables/xtables-save.c                       |   4 +-
 9 files changed, 268 insertions(+), 99 deletions(-)

-- 
2.23.0


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2019-09-24 14:43 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-16 16:49 [iptables PATCH 00/14] Improve iptables-nft performance with large rulesets Phil Sutter
2019-09-16 16:49 ` [iptables PATCH 01/14] tests/shell: Make ebtables-basic test more verbose Phil Sutter
2019-09-20 10:32   ` Pablo Neira Ayuso
2019-09-16 16:49 ` [iptables PATCH 02/14] tests/shell: Speed up ipt-restore/0004-restore-race_0 Phil Sutter
2019-09-16 17:35   ` Florian Westphal
2019-09-16 16:49 ` [iptables PATCH 03/14] DEBUG: Print to stderr to not disturb iptables-save Phil Sutter
2019-09-20 10:32   ` Pablo Neira Ayuso
2019-09-16 16:49 ` [iptables PATCH 04/14] nft: Use nftnl_*_set_str() functions Phil Sutter
2019-09-20 10:33   ` Pablo Neira Ayuso
2019-09-16 16:49 ` [iptables PATCH 05/14] nft: Introduce nft_bridge_commit() Phil Sutter
2019-09-20 10:36   ` Pablo Neira Ayuso
2019-09-16 16:49 ` [iptables PATCH 06/14] nft: Fix for add and delete of same rule in single batch Phil Sutter
2019-09-16 16:49 ` [iptables PATCH 07/14] nft Increase mnl_talk() receive buffer size Phil Sutter
2019-09-17  5:00   ` Pablo Neira Ayuso
2019-09-17 14:08     ` Phil Sutter
2019-09-20 11:13   ` Pablo Neira Ayuso
2019-09-23 16:46     ` Phil Sutter
2019-09-16 16:49 ` [iptables PATCH 08/14] xtables-restore: Avoid cache population when flushing Phil Sutter
2019-09-20 11:57   ` Pablo Neira Ayuso
2019-09-24 14:43     ` Phil Sutter
2019-09-16 16:49 ` [iptables PATCH 09/14] nft: Rename have_cache into have_chain_cache Phil Sutter
2019-09-16 16:49 ` [iptables PATCH 10/14] nft: Fetch rule cache only if needed Phil Sutter
2019-09-16 16:49 ` [iptables PATCH 11/14] nft: Allow to fetch only a specific chain from kernel Phil Sutter
2019-09-16 16:49 ` [iptables PATCH 12/14] nft: Support fetching rules for a single chain only Phil Sutter
2019-09-16 16:49 ` [iptables PATCH 13/14] nft: Optimize flushing all chains of a table Phil Sutter
2019-09-16 16:50 ` [iptables PATCH 14/14] nft: Reduce impact of nft_chain_builtin_init() Phil Sutter

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.