Description
Kube-OVN Version
v1.13.2 and before
Kubernetes Version
Client Version: v1.28.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.32.0
Operation-system/Kernel Version
"Ubuntu 22.04.4 LTS"
Description
Related to #4849 and #4822 , when lots of subnets in a cluster, kube-ovn-cni can consume up to 80% of CPU.
This is related to the setIptables
function which create count(subnet)*2 forward rules and check if rule exists every 10 seconds, which leads to a count(subnet)2count(subnet)*2 times filter.
Steps To Reproduce
- Create a cluster with 2 node and 250 subnets.
- Use top to see kube-ovn-daemon cpu usages
Current Behavior
Up to 80% CPU usage.
Expected Behavior
The CPU usage should be low under this load.