performance problems in getsamfilepwuid() with netlogond

Steve Langasek vorlon at netexpress.net
Wed Aug 16 14:40:07 GMT 2000


Hi,

Per the suggestions received on this list, I'm now running a SAMBA_TNG PDC
concurrently with Samba 2.0.7 for filesharing.  For the most part, things work
pretty well, but I can't join a workstation to the domain because the
connection to the PDC times out!

The problem is that the smbpasswd file on the PDC is over 5000 lines long
(we've been using 'encrypted passwords = yes' for some time now), and a new
workstation account is of course added at the bottom of the file.  I was
astonished to find that netlogond calls getsamfilepwuid() on the workstation
account's uid... which causes the program to call getpwnam() for every entry
in the smbpasswd file until it reaches the one for the workstation!  Needless
to say, this is a bit of a performance hit when using a flatfile password
database.  If I shuffle entries around in the smbpasswd file to put the
workstation accounts at the top, I can join the domain successfully; but
obviously, there's no way to put /all/ of the smbpasswd entries at the top.

What are the chances that this function could be optimized?  The design is
currently very clean, but it simply isn't scalable.  Would a patch be accepted
that rewrote this function, or would I be better off switching to a different
SAM backend?

Regards,
Steve Langasek
postmodern programmer



More information about the samba-ntdom mailing list