TenjuZenjin

Q: AFP/SMB Directory Listings very slow in Finder

Hello comunity!

 

Since the upgrade to OS X Mavericks we are experiencing server problems, browsing AFP/SMB shares on remote servers (VPN). The Directory Listing is very slow an can take up to 30 minutes for large listings.

 

Here's the setup

 

  • 2 networks are connected thanks to a VPN connection.
  • All clients, in all connected networks can communicate to a common fileserver (MacPro with OS X 10.6 SnowLeopard Server) in Network A
  • Firewall is not an issue between those networks
  • The fileserver also has other network services set up (DNS, Mailserver, SMB, AFP, Firewall, ...)
  • The clients authenticate via OpenDirectory and Kerberos to the fileserver

 

So the problems occur if i want to connect a client on network B to the server on network A. Connection, authentication, ... all good. Even the performance over the VPN, to tranfer files is OK. But browsing subfolders is catastrophic. I used AFP and SMB alike, results are the same.

 

I also made tests on older clients, to see if the fileserver is the problem. 10.6 and 10.8 clients can browse normally, speed is OK. Even Windows Clients can browse normally all the subfolders of the fileserver.

 

I analyzed different approaches made here, but none of them worked:

  • Connect to share with explicit port
  • Connect to share with FQDN
  • Connect to share with port 445 (SMB)
  • Setup an nsmb.conf with notify_off=yes
  • ...

 

I also did analyze different logs and there's something i found, but can not say if it's connected. I did see many log entries like this:

...

29.10.13 12:21:51,960 icbaccountsd[775]: -[ICBLocalDictionary writeLocalMapping:]: Status: Writing out local mapping to disk

29.10.13 12:21:51,960 icbaccountsd[775]: -[ICBLocalDictionary writeLocalMapping:]: Status: Ending writing out local mapping to disk

29.10.13 12:21:51,960 icbaccountsd[775]: -[ICBRemoteDictionary writeDevices]: Status: Writing out of devices

29.10.13 12:21:51,960 icbaccountsd[775]: -[ICBRemoteDictionary writeDevices]: Status: Ending writing out of device

...

 

I also saw tha a process "icbaccountsd" was often coming up an using all of my CPU, when i start browsing the share. Thus i could not find any documentation on it.

 

So my question: What can I do to accelerate the browsing of my AFP/SMB shares for all my Mavericks clients? What can I do to speed up the Directory Listing? And yes: i know about solutions like PathFinder, TotalFinder, .... but i'm more interested in a native solution to this problem.

 

Thx!!

OS X Mavericks (10.9), 10.6.8 Server

Posted on Oct 29, 2013 4:33 AM

Close

Q: AFP/SMB Directory Listings very slow in Finder

  • All replies
  • Helpful answers

first Previous Page 7 of 12 last Next
  • by AJ 2010,

    AJ 2010 AJ 2010 Jun 30, 2014 8:49 PM in response to atothek47
    Level 1 (4 points)
    Jun 30, 2014 8:49 PM in response to atothek47

    In the EMC guide, there's one step about calculating your appropriate values for net.inet.tcp.sendspace – TCP send buffer and net.inet.tcp.recvspace – TCP receive buffer. In it, they say you can calculate an appropriate value for your network using this formula: Total network bandwidth (in bytes/second) x roundtrip delay (in seconds) = approximate send/receive buffer (in bytes). For example, if you have a 1 Gbps network with 1 ms of end-to-end delay, an appropriate buffer value would be: 125,000,000 x 0.001 = 125,000 bytes.

     

    To obtain the value to plug in for end to end delay, can you simply take the average result from running a ping test in the terminal between the client machine and the server or is there some other method you used to get this value?

  • by JohnJ15,

    JohnJ15 JohnJ15 Jul 2, 2014 12:50 PM in response to Jorge Secco Caetano
    Level 1 (13 points)
    Mac OS X
    Jul 2, 2014 12:50 PM in response to Jorge Secco Caetano

    Jorge,

     

    Did you have to create the Smb2CreditsMin / Smb2CreditsMax registry keys? Looking at mine now, and they do not exist.

  • by Jorge Secco Caetano,

    Jorge Secco Caetano Jorge Secco Caetano Jul 2, 2014 4:45 PM in response to JohnJ15
    Level 1 (10 points)
    Jul 2, 2014 4:45 PM in response to JohnJ15

    I used the powershell method (within this forum thread, see below) , all parameters where there... just typed the commands to change values. My windows version in this case is 8.1 Pro.

     

    An alternative to using regedit for those uncomfortable messing with the registry is to user powershell SMB share cmdlets.  It's really easy.

     

    Bring up an administrative command prompt and type in powershell.  At the resulting prompt, type in

    get-smbserverconfiguration (it's all one word) and look up your current values for smb2creditsmin and smb2creditsmax.  On Windows 8.1, mine were 128 and 2048 respectively.

     

    Now type set-smbserverconfiguration -smb2creditsmin 512 -smb2creditsmax 8192 and respond Y to the confirmation prompt.  Then just exit out of powershell and exit out of the command prompt.

     

    Directory listings on the network share went from minutes to extremely quick.

     

    Your tip really works, so I thought I'd share an easier way to do exactly what you suggested.  Thanks!

     

    Important: I had to reboot the windows machine after changing the parameters.

  • by JohnJ15,

    JohnJ15 JohnJ15 Jul 2, 2014 5:13 PM in response to Jorge Secco Caetano
    Level 1 (13 points)
    Mac OS X
    Jul 2, 2014 5:13 PM in response to Jorge Secco Caetano

    Jorge -

     

    Thanks for the reply. I thought those changes were done server side vs a desktop client.

  • by Jorge Secco Caetano,

    Jorge Secco Caetano Jorge Secco Caetano Jul 2, 2014 5:50 PM in response to JohnJ15
    Level 1 (10 points)
    Jul 2, 2014 5:50 PM in response to JohnJ15

    JohnJ15,

     

    You are right... these parameters are "SERVER SIDE" (windows servers). In this case I was setting up win 8.1 home media shares. It appears to be something related to SMB2 -> OSX 10.9 on windows scenarios.

     

    My tests with FreeNAS (bsd smb2 and smb3 implementation) and OSX 10.9 did not present the slow browsing behavior, although when browsing 3 or 4 thousand files folders I could notice slow browsing. In most scenarios OSX 10.9 file transfer performance were quite impressive, almost touch the ethernet and wifi ceilings

     

    I also tested Win2k8 R2 shares, all with normal behavior.

  • by skihnia,

    skihnia skihnia Jul 3, 2014 5:09 AM in response to TenjuZenjin
    Level 1 (0 points)
    Jul 3, 2014 5:09 AM in response to TenjuZenjin

    I have also struggled with slow listing of Windows 2012 Server shares.

    Wanted to post my solution to problem.

    I was able to get it working as it should by installing trial version of Path Finder. Installed, removed, rebooted and now shares open fast also in Finder!

     

    I'm Windows server guy and not so familiar with osx so if anyone knows how could we find out what does the Path Finder do that makes things work would be appreciated.

  • by Jorge Secco Caetano,

    Jorge Secco Caetano Jorge Secco Caetano Jul 5, 2014 6:29 AM in response to skihnia
    Level 1 (10 points)
    Jul 5, 2014 6:29 AM in response to skihnia

    skihnia,

     

    Path Finder is a program designed to connect to windows shares (but also to extend OSX files managing interface). I am quite sure it set up an environment in OSX to keep transfer within windows parameters (mimicking the explorer behavior).

  • by skihnia,

    skihnia skihnia Jul 7, 2014 3:48 AM in response to Jorge Secco Caetano
    Level 1 (0 points)
    Jul 7, 2014 3:48 AM in response to Jorge Secco Caetano

    Yes, That's why I installed and tried it in the first place. When testing I noticed that also Finder got better when Path Finder was installed. So now I would like to know what those parameters are that Path Finder changes in OSX so that it works with Windows shares.

    I have seen and tried lots and lots of suggestions how to modify OSX but nothing seem to work well. At least not as well as after Path Finder install/uninstall.

  • by zaxxon72,

    zaxxon72 zaxxon72 Jul 21, 2014 11:59 PM in response to skihnia
    Level 1 (0 points)
    Jul 21, 2014 11:59 PM in response to skihnia

    Hi,

     

    could someone who has a friend with a friend that has access to Yosemite perhaps peek over their shoulders when the connect with their 10.10 clients to AFP/SMB shares? If the behaviour stays the same or if Finder brings up the folder contents any faster?

     

    that would be awesome....

  • by babowa,

    babowa babowa Jul 22, 2014 8:20 PM in response to zaxxon72
    Level 7 (32,009 points)
    iPad
    Jul 22, 2014 8:20 PM in response to zaxxon72

    Sorry, but not yet publicly released OS versions should not be discussed here - it violates the ToU and anyone with the knowledge would be violating their NDA.

  • by K I M B A K A T,

    K I M B A K A T K I M B A K A T Jul 23, 2014 10:36 AM in response to TenjuZenjin
    Level 1 (9 points)
    Jul 23, 2014 10:36 AM in response to TenjuZenjin

    Same issue.

     

    ML Server to Mountain Lion client. (latest updates)

    VPN connects.

    My Open Directory binds great!!

    Webdav through an FTP Transfer program works great (Transmit app).

     

    The FInder. No connections. No authentication. afp and smb does not work. They just don't load in the finder.

     

    It's sad that these little FTP programs work....but using the Finder to access server files??  Kind of takes the fun out of Drag n Drop!

    plus now I have to cater and teach people how to use an FTP program.

     

    There is one flavor I like on computers...and that's VANILLA (now blue folders)!

  • by keithrondinelli,

    keithrondinelli keithrondinelli Jul 30, 2014 8:18 AM in response to TenjuZenjin
    Level 1 (0 points)
    Jul 30, 2014 8:18 AM in response to TenjuZenjin

    I've tried all the fixes. The only thing that did it for me was to bypass the finder entirely and use MuCommander:

     

    http://www.mucommander.com

     

    File browsing over the VPN Smb connection is lightning quick now. Downloads and uploads are still relatively slow, but at least I can navigate the remote directories with speed.

  • by mprodywus,

    mprodywus mprodywus Jul 30, 2014 2:37 PM in response to zaxxon72
    Level 1 (0 points)
    Jul 30, 2014 2:37 PM in response to zaxxon72

    I installed Yosemite beta here and it they fixed it! I have a Windows 2008R2 (SMB2) hosted in a remote datacenter (40ms latency) that no previous fix mentioned here before gave me Windows like performance (including DAVE). Now it works just like my windows machines going to this Windows share.

  • by Jurek R.,

    Jurek R. Jurek R. Aug 7, 2014 7:42 PM in response to TenjuZenjin
    Level 1 (0 points)
    Aug 7, 2014 7:42 PM in response to TenjuZenjin

    This is the real fix for slow SMB1 or SMB2 connections under OSX 10.9 Mavericks:

     

    Go to terminal and enter:

    sudo sysctl -w net.inet.tcp.delayed_ack=0

     

    Now test smb samba file access, browse directories. Really fast, right?

     

    Now you have to make this command permanent, so it will be loaded after boot. For this, create a startup item in /Library/StartupItems.

     

    Source of this hint: http://www.insanelymac.com/forum/topic/20004-painfully-slow-smb-file-transfers/? p=132405

  • by thorsten-l,

    thorsten-l thorsten-l Aug 8, 2014 2:13 AM in response to Jurek R.
    Level 1 (0 points)
    Aug 8, 2014 2:13 AM in response to Jurek R.

    You do not need a StartupItem to set net.inet.tcp.delayed_ack=0

    Simply create/edit the file /etc/sysctl.conf and write

    net.inet.tcp.delayed_ack=0

    into it. After the next reboot you cat check with

    sysctl net.inet.tcp.delayed_ack

    if it is set to zero.

first Previous Page 7 of 12 last Next