Debian – Samba share running on debian-squeeze slow on first connection

debiansambashare

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?

Best 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:

  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.
Related Topic