Smb list dir slow

I have the problem that displaying the files in a directory takes quite a lot of times. using find takes about 30 seconds, while it only takes about 1 sec when connecting via nfs. Obviously smb should take longer since the connection is encrypted, but this is quite long. Are there any suggestions as how I could improve the performance? Is this just the encryption, is the protocol not optimized for many requests or is smb configured wrong?

Im am using the default smb configuration. The Dataset is encrypted with AES-256-GCM. The reads and writes aren’t that fast(im using hdds), but not slow either(write wifi: 1.5GB in 24.756s / 60mb/s ).

Not by default. Did you force this?

What are you system’s specs?


We also need to know how many files you are traversing and what is the client? You mention using find so I assume this is Linux, or Windows with WSL? (God forbid, a Mac?)

File counts matter as well. 10K files in a directory is one thing, we’ve seen people doing 10M+ and understandably that takes a long time.


It seems to be the client. I got it down to 10 seconds with these optimizations. Enhancing macOS SMB Network Share Performance – Patrick Funke.

1 Like

There you go. Glad you figured it out, but for the benefit of later readers. SMB listing performance on OSX is laughably bad. You’ll need to do extra work client side if you plan on thousands of files in a directory.