I'm finding that accessing a Samba share (4.1.6) from a Mac running Yosemite can be extremely slow. It can take several minutes (no exaggeration) to display a folder containing four or five files.
I've run Wireshark during one of these long pauses and I can see a steady stream of "Create Request File" / "Create Response File" SMB2 packets being sent - referring to a metadata file for each file in a folder that I opened and closed some time ago (i.e. of the form "._Realname" - I believe these are resource forks). There are a few hundred files in this folder so it takes a long time for it to work through them all, during which time other folder access appears to be blocked.
I've tried a couple of things:
Preventing .DS_Store and resource forks being created: Adding a veto for ._ file creation doesn't help - I can still see it going through the files (and I understand this can cause other problems when you try to copy a folder from somewhere with various dot-underscore files onto the share).
Connect via port and IP address: I've read that connecting via the IP and specifying port 139 directly can have an effect. This does improve things a little, although I can still see a stream of the "Create Request File" / "Create Response File" packets.
Assuming this is the cause of the slowness, is there a way of preventing Yosemite from even trying to create or read these files for a network share? (Not just the .DS_Store, but the resource forks as well.) Is there some magical Samba or Mac configuration option that I'm missing?