From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Brskt <contact@brskt.be>
Cc: netfilter@vger.kernel.org
Subject: Re: List chain during attack high CPU usage
Date: Wed, 7 Sep 2022 16:54:42 +0200 [thread overview]
Message-ID: <YxiwsmThXAYt3kml@salvia> (raw)
In-Reply-To: <YxCKp2yQT1mu096e@salvia>
On Thu, Sep 01, 2022 at 12:34:15PM +0200, Pablo Neira Ayuso wrote:
> On Wed, Aug 31, 2022 at 02:18:17AM +0200, Brskt wrote:
> > Hello,
> >
> > I'm using some filter which uses sets with meters. When the server is
> > receiving a lot of packets per seconds (~800k+) and using the command to
> > list the chain, it does take ~80% of CPU and take a long time to return an
> > output.
> >
> > # cat /etc/issue
> > Welcome to Alpine Linux 3.16
> >
> > # nft -v
> > nftables v1.0.5 (Lester Gooch #4)
> >
> > # uname -r
> > 5.15.62-1-lts
>
> Could you provide more information on your setup? ruleset?
>
> Ruleset listing is also lockless.
>
> It is hard to guess with this short notice.
For the record, the existing userspace cache logic in nftables is
retrieving the elements in your set, and I suspect you have a lot of
elements, that is why:
nft list chain x y
is likely taking time there to show the listing.
It should be possible to improve this cache logic, it will only
require a userspace software update.
next prev parent reply other threads:[~2022-09-07 14:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 0:18 List chain during attack high CPU usage Brskt
2022-09-01 10:34 ` Pablo Neira Ayuso
2022-09-07 14:54 ` Pablo Neira Ayuso [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-08-03 11:49 Brskt
2023-08-22 9:56 ` Pablo Neira Ayuso
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=YxiwsmThXAYt3kml@salvia \
--to=pablo@netfilter.org \
--cc=contact@brskt.be \
--cc=netfilter@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.