mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Performance regression in ip_set_swap on 6.1.69
@ 2024-01-05 22:45 Ale Crismani
  2024-01-10 10:23 ` David Wang
  0 siblings, 1 reply; 15+ messages in thread
From: Ale Crismani @ 2024-01-05 22:45 UTC (permalink / raw)
  To: linux-kernel

Dear all,

When upgrading some of our Debian hosts that compose a Kubernetes cluster we found a regression in ip_set_swap on 6.1.69. Calls to ip_set_swap now take roughly 15ms, while they used to take just tens of microseconds before.

The issue is very visible for use, since we use kube-router as our Kubernetes networking interface, and it uses ipset swap all the time to populate sets that enforce firewall policies between containers.

We tracked the issue down with strace, and then took stats with bpftrace running:
---
kfunc:ip_set:ip_set_swap {
        @start[tid] = nsecs;
}

kretfunc:ip_set:ip_set_swap {
        if (@start[tid]) {
                @srlat = hist((nsecs - @start[tid])/1000);
                delete(@start[tid]);
        }
}

interval:s:20 {
        printf("ip_set_swap() latency, milliseconds:\n");
---

On 6.1.69 results look like:
 
ip_set_swap() latency, milliseconds:
[8K, 16K)           1848 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[16K, 32K)         1017 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[32K, 64K)         38     |@

while on 6.1.67:
ip_set_swap() latency, milliseconds:

[0]                  166   |@
[1]                  378   |@@
[2, 4)              762   |@@@@@
[4, 8)              1624 |@@@@@@@@@@@
[8, 16)            3493 |@@@@@@@@@@@@@@@@@@@@@@@@
[16, 32)          7308 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[32, 64)          6412 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[64, 128)              1 |

We tried compiling commits between 6.1.67 and 6.1.69 and it seems the performance regression was introduced by 875ee3a, ip_set_swap is fast on 602505 that precedes it, and slow on it.

First time I post here, hope the format is appropriate, and thanks for any help with this! Also, if possible, I'd appreciate if any reply could CC me, as I am not subscribed.

Alessandro Crismani

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

end of thread, other threads:[~2024-01-16  7:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-05 22:45 Performance regression in ip_set_swap on 6.1.69 Ale Crismani
2024-01-10 10:23 ` David Wang
2024-01-10 10:35   ` Jozsef Kadlecsik
2024-01-10 11:05     ` David Wang
2024-01-10 11:30       ` David Wang
2024-01-10 16:14       ` Jozsef Kadlecsik
2024-01-11  8:25         ` Jozsef Kadlecsik
2024-01-11 11:11           ` David Wang
2024-01-11 11:22             ` Jozsef Kadlecsik
2024-01-11 14:53               ` Re:Performance regression in ip_set_swap on 6.7.0 David Wang
2024-01-13 18:24                 ` Jozsef Kadlecsik
2024-01-14  5:30                   ` David Wang
2024-01-14 20:38                     ` Performance " Ale Crismani
2024-01-15 13:29                       ` Ale Crismani
2024-01-16  7:57                         ` Jozsef Kadlecsik

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

all inboxes | Powered by JetHome®