You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
But for the "free table" only n_elems/8 == SSS_MC_CACHE_ELEMENTS/8 bytes are allocated -- this corresponds to 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).
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.
Memcache size was made configurable in megabytes and not in slots
to hide internal implementation from users.
Relates: #5115
Reviewed-by: Sumit Bose <sbose@redhat.com>
Cloned from Pagure issue: https://pagure.io/SSSD/sssd/issue/4160
sssd/src/responder/nss/nsssrv_mmap_cache.c
Line 1310 in f3e89aa
For the "data table"
sss_mmap_cache_init()
allocatesn_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.But for the "free table" only
n_elems/8
==SSS_MC_CACHE_ELEMENTS/8
bytes are allocated -- this corresponds toSSS_MC_CACHE_ELEMENTS
.The problems is, no other piece of code (besides
sss_mmap_cache_init()
) is aware ofSSS_AVG_*_PAYLOAD
payload multiplier -- merelyMC_SLOT_SIZE
is expected as payload size everywhere (seeMC_SLOT_WITHIN_BOUNDS
,MC_SIZE_TO_SLOTS
, etc).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.
Comments
Comment from atikhonov at 2020-02-24 16:11:43
Metadata Update from @atikhonov:
Comment from atikhonov at 2020-03-05 11:27:55
PR: #999
Comment from atikhonov at 2020-03-05 11:29:52
Metadata Update from @atikhonov:
Comment from thalman at 2020-03-13 14:39:55
Metadata Update from @thalman:
Comment from pbrezina at 2020-04-09 13:09:01
sssd-1-16
Comment from pbrezina at 2020-04-09 13:09:01
Metadata Update from @pbrezina:
Comment from atikhonov at 2020-04-09 14:07:23
Patches are not merged in master branch yet.
Comment from atikhonov at 2020-04-09 14:07:23
Metadata Update from @atikhonov:
The text was updated successfully, but these errors were encountered: