Apply peformance tuning to new sandboxes also#43146
Conversation
|
Looks like this replaces #42897 (looks like there was a bad rebase on that one?) I see there's a typo in the commit message (
I think that was my suggestion in f014fa2#r718371177, where I initially thought both were setting the same options. The variable was only used in a single place, so I suggested to either move them closer to where they're used, or just to inline them (to reduce the cognitive overload of finding "where" they're used, and the reverse ("what options are in That said, the earlier version did set two different options in two places; see f014fa2, so I'm a bit confused now why this PR is different from the earlier iteration; I think this PR is missing some of the changes from f014fa2 / #42897 |
33379c5 to
9c471df
Compare
|
Yep -- the rebase did clobber the old PR when trying to sign off one of the commits. The change to |
|
@thaJeztah @samuelkarp @corhere can I get a re-review? |
thaJeztah
left a comment
There was a problem hiding this comment.
changes look ok, but looks like one change is in the wrong commit; can you fix that?
relates to moby#35082, moby/libnetwork#2491 Previously, values for expire_quiescent_template, conn_reuse_mode, and expire_nodest_conn were set only system-wide. Also apply them for new lb_* and ingress_sbox sandboxes, so they are appropriately propagated Signed-off-by: Ryan Barry <[email protected]>
9c471df to
0dd3a2e
Compare
|
CI failure looks unrelated here. Can someone kick it? |
|
(kicked CI) @corhere is #43146 (comment) ok with you, or do you still prefer to have it addressed? |
|
@thaJeztah |
thaJeztah
left a comment
There was a problem hiding this comment.
LGTM (kicked CI once more just to be sure, see my comment higher up)
|
Oh; I was wrong; looks like it is a known flaky (but on specific architectures); #41561 For posterity; failure was; anyway, let's see if CI goes green and get this in |
Looks like #43146 (comment) was addressed
|
Bringing this one in; CI is green now 👍 |
|
I found another issue. The <right after booting OS>
docker@ub2204-1:~$ sudo nsenter --net=/var/run/docker/netns/lb_wgyv3nagr sysctl net.ipv4.vs.expire_nodest_conn
net.ipv4.vs.expire_nodest_conn = 0
docker@ub2204-1:~$ sudo sysctl net.ipv4.vs.expire_nodest_conn
net.ipv4.vs.expire_nodest_conn = 0
<restart docker daemon>
docker@ub2204-1:~$ sudo systemctl restart docker
docker@ub2204-1:~$ sudo nsenter --net=/var/run/docker/netns/lb_wgyv3nagr sysctl net.ipv4.vs.expire_nodest_conn
net.ipv4.vs.expire_nodest_conn = 1
docker@ub2204-1:~$ sudo sysctl net.ipv4.vs.expire_nodest_conn
net.ipv4.vs.expire_nodest_conn = 1(Above testing was run with the dockerd binary including this PR.) This means the settings would get lost after the user reboots the system and they probably would not notice that. |
|
@xinfengliu nice find! Looks like there's some other code-path that should also apply it. Could you perhaps open a ticket for that? Just to be sure it's not forgotten (easy to miss comments on merged pull requests); contributions welcome as well of course! |
|
After further checking, I find it is because May 22 13:22:53 ub2204-1 dockerd[1053]: time="2022-05-22T13:22:53.350537245Z" level=error msg="error reading the kernel parameter net.ipv4.vs.conn_reuse_mode" error="open /proc/sys/net/ipv4/vs/conn_reuse_mode: no such file or directory"
May 22 13:22:53 ub2204-1 dockerd[1053]: time="2022-05-22T13:22:53.350561161Z" level=error msg="error reading the kernel parameter net.ipv4.vs.expire_nodest_conn" error="open /proc/sys/net/ipv4/vs/expire_nodest_conn: no such file or directory"
May 22 13:22:53 ub2204-1 dockerd[1053]: time="2022-05-22T13:22:53.350567369Z" level=error msg="error reading the kernel parameter net.ipv4.vs.expire_quiescent_template" error="open /proc/sys/net/ipv4/vs/expire_quiescent_template: no such file or directory"
May 22 13:22:53 ub2204-1 dockerd[1053]: time="2022-05-22T13:22:53.350577244Z" level=error msg="error reading the kernel parameter net.ipv4.vs.conn_reuse_mode" error="open /proc/sys/net/ipv4/vs/conn_reuse_mode: no such file or directory"Not sure if we should create an moby issue for it (addressing it in moby code). I guess we could use |
|
Even if we did use Other modules are loaded ( |
Previously, with the patch from moby#43146, it was possible for a network configured with a single ingress or load balancer on a distribution which does not have the `ip_vs` kernel module loaded by default to try to apply sysctls which did not exist yet, and subsequently dynamically load the module as part of ipvs/netlink.go. This module is vendored, and not a great place to try to tie back into core libnetwork functionality, so also ensure that the sysctls (which are idempotent) are called after ingress/lb creation once `ipvs` has been initialized. Signed-off-by: Ryan Barry <[email protected]>
Pull moby/moby#43146 and moby/moby#43670 into 20.10 relates to #35082, moby#2491 Previously, values for expire_quiescent_template, conn_reuse_mode, and expire_nodest_conn were set only system-wide. Also apply them for new lb_* and ingress_sbox sandboxes, so they are appropriately propagated Signed-off-by: Ryan Barry <[email protected]>
Pull moby/moby#43146 and moby/moby#43670 into 20.10 relates to #35082, moby#2491 Previously, values for expire_quiescent_template, conn_reuse_mode, and expire_nodest_conn were set only system-wide. Also apply them for new lb_* and ingress_sbox sandboxes, so they are appropriately propagated Signed-off-by: Ryan Barry <[email protected]>
Pull moby/moby#43146 and moby/moby#43670 into 20.10 relates to #35082, moby#2491 Previously, values for expire_quiescent_template, conn_reuse_mode, and expire_nodest_conn were set only system-wide. Also apply them for new lb_* and ingress_sbox sandboxes, so they are appropriately propagated Signed-off-by: Ryan Barry <[email protected]>
Pull moby/moby#43146 and moby/moby#43670 into 20.10 relates to #35082, moby#2491 Previously, values for expire_quiescent_template, conn_reuse_mode, and expire_nodest_conn were set only system-wide. Also apply them for new lb_* and ingress_sbox sandboxes, so they are appropriately propagated Signed-off-by: Ryan Barry <[email protected]> Co-authored-by: Bjorn Neergaard <[email protected]>
relates to #35082, moby/libnetwork#2491
Previously, values for expire_quiescent_template, conn_reuse_mode,
and expire_nodest_conn were set only system-wide. Also apply them
for new lb_* and ingress_sbox sandboxes, so they are appropriately
propagated
Signed-off-by: Ryan Barry [email protected]
Signed-off-by: Ryan Barry [email protected]
- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)