Ubuntu – Samba Ubuntu 20.04 -> Windows slow transfer speeds

ethernetnetworkingsambaserverwindows 10

I recently upgraded my media server's hardware and used the opportunity to change OS from windows to Ubuntu. My personal desktop and my media server are both connected to the same router by cat 5e cables. Before upgrading, when I still had windows 10 on my media server, whenever I transferred files from my desktop to the server or vice versa, I'd get around 100-115 MBps transfer speeds. Now, the transfer speeds are really slow compared to the previous speed. Furthermore, even generally, my server's Wifi connections is faster than my ethernet connection (280Mbps vs 89Mbps) while I'm supposed to have 400Mbps which I get when doing a speed test from my desktop when connected by ethernet.

Now, I'm transferring some files to the media server (around 300GB), and the transfer speed is 10-11MBps. The transfer is capped at this speed regardless of whether I'm transferring over WiFi or Ethernet.

What can I do to fix my network issues? Thanks!

Edit: on while troubleshooting, I discovered that my ethernet port is limiting the speed to 100Mbps even though both the port and my router are capable of Gigabit lan. I understand now why my wifi connection is faster than my ethernet connection. I'll edit again once I figure out how to fix this issue

Best Answer

Try these samba tweaks to see if you can improve your transfer speed, I used them and I can transfer from my Windows PC to my Linux Server a file about 1GB in size in a bout 1 min or less over WiFi.

#Backup original settings
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.orig

#Open file to apply samba speed tweaks
sudo nano /etc/samba/smb.conf

#Locate and change the following lines in smb.conf
read raw = Yes
write raw = Yes
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192
min receivefile size = 16384
use sendfile = true
aio read size = 16384
aio write size = 16384

Don't forget to save and close the file after you edit the above section.

For the socket option, you can also try these settings to compare which works best for you:

socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
Related Question