[Samba] PDC and BDC load-balancing

Sven Köhler skoehler at upb.de
Sat Jul 27 16:12:01 GMT 2002

> I would like to know how Samba / Windows determines which domain 
> controller should handle a logon request, and whether there is a way I 
> can affect the process.

i heard something like the Workstation takes the first DC which answers 
- which should be the faster machine.

> Here's the situation: I have a school installation running a Samba 
> domain, with a PDC (1.1GHz Celeron, 256 MB RAM) and one BDC (much 
> smaller, 366 with 64 MB RAM), both with RedHat 7.1 and Samba 2.2.5. 
> There are about 80 NT and 2000 workstations, and about 10 98 machines.

i think the 386-machine will answer with a little delay.

> At first I just had a PDC. Students use different computers from one 
> lesson to the next, and mess with settings a lot, so the choice to use 
> mandatory roaming profiles was an obvious one. Also, some workstations 
> have fairly small hard drives, so I disabled Windows from caching 
> profiles locally. From experience we know that a hard drive can fill up 
> with cached profiles, and Windows falls over.


> When we tested this everything worked beautifully ... until a class all 
> logged in simultaneously. Suddenly there were 35 simultaneous requests 
> for a 810KB profile, and somewhere there was a bottleneck. I thought the 
> PDC would be able to cope with that, and I thought the network was fast 
> enough to deal with that (100Mbps ethernet), but I was wrong. The 
> workstations eventually timed out, and went back to the login screen, 
> but Samba kept on trying to open new connections, several for each 
> workstation, and the smbd process for each workstation got more and more 
> demanding. They didn't respond to SIGTERM and I had to kill them.

hmm - that sounds strange (and somehow shocks be - i wasn't thinking 
that samba is such bad, yet)

> So I figured Plan A was to install a BDC. I didn't have another 1.1GHz 
> machine, so I decided to test with a smaller one, see how it affected 
> the PDC's load, and take it from there.

why did you setup a BDC? as far as i know, a BDC has the user-database 
of the PDC - nothing more - nothing less.
the roaming-profiles are strored at the path you specified. if one 
workstation downloads from the PDC (and of course uploads to the PDC) 
and the other downloads the profile from the BDC - the copy on the BDC 
would have to be synced all the time to the profile on the PDC.

an auth-request is just a work of milli-seconds - it's not such a big thing.

a BDC just allows the user to logon if the PDC is not answering. The 
Profile is downloaded from a more or less static path - from the server 
that is the file-server (which should be abled to handle such flood of 

More information about the samba mailing list