Univention Bugzilla – Bug 34003
Committing slapd.conf is slow due to 25univention-ldap-server_local-schema
Last modified: 2021-05-25 15:59:24 CEST
Created attachment 5758 [details] 25univention-ldap-server_local-schema Committing slapd.conf is slow due to 25univention-ldap-server_local-schema. In my thests the attached version speeded this up by about a factor of four and it scales much better with the number of additional local schema files. Maybe the code got more ugly but this may be improved.
It's still slow to commit /etc/ldap/slapd.conf.
This issue has been filed against UCS 3. UCS 3 is out of the normal maintenance and many UCS components have vastly changed in UCS 4. If this issue is still valid, please change the version to a newer UCS version otherwise this issue will be automatically closed in the next weeks.
Created attachment 10403 [details] patch
Great performance improovement! Use ucr_filter() instead of subprocess(['cat']) | subprocess(['ucr', 'filter']).
Updated patch in git:fbest/34003-performance-of-25univention-ldap-server_local-schema This increases commiting slapd.conf in 2 seconds instead of 18 seconds. The resulting content is equal. Previous: # time ucr commit /etc/ldap/slapd.conf Multifile: /etc/ldap/slapd.conf real 0m18,364s user 0m15,608s sys 0m2,909s # time ucr commit /etc/ldap/slapd.conf Multifile: /etc/ldap/slapd.conf real 0m19,683s user 0m16,578s sys 0m3,297s # time ucr commit /etc/ldap/slapd.conf Multifile: /etc/ldap/slapd.conf real 0m19,016s user 0m16,090s sys 0m3,137s Afterwards: # time ucr commit /etc/ldap/slapd.conf Multifile: /etc/ldap/slapd.conf real 0m1,982s user 0m1,677s sys 0m0,313s # time ucr commit /etc/ldap/slapd.conf Multifile: /etc/ldap/slapd.conf real 0m2,073s user 0m1,723s sys 0m0,361s # time ucr commit /etc/ldap/slapd.conf Multifile: /etc/ldap/slapd.conf real 0m2,099s user 0m1,804s sys 0m0,308s
Fixed: instead of 2 subprocesses per file run_filter() is invoked directly. univention-ldap (16.0.6-1) 458dcdfb4a34 | Bug #34003: fix performance of 25univention-ldap-server_local-schema changelog-5.0-0.xml 458dcdfb4a34 | Bug #34003: fix performance of 25univention-ldap-server_local-schema
This fixed Bug #52745. Code review: OK Resulting content of slapd.conf is the same: OK Tests: OK Tests that failed due to the long time it took to commit slapd.conf are green again: OK Changelog: OK Verified
UCS 5.0 has been released: https://docs.software-univention.de/release-notes-5.0-0-en.html https://docs.software-univention.de/release-notes-5.0-0-de.html If this error occurs again, please use "Clone This Bug".