Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Ricardo Katz <ricardo.katz@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: 50k rules and performance issue in nft list table AND iptables-nft
Date: Fri, 21 Aug 2020 13:20:49 +0200	[thread overview]
Message-ID: <20200821112049.GA29905@salvia> (raw)
In-Reply-To: <CAG3fPQ4m9+Wbj3vKPmXbXa9-vH6ABq1eVNGGGzgbY_hNqGtdTw@mail.gmail.com>

Hi,

On Fri, Aug 14, 2020 at 06:56:32PM -0300, Ricardo Katz wrote:
> Hello,
> 
> I've been digging into some performance issue I'm facing in my
> production environment and would like to ask if someone has a light
> about this.
> 
> My environment has ~50k rules that references some ipsets (it's a
> Kubernetes cluster with Calico), and we've seen that sometimes
> iptables-nft-save takes more than 20s. So I've tried to search what
> was causing that, and have found some interesting behavior:
[...]
> * nft list table performs WORST than iptables-nft-save, sometimes
> taking more than 25s to display the rules. I've made the same test in
> a non prod (less load) environment and it takes a little bit less but
> yet, it's strange. The measured time is 4s in userspace and the rest
> in kernel space, which leads me to ask: is there a way netlink should
> be tuned? [...]

I have posted a patch to improve listing time:

https://patchwork.ozlabs.org/project/netfilter-devel/patch/20200821111438.5362-2-pablo@netfilter.org/

Thanks for reporting.

  reply	other threads:[~2020-08-21 11:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-14 21:56 50k rules and performance issue in nft list table AND iptables-nft Ricardo Katz
2020-08-21 11:20 ` Pablo Neira Ayuso [this message]
2020-08-21 11:50   ` Ricardo Katz

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=20200821112049.GA29905@salvia \
    --to=pablo@netfilter.org \
    --cc=netfilter@vger.kernel.org \
    --cc=ricardo.katz@gmail.com \
    /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