Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nis server: limit group.byname and group.bygid maps to POSIX groups #6867

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abbra
Copy link
Contributor

@abbra abbra commented Jun 2, 2023

For NIS maps only POSIX groups make sense. Limit searches to those. This should avoid pulling groups like 'ipausers' into NIS maps. It also will help with large non-POSIX groups being rebuilt when a new member is added because then NIS maps wouldn't need to be rebuilt.

In a real life scenario this reduced time spent on adding a user from 45 seconds to 15 seconds: 'ipausers' group membership change does not trigger a rebuild of NIS maps anymore.

Fixes: https://pagure.io/freeipa/issue/9388

@abbra abbra added ipa-4-9 Mark for backport to ipa 4.9 ipa-4-10 Mark for backport to ipa 4.10 labels Jun 2, 2023
@abbra abbra force-pushed the compat-tree-speedup branch 5 times, most recently from 9b67430 to bffdee6 Compare June 2, 2023 08:11
@rcritten
Copy link
Contributor

rcritten commented Jun 2, 2023

Is there a way to tell in the logs that a NIS rebuild is triggered? Or can this be observed only by the reduced time to add a new user? How many users did you test with?

@stale
Copy link

stale bot commented Aug 12, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Stale PR [Bot] label Aug 12, 2023
@abbra abbra removed the stale Stale PR [Bot] label Sep 15, 2023
For NIS maps only POSIX groups make sense. Limit searches to those. This
should avoid pulling groups like 'ipausers' into NIS maps. It also will
help with large non-POSIX groups being rebuilt when a new member is
added because then NIS maps wouldn't need to be rebuilt.

In a real life scenario this reduced time spent on adding a user from 45
seconds to 15 seconds: 'ipausers' group membership change does not
trigger a rebuild of NIS maps anymore.

Fixes: https://pagure.io/freeipa/issue/9388

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
@abbra
Copy link
Contributor Author

abbra commented Sep 26, 2023

Rebased and removed the temporary commit which used 389-ds nightly COPR.

@flo-renaud
Copy link
Contributor

New installation and upgrade work well (tested both with the plugin enabled or disabled).
Same question as @rcritten , is there an easy way to check the performance difference?

@abbra
Copy link
Contributor Author

abbra commented Sep 28, 2023

According to the reporter (in bugzilla), they have had ~2100 users in ipausers group. Adding a new user causes NIS to trigger dereference requests in NIS plugin (and in compat tree, I guess) which slow down ipa user-add for them substantially. Doing this change made them to observe 45 to 15 seconds speed up for each new user added. ipausers group is non-POSIX one and should not be seen by both NIS and Compat tree plugins.

Thus a test would be to create new users continuously. I believe freeipa-perftest would show the difference in groupsize test?

@rcritten
Copy link
Contributor

rcritten commented Dec 6, 2023

I tested with NIS enabled with and without the patch applied using a different methodology.

I did the time to add 2100 users sequentially. There is no apparently difference in the times with and without the patch. In total it takes ~230 minutes. Without NIS enabled it takes 30m.

Copy link

stale bot commented Mar 17, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Stale PR [Bot] label Mar 17, 2024
@abbra abbra removed the stale Stale PR [Bot] label Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ipa-4-9 Mark for backport to ipa 4.9 ipa-4-10 Mark for backport to ipa 4.10
Projects
None yet
3 participants