Skip to content

ipvs: add sysctl_run_estimation to support disable estimation

Hangbin Liu requested to merge liuhangbin/centos-stream-9:bz2174312_ipvs into main

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2174312 Upstream Status: net.git commit 2232642ec3fb

Conflicts: we backported 174c37627894 ("netfilter: ipvs: make global sysctl readonly in non-init netns") first.

Note: A latter upstream commit 144361c1949f ("ipvs: run_estimation should control the kthread tasks") changes the run_estimation sysctl to control the kthread tasks, which depend on a lot of other commits, so I will just skip it.

commit 2232642ec3fb4aad6ae4da1e109f55a0e7f2d204 Author: Dust Li dust.li@linux.alibaba.com Date: Fri Aug 20 13:37:52 2021 +0800

ipvs: add sysctl_run_estimation to support disable estimation

estimation_timer will iterate the est_list to do estimation
for each ipvs stats. When there are lots of services, the
list can be very large.
We found that estimation_timer() run for more then 200ms on a
machine with 104 CPU and 50K services.

yunhong-cgl jiang report the same phenomenon before:
https://www.spinics.net/lists/lvs-devel/msg05426.html

In some cases(for example a large K8S cluster with many ipvs services),
ipvs estimation may not be needed. So adding a sysctl blob to allow
users to disable this completely.

Default is: 1 (enable)

Cc: yunhong-cgl jiang <xintian1976@gmail.com>
Signed-off-by: Dust Li <dust.li@linux.alibaba.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

Signed-off-by: Hangbin Liu haliu@redhat.com

Merge request reports