performance of accounts-daemon is very poor
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
accountsservice |
Unknown
|
Medium
|
|||
accountsservice (Ubuntu) |
In Progress
|
High
|
Unassigned | ||
Oneiric |
Won't Fix
|
Medium
|
Unassigned | ||
Precise |
Won't Fix
|
High
|
Unassigned |
Bug Description
Version 11.10
The performance of accounts-daemon is unacceptable with large password and/or group files. We have appoximately 40000 users in the passwords file and 16000 lines in the group file. Having looked at the source, it appears to me the problem is that for each user is pulls from the password database (via getpwXXX) its then calls getgroups to return the users list of groups.
Getgroups must make a complete pass through the group file to determine the groups for the user. When initializing this results in
reading the groups file 40000 times.
I think a better solution is to build a inverted group file map then first time getgroups is called by reading the entire group database and building a data structure indexed by username where a users group list can by found in a single lookup.
Of couse, an even better solution would be for getgroups to do that itself, but that would require much larger code changes.
I tried installed nscd to see if this would make a difference but no dice.
At the moment, 11.10 is unusable for us because of this problem.
Hope this is all the info you need.
Regards, pdg
<email address hidden>
Changed in accountsservice: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Changed in accountsservice (Ubuntu Oneiric): | |
status: | New → Triaged |
Changed in accountsservice (Ubuntu Precise): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in accountsservice (Ubuntu Oneiric): | |
importance: | Undecided → Medium |
Changed in accountsservice (Ubuntu): | |
status: | Triaged → Fix Released |
Changed in accountsservice (Ubuntu Oneiric): | |
status: | Triaged → Fix Released |
Changed in accountsservice (Ubuntu Precise): | |
status: | Triaged → Fix Released |
Changed in accountsservice (Ubuntu Precise): | |
status: | Fix Released → Triaged |
Changed in accountsservice (Ubuntu Oneiric): | |
status: | Fix Released → Triaged |
Changed in accountsservice (Ubuntu): | |
status: | Fix Released → Triaged |
Changed in accountsservice (Ubuntu Precise): | |
milestone: | none → ubuntu-12.04.2 |
Changed in accountsservice (Ubuntu Precise): | |
assignee: | nobody → Ritesh Khadgaray (khadgaray) |
Changed in accountsservice (Ubuntu): | |
assignee: | nobody → Ritesh Khadgaray (khadgaray) |
status: | Triaged → In Progress |
Changed in accountsservice (Ubuntu Precise): | |
status: | Triaged → In Progress |
Changed in accountsservice (Ubuntu Precise): | |
milestone: | ubuntu-12.04.2 → ubuntu-12.04.3 |
Changed in accountsservice (Ubuntu Precise): | |
assignee: | Ritesh Khadgaray (khadgaray) → nobody |
Changed in accountsservice (Ubuntu): | |
assignee: | Ritesh Khadgaray (khadgaray) → nobody |
Changed in accountsservice: | |
status: | Confirmed → Unknown |
Sorry, I said getgroups in my original post, and I should have said getgrouplist.