Janis Koluzs
2004-Dec-21 18:31 UTC
[Samba] Slow login using Samba 3.09 but Samba 2.27 works ok.
Hello! We have Mandrake Linux 9.0 system with Samba v2.27 serving as a PDC for ~400 users. (Hardware: P1800, 256Mb). The performance is acceptable- user can log in in approx. 5 sec. (Includes copying ~700Kb roaming profile). Now we've got new server (P3000HT,512Mb,SATA) with Mandrake Linux 10.1 community and Samba 3.09 (compiled from sources). And guess what? Now user on the *same* computer can log in only in 20(!) sec. Here's what log says using log level=1: ---------------------------- [2004/12/21 15:38:34, 1] smbd/service.c:make_connection_snum(648) kl2-02 (192.168.0.32) connect to service profiles initially as user test123 (uid=943, gid=503) (pid 9329) [2004/12/21 15:38:45, 1] smbd/service.c:make_connection_snum(648) kl2-02 (192.168.0.32) connect to service profiles initially as user test123 (uid=943, gid=503) (pid 9329) [2004/12/21 15:39:03, 1] smbd/service.c:make_connection_snum(648) kl2-02 (192.168.0.32) connect to service netlogon initially as user test123 (uid=943, gid=503) (pid 9329) ---------------------------- Note the time difference and the fact that samba connects to profiles *twice*. And now here's a log using log level=10: ---------------------------- [2004/12/21 15:49:22, 4] smbd/trans2.c:call_trans2findfirst(1523) SMBtrans2 mask=test123 directory=./ dirtype=22 numentries=1 [2004/12/21 15:49:38, 10] lib/util_sock.c:read_smb_length_return_keepalive(505) got smb length of 102 ---------------------------- Note again the time difference. Here's Samba 3.09 config file: ---------------------------- [global] log file = /var/log/samba/log.%m load printers = yes smb passwd file = /etc/samba/smbpasswd passwd chat = *new*password* %n\n *new*password %n\n *successfully* socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 logon drive = N: domain master = Yes map to guest = bad user encrypt passwords = yes passwd program = /usr/bin/passwd %u printer admin = @adm dns proxy = no netbios name = serv3 server string = Samba Server %v printing = cups unix password sync = Yes workgroup = MDKGROUP logon path = \\%N\profiles\%U debug level = 1 os level = 20 printcap name = lpstat security = user add machine script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine account' -s /bin/false -M %u max log size = 50000 domain logons = Yes log level = 1 [homes] comment = Home Directories browseable = no writable = yes create mask = 0700 directory mask = 0700 valid users = %S [profiles] path = /home/samba/profiles browseable = no guest ok = yes writable = yes create mask = 0700 directory mask = 0700 profile acls = yes csc policy = disable ---------------------------- and here's Samba 2.27 config: ---------------------------- [global] workgroup = COMPANY netbios name = SERV2 server string = Samba Server %v encrypt passwords = Yes pam password change = Yes unix password sync = Yes log file = /var/log/samba/log.%m max log size = 500 socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192 printcap name = lpstat add user script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine account' -s /bin/false -M %u logon path = \\%N\profiles\%U logon drive = N: domain logons = Yes os level = 64 domain master = Yes dns proxy = No hosts allow = 192.168.0.,127. printing = cups [homes] comment = Home Directories valid users = %S read only = No create mask = 0700 directory mask = 0700 browseable = No [profiles] path = /home/samba/profiles read only = No create mask = 0700 directory mask = 0700 browseable = No ---------------------------- On the whole new config is based on the old one, so I don't think it's a config issue. I just added few lines ( like: profile acls = yes, csc policy = disable) after googling on this issue but with no luck. Any ideas would be appreciated. Janis.