Review / discuss what LDAP indices we need For bug 53191 we decided against adding attributes which produced the "not indexed" warning. To many indices can slow down the LDAP server performance: - https://unix.stackexchange.com/questions/451118/openldap-bdb-equality-candidates-memberof-not-indexed As i understand this, every index produces search candidates e.g. "(&(univentionObjectType=users/user)(uid=foo))" one big set of candidates for "univentionObjectType" and a small one for "uid". This is slower than just having an index for "uid" 50000 users -> 2.9ms for both indices, 2.7ms only for uid as an index. - Write operations need to update indices Time to delete a user in a domain with 50000 users 98ms default ucs indices 31ms only uid + objectClass as indices Looking at the numbers above, generally it still seems to be the right approach to add an index, since searches can be magnitudes slower without an index.
There's a maximum number for indices in OpenLDAP: servers/slapd/back-mdb/back-mdb.h:45 > #define MDB_INDICES»»···256
There is a large list of attributes, which are missing; see <https://git.knut.univention.de/univention/ucs/-/blob/5.2-0/test/ucs-test/tests/99_end/06_ldap-index-missing?ref_type=heads>
(In reply to Philipp Hahn from comment #1) > There's a maximum number for indices in OpenLDAP: > servers/slapd/back-mdb/back-mdb.h:45 > > #define MDB_INDICES»»···256 UCS 5.2 is using openldap 2.5.13, which is still set to only 128 indices https://git.openldap.org/openldap/openldap/-/blob/OPENLDAP_REL_ENG_2_5_13/servers/slapd/back-mdb/back-mdb.h?ref_type=tags#L44
Note: We increased the number of indexes with a patch in our openldap build to 256. See https://forge.univention.org/bugzilla/show_bug.cgi?id=58443(In reply to Jürn Brodersen from comment #4) > (In reply to Philipp Hahn from comment #1) > > There's a maximum number for indices in OpenLDAP: > > servers/slapd/back-mdb/back-mdb.h:45 > > > #define MDB_INDICES»»···256 > > UCS 5.2 is using openldap 2.5.13, which is still set to only 128 indices > > https://git.openldap.org/openldap/openldap/-/blob/OPENLDAP_REL_ENG_2_5_13/ > servers/slapd/back-mdb/back-mdb.h?ref_type=tags#L44 Note: We increased the number of indexes with a patch in our openldap build to 256. See https://forge.univention.org/bugzilla/show_bug.cgi?id=58443