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 10 of 12 last Next
  • by Kiwiro,

    Kiwiro Kiwiro Nov 19, 2015 2:55 AM in response to TenjuZenjin
    Level 1 (4 points)
    Nov 19, 2015 2:55 AM in response to TenjuZenjin

    When I upgraded to El Capitan I expected better support for SAMBA. Accessing shares over VPN is extremely slow and buggy. The problem is El Capitan because I have a Windows VM installed on it and it works 10x faster than Mac.

  • by BobHarris,

    BobHarris BobHarris Nov 19, 2015 5:49 AM in response to Kiwiro
    Level 6 (19,272 points)
    Mac OS X
    Nov 19, 2015 5:49 AM in response to Kiwiro

    Kiwiro wrote:

    When I upgraded to El Capitan I expected better support for SAMBA.

    Samba changed their license to exclude Apple from shipping Samba with OS X.  Apple had to roll their own CIFS/SMB support into OS X.

     

    If you want Samba, it is available as an open source package at

    <https://www.samba.org/>

  • by Kiwiro,

    Kiwiro Kiwiro Nov 19, 2015 6:23 AM in response to BobHarris
    Level 1 (4 points)
    Nov 19, 2015 6:23 AM in response to BobHarris

    Interesting. Until today, I thought SMB and Samba are the same thing. Anyway, linux and windows machine work a lot better than Mac with my NAS. I understand why it doesn't work well, but it's not a good excuse. Considering SMB/Samba are widely used in the consumer market and that Apple plans to drop AFP support, it should work a lot better than it does now.

  • by BobHarris,

    BobHarris BobHarris Nov 19, 2015 7:05 AM in response to Kiwiro
    Level 6 (19,272 points)
    Mac OS X
    Nov 19, 2015 7:05 AM in response to Kiwiro

    Samba has been tuned for many many years (at least 15 or 20), and it is often what runs on other open source platforms.  And until a few years ago it was distributed as part of OS X.  But then Samba changed its license to explicitly exclude distributing the software with any closed source packages (Apple, and other commercial Unix operating systems).

     

    But the license changes do not exclude you.  You are allowed to install Samba on your Mac if you desire.  It is only Apple that cannot install it for you.

     

    As for performance, it is not easy getting a network file system working efficiently (speaking as someone that worked on an AFP implementation for OpenVMS back in the late '80s and early '90s).

     

    Yes, it would be nice if Apple's CIFS/SMB implementation worked well with Windows.  Suggest you provide Apple with feedback for you needs

    as it is possible Apple is mostly testing against Macs and less so against Windows and Samba implementations on other platforms.  After all, they are selling Macs, not Windows, Linux, Solaris, AIX, HP-UX, etc...

     

  • by nkalvi,

    nkalvi nkalvi Nov 19, 2015 7:33 AM in response to Kiwiro
    Level 1 (0 points)
    Nov 19, 2015 7:33 AM in response to Kiwiro

    Hi Kiwiro, what're the typical speeds you're getting from OS X and Windows VMs? Is it better when not using VPN?

     

    I've been using the default (SMB2) from El Capitan to access Windows 8/10 shares on the same Gigabit ethernet and I get 80-110MB/s read/write speeds (typically for files larger than a 2GB). I did make the changes suggested in https://discussions.apple.com/message/25626139#25626139 after I experienced terribly slow browsing in 10.9.3.

  • by Kiwiro,

    Kiwiro Kiwiro Nov 19, 2015 9:54 AM in response to nkalvi
    Level 1 (4 points)
    Nov 19, 2015 9:54 AM in response to nkalvi

    On the work NAS (qnap), to which I can connect through VPN only, I get 1 MB/s both on Mac and on Windows 7 VM. That's the upload speed limit of the NAS.  Finder crashed 2 times till I got to the test file.

    On the home server, I got 20 MB/s from Mac and 25 MB/s from Win VM. 25-30 MB/s is the server's limit (an old dell laptop).

     

    My home server is on Linux so I can't use the solution from the link.

  • by nkalvi,

    nkalvi nkalvi Nov 19, 2015 10:05 AM in response to Kiwiro
    Level 1 (0 points)
    Nov 19, 2015 10:05 AM in response to Kiwiro

    Thanks. I'll let you know when I get a chance to test with a Linux machine.

     

    BTW, I assume SMB3 is enabled on Linux (I thought that the default on El Capitan was SMB2, but it is SMB3 https://www.apple.com/jp/osx/all-features/pdf/osx_elcapitan_core_technologies_ov erview.pdf).

  • by Kiwiro,

    Kiwiro Kiwiro Nov 19, 2015 12:08 PM in response to nkalvi
    Level 1 (4 points)
    Nov 19, 2015 12:08 PM in response to nkalvi

    It took me a while to check whether the home server was actually using SMB3 or not and it does. The work NAS has SMB3 active but I don't know if it's using it because Wireshark shows the packets as SSL. My problem is with directory listing and Finder crashing when accessing shares, not necessarily the transfer speed.

  • by nkalvi,

    nkalvi nkalvi Nov 20, 2015 5:22 PM in response to Kiwiro
    Level 1 (0 points)
    Nov 20, 2015 5:22 PM in response to Kiwiro

    I've also had Finder crashing while trying to browse Windows 10 shares in the earlier betas (including 10.11.2), but I haven't had any problems with the latest one (beta 4). Sorry - I thought browsing and transfer speeds were related.

     

    Would Wireshark capture on Mac help isolating the cause for Finder crash?

  • by webmaster@data2,

    webmaster@data2 webmaster@data2 Nov 23, 2015 11:48 PM in response to nkalvi
    Level 1 (5 points)
    Nov 23, 2015 11:48 PM in response to nkalvi

    Hello All, wasted a good few days checking every possible reason why SMB shares are slow to access on OSX 10.11.x (and possibly before but not wasting more time)

     

    Tried Samba on multiple NAS distros and Windows vanilla SMB file sharing... nada Tried downgrading server versions smb nt/v1, smb v2, and applied tests of recommended OSX smb/nsmb.conf testing, excluding spotlight from indexing volumes, changing finder views, changing finder display thumbnails/previews, nothing improves the slow smb browsing speeds.

     

    Here is a great document on finder's behaviour on a network http://www.emc.com/collateral/TechnicalDocument/docu51273.pdf - very specific and looks like EMC had a hard time getting things to work with there SAN/Storage tech also.

     

    Two machines side-by-side, one is win 7, other OSX 10.11.x i5 macbook, browse a network share with more than 100 objects... win7 near instant, OSX poor and un-productive content loading, wait anywhere between 20sec to 5min for larger folders.

     

    In OSX, browse the same SMB mount via terminal, instant results, no delays in fetching file names, size (e.g.# ls /Volumes/smbShareName/dir1), this is not a smb version issue or size of folder. Its finder!

     

    Makes me really sad that Apple made finder resource hungry for network volumes, whats even worse is the latest Office 2016 only supports the SMB protocol and AFP left with various user issues like opening re-corrupt files (when they are fine via slow OSX smb access).

     

    For the love of G*#, Apple give use a network optimised finder... you want to get on the SMB bus, put the wheels back underneath so we can start rolling forward as I cannot support Mac in a business environment much longer.

  • by BobHarris,

    BobHarris BobHarris Nov 24, 2015 6:25 AM in response to webmaster@data2
    Level 6 (19,272 points)
    Mac OS X
    Nov 24, 2015 6:25 AM in response to webmaster@data2

    webmaster@data2 wrote:

     

    For the love of G*#, Apple give use a network optimised finder... you want to get on the SMB bus, put the wheels back underneath so we can start rolling forward as I cannot support Mac in a business environment much longer.

     

  • by knob1,Helpful

    knob1 knob1 Nov 26, 2015 6:50 AM in response to TenjuZenjin
    Level 1 (5 points)
    Nov 26, 2015 6:50 AM in response to TenjuZenjin

    !! Possible solution that worked for me - at the moment !!

     

    Hello,

     

    I also got the problem that browsing an afp share gets very slow.

    My Share is little over 5TB big with much media data.

     

    I tried all the solutions that I found on this forum but nothing helped as much as what I just found.

     

    After spending many hours today to find a solution I finally turned on wireshark to have a look whats going on on port 548 (AFP over TCP Port)

    I saw that whenever I opened a folder many requests were send to the server - my guess was that the finder is requesting the little preview images because inside of each request was a filename of the folder I just opened.

    My guess is that whenever you open up a folder, OSX sends multiple requests to the server to get the preview image.

    The server tries to answer all the requests but when you navigate to another folder the next requests for this folder are sent - kind of DDOS.

     

    After realising this, I went to the root share, right clicked -> Show Vew Options and turned off Show Icon Preview.

    The result was phenomenal - afp was fast and the traffic on port 548 was shut down very drastic.

     

    I would like to hear if this solves the problem for others too or if I'm the only one where this helped

  • by seebeasy,

    seebeasy seebeasy Dec 4, 2015 4:55 PM in response to knob1
    Level 1 (0 points)
    Dec 4, 2015 4:55 PM in response to knob1

    knob1 - I've been suffering for years, like everyone else with SMB windows / NAS shares.  I have several thousand files per share, and each resource would take anywhere from 6min to over 20min sometimes. I unchecked the "Show Icon Preview"...relaunched Finder, and the resources open in seconds.  This was a remarkable find, thanks for your input.

  • by merrikat61,

    merrikat61 merrikat61 Dec 21, 2015 3:03 PM in response to Ronesy
    Level 1 (0 points)
    Dec 21, 2015 3:03 PM in response to Ronesy

    This is the solution that helped me! Running 10.11 w/samba share on Raspberry Pi. Spent a LONG time searching - thank you!

  • by erswa79,

    erswa79 erswa79 Jan 4, 2016 10:57 AM in response to knob1
    Level 1 (0 points)
    Jan 4, 2016 10:57 AM in response to knob1

    I tried a 100 fixes that made no difference. This one worked for me.  Am connected to a Linksys Wifi router with USB HDD plugged into it. SMB shares worked perfectly from Kodi or Windows machine but new MacAir was UN-USABLE it was so slow.  

    But now looks good!

first Previous Page 10 of 12 last Next