The Finder is set to NOT to try to create previews, etc. for as much as you could turn off. I move the folder to local storage and it opens instantly. This is pure MacOS SMB + Finder.
Yes. I included that in my original post.
If you are worried about the signing, you can turn that off on the Mac. Add (or create) to /etc/nsmb.conf on the mac:
signing_required=no
Of course, reboot or restart samba. That line should go in [default] section. According to the doc, the default is no, have you turned it on possibly? I am confused by showing it in the OP, but, saying itās on later.
EDIT: Ok, so, apparently, later Mac OS enables signing on SMB2/3 when needed and IF the server offers it, even with the setting of no (which is default). I suppose one can try and disable server signing on Truenas end and see if it makes a big difference.
Very interesting @kris , thanks for posting. Iāve always felt that Finder sucks with SMB, but never saw it quantified. Itās surprising to me that Apple hasnāt done anything about it after all this time.
Are you sure? The process that gathers the metadata is started when the filesystem is mounted and it is updated as new data is written to the filesystem. You can see these processes in the Activity Monitor.
What if the data is on a local USB3 drive? How fast does Finder open when you first mount the drive (plug it in)?
As a side note, we compared I/O speed from macOS to a TrueNAS CORE server via:
NFS
SMB
AFP
and found all three to be comparable, at least as of macOS 12.x Monterey. We were testing sequential and random write and read.
Unpopular opinions:
I always felt that Apple sucks with everything that is network related.
I also always felt that Linux or FreeBSD is not a great SMB server compared to Windows Server.
Thankfully I can almost always use NFS instead
Yup! It is a bit silly. I should not have to disable this everywhere on a share because the MacOS behaves poorly.
The files in my test were copied to a thuberbolt attached NVMe array. I copied the same file set to 10TB USB3 connected spinning rust. First finder open was 30 seconds. 2nd was open was 2.
#/etc/nsmb.conf
[default]
mc_on=yes
mc_prefer_wired=yes
signing_required=no
dir_cache_async_cnt=100
dir_cache_max=360
dir_cache_min=60
max_dirs_cached=500
max_cached_per_dir=10000
I was able to dramatically improve the opening time of these folders with the settings above on MacOS.