performance modify rate: reduce lock contention on the object extension factory #4600
Labels
Need BZ
The ticket needs to be cloned to a BZ
performance
Issue impacts performance
priority_high
need urgent fix / highly valuable / easy to fix
Milestone
Issue Description
/opt/ldapbench/bin/modrate --hostname instance --port 389 --bindDN 'cn=Directory Manager' --bindPassword xxx --entryDN id=user.[1-10000],ou=People,dc=example,dc=com" --attribute street --attribute description --valueLength 12 --numThreads 5
During these modifies, target entry is allocated/duplicated/free. entry structure contains a object (entry) extension that is allocated via a factory slapi_register_object_extension.
ATM the purpose of this factory is to store "unhashed#user#password" in case of update of the password (pw_exp_init).
The factory is protected via a NSPR simple mutex and is the second hottest lock in contention
Moving this mutex to a pthread mutex reduce the contention to be 5th hottest
This change gives a 1% increase of the throughput: 3400 vs 3370/s
This change will also impact all others object extension (conn, op, entry,...)
Note: I think another ticket should be created to avoid creating systematically an entry extension. If possible it could rather been created on demand (if unhashed password is managed, if MODs update userpassword)
Package Version and Platform:
all version
Steps to Reproduce
Using modrate/perf_c2c
Expected results
Reduce contention on entry extension factory
The text was updated successfully, but these errors were encountered: