|
| 1 | +--- |
| 2 | +title: Fixing SMB transfers on Mac |
| 3 | +summary: My notes on how to fix SMB transfer speeds on Mac Tahoe on Unraid NAS |
| 4 | +tags: |
| 5 | + - Server |
| 6 | + - SMB |
| 7 | + - Unraid |
| 8 | + - Mac Tahoe |
| 9 | +--- |
| 10 | + |
| 11 | +Setting up my NAS last year was probably one of the best things I did, I'll try and do another post on all that but the long and short is I'm using an old PC with Unraid. |
| 12 | + |
| 13 | +Unraid gives you a few options to connect to your NAS, I first tried SMB, I really liked how Mac Finder just discovered it, I didn't have to remember any IP addresses or special commands. |
| 14 | + |
| 15 | +Reads were good, I could browse directories pretty quick, open up files fine. But writing was extremely slow, and worse with lots of files. |
| 16 | + |
| 17 | +At the time I didn't really know what to do, someone on the internet said try NFS and the transfers were much better. But today accidentally crashed my server (my fault not Unraid) and I thought ok time to give SMB another shot. |
| 18 | + |
| 19 | +I tested this by transfering a folder of varying sized MP4's. Finder doesn't have a fancy transfer rate window like windows does so I used Activity Monitors network view which does the job. |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | +This sawtooth pattern is weird, it looks like finder is transferring one file, then reading it before transferring the next. |
| 24 | + |
| 25 | +The internet said that macs aren't setup great for SMB performance. And after a while of trial and error I settled on this config |
| 26 | + |
| 27 | +```toml |
| 28 | +[default] |
| 29 | +# Disable signing |
| 30 | +signing_required=no |
| 31 | +# Turn off validation of the negotiate info (helps with signing issues) |
| 32 | +validate_neg_off=yes |
| 33 | +# Force SMB 3+ for better performance |
| 34 | +protocol_vers_map=6 |
| 35 | +``` |
| 36 | + |
| 37 | +After connecting to an smb share on mac we can run `smbutil statshares -a` to get a picture of what that looks like. Unfortunately for me `signing_require` didn't seem to change this to OFF even after restarting. |
| 38 | + |
| 39 | +```txt |
| 40 | +SMB_CURR_SIGN_ALGORITHM AES_128_GMAC |
| 41 | +``` |
| 42 | + |
| 43 | +I got the same transfer performance when I tested which confirmed more work needed to be done. This config might be unnecessary, and if thats the true I'll update this article. |
| 44 | + |
| 45 | +Next up lets make sure that signing is not on the NAS. In Unraid, Settings > SMB > Samba extra configuration: |
| 46 | + |
| 47 | +```toml |
| 48 | +# Force signing off |
| 49 | +server signing = disabled |
| 50 | +strict sync = no |
| 51 | +``` |
| 52 | + |
| 53 | +It was adding `strict sync = no` that made the difference, since adding my network transfer looked a lot more consistent. |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | +Speeds aren't amazing but this is equivalent to NFS so I'm happy. After [reading the docs](https://www.samba.org/samba/docs/using_samba/ch11.html) I think it was requiring the server to do a WRITE > READ cycle for every file. |
| 58 | + |
| 59 | +Hopefully this will help you, or more likely future me after I've forgotten about this |
0 commit comments