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.

Finder slow at listing directory content from SMB shares

I'm connecting to SMB shares on an Windows 2003 Server from a MBP running 10.6.1 and face two issues doing that.

1) Finder is slow at listing the directory content of the shares
The problem only occurs in Apple Finder. When I do "ls" from Terminal the directory listing displays in the same moment I hit enter.
The problem also does not occur when using PathFinder from Cocoatech.

2) Reconnecting to the SMB Server fails (sometimes)
It almost always fails when I unplug the ethernet cable and plug it back in. Finder then complains it couldn't find the server by name or the IP address would be wrong.
Both options are not true. DNS is present and working. Connecting by IP only also fails with the same error message.

Anybody seing this also?

I've tried to "optimize" by changing smb.conf but without success.

MBP, Mac OS X (10.6.1)

Posted on Sep 22, 2009 12:20 PM

Reply
75 replies

Jan 30, 2011 10:06 AM in response to cargadetrabalhos

1. Launch Apple Terminal: Finder > Utilities > Terminal

2. Check if config file exists, enter: "ls /etc/nsmbc.onf" <return>
-> should return "ls: /etc/nsmb.conf: No such file or directory"
-> if not the file exists you probably want to stop here 😉

3. Create empty file: "sudo touch /etc/nsmb.conf" <return>
You will be prompted for your password. This is the same password as when you log into your mac.

4. edit the file in Textedit: "sudo open -e /etc/nsmb.conf" <return>
-> enter the settings as described in the previous post

5. Please make sure you use the correct syntax. Especially square bracket for the sections. Square brackets are not displayed correctly here (at least I don't know how to do it) .
If unsure about the <your smb server1> section just create the default section
For more information on nsmb.conf type: "man nsmb.conf in Terminal or Google

6. Save the file in TextEdit: File > Save

7. Done 🙂 (probably want to restart)

Feb 1, 2011 6:06 PM in response to steve2u

The nsmb.conf file changes are pretty interesting here. To me it seems like the most likely setting to make the change is notify_off, which turns off SMB change notification. OS X uses that with the server to know when a file has changed. The server can notify the client of changes to files in a directory. This has the effect of making SMB a bit more chatty as the client has to request a directory to be monitored for changes and the server has to notify the client of the changes.

Setting minauth to none is worrisome as that reduces security.

Setting streams to "no" may have some effect as that turns off named streams, which are a feature of the latest versions of Samba, but I don't believe Windows 2003 SMB servers support it anyway. It allows resource fork data to go into the original file as a "stream" of that file. With it disabled, the resource fork data will now go to a dot-bar file (the filename is prepended with ._).

I've been seeing these sorts of SMB slowness issues for quite awhile and I've made a bit of a breakthrough recently via watching packet captures. For example, let's say you're a user who's browsing through the Finder in column view. You work your way down from the root of a share, five levels down. At some point, you're stuck waiting and waiting and waiting for a directory of only a few items to display. All you see is a spinning progress wheel in your Finder window. Eventually, after maybe 20 seconds, maybe longer, you get that directory listing. What was the Finder doing in the meantime?

Quite a lot, as it turns out. Finder had to go to the top of the SMB share and get file listings of that directory as well as all the subdirectories between what you're trying to see and what's at the root of the share. But wait, it's not just file listings - it's metadata too. Metadata could mean resource forks, permissions, file attributes, etc. If your server is busy and its disks are heavily used, then you could be waiting on the disks for that information.

In the end, all of these network calls between the Mac and the server are what contribute to a poor experience in the Finder.

What's totally unknown to me is if the Finder can be tuned - can you actually increase how long it caches its view on a directory hierarchy so you can eliminate its need to refresh its view further down in that tree? It seems like, in column view, it wants to get an updated view every 20 seconds or so, based on if the user is actually doing something. If the user does nothing, the Finder does nothing to refresh itself.

Yes, this was a long post, but it's my experience on this problem and what I believe to be happening. I think I'm going to file a bug with Apple via my developer connection account. There's got to be some way to make this better.

Feb 4, 2011 3:47 PM in response to Sheep71

This worked for me thank you so much from the bottom of my heart I feel like crying this tip is that good...
Listen, I'm on 10.6.6 and through all the updates to snow leopard this problem still hasn't been fixed by Apple.
So thank you again cause this just saved me from down grading thats how frustrating of a problem this is.

Feb 6, 2011 1:47 PM in response to Jola@edyn

Jola@edyn,

I completely agree about enterprise adoption. It's something that I see frequently and what may look like a problem with an SMB server actually ends up being a problem with the OS X SMB client. I can understand the need for the Finder to put together a complete picture of what's in a directory, but I also think it can be smarter about doing it. Start with the directory the user's trying to view, then spin off another thread to handle previous directories, when the Finder's cached view on them expires. We'll see what happens in 10.7.

Oct 10, 2011 1:28 PM in response to Bernie Case

Thanks for the info. I'm having the exact same problem as everyone else here. No problems with our Windows boxes but always slow network browsing on the Mac's. I work for an NFL team and we have 6 Mac's. We might have more but they don't play nice on an AD Domain.


I've tried everything and still have no solution. It can take 45 seconds for Finder to open up a folder with a ton of pictures in it. It's insane. Two of our Mac's have OSX 10.7 on them and it has not made a difference at all. The rest of them have 10.6.8 and all have the slowness problem when browsing the network shares.


Any update on this?


I find it hard to believe that I've seen threads regarding this slowness for 3-4 years solid and none of them have solutions. Is Apple really NOT listening?


Please help Apple!

Nov 30, 2011 11:43 AM in response to ServerMechanic

I'm not surprised at all. I'm slowly beginning to realise that Apple are the greediest bunch of money grabbers in existence.


Once you make a purchase, you're on your own, unless yo want to pay for support!! Its our fault for being ignorant enough to connect non Apple products to our beautiful Apple hardware.


Shame on them, not even Bill Gates created this much havoc. We have a 6Tb NAS with all the company CAD files on it and its like Russian roulette trying to get any Macs to connect, some times its fine, most times its not. We actually have to use a PC to transfer them to a USB key and back again. Is it 2011? Its pathetic.


Right now I hate Apple, I only wish they realised how much they are ******* people off. They don't deserve to be anywhere near Enterprise. Keep selling the macs to cool hipsters and leave business alone.


This week I have wasted HOURS trying to sort out the SMB issue, everyone is looking at me like its my fault and its not, Apple have know about this for years and done nothing. I had a conversation with the boss earlier and he is seriously contemplating the next round of updates be Dell's. Better the devil you know. Apple are a loose cannon, its like dealing with a spoilt child, they want everything, its their way or the highway.


Arrogant AppleHoles

Finder slow at listing directory content from SMB shares

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