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
183 replies

Jun 16, 2014 7:04 PM in response to TenjuZenjin

I would like to add my 0,20 cents here:


Situation = (same issue here) MAVERICKS + WINDOWS 8.1 shares... very, very slow browsing.

(Gigabit switch, wired ethernet, RAID 0 on Windows 8.1 with 3HDs and RAID 1 on OSX with 2HDs)


So i decided to test two scenarios:


1) Using only cifs:\\ shares (smb1 on OSX) = a) browsing are really fast, but b) no transfers got more then 450Mbits either for lager files (more then 25Gb) or smaller files;


2) Using smb:\\ shares (smb2 on OSX now) = a) browsing like **** (5min to list 200 files), but all transfers toutched the ceilling here at 850Mbits to files larger than 12Gb and 980Mbits for files smaller than 12Gb (I think that files within the windows cache are faster);


I also tested some NAS providers over my corporate network and one specially designed to operate at 4Gbits speeds (FreeNAS with 6HDs plus two eth interfaces) gave me slow browing under Mavericks. It also had smb2 under the hood and browsing was signifcantly faster then windows 8.1, but really slower then previous OSX versions.


I will try touching the windows parameters here as well as shutting down the .DS files to see how far can my MBPro lands here.


Txns for tips!!!

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.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

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.