need help investigating slow Linux home LAN
April 18, 2013 1:25 PM   Subscribe

Why are file transfers between PCs on my home network so slow when I can download stuff from the internet way faster? I'm a developer, not an IT guy; I don't even know where to start looking to figure this stuff out. Details below -

My home network consists of one Ubuntu 12.10 laptop and one Ubuntu 12.04 HTPC/file server/etc. The laptop connects to my LAN over 802.11n, and the PC over GigE. The router is an Asus RT-N66U. I have no problems accessing the internet from either machine; download speeds are fine on both according to . The problem is that it is agonizingly slow to access the PC from the laptop.

I've got the PC set up to export a directory over CIFS, so I can mount it on the laptop and get to my music and photos. Reading from or writing to this directory takes ages. It takes ten seconds to list the contents of a directory from a command line, and it takes 5-6 seconds to open a ~4MB image in GIMP. I suspect I've got smbd configured incorrectly, but then again I had the same problems when I had everything set up using NFS, but then again I might have set that up incorrectly too. This isn't a new problem for me, so I don't think it's the result of any recent software updates.

Any ideas on where to start digging? thanks!
posted by xbonesgt to Computers & Internet (12 answers total) 1 user marked this as a favorite
Best answer: I know this sounds boneheaded, but before you try anything else have you tried plugging the laptop in to the router directly? I would definitely try that before I went down any other path troubleshooting this.
posted by emptythought at 1:32 PM on April 18, 2013

How fast are large files transfered? `rsync --progress` on a single file should print out the transfer speed. Use a single large file (linux install isos are good candidate), and copy it multiple ways - ssh, cifs, and nfs. The "single large file" bit is important because transferring multiple small files introduces more latency.

That should provide at least a little more information, and help isolate the problem to the network or smbd.
posted by unix at 1:40 PM on April 18, 2013

CIFS (with SAMBA) has been known to have some performance issues depending on various things. Don't get me started on NFS.

Could you try again with pure FTP or HTTP?
posted by hylaride at 1:52 PM on April 18, 2013

Auto-negotiate status of the NICs or hard-coding the speed/duplex, which is discouraged for GigE.
posted by ijoyner at 1:58 PM on April 18, 2013

Response by poster: ~250MB file from laptop to PC, as measured with rsync --progress :

- 39 MB/sec over CIFS
- 3 MB/sec over SSH

~700MB file from PC to laptop:

- under 1MB/sec over CIFS
- under 1MB/sec over SSH

ssh'ing into the PC and doing anything from a terminal is, suddenly, a very painful process now that it's serving up the big file.

hang on, it'll take me a bit to get NFS set up.
posted by xbonesgt at 2:02 PM on April 18, 2013

Best answer: While I think 39 MB/sec is theoretically possible over 802.11n under the right conditions, I'm skeptical of that number.

You should try it plugged into the router as well so everything is over a wired network.
posted by unix at 2:09 PM on April 18, 2013

Response by poster:
dan@willard:~/Downloads$ ls -l snapshot-linux-28-amd64.deb 
-rw-rw-r-- 1 dan users 267113440 Dec 21 22:54 snapshot-linux-28-amd64.deb

dan@willard:~/Downloads$ rsync --progress snapshot-linux-28-amd64.deb /share/snapshot.deb
   267113440 100%   47.33MB/s    0:00:05 (xfer#1, to-check=0/1)

sent 267146136 bytes  received 31 bytes  2078958.50 bytes/sec
total size is 267113440  speedup is 1.00

dan@willard:~/Downloads$ mount | grep share
//kurtz/sharestuff on /share type cifs (rw,nosuid,nodev,user=dan)

oh man, I misinterpreted the rsync output, didn't I?
posted by xbonesgt at 2:21 PM on April 18, 2013

What's the speed using ftp?
posted by sebastienbailard at 2:23 PM on April 18, 2013

Response by poster: ok, my problems seem to go away when I use the laptop's Ethernet connection instead of its wifi connection. Pulling the 700MB file from the PC takes way less time. Dunno why I didn't try that right off the bat. Now that I know what the problem is, I can take it from here.

thanks all!
posted by xbonesgt at 2:32 PM on April 18, 2013

If there are a lot of other access points around that's likely to be the problem. Try to find a free channel, and ideally use the 5.8Ghz band - that's a lot less congested than 2.4.
posted by unix at 2:58 PM on April 18, 2013

I would honestly suspect some kind of cockery here with bad linux wireless drivers. I used to have a laptop that i had fully given up on ever using it's wireless because i didn't want to get a different card, and it just worked so poorly or randomly not at all on linux. I ended up just running a long ethernet cable up behind the area i typically used it in my house.

Wireless N itself is not very susceptible to interference in that sense, and is very good at routing around it. I live in a row of apartment buildings where i can see pages worth of 30+ networks, and i can max out of my 50/10 home internet connection over the wireless on OSX, iOS, or windows with a decent router. If the channel is set to "automatic" there's a lot of smarts built in to the 11n protocol itself to avoid that type of interference, and some manufacturers pile on even more special sauce(apple, netgear "rangemax", etc)

The problem here is bad linux support or implementation of something related to the card/its drivers, a software cockup or misconfiguration with the service/daemon on linux, or the card itself in the laptop being a hunk of crap.(which has happened to me several times, once even replacing the card itself with another card of the exact same model solved the problem. they CAN get flaky and eventually fail).

Step 1 though, have you tried pulling the files down over wireless on a random windows laptop?

Just trying to guide you in the direction of not giving up here :3
posted by emptythought at 4:38 PM on April 18, 2013

In your position you might try booting both up with live cd/live USB memory stick of this daily build: Ubuntu 13.04 (Raring Ringtail) Daily Build.

(This occurred to me after looking at distrowatch, and noticing that there's a daily build.)

I'm going to try that myself to see if my flaky wireless card starts behaving. It's probably a pretty low-effort and low-impact way to do a bit of troubleshooting.
posted by sebastienbailard at 10:44 PM on April 18, 2013

« Older WTF are these rashes below my belly button/above...   |   What does a 9-year-old boy need to know? Newer »
This thread is closed to new comments.