#1166 autofs: speed up _sss_getautomntbyname_r() by storing results in struct automntent
Closed: Fixed None Opened 12 years ago by jhrozek.

This came up during patch review of the autofs patches. It's not clear whether this enhancement can make 1.8 beta, so I'm filing it as a ticket.

Stephen said:

Why don't we just store the result data in the "struct automtent" when we complete the _sss_setautomntent() routine? Granted, we'd be carrying around
more memory in autofs, but it would be accessible quite a bit faster than going back and forth to the responder for multiple _sss_getautomntbyname_r()
calls. At the very minimum, it would be better to replicate what we're
doing in the NSS passwd client, where we get SSS_NSS_MAX_ENTRIES at a
time. I can see this being a bottleneck for a system looking up user home
directories for thousands of users.

Additional comment about this. It's not sufficient to have the
endautomntent() value not go to the responder. If the responder is
allocating memory and maintaining a view of the data for this request
series, we need to be able to tell it to release it when we're done.

(The responder will also need to implement a timer event to free memory
after a certain amount of time, so we don't have a memory leak problem
if the calling function doesn't invoke endautomntent())


Fields changed

milestone: NEEDS_TRIAGE => SSSD AutoFS cleanup

Fields changed

owner: somebody => jhrozek

Fields changed

rhbz: => 0

Fields changed

status: new => assigned

Fields changed

patch: 0 => 1

Fields changed

resolution: => fixed
status: assigned => closed

Metadata Update from @jhrozek:
- Issue assigned to jhrozek
- Issue set to the milestone: SSSD AutoFS cleanup

7 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/2208

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.

Login to comment on this ticket.

Metadata