Linux Samba Performance Solution
May 5, 2017

Ever since I switched to Arch Linux I’ve had absolutely terrible SMB performance. I tried tweaking the SMB settings on the client and server with no success. Windows had no problems so it was clearly a client side issue. Basically the problem is caused by the TCP read/write buffers not being large enough. If the buffers are too small you will end up with 50MB/s read/write speeds when they should be 90MB/s+.

/etc/sysctl.d/20-tcp.conf

net.core.wmem_max = 12582912
net.core.rmem_max = 12582912
net.ipv4.tcp_rmem = 10240 87380 12582912
net.ipv4.tcp_wmem = 10240 87380 12582912

Reboot or apply the settings using the sysctl command. You should now have a nice performance boost with SMB shares!

Comments