Univention Bugzilla – Bug 55120
univention-group-membership-cache consumes CPU 100%
Last modified: 2022-10-11 16:29:35 CEST
After latest update (2.0.0-7), customers noticed that portal update consumes 100% of CPU core for the process: /usr/bin/python3 /usr/sbin/univention-portal update --reason ldap:group
Fixed in Package: univention-group-membership-cache Version: 2.0.0-11A~5.0.0.202208241026 Branch: ucs_5.0-0 Scope: errata5.0-2 univention-group-membership-cache.yaml dcc5074b4ebf | Bug #55120: YAML 841977010152 | Bug #55120: YAML 93ac9fbd9182 | Bug #55120: Advisory update 23f3e98e5f3f | Bug #55120: univention-group-membership-cache consumes CPU 100% univention-group-membership-cache (2.0.0-9) eb3bdda6ba24 | Bug #55120: Fix users_groups univention-group-membership-cache (2.0.0-8) 23f3e98e5f3f | Bug #55120: univention-group-membership-cache consumes CPU 100% univention-group-membership-cache (2.0.0-11) 11be9633aaa3 | Bug #55120: Fix load() univention-group-membership-cache (2.0.0-10) 3fa76696b62a | Bug #55120: Improve performance We basically switched in the internal function of the ldap_cache's users_groups from groups_for_user to users_in_group. We found that for specific user/group data, despite operating on in-memory dictionaries and sets only, groups_for_user is much slower than users_in_group (which queries the database). We saw improvements from >2000s to <5s for very large environments.
OK: Group cache still generates the correct group lists OK: Groups in groups OK: Portal tile visibly depending on groups in cache OK: Performance with many users (~3 seconds with 200k users) OK: Performance with many groups and lots of groups in groups (Has been tested in customer environments) OK: Yaml OK: Tests (Have been fixed today, so no official run, but I ran them successfully in a Jenkins environment) Verified
<https://errata.software-univention.de/#/?erratum=5.0x393>