[SSSD] RFC - disable the cleanup task by default

Jakub Hrozek jhrozek at redhat.com
Tue Apr 7 14:39:30 UTC 2015


Hi,

I would like to propose disabling the cleanup task by default. It causes
problems and is not really useful in my opinion.

The cleanup task was designed to keep the cache size within certain
limits. This is how it roughly works now:
    - find users who have never logged in by default. If
      account_cache_expiration is set, find users who loggged in later
      than account_cache_expiration
    - delete the matching set of users
    - find groups that have no members
    - delete the matching set of groups

So unless account_cache_expiration is set to something sensible, only
empty groups are removed and that's quite a corner case. The above
effectivelly walks the whole database, especially the groups step is
quite slow with a huge database. The whole cleanup task also runs in a
single sysdb transaction, which means all other transactions are blocked
while the cleanup task crunches the database. Just today I've seen two
users/customers for which disabling the cleanup helped performance.

The alternative would be to fix the cleanup task. So far I only checked
that indexed attributes are used -- they are. But I don't see much value
in the cleanup task to be honest. If an entry is explicitly requested,
then the back end removes the cached entry when evaluating the negative
result..

Therefore, I think we should disable the cleanup task completely unless
account_cache_expiration is set to a non-default value. If
account_cache_expiration was set, then the cleanup task would run as it
does now. Opinions?



More information about the sssd-devel mailing list