You are not logged in.

#1 2010-12-11 19:55:01

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

box-to-box LAN speeds very slow [SOLVED]

I have a gigalan network at home.  I'm noticing an odd behavior when transferring files from machine A to machine B.  If I send a file from A-->B via scp or samba, I get speeds of 55-60 MB/s.  If however, I send a file from B-->A, I get speeds around 7.1 MB/s.  Glad to post more details.  Anyone have thoughts as to why the lop-sided xfer rates?

Both machines are "modern" desktops; watching htop as the files go I don't see more than a 6-7 % CPU load.

Last edited by graysky (2010-12-12 11:47:42)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2010-12-11 20:05:42

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: box-to-box LAN speeds very slow [SOLVED]

You should test the performance with iperf, sounds like a shitty NIC on one side smile. For reference, I have a 'gigabit' onboard Realtek NIC that barely does 200+ Mbps. Jumbo frames, no jumbo frames, etc. - it's pathetic.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2010-12-11 20:12:15

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: box-to-box LAN speeds very slow [SOLVED]

.:B:. wrote:

You should test the performance with iperf, sounds like a shitty NIC on one side smile. For reference, I have a 'gigabit' onboard Realtek NIC that barely does 200+ Mbps. Jumbo frames, no jumbo frames, etc. - it's pathetic.

Good idea!

Box A as client (iperf -c ip.of.B) and B as server (iperf -s)
=898 Mbit/sec (n=3)

Box B as client and A as server
=975 Mbit/sec (n=3)

?

Last edited by graysky (2010-12-11 20:12:33)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2010-12-11 20:16:58

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: box-to-box LAN speeds very slow [SOLVED]

mechanical drives top out around 65MB/s for sequential reads, and much lower if the files are spread out, which looks like the limiting factor for the higher speed transfer

7.1MB/s is REALLY low though... are you reading from an external drive perhaps?

Offline

#5 2010-12-11 20:23:07

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: box-to-box LAN speeds very slow [SOLVED]

Nope... SATA2 7200 RPM drive.  Odd that it's only one way.  That's what has me puzzled.

EDIT: I took the HDDs out of the loop and write a 1.5 gig file into /dev/shm and transfered to to /dev/shm on the other box.  Same results!

dd if=/dev/zero of=tempfile bs=1M count=1500 conv=fdatasync,notrunc

EDIT2: Damn.  I got confused and was looking at an htop report on the more powerful machine.  Indeed, the 2nd machine IS getting maxed out one one core when I transfer the file either by samba or scp!  Is there a multithreaded samba or scp?  What is a less CPU intensive way to move files?  nfs?

Last edited by graysky (2010-12-11 20:29:45)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2010-12-11 20:37:39

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: box-to-box LAN speeds very slow [SOLVED]

Certainly, but NFS should be slightly more performant than Samba. Scp is encrypted traffic, so it's only natural it taxes your CPU more.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#7 2010-12-12 10:51:14

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: box-to-box LAN speeds very slow [SOLVED]

Wow, nfsv4 is nothing short of amazing.  25 % CPU load and 80 MB/s.

48428910.jpg


For those finding this thread in the future, see the nfsv4 wiki: https://wiki.archlinux.org/index.php/NFSv4

On server:

# pacman -S nfs-utils

added the following to /etc/exports

/nfs4exports    192.168.0.0/24(ro,fsid=0,no_subtree_check,async,insecure,anonuid=1000,anongid=100)
/nfs4exports/datas    192.168.0.0/24(rw,no_subtree_check,async,nohide,insecure,anonuid=1000,anongid=100)

added the following to /etc/fstab

/media/data    /nfs4exports/datas    none    rw,bind    0    0

added the following to my daemons array:

nfs-common nfs-server

On the client:

modprobe nfs
/etc/rc.d/nfs-common start
mount -t nfs4 hostname_of_server:/datas /path/to/mountpoint

EDIT: fixed typo
s/nfs./nfs-/

Last edited by graysky (2011-02-01 02:08:40)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#8 2010-12-12 16:09:07

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: box-to-box LAN speeds very slow [SOLVED]

For future reference, if it is a one time transfer and you want really fast speeds you should try netcat. It literally pipes data into a tcp connection on one end and dumps it on the other.


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#9 2011-01-31 10:47:54

Marcel-
Member
From: Utrecht, NL
Registered: 2006-12-03
Posts: 266

Re: box-to-box LAN speeds very slow [SOLVED]

graysky wrote:

added the following to my daemons array:

nfs-common nfs.server

FYI, it's nfs-server.

BTW, don't you have to start rpcbind first, as both the NFSv4 and NFS Wiki's say?

Offline

Board footer

Powered by FluxBB