#4160 mem-cache bug: only small fraction of memory allocated is actually used
Closed: cloned-to-github 3 years ago by pbrezina. Opened 4 years ago by atikhonov.


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.

Metadata Update from @atikhonov:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1787067

4 years ago

Metadata Update from @atikhonov:
- Issue tagged with: PR

4 years ago

Metadata Update from @thalman:
- Issue tagged with: Next milestone

4 years ago
  • sssd-1-16
    • 38d4eab - mem-cache: sizes of free and data tables were made consistent

Metadata Update from @pbrezina:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

4 years ago

Patches are not merged in master branch yet.

Metadata Update from @atikhonov:
- Issue status updated to: Open (was: Closed)

4 years ago

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.

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)

3 years ago

Login to comment on this ticket.