Univention Bugzilla – Full Text Bug Listing |
Summary: | use nosync for mdb during join and slapindex | ||
---|---|---|---|
Product: | UCS | Reporter: | Sönke Schwardt-Krummrich <schwardt> |
Component: | Join (univention-join) | Assignee: | Felix Botner <botner> |
Status: | CLOSED FIXED | QA Contact: | Stefan Gohmann <gohmann> |
Severity: | enhancement | ||
Priority: | P5 | CC: | best, gohmann, markus.daehlmann |
Version: | UCS 4.1 | ||
Target Milestone: | UCS 4.1-3-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
See Also: |
https://forge.univention.org/bugzilla/show_bug.cgi?id=50673 https://forge.univention.org/bugzilla/show_bug.cgi?id=47609 |
||
What kind of report is it?: | Bug Report | What type of bug is this?: | 2: Improvement: Would be a product improvement |
Who will be affected by this bug?: | 3: Will affect average number of installed domains | How will those affected feel about the bug?: | 1: Nuisance – not a big deal but noticeable |
User Pain: | 0.034 | Enterprise Customer affected?: | |
School Customer affected?: | ISV affected?: | ||
Waiting Support: | Flags outvoted (downgraded) after PO Review: | ||
Ticket number: | Bug group (optional): | UCS Performance | |
Max CVSS v3 score: |
Description
Sönke Schwardt-Krummrich
2016-05-17 13:38:51 CEST
What does the "nosync" flag do? "nosync" turns off syncing the database to disk after every transaction, which is very useful for slapindex, which would otherwise do an fdatasync after indexing every single LDAP object. As Sönke said this reduces the run time of slapindex from 2 hours to a couple of seconds on many of our school slaves. It would greatly benefit us if /usr/share/univention-ldap/ldap_setup_index would set this parameter before invoking slapindex, especially when we do several index-changing UCS updates in a row. After some research I believe that running "slapindex -q" would basically do the same as setting the "nosync" MDB option. Plus, with '-q' slapindex makes use of the "tool-threads" option, which is already configurable via UCR, so it can run multi-threaded. Of course, all of this comes at the cost of data integrity in case of a system failure while indexing, but as long as it is not the master LDAP being indexed, this is an acceptable price to pay, since one could just rejoin the failed machine. So in short: A UCR variable that would let us use "-q" in automated slapindex scenarios would be highly appreciated. (In reply to Sönke Schwardt-Krummrich from comment #0) > A customer suggested to set the nosync flag for mdb in univention-join while > the LDAP is initially replicated. works for me with: -> ucr set ldap/database/mdb/envflags='nosync' && \ univention-join && \ ucr unset ldap/database/mdb/envflags && \ service slapd restart > slapindex Added UCR variable ldap/index/quickmode, If true "ldap_setup_index" starts slapindex in "quick" mode. univention-ldap: 12.1.6-38.835.201609051757 univention-ldap.yaml merged to 4.2 One small issue: Can you describe in the UCR variable what the default is? root@master411:~# ucr search ldap/index/quickmode ldap/index/quickmode: <empty> If this option is activated, the LDAP reindex tool slapindex is started in "quick" mode (fewer integrity checks, improved indexing time). root@master411:~# OK, univention-ldap-server now sets a default for ldap/index/quickmode. Added default to description. errata4.1-3 4.2-0 updated yaml Code review: OK ucs-test: OK Tests: OK YAML: OK |