LinuxQuestions.org
Review your favorite Linux distribution.
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 10-21-2011, 07:33 AM   #1
felix001
Member
 
Registered: Jan 2009
Posts: 101

Rep: Reputation: 15
TCP Throughput


Hi,

Ive been playing around and reading up on TCP throughput.
Theres a number of article on the web that refer to the following to calculate the maximum TCP throughput per flow.

RCV buffer size / RTT = Max TCP throughput = ? bps

The example I have is whilst downloading a file from speedtest.
Based on the example above I get a total of 5.68Mbps per tcp flow.

But when i perform a download of a file I get 11.23Mb/s.

Code:
[root@webserver1 ~]# echo "scale=2; `curl  --progress-bar -w "%{speed_download}" http://speedtest.wdc01.softlayer.com/downloads/test10.zip -o test.zip` / 131072" | bc | xargs -I {} echo {}Mb\/s
######################################################################## 100.0%
11.23Mb/s
I was thinking that it was opening multiple connections but I can see only 1 TCP socket open for this connection. Has anyone got any ideas ?

Thanks,
 
Old 10-24-2011, 10:26 AM   #2
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
Obviously the meaasured value is the correct one so the problem must be with your calculations. If you show us how you worked it out we could probably help you.

P.S. how did you find out what rxbuff size was? This may well be different dependant on all sorts of factors, type of app, method of accessing the network card driver, linux distro etc . I would be using iperf to investigate this sort of thing because you can set all of the transmission variables yourself and tinker with them one at a time.
 
Old 10-24-2011, 03:36 PM   #3
felix001
Member
 
Registered: Jan 2009
Posts: 101

Original Poster
Rep: Reputation: 15
I think you were right about the rx buffer size but the results still do not complete match,
Ive shown all the steps below used to calculate the total.....

Code:
[root@webserver1 ~]# ping -c 2 speedtest.wdc01.softlayer.com
PING speedtest.wdc01.softlayer.com (208.43.102.250) 56(84) bytes of data.
64 bytes from speedtest.wdc01.softlayer.com (208.43.102.250): icmp_seq=1 ttl=42 time=102 ms
64 bytes from speedtest.wdc01.softlayer.com (208.43.102.250): icmp_seq=2 ttl=42 time=102 ms

--- speedtest.wdc01.softlayer.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 102.134/102.161/102.188/0.027 ms
[root@webserver1 ~]# cat /proc/sys/net/core/rmem_max
129024
[root@webserver1 ~]#  speed=$(echo "(( 129024 * 8 ) / 0.102 ) / 1000000" | bc) ; echo "${speed}"Mbp\/s
10Mbp/s
Code:
[root@webserver1 ~]# echo "scale=2; `curl  --progress-bar -w "%{speed_download}" http://speedtest.wdc01.softlayer.com/downloads/test10.zip -o test.zip` / 131072" | bc | xargs -I {} echo {}Mb\/s
######################################################################## 100.0%
14.27Mb/s
Thanks for all your help....
 
Old 10-30-2011, 09:05 AM   #4
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
Its possible that your RTT as measured by ping is not entirely representative of the latency for TCP. For instance if the transfer is coming via a DMA transfer from HD controller to NIC card with all the relevant TCP offloading, RTT may be lower than for a ping which has to be dealt with by a busy processor, as an example.

If you wireshark the transfer you can get it to tell you what the average round-trip time for window/ack is which may be a bit lower than your ping response.
 
  


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
[SOLVED] i cant open UDP + TCP with our passthru cURL script, but TCP works just not both?? Good Question Linux - Networking 1 10-21-2011 11:57 AM
Select YeAH-TCP like default TCP congestion control algorithm simonbcn Linux - Networking 0 01-20-2011 10:34 AM
slow tcp on 100mbps wan, strange tcp window behaviour on ubuntu 9.10 cputoaster Linux - Networking 2 03-10-2010 12:43 AM
slow tcp wan, strange tcp window behaviour on ubuntu 9.10 cputoaster Linux - Networking 0 03-09-2010 04:39 AM
Linux change TCP kernel Parameter for TCP DELAY ACK TICKS linux_mando Linux - Networking 5 08-22-2006 08:20 AM

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

All times are GMT -5. The time now is 11:38 PM.

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