Hi, We have noticed a performance regression on some of our boxes when we upgraded from Ubuntu 18.04 (sssd 1.16.1-1ubuntu1.7) (sudo 1.8.21p2) -> Ubuntu 20.04 (sssd 2.2.3-3ubuntu0.1) (sudo 1.8.31) (however it was not universal, some Ubuntu 20.04 boxes are fine) joined to a FreeIPA domain.
We have noticed the following line takes a long when turned on sudo debug logging (not sure if this is red hearing) sudo_pam_approval @ ../../../plugins/sudoers/auth/pam.c:330
Any idea what may cause this, or something to try would be much appreciated?
see benchmark Ubuntu 18.04 ./hyperfine "sudo -u user true" --warmup 5 Benchmark #1: sudo -u trans true Time (mean ± σ): 51.0 ms ± 24.6 ms [User: 5.7 ms, System: 3.5 ms] Range (min … max): 42.1 ms … 236.7 ms 60 runs
Ubuntu 20.04 Benchmark #1: sudo -u user true Time (mean ± σ): 436.0 ms ± 36.1 ms [User: 15.2 ms, System: 14.7 ms] Range (min … max): 407.4 ms … 534.3 ms 10 runs
I have further noticed that the difference is coming from additional calls from sssd to ldap (from a tcpdump)
It looks like in both cases caching is not working as for every sudo -u user "cmd" a call is being made to ldap however in the slower case it is making additional calls (I can't see what they are because they are all tls/ldap)
I am unsure if this is expected behavior ?
I am going to try tweak the sudo rule caching options.
Is there any way to use nsswitch or another mechanism to not bother using sss when it matches a sudo rule locally?
Something like sudoers: files [SUCCESS=return] sss
I am looking for a way to bypass sssd's performance issues by using local sudoers files while at the same time still having sss for other rules.
On 1/22/21 3:11 PM, Judd Gaddie wrote:
Is there any way to use nsswitch or another mechanism to not bother using sss when it matches a sudo rule locally?
Something like sudoers: files [SUCCESS=return] sss
I don't think that sudo supports this.
I am looking for a way to bypass sssd's performance issues by using local sudoers files while at the same time still having sss for other rules.
Can you share sudo and sssd log files? https://sssd.io/docs/users/troubleshooting/sudo_troubleshooting.html
Do you have only local sudoers or also some rules in LDAP?
sssd-users@lists.fedorahosted.org