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?

link|improve this question

78% accept rate
feedback

1 Answer

up vote 0 down vote accepted

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:

  1. 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.
  2. 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.
link|improve this answer
Any ideas on how to fix this then? – psp Mar 6 '11 at 16:40
@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 '11 at 16:49
@sysadmin1138 Clients are Windows7. I create a new smbuser by using: "smbpasswd". – psp Mar 6 '11 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, the tdbsam 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 '11 at 17:10
passwd - does contain the users and the database has well under 250 users – psp Mar 6 '11 at 17:16
show 3 more comments
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.