public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [REGRESSION] 6.18.14 netfilter/nftables consumes way more memory
@ 2026-03-04 17:50 Chris Arges
  2026-03-04 21:26 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 8+ messages in thread
From: Chris Arges @ 2026-03-04 17:50 UTC (permalink / raw)
  To: Pablo Neira Ayuso, Florian Westphal, stable, linux-kernel,
	Greg Kroah-Hartman
  Cc: lwn, jslaby, kernel-team, netfilter-devel

Hello,

We've noticed significant slab unreclaimable memory increase after upgrading
from 6.18.12 to 6.18.15. Other memory values look fairly close, but in my
testing slab unreclaimable goes from 1.7 GB to 4.9 GB on machines.

Our use case is having nft rules like below, but adding them to 1000s of
network namespaces. This is essentially running `nft -f` for all these
namespaces every minute.

```
table inet service_1234567 {
}
delete table inet service_1234567
table inet service_1234567 {
	chain input {
		type filter hook prerouting priority filter; policy accept;
		ip saddr @account.ip_list drop
	}
	set account.ip_list {
		type ipv4_addr
		flags interval
		auto-merge
	}
}
add element inet service_1234567 account.ip_list { /* add 1000s of CIDRs here */ }
```

I suspect this is related to:
- 36ed9b6e3961 (upstream 7e43e0a1141deec651a60109dab3690854107298)
- netfilter: nft_set_rbtree: translate rbtree to array for binary search

I'm still digging into this, and plan on reverting commits and seeing if memory
usage goes back to nominal in production. I don't have a trivial
reproducer unfortunately.

Happy to run some additional tests, and I can easily apply patches on top of
linux-6.18.y to run in a test environment.

We are using userspace nftables 1.1.3, but had to apply the patch mentioned
in this thread: https://lore.kernel.org/all/e6b43861cda6953cc7f8c259e663b890e53d7785.camel@sapience.com/
In order to solve the other regression we encountered.

Thanks,
--chris

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

end of thread, other threads:[~2026-03-07  0:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04 17:50 [REGRESSION] 6.18.14 netfilter/nftables consumes way more memory Chris Arges
2026-03-04 21:26 ` Pablo Neira Ayuso
2026-03-04 21:27   ` Pablo Neira Ayuso
2026-03-05 16:28     ` Chris Arges
2026-03-06 12:22       ` Pablo Neira Ayuso
2026-03-06 12:25         ` Pablo Neira Ayuso
2026-03-06 18:20           ` Chris Arges
2026-03-07  0:15             ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox