LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-15-2011, 08:35 AM   #1
Quantumstate
Member
 
Registered: Jun 2005
Location: Seattle, Ecotopia
Distribution: CentOS 7.4 with KDE
Posts: 262

Rep: Reputation: 22
LAN Slow


I am doing backups and restores to and from a backup server machine in the garage (in case of fire or theft) using rsync, and the LAN is running much slower than I think it should.

Best consistent speed I get is 40Mb/s. The lights on the interface cards indicate it's in Gb mode, and the interfaces are fairly new. The router is a Netgear WNDR3700 the top-of-the-line consumer-grade router.

Hardwire only, using Ubiquiti ToughCable and ToughConnectors, less than a 50' run.

What can I look for?

Last edited by Quantumstate; 05-15-2011 at 08:37 AM.
 
Old 05-15-2011, 08:48 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
That sounds about right. Unless you are running SSDs or a performance oriented RAID configuration on both sides of the connection, the bottleneck will likely be the hard drives. Rsync is doing a lot of seeking and occasional transfer (after the initial sync), which impacts the transfer rate considerably.

You can do some tuning. You don't mention using jumbo frames - setting the MTU on the interfaces to greater than 1500, if supported by your hardware. That can significantly improve long transfers.
 
0 members found this post helpful.
Old 05-15-2011, 08:57 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

macemoneta's reply sounds correct.

You could do a few test (expensive local read/writes) and monitor with the iostat command.

Example:
Code:
iostat -m 2 10
check 10 times, every 2 seconds and show in Mb's

Hope this helps.
 
Old 05-15-2011, 02:07 PM   #4
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
iperf is a good tool for testing LAN performance. It is cross platform and tests memory to memory data transfer via TCP or UDP. This takes storage speed out of the equation, allowing you to verify your LAN performance.
 
Old 05-15-2011, 05:08 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
Could test also with some other file transfer if you think the fault is rsync. Just get a big file of some kind and transfer it ftp maybe.
 
Old 05-15-2011, 06:38 PM   #6
Quantumstate
Member
 
Registered: Jun 2005
Location: Seattle, Ecotopia
Distribution: CentOS 7.4 with KDE
Posts: 262

Original Poster
Rep: Reputation: 22
iperf is not available in Debian, and unfortunately Sourceforge won't let me look at anything without being signed in. I tried the three usernames and password I've used for the past ten years and it refuses them all. I tried to register anew, and it said, "Oh snap! We can't process this request." So I give up on that.

I do notice though that the CPU on the backup server is running rsync at 100% on one core, and very little on the other. It appears that rsync is not multithreaded and this may be my problem. Any idea why, or what can be done about it?

Disks aren't too busy.
 
Old 05-16-2011, 12:50 PM   #7
CodeKrash
LQ Newbie
 
Registered: May 2011
Posts: 21

Rep: Reputation: 1
dont settle for 40MiB/Sec. a straight jump that wide should be able to hover around 80MiB/Sec. I have a Freenas box / good GB switch, and new motherboards at both ends and it flies!

unrelated: I have to disable/enable the nic on my client to get it "awake" and running healthy again. at least once a day this happens.

edit: ahci mode hard drives help drastically

I would take a hard look at the hard drive activity during big transfers, often the controller/hard drive is the primary bottleneck in this situation.

after you fix rsync so that it can handle 1GiB/Sec, move on to the other things I mentioned (and the FTP test mentioned earlier becassuse FTP has nearly no overhead like rsync)

Last edited by CodeKrash; 05-16-2011 at 12:57 PM.
 
Old 05-16-2011, 01:33 PM   #8
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
Quote:
Originally Posted by Quantumstate View Post
iperf is not available in Debian

Errrr, are you sure?

From http://www.debianhelp.co.uk/networktools1.htm -


Install iperf in debian

#apt-get install iperf
 
Old 05-16-2011, 06:32 PM   #9
Quantumstate
Member
 
Registered: Jun 2005
Location: Seattle, Ecotopia
Distribution: CentOS 7.4 with KDE
Posts: 262

Original Poster
Rep: Reputation: 22
CodeKrash, it appears that the CPU on my backup server is maxed on one core with rsync, if top isn't lying. Since rsync is not multi-thread that's the limiting factor. iotop shows on the backup server a read rate from 3 to 7 M/s, and on the destination an average write rate of 4.5 M/s. Both sides are WD Green 2TB drives capable of much more than this. I only see periodic flashes on both machines' drives. I'm pretty sure I'm CPU-bound on the source, one core.

Baldy I tried that before and it couldn't find iperf, even with apt-cache search, but I tried it just now and it installed. Ghosts, I guess.
 
Old 05-17-2011, 08:10 AM   #10
CodeKrash
LQ Newbie
 
Registered: May 2011
Posts: 21

Rep: Reputation: 1
Ouch!
you may have to add the repository for iperf to apt, I know that with yum this happens often to find some software.
I hope you don't settle for that magnitude of inefficiency.
 
Old 05-18-2011, 10:36 AM   #11
Quantumstate
Member
 
Registered: Jun 2005
Location: Seattle, Ecotopia
Distribution: CentOS 7.4 with KDE
Posts: 262

Original Poster
Rep: Reputation: 22
I was told on the rsync listserv that it's spending time doing file deltas and compression. Recommendation was to change --compress to --whole-file, and in fact that increased my speed from 4.5Mb/s to 18.5!

Much better. Still core-bound though. (not disk, or network)
 
Old 05-19-2011, 09:49 AM   #12
Quantumstate
Member
 
Registered: Jun 2005
Location: Seattle, Ecotopia
Distribution: CentOS 7.4 with KDE
Posts: 262

Original Poster
Rep: Reputation: 22
OK now that I've finished my restore, I've run iperf.
Droog --> Hex 937 Mbits/sec!
Merlin --> Hex 40.6 Mbits/sec (wifi)

So I'm getting amazing performance from the Gb connexion; I should because I used expensive Ubiquiti ToughCable and ToughConnectors for the 70' run to the garage where my backup server is. BTW, Ubiquity has some amazing products, especially the NanoBridge M2.

My wifi performance is not too good, considering that I run 5GHz only, 802.11n. It's a Netgear WNDR3700 router and the client card is the Intel 4595 built into my HP 8710w laptop.

Last edited by Quantumstate; 05-19-2011 at 09:51 AM.
 
Old 05-20-2011, 04:45 PM   #13
CodeKrash
LQ Newbie
 
Registered: May 2011
Posts: 21

Rep: Reputation: 1
glad to hear it. that's a pretty long run, sounds fun
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Wireless LAN slow danielph Linux - Wireless Networking 1 06-24-2006 07:59 AM
slow and unstable LAN ZaphyR Linux - Networking 4 08-16-2004 05:40 AM
Slow LAN with Debian muxman Linux - Networking 2 05-02-2004 11:14 PM
slow LAN connection ekoome Slackware 4 03-02-2004 07:23 AM
K7S5A mb - LAN seems slow araczek Linux - Networking 1 10-04-2002 11:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration