LinuxQuestions.org
Help answer threads with 0 replies.
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 12-22-2021, 11:24 AM   #1
joemon83
Member
 
Registered: Jan 2009
Posts: 71

Rep: Reputation: 11
bandwidth difference huge between iperf and scp


Hi,
I am performing network bandwidth benchmarking between 2 nodes in different locations.
iperf and scp shows huge difference in Bandwidth.

iperf3 -i 5 -w 64M -t 60 -p 443 -c remote_host

scp 100G_file.img remote_host:/tmp/

iperf showed bandwidth of around 9.32 Gbits/sec, which is approximately 1.165 GB/sec
scp showed speed of just approximately 100-140MBps

So that is like scp is 10 times slower than iperf.
Any idea why is that so ?

One reason I could think of is that scp need to write to harddisk on remote host, which can slow things. While iperf doesn't really write anything to disk.
But again, that shouldn't really make a difference of 10x.

Anyone who has experience on the same, please share your inputs.
 
Old 12-22-2021, 11:29 AM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
You are forgetting about the overhead from the encryption used in the connection with the scp, depending on the speed of the machines doing that, it could take considerable time.
 
Old 12-22-2021, 11:31 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,840

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
Quote:
Originally Posted by joemon83 View Post
One reason I could think of is that scp need to write to harddisk on remote host, which can slow things. While iperf doesn't really write anything to disk.
But again, that shouldn't really make a difference of 10x.
It looks like you have a fast network. A HDD will definitely slow down the data transfer. You can try to cp 100G on that host without network to check.
 
Old 12-23-2021, 06:02 AM   #4
joemon83
Member
 
Registered: Jan 2009
Posts: 71

Original Poster
Rep: Reputation: 11
Thanks guys. Looks like both the factors contributes to the delay i.e. encryption as well as slow disk (compared to network)

dd command shows disk speed significantly lower than network speed

dd if=/dev/zero of=100G.img bs=1024 count=102400000
102400000+0 records in
102400000+0 records out
104857600000 bytes (105 GB) copied, 330.768 s, 317 MB/s
 
Old 12-23-2021, 06:08 AM   #5
joemon83
Member
 
Registered: Jan 2009
Posts: 71

Original Poster
Rep: Reputation: 11
scp tranfer speed would have been restricted to 317 MB/sec by the disk and the scp encryption would have brought it down further.
 
  


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
scp : -l option (bandwidth limiting) doesn't work when scp-ing from a remote server to another remote server stoorky Linux - Server 10 03-05-2018 03:28 AM
What's the differences between Netperf and Iperf? RickCheung Linux - Networking 2 06-15-2016 01:59 PM
iperf throuput is different between tcp and udp Gil@LQ General 0 08-10-2013 06:31 PM

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

All times are GMT -5. The time now is 03:37 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