This improves efficiency when adding a lot of rules to a table. Rather than calling insert or append for each rule, we can execute one iptables operation to replace them all.
This was identified to greatly improve the performance in ovn-kubernetes. The overall time of installing 1000 rules was taking 4.8 seconds by insert operations. By moving to this commit it only takes .058 seconds.
This improves efficiency when adding a lot of rules to a table. Rather than calling insert or append for each rule, we can execute one iptables operation to replace them all.
This was identified to greatly improve the performance in ovn-kubernetes. The overall time of installing 1000 rules was taking 4.8 seconds by insert operations. By moving to this commit it only takes .058 seconds.
https://github.com/ovn-org/ovn-kubernetes/pull/4241
https://github.com/ovn-org/ovn-kubernetes/pull/4241#issuecomment-2026167282