You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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:30 AM

Reply
Question marked as Top-ranking reply

Posted on Nov 26, 2015 6:50 AM

!! 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

183 replies

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)!

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

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.

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

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

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?

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.

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.

AFP/SMB Directory Listings very slow in Finder

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.