Ubuntu – Only Around 50MB/sec Max Network Transfer; had 70-100MB/s on Windows, Ubuntu reports Gigabit Speeds, Why

ethernetsamba

I have two different computers, one a desktop, the other a laptop. Both have different network controllers in them (one Qualcomm Atheros, other Realtek). Both using the included driver.

Both computers have Xubuntu 13.04 x64 currently, but the results are reproducible on 13.10 (with Kernel 3.10 and 3.11 daily) and 12.04.2, and Lubuntu 13.04. The results are also the same on the desktop if I use a compiled Realtek driver (8168 I think).

If I try restoring files from a backup computer, the transfer speed at a most goes around 50MB/sec, on both machines. Network information is reporting 1000 Mb/s.

The same computers under Windows can easily get 70-90MB/s transfer speeds while restoring backups.

Just to be clear, I'm dragging some folders from a Samba share on another computer, to my desktop and laptop (not at the same time) using Xubuntu's file manager, Thunar.

Any idea what's up?

Best Answer

What's up? Samba, probably.

Before you try something else, test the network drivers with iperf -s on one and iperf -c other_ip on the second. Should show raw performance. You could see up to ~125MB/s but down to ~100MB/s would still be okay.

Assuming that's fine, try another protocol. I suggested NFS to another user because it's a lot faster than Samba in my experience. My post there includes sample configuration to get you up and running a fairly insecure sharing scheme. If you need usernames and passwords, this can all be done, it's just a bit more work.

If you want to mix Ubuntu and Windows, I suggest you keep Samba hanging around for when you need to copy from one OS to the other, but it's going to be slow.


There are Samba tuning guides littered around the internet but I've never had much success in improving Samba-to-Samba transfer speeds. Here are the two biggest claims I've seen to date:

  • Using strict allocate doubles write speeds.

  • Bigger buffers just generally help:

    read size = 65536
    read prediction = true
    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
    write raw = yes
    read raw = no
    

These two "solutions" are all over the place but as I say, I've never had much luck with either and given everything is Linux of some sort here, I just fall back on NFS for speed.