When I first connect to the samba share from any windows client, it is very slow. But once it's open, it becomes fast until I leave the connection unused for a while. Are there any settings which need changing to sort this out?
1 Answer
That sounds like Samba and the Windows clients are taking a while negotiating the initial connection. Windows quietly closes unused connections in the background, which is why you're seeing the slow-downs after things have been unused; Windows is re-opening a connection. The two biggest areas that cause problems here are:
- Authentication delays. Whatever the Samba server is using for authentication is slow for some reason. Samba can use several back-ends, each one with their own possible delays.
- Protocol negotiation delays. Less common these days, but if the Samba server and the Windows clients take a while to figure out a common auth protocol, it can be visible. One possible source of problems is if you've configured Kerberos auth incorrectly and it's failing back to NTLMv2.
-
-
@psp I'll need more data before I can help. What are you using for an authentication back-end? What Windows versions are your clients?– sysadmin1138 ♦Mar 6, 2011 at 16:49
-
@sysadmin1138 Clients are Windows7. I create a new smbuser by using: "smbpasswd".– pspMar 6, 2011 at 17:00
-
If the
passdb backend
in/etc/samba/smb.conf
is tdbsam, it can be slow if you have more than 250 users in there. Also, thetdbsam
back-end will query/etc/passwd
for account information; if passwd does not contain the user this could be the source of your slowdowns.– sysadmin1138 ♦Mar 6, 2011 at 17:10 -
passwd - does contain the users and the database has well under 250 users– pspMar 6, 2011 at 17:16