Apple CLI command to mount an SMB share that isn't abysmally slow
from ragingHungryPanda@piefed.keyboardvagabond.com to selfhosted@lemmy.world on 18 Apr 04:33
https://piefed.keyboardvagabond.com/c/selfhosted/p/316739/apple-cli-command-to-mount-an-smb-share-that-isn-t-abysmally-slow

I’ve finally got tired of how bad the latency and transfer speeds are when mounting my TrueNas SMB shares on my macbook. I looked online for some solutions, but didn’t really have much success with them. I managed to get to this command that seems to be a lot better:
mount_smbfs -o soft,nobrowse “//<username>@<domain or ip>/apps” “$HOME/mnt/apps”
where /mnt/apps is a directory that I created for myself. In this case I’m mounting a share called “apps”. For now it actually seems to be pretty responsive and loads directories and files at an acceptable speed.

#apple #applesilicon #fileshare #mac #selfhosted #selfhosting #smb #truenas

threaded - newest

makyo@lemmy.world on 18 Apr 05:16 next collapse

I’m going to try this, SMB support on Mac has been a thorn in my side for years

MagnificentSteiner@lemmy.zip on 18 Apr 05:45 next collapse

You can transfer files using rsync over SSH without needing to mount the drive which should give you better speeds.

ragingHungryPanda@piefed.keyboardvagabond.com on 18 Apr 05:52 next collapse

oh that’s good to know! I’ll definitely try using rsync next time I need to move something over 🤞

MagnificentSteiner@lemmy.zip on 18 Apr 06:08 collapse

FYI you just replace the destination with username@IP:filelocation like this that I use to backup my laptop to my server

rsync -av --delete /home/me me@192.168.1.2:/srv/dev-disk-by-uuid-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Backups/PCs/Laptop/home

ragingHungryPanda@piefed.keyboardvagabond.com on 18 Apr 06:09 collapse

saving this comment. thank you!

Damage@feddit.it on 18 Apr 06:14 collapse

Why would rsync be faster? SSH traffic is encrypted, it’s usually slower than normal file transfers

MagnificentSteiner@lemmy.zip on 18 Apr 06:38 next collapse

I dunno. I suspect it’s the GUI file manager but don’t know for certain.

possiblylinux127@lemmy.zip on 18 Apr 08:55 next collapse

SMB is also encrypted

You don’t want it any other way

Mister_Hangman@lemmy.world on 18 Apr 20:59 collapse

… so is ssh?

plz1@lemmy.world on 18 Apr 19:12 collapse

SMB on MacOS has had performance issues for a long, long time. It doesn’t implement SMB very well, and all the Samba hackery people need to go through to work around it is basically just lived with. rsync is much better because of this.

Decronym@lemmy.decronym.xyz on 18 Apr 06:20 next collapse

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

Fewer Letters More Letters
IP Internet Protocol
NFS Network File System, a Unix-based file-sharing protocol known for performance and efficiency
SMB Server Message Block protocol for file and printer sharing; Windows-native
SSH Secure Shell for remote terminal access
VPN Virtual Private Network

5 acronyms in this thread; the most compressed thread commented on today has 15 acronyms.

[Thread #244 for this comm, first seen 18th Apr 2026, 13:20] [FAQ] [Full list] [Contact] [Source code]

nomecks@lemmy.wtf on 18 Apr 07:04 next collapse

Can you export the share as SMB and NFS at the same time? It’ll probably be faster mounted with NFS

ragingHungryPanda@piefed.keyboardvagabond.com on 18 Apr 14:01 collapse

I don’t know if I did something wrong, but NFS only let me see one at the mounted root level. I couldn’t navigate the directory tree

ripcord@lemmy.world on 18 Apr 16:49 next collapse

You’ll need to export each volume individually I would expect, are you saying you could only see one volume?

ragingHungryPanda@piefed.keyboardvagabond.com on 18 Apr 19:08 collapse

no, it was weird. I could only see the folder I set up for NFS. for example, on folder media, I could see the subdirectories of music, movies, etc, but not their contents. Then if i set up NFS on movies I could mount movies send then see it. It was really weird

cantankerous_cashew@lemmy.world on 18 Apr 17:16 collapse

You might have to patch your nfs config; the default one supplied by Apple is using an older protocol. Run this and reboot:

printf "\nnfs.client.mount.options = vers=4\n" | sudo tee -a "/etc/nfs.conf" &> /dev/null
ragingHungryPanda@piefed.keyboardvagabond.com on 18 Apr 19:05 collapse

thank you!

<img alt="" src="https://media1.tenor.com/m/e4gFFQWSUvAAAAAC/i-love-you-patrick-star.gif">

paraphrand@lemmy.world on 18 Apr 08:30 next collapse

Why is this better than what you do with the Finder GUI? I’d just like to understand the mechanism.

ragingHungryPanda@piefed.keyboardvagabond.com on 18 Apr 14:00 collapse

there seems to be issues with the apple silicon smb implementation that’s absolutely abysmal and painful in performance. But once I mounted the shares this way, it became tolerable even in finder

ripcord@lemmy.world on 18 Apr 16:47 collapse

Ah, if it’s limited to Apple silicon maybe that’s why. Ive never noticed any particular speed problems on any of my Macs (2004 or so through 2019)

ripcord@lemmy.world on 18 Apr 16:50 next collapse

I regularly get 100-200MByte/sec throughput to the Linux, Mac, and Synology SMB servers in my home

kalleboo@lemmy.world on 18 Apr 22:50 collapse

My SMB slowness has always been when copying a lot of files, the Finder does something really slow and weird when trying to figure out if the destination can be copied to (dunno if it’s checking for existing files with the same name or what). Once the actual transfer is going it’s fast, but then it hits the next file and pauses for several seconds while it’s doing something

ripcord@lemmy.world on 19 Apr 21:06 collapse

I’ll have to do some perf tests to see if the client seems slower than others with small io/metadata.

But that has definitely always been the weakest area of networked storage - small, transactional workloads. Latency is the killer there, and there’s always going to be higher latency than local storage (although some of the super low latency expensive rdma stuff gets pretty close).

The way to mitigate that is to do copies that are multithreaded. Unfortunately most consumer file copiers out there are terrible at this. rclone definitely will do it but is CLI. Parallel rsync is also possible from CLI and works great but need utilities. I like Carbon Copy Cloner personally which at least kicks off 2 rsyncs

Edit: Apparently freefilesync will also do parallel copies and is at least GUI and somewhat user friendly. I haven’t tried it, though. Or at least not for a super long time.

paraphrand@lemmy.world on 18 Apr 19:06 next collapse

It’s difficult to know of any random person is differentiating between Intel Macs or not when they say Apple silicon these days. This is the first I’ve heard of this.

I experience SMB slowness over the internet, but not locally, on my Intel and ARM Macs. (I’m forced to use smb over the internet via VPN for work.)

I’m gonna try these commands sometime this week to see if it improves things.

ragingHungryPanda@piefed.keyboardvagabond.com on 18 Apr 19:09 collapse

from what I’ve read online, it’s only Apple silicon, not Intel macs

WASTECH@lemmy.world on 20 Apr 20:01 collapse

Apples implementation of SMB has always been abysmal. I’ve been using Mac’s for close to 20 years now, and connecting to SMB shares has always been a pain. IMO, it’s gotten better recently (since they dumped AFP and were forced to work better with SMB). For whatever reason, it has always been slow to connect through Finder. Not sure there has been much progress on that front…

Really makes you wonder what Apple uses internally, because it must not be SMB!

LodeMike@lemmy.today on 19 Apr 14:51 next collapse

Samba is a piece of shit because it’s not serialized. Use something else.

Hiro8811@lemmy.world on 21 Apr 07:32 collapse

What!? I’ve been looking to switch but the others options are complicated and I can’t connect all my devices.

uenticx@lemmy.world on 21 Apr 14:41 collapse

I don’t see a suggestion to use MACFuse here, so I’ll just drop this here: macfuse.github.io

Copy your ssh pub key to the device ssh-copy-id user@hostname

Then just mount it:

sshfs user@hostname:/remote/path ~/mnt/myfiles \
-o reconnect \
-o ServerAliveInterval=15 \
-o ServerAliveCountMax=3 \
-o follow_symlinks \
-o IdentityFile=~/.ssh/id_rsa