Why is Samba SMB slower than HTTP/NFS/FTP transfer on NAS on my LAN?

TLDR: SMB & AFP have bulkier encryption and actually do more than just show you an index of the files. FTP and NFS are just there to give you a list and get the job done. Your RPI as mentioned in another comment is hardware restricted to the USB bus that moves all I/O data. But 2-4Mbps is garbo so check your client and update all your software, 10-18Mbps sounds more legit unless your RPI or comp are defective.

Doesn't appear to matter what hardware is used, Samba is simply slow. AFP (Apple File Protocol) is no better, I have been working with AFP and SMB since 2008 using both Windows and Mac, it's evident that I found more freedom with Linux especially since they've really improved laptop wifi capabilities and the economy is popping things like C.H.I.P. and RPIs out their ears. But the point is, SMB, AFP, NFS and FTP all have their downsides. SMB can be improved if you remove some of the security features and same goes for AFP. The reason why you can see improvement in FTP is the very bare bones transferring that it is, there's no encrypted handshake. NFS locks files and similar to FTP isn't made for "opening" (copying from the host machine to your memory) and editing files, unlike SMB and AFP which are designed to act as though you're browsing the host machine.


The SoC device used on the Pi does not have builtin support for ethernet so the ethernet functionality on the Pi is provided by a USB-ethernet chip, sharing the same USB bus as any other USB peripheral you might have connected to it (including any USB flash drives). This is probably the main reason why you see abysmal performance.

Solution? Sadly there is none, it is a hardware limitation. It has nothing to do with the speed of your hard drive or the network setup you have, the USB bus on the Pi is pushed to its limit with both the disk and ethernet running concurrently.

You might want to invest a little more in your NAS setup and purchase a single board computer that does indeed have builtin ethernet. There are several platforms with gigabit ethernet support out there.