4

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?

3 Answers3

6

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.

Oli
  • 299,380
2

I had the same issue (2,5-3,0 MBps) and solved this by adding this line to the config:

[global]
    ...
    server signing = disabled
Zanna
  • 72,312
1

First check the speed between the computers, as suggested by Oli. I found that I had to switch from 2,4GHz to 5GHz, before trying to optimize Samba.

On Ubuntu with Samba run:

iperf -s

On Client/Ubuntu/Mac run:

iperf -c IP_on_Ubuntu_With_Samba

I got 40.2 Mbits/sec on 2,4GHz and 367 Mbits/sec after switching to 5GHz. I first run both on same server and got 72.5 Gbits/sec, so I knew something was wrong with the test.

To install on Mac: "brew install iperf"

Punnerud
  • 121