logon times

Andy Polyakov appro at fy.chalmers.se
Fri Oct 22 16:29:23 GMT 1999


Hi, everybody!

Given: SAMBA 2.1 controlled domain in NIS+ environment.

Problem: It takes substantially longer to logon in comparison to
"native" NTAS controlled domain.

One of causes: in lib/username.c "while(getpwent()) {strdup(this);
strdup(that);}" is performed for every(?) new session request which in
my case of >1.000 NIS+ accounts takes >6 seconds. Now the big plan here
is to migrate to DCE/DFS at campus level when "while(getpwent())" gonna
face >30.000 users. But not enough with users some (or all?) DCE
implementations dump even hosts as well! Now the 100$ question is how
long is "while(getpwent())" gonna take then (not to mention the wasted
memory)? Yes, I'm aware that in the beginning of lib/username.c it says:

> /****************************************************************************
>   Since getpwnam() makes samba really slow with the NT-domain code
>   (reading /etc/passwd again and again and again), here is an implementation
>   of very simple passwd cache
> ****************************************************************************/

Which IMO needs some rethinking and redesign to cover cases when true
arbitrary access to accounting database is a real option. I gonna *try
to find* some time for this, but if anybody gets there first I'll be
only happy to be excused...

Cheers. Andy.


More information about the samba-ntdom mailing list