performance problems in getsamfilepwuid() with netlogond
Michael Glauche
mg at plum.de
Wed Aug 16 16:10:51 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?
I think the TDB impemenation can solve this issue.
from configure --help:
--with-sam-pwdb={passdb,tdb,nt5ldap}
which password-database to use (passdb)
Try it with pwdb=tdb
Beware that tdb password backend is not very much testet. (even
don't know if it should work ;)
One problem still exist (IIRC): samba looks up those users in the system
passwd file. There is an option " --with-surstdb Use SURS tdb database",
but I guess its highly experimental ;)
regards,
Michael
More information about the samba-ntdom
mailing list