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 8 of 12 last Next
  • by Karpsa,

    Karpsa Karpsa Aug 14, 2014 11:43 PM in response to keithrondinelli
    Level 1 (0 points)
    Aug 14, 2014 11:43 PM in response to keithrondinelli

    Thanks keithrondinelli, mucommander fastened my vpn server browsing remarkably.

    Next problem I have is that the word documents I access on the server via mucommander open as read-only.

    Any help on this?

  • by HarboeStavanger,

    HarboeStavanger HarboeStavanger Sep 15, 2014 11:09 PM in response to Jorge Secco Caetano
    Level 1 (0 points)
    Sep 15, 2014 11:09 PM in response to Jorge Secco Caetano

    Fantastic!

     

    The slow browsing from my Windows Server Essentials 2012 is gone!

  • by Zamees,

    Zamees Zamees Sep 29, 2014 4:41 PM in response to Jurek R.
    Level 1 (0 points)
    Sep 29, 2014 4:41 PM in response to Jurek R.

    Jurek R. wrote:

     

    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

     

    This does not work when using a fileshare from a NAS. Still very slow speeds. Tested Mavericks vs ML, ML is blazing fast compared. Hopefully Yosemite fixes this, I have still yet to update to Mavericks because of this one issue.

  • by GGGforce,

    GGGforce GGGforce Oct 5, 2014 5:58 AM in response to Zamees
    Level 1 (0 points)
    Oct 5, 2014 5:58 AM in response to Zamees

    I struggled with a similar problem for hours.  Opening a Samba network share in Finder took minutes before the files and directories were listed.  Replacing the server name with it's IP address solved the issue for me.

  • by shakib allabib,

    shakib allabib shakib allabib Oct 6, 2014 4:34 PM in response to TenjuZenjin
    Level 1 (0 points)
    Oct 6, 2014 4:34 PM in response to TenjuZenjin

    This worked for me


    I tried to delete the cache from the user library.. didn't solve (i wasn't in safe mode)
    I then went to the settings -> Sharing... and it was taking time to load too...
    So i disabled everything for sharing one by one for all user and then turned it off (unchecked the sharing service)

    Afterwards everything was back to normal speed, folders would load rapidly..
    So, then i went and reenabled sharing for smb and afp and for windows for multiple users.. and it's still fast.

     

    Hope it helps
    Good luck

  • by Billish,

    Billish Billish Oct 29, 2014 7:12 PM in response to TenjuZenjin
    Level 1 (19 points)
    Mac OS X
    Oct 29, 2014 7:12 PM in response to TenjuZenjin

    All:

     

    I've got this same issue on my MacBook Air running Snow Leopard (OS 10.6.8).

     

    I tried almost all the fixes in this rather lengthy thread, including:

     

    - The various smb.conf file edits, Samba config, etc. (whatever the heck that does...I did it...lol)

    - Told Spotlight not to search in the VPN folders

    - Installed both PathFinder and muCommander as alternatives to Finder

     

    In the end, the native OS X Finder is STILL slower than snake snot, and none of the fixes really did anything.

     

    However, I do find that both PathFinder and muCommander are about 10x faster than Finder.  Both of them took about 8 seconds to list everything in one of my VPN directories that the native Finder took almost 80 seconds for. 

     

    So....anyway...that's what I'm finding.  No idea what my browsing my particular VPN folders would do under Mavericks or Yosemite.

     

    By the way, if one has a physical machine on your company's network and Remote Desktop is enabled on that machine, an alternative is to  just connect to your VPN, then use the REALLY GOOD new version of Microsoft's Remote Desktop Connection (RDC) for OS X to connect to your company-issued workstation, and use it's native file browser.  For years, I despised how impossible it was to ever get Remote Desktop in Windows to work well, but the new versions really seem to work....I even connect to my workstation on my Android tablet after VPN'ing in using Cisco Anyconnect...works great.

     

    R,

    Bill

  • by jebedias,

    jebedias jebedias Nov 5, 2014 10:49 PM in response to Jurek R.
    Level 1 (0 points)
    Nov 5, 2014 10:49 PM in response to Jurek R.

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

     

    The command above worked wonderfully. Too bad I have no clue as to what exactly it does.

     

    Will I face any drawbacks by using this command?

  • by GiedriusT,

    GiedriusT GiedriusT Nov 13, 2014 11:12 AM in response to shakib allabib
    Level 1 (0 points)
    Nov 13, 2014 11:12 AM in response to shakib allabib

    None of the described workarounds worked for me

     

    Server: RHEL 6.6 (x86_64) using Samba4

     

    Windows PCs (Win7, Win8, Win8.1) on the same network list folders with 10-30k files instantly

    Macs (Maverics/Yosemite) do that in 3-30 minutes

     

    These tweaks for Mac OSX did not help at all:

    defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true

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

     

    I have tested on another server, with newly created share:

    Created a new folder in that share, and ran the script to create 10,000 files, when I connected from yosemite to that share, and browsed that folder with a bunch of files, it took 5 mintues to display a list of files.

     

    Here is the script which I have used to create a bunch of files:

    #! /bin/bash

     

    for i in {00000..10000}

    do

        echo hello > "/Data/Share/File-${i}.txt"

    done

     

    Any other solutions available?

  • by hwerk,

    hwerk hwerk Nov 18, 2014 7:25 AM in response to TenjuZenjin
    Level 1 (0 points)
    Nov 18, 2014 7:25 AM in response to TenjuZenjin

    I had severe performance problems using Samba under Ubuntu 10. After upgrading to Samba 3.6.x which supports SMB2...

     

    sudo add-apt-repository ppa:automation/ppa
    sudo apt-get update
    sudo apt-get upgrade samba

     

    and making sure SMB2 is put to use ....

     

    max protocol = SMB2

    (in [global] section of /etc/samba/smb.conf)

     

    everything works fine.

  • by Joe Oliveira,

    Joe Oliveira Joe Oliveira Nov 18, 2014 9:26 AM in response to ncalliari
    Level 1 (0 points)
    Nov 18, 2014 9:26 AM in response to ncalliari

    I was reluctant to upgrade to Mavericks for a while but I had to because on one application that would install only on it. I struggled with this issue for a while and was thinking in rolling back. But after adding those values to the registry it is working much better. I am using Server 2012. I would definitely your post as the answer for those who are comfortable with working with registry. Thanks.

  • by Andreas Carlsson,

    Andreas Carlsson Andreas Carlsson Nov 19, 2014 2:15 AM in response to TenjuZenjin
    Level 2 (249 points)
    Apple Music
    Nov 19, 2014 2:15 AM in response to TenjuZenjin

    I am having this problem to, as well as all my clients that have a Windows server. It's annyoing and very embarrassing.

     

    I can connect from the same Mac from within Parallels/Fusion and directory listings are blazing fast! But from the Mac it's extremely slow...

     

    I just reported this as a bug to Apple. They REALLY need to do something about this!

  • by gecko_101,

    gecko_101 gecko_101 Dec 9, 2014 12:37 AM in response to Andreas Carlsson
    Level 1 (0 points)
    Dec 9, 2014 12:37 AM in response to Andreas Carlsson

    Yosemite is no better.

     

    Apple do not appear to be addressing this issue, which I find incredible; considering this is such a fundamental function.

     

    My files are hosted on a QNAP server, but it sounds like this is apperent on any server.  I have tried AFP and SMB, forcing SMB 2.0 and 2.1, and I wait over 10 minutes to see files in Finder.  Navigating the disctoriy at the command line is no problem.  A windows client has no problem whatsoever (with SAMBA of course).

     

    My machine is connected to the QNAP at gigabit, via a gigabit switch, it doesn't get much better than that!

  • by cultavix,

    cultavix cultavix Mar 14, 2015 12:57 AM in response to -KEPHSTER-
    Level 1 (0 points)
    Mar 14, 2015 12:57 AM in response to -KEPHSTER-

    Dude!!! Thank you so much. I don't normally log in here to thank people... but man, I've been struggling with slow storage for a while now. Thank you **virtual bow**

     

    Btw, I used "defaults write com.apple.desktopservices DSDontWriteNetworkStores true" - instantly solved my problem

  • by Billish,

    Billish Billish Mar 14, 2015 7:47 AM in response to hwerk
    Level 1 (19 points)
    Mac OS X
    Mar 14, 2015 7:47 AM in response to hwerk

    @hwerk:

     

    You didn't state it, but I'm assuming those sudo commands are to be run in a Terminal window.

     

    So...I tried it.  The very first one fails, stating:

     

    "sudo: add-apt-repository: command not found"

     

    What's the deal?  Do I not have Samba 3.6 or later on my Snow Leopard box or something?

  • by Billish,

    Billish Billish Mar 14, 2015 7:44 AM in response to -KEPHSTER-
    Level 1 (19 points)
    Mac OS X
    Mar 14, 2015 7:44 AM in response to -KEPHSTER-

    @KEPHSTER:

     

    Nope...didn't make an ounce of difference for me.  Any other ideas?

     

    R,

    Bill

first Previous Page 8 of 12 last Next