SMB vs NFS nowadays


Just got my vero and it is holding up good and read nfs is preferred to smb. But i noticed a lot of those posts ae on old osmc forum and not the new one

does this still apply today or was it an old issue with the pi


NFS is native to Linux. Smb is a reverse engineered Microsoft protocol. This is why NFS will always be preferred.

It used to be that SMB was reverse engineered and also very ‘chatty’. However, the protocol is now much improved, cleaner and the specification have been published. It’s a good and solid protocol and so is the Samba implementation. It works well in environments with different systems.

NFS plays a bit better with UNIX filesystems/permissions and there are claims it is faster and can be easier to setup.

In the end, for streaming, it doesn’t matter what you use, as long as the underlying network is stable and performs well enough for the required bitrate+overhead.
This is really key.

I stream 1080p movies over SMB from a Seagate Central to my Pi2, on a 802.11g network and there’s no problems although I’m getting a 5GHz Tenda USB adapter soon for the Pi so I can use 802.11a/n instead.

It’s more than a claim.

SMB has huge network overheads, HUGE!!! ones for everything it does.
This means less media data being transmitted through the pipe at any one time.

NFS has the least network overheads, as far as I know, meaning more media data can be sent through the pipe leading to higher bitrate sound and video being processed by the receiving client.

TL:DR - NFS pwns SMB

NFS is faster than SMB because of less overhead, this fact did not change. Plus, ist still makes a noticeable difference on the RPi 2. And on top of it, there’s still a difference between accessing an NFS share as an OSMC source and mounting it via fstab.

I have tested SMB vs NFS on my Vero 4K, and there is a definitive difference between them. I am unable to play 4K material over SMB & Wifi, but the same sourcefile plays excellent over NFS.

Maybe worth writing down in a FAQ or something.


NFS is much more performant, particularly when mounted via fstab.
When playing back 4K content on the Vero it’s a big improvement.


Is mounting via fstab prefered with OSMC as well? I guess the source-paths are treated as “local files” then?
Or how is this set up?

I have only tested setting the source library to nfs://x.x.x.x/path

Vero runs OSMC. OSMC is the OS.

Yes – fstab is always the best way

Yes, I know OSMC is the OS :slight_smile: I just wondered if fstab was prefered or not.

I tried setting up the mount in fstab, and my Vero 4k booted pretty slot after that.
But it seem to work. Have not noticed any perormance issues yet.

EDIT: It was a real hassle to get the fstab parameters to work. If slightly wrong OSMC id not even boot propely…

If you configure the mount so that boot depends on it booting will fail. The recommended way is
//<IP of Server>/<Share Name> /mnt/<Share Name> cifs x-systemd.automount,noauto,iocharset=utf8,user,username=<user on server>,password=<your server password>,uid=osmc,gid=osmc,iocharset=utf8,file_mode=0770,dir_mode=0770 0 0

This is what i have in my fstab: /mnt/share nfs ro,vers=3,x-systemd.automount,noauto 0 0

My export is read-only, and NFSv3, so I assume your suggestion may not work. Which of the parameters makes it depend on the mount on boot?.. is it the “x-”?
The above works, it mounts and it boots, but if it for some reason fails it will not boot properly and end up in “safe mode” or whatever it was called.

Ok, now I guess we misunderstood each other. I thought you are still talking about SMB mounts.

I think the parameter is called nfsvers=3 and not vers=3 also maybe try to add nofail

Also check (from the OSMC box) with showmount -e if the nfs export is correct

I changed to nfsvers=3 and added nofail, it still mounts so I guess it works? :slight_smile:

This is what i see when running mount | grep mnt

systemd-1 on /mnt/share type autofs (rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct) on /mnt/share type nfs (ro,relatime,vers=3,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=,mountvers=3,mountport=50863,mountproto=udp,local_lock=none,addr=

What is the systemd-1 mount? Looks the same but read-write.