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

Jun 16, 2014 7:45 PM in response to Jorge Secco Caetano

Ok, the smb2 parameters did the trick here... it seems windows are quite conservative regarding client requests throttling up, so buffing up these parameters really worked here (might not be the case with VPNs or high latency links).


Just checked some smb2 guides and it is quite ok to change these parameters. Windows are more likely to use smb3 nowadays.


I will try to mimic these smb2 parameters with my NAS devices here and will post results when available.


Cheer up!

Jun 26, 2014 8:59 AM in response to Jorge Secco Caetano

Experiencing the same issues as described by all. Devastatingly slow connectivity speed with Mavericks that has required we bring back older machines running Lion. Its unfortunate Apple will not respond to a show stopper situation that is so critical to their business customers. Here is an interesting fact. Connecting to an old XServe sitting in a Win Server environment running 10.6 offers the same fast afp connectivity from any OSX workstation. Lightning fast with Mavericks.

Jun 26, 2014 2:20 PM in response to Westrex

Westrex,


I truly believe this is related to SMB2 parameters in OSX 10.9. I tweaked some parameters in my Windows 2008 R2 server, matching the OSX 10.9 required behavior, and everything got blazing fast using SMB shares (SMB2) (around 960Mbits). I never used AFP for practical reasons, mostly because I have a few MacBooks here and SMB is the default connection (avoiding add another service to my servers).


Regard, that in my tests, SMB2 connections were far better (after the tweaks in the server side) than SMB1 (cifs://) connections, and besides the fast browsing files and folders, transfers were slow (below 400Mbits) using SMB1. I would try configuring the same parameters at your windows SMB2 servers so you could adjust to OSX 10.9 behavior that is more aggressive.


The parameters were:

"Smb2CreditsMin and Smb2CreditsMax

HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters\Smb2CreditsMin

HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters\Smb2CreditsMax

And I used the sweetcider method (powershell). Smb2CreditsMin set to 768 and Smb2CreditsMax set to 16384 (decimal values)

Jun 26, 2014 3:30 PM in response to Jorge Secco Caetano

Great, I'll give it a go. I was always told to never use SMB for connection using a Mac to Win environment. We use a workaround using afp and Acronis ExtremeZ-IP. I suppose in this case the Win server will think it is, and negotiating like a PC. Just wondering if metadata in files and directories will behave the same or there will be some data loss from the files created in OSX. Thanks

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?

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.

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.

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.

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.

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.