3

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?

4

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.

  • iperf is pretty cool; ran it on all three computers, transfers were around 1.08 GBytes, 928 Mbits/sec bandwidth. So it does seem like you're right about it being Samba-related. I'll have a look at NFS; but I imagine it would also be able to share to Windows users as well? – Espionage724 Aug 8 '13 at 0:07
  • If NFS is slow too, it could be disk related. Might be worth popping into Disk Utility (aka palimpsest) and running benchmarks. – Oli Aug 8 '13 at 0:08
  • NFS only works with Windows if you have a Professional/Business like license and therefore have access to the Services for Unix/Client Services add-ons... And even then I have no idea how it performs. As I say, for Win-with-Ubuntu transfers, I'd just lump it and go with Samba. – Oli Aug 8 '13 at 0:12
  • Hmm, I opted to try out a simple FTP server (vsftpd) and got it setup pretty quickly, and transfers are far better (got up to 114MB/s on a file). I tried out those tweaks (and a few others found online) for Samba, and had no luck with them improving speeds. I'll look into NFS again at some point, but it seems like quite a chore to setup – Espionage724 Aug 8 '13 at 1:21
  • So, my server computer runs Windows 8.1 now. When my laptop was also running 8.1, file transfers to and from the server computer were around 100MB/s. I switched the laptop over to Xubuntu, and now I only get 50MB/s. I feel as if there might be some artificial cap on data transfers somewhere, but I'm not sure. The computers themself have the hardware to handle higher transfer speeds, but only on Linux does it go slower than expected (ifperf transfers are fine). – Espionage724 Jan 8 '14 at 6:37
1

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

[global]
    ...
    server signing = disabled
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"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.