Learn more about these different git repos.
Other Git URLs
https://github.com/SSSD/sssd/blob/f3e89aa02ca9c10ab2ac456ca643b3cf5edb44a0/src/responder/nss/nsssrv_mmap_cache.c#L1310
For the "data table" sss_mmap_cache_init() allocates n_elems*payload == SSS_MC_CACHE_ELEMENTS*{SSS_AVG_PASSWD_PAYLOAD|SSS_AVG_GROUP_PAYLOAD|SSS_AVG_INITGROUP_PAYLOAD} == 50000*MC_SLOT_SIZE*{4|3|5} bytes of memory.
sss_mmap_cache_init()
n_elems*payload
SSS_MC_CACHE_ELEMENTS*{SSS_AVG_PASSWD_PAYLOAD|SSS_AVG_GROUP_PAYLOAD|SSS_AVG_INITGROUP_PAYLOAD}
50000*MC_SLOT_SIZE*{4|3|5}
But for the "free table" only n_elems/8 == SSS_MC_CACHE_ELEMENTS/8 bytes are allocated -- this corresponds to SSS_MC_CACHE_ELEMENTS.
n_elems/8
SSS_MC_CACHE_ELEMENTS/8
SSS_MC_CACHE_ELEMENTS
The problems is, no other piece of code (besides sss_mmap_cache_init()) is aware of SSS_AVG_*_PAYLOAD payload multiplier -- merely MC_SLOT_SIZE is expected as payload size everywhere (see MC_SLOT_WITHIN_BOUNDS, MC_SIZE_TO_SLOTS, etc).
SSS_AVG_*_PAYLOAD
MC_SLOT_SIZE
MC_SLOT_WITHIN_BOUNDS
MC_SIZE_TO_SLOTS
Thus only {1/4|1/3|1/5} of allocated memory is actually used.
This results in significant performance hit in environment with large amount of users / groups and heavy nss load.
Metadata Update from @atikhonov: - Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1787067
PR: https://github.com/SSSD/sssd/pull/999
Metadata Update from @atikhonov: - Issue tagged with: PR
Metadata Update from @thalman: - Issue tagged with: Next milestone
sssd-1-16
Metadata Update from @pbrezina: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
Patches are not merged in master branch yet.
Metadata Update from @atikhonov: - Issue status updated to: Open (was: Closed)
SSSD is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in SSSD's github repository.
This issue has been cloned to Github and is available here: - https://github.com/SSSD/sssd/issues/5115
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @pbrezina: - Issue close_status updated to: cloned-to-github - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.