Samba – Windows slow browse of SAMBA share with File Explorer

network-sharesamba

When browsing a SAMBA file server, File Explorer takes a very long time (60+ secs) to load a share. If I view the same share on the command line with the following command, it returns the listing instantly.

dir \\server\share

This leads me to believe it's a problem with Windows and not the file server.

How can I diagnose the problem? What is File Explorer doing differently than the "dir" command?

Thanks.

Best Answer

You asked: "How can I diagnose the problem?" Here's how I would start to troubleshoot this:

If you have done these steps, could you edit your question to show the results of these steps? More detailed information in the question will lead to more detailed answers. Thank you.

  1. Do you have access to the host running Samba? What OS is on the host? I would log in to that host and look at the samba log files. The log file location should be defined in /etc/samba/smb.conf or an included configuration file.
  2. What is the IP address of server? Assuming it is 192.168.1.2, do dir \\server\share and dir \\192.168.1.2\share both take the same amount of time to load the share? Does File Explorer take the same time when using the IP and when using the hostname? If the time is faster with one or the other, that points to an issue with name resolution.
  3. Do you have another identical client to test the samba share from? Is the problem the same on the second client? Or does the problem only appear on one client? An identical problem on both clients suggests a configuration setting on the samba server needs adjustment.
  4. Do you have a linux host to use to test client access? If I have to debug the samba service, I find smbclient a useful tool.
  5. Does the problem only appear with samba and file sharing? Or does the host offer other services (http ?) that you can check by both IP and name, to see if there is a difference?