I tested the read speed of NFS, Samba and SFTP on lede 17.01-rc2 over 11ac WLAN.
When copying the same file from a ext4 file system on the router to my laptop, NFS gives ~30MB/s, SFTP gives ~10MB/s, while Samba gives only ~3MB/s . And a peculiar thing is that the CPU usage is very low with Samba.
I am using the default configuration for both services. Could anyone point out a way to troubleshoot?
Update:
Thanks to weedy, I tested the transfer speed on Ethernet. It is approx. 50MB/s. Is there anything in the wireless driver that prevents samba to reach a higher speed?
# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
socket options = TCP_NODELAY SO_KEEPALIVE IPTOS_LOWDELAY
use sendfile = Yes
aio read size = 4096
aio write size = 4096
These might not work with the samba version we ship.
# No NTLMv1, force NTLMv2
ntlm auth = no
client ntlmv2 auth = yes
client use spnego principal = no
client max protocol = SMB3
server max protocol = SMB3
Thank you. I added the the settings to /etc/samba.smb.conf.template and restarted samba. But there seems little improvement in terms of upload and download speed.
Hi, I have never been anywhere near 50MB, which is amazing speed, I have only wr1043nd, but what helped me a lot was removing sync from options in /etc/config/fstab. Look for options rw,sync and try delete sync word, reboot and try speed again. Maybe wifi shares the same "wire" (interface, line, whatever) with USB interface on your router and that is why you have much lower speed via wifi.
The speed of samba is slow on both 2.4G and 5G wireless (less than 1MB/s on 2.4G). But the speed of NFS can reach 30MB/s on 5G.
@nozombian My hard disk is attached to the E-SATA port instead of the USB 3.0. The SATA channel is built in to Armada 385. And the wireless chips are connected via PCI-E. I don't think they use the same "lane".
Hi weedy,
I have the same problem, maybe the samba version 3.6 is not high enough.
Anyway, what's "speed.txt" and the "manual pages" you referred?
And these settings should be put in /etc/samba/smb.conf ?
Thanks
While Samba 3.6 isn't ideal it certainly does perform better than ~3Mbyte/s. What clients are you using? Are you all also testing wired connections? There's some work getting Samba 4 in but it's in progress and rather hackish.