510 likes | 611 Views
How Fast Is the Internet -- Or – How Long Will It Take To Download That File?. John DeDourek July 7-8, 2003. Day 1 Schedule. How does the Internet work? Introductions Presentation Discussion Tour Network tools. Day 2 Schedule. How fast is the Internet? Presentation More tools
E N D
How Fast Is the Internet-- Or – How Long Will It Take To Download That File? John DeDourek July 7-8, 2003
Day 1 Schedule • How does the Internet work? • Introductions • Presentation • Discussion • Tour • Network tools
Day 2 Schedule • How fast is the Internet? • Presentation • More tools • Network measurements
Host Host Host A Network Medium
Multiple Access Network Host Host Host Host Host Two Types Of Network Point-to-point (full duplex)
Frames Network data is “packaged” in frames Data Header Trailer (e.g. 1500 bytes for Ethernet)
Host Host A more complex Ethernet Store and Forward Switch Store and Forward Switch
Definition Network: an interconnection of hosts such that any host can send a frame “directly” to any other host
Limitation • For various technical reasons, a network is restricted in various ways • Maximum number of hosts • Maximum length of “wire” • Maximum number of switches (etc.) between two hosts
The Internet Idea • Interconnect individual networks • Any host can send data to any other host, whether on the same network or another network, in the same way
Host Host Host Host Router Router Internet Network Network Network
IP Packet data header host packet net frame router packet Etc.
Queues out in Packets or frames
R R R H H H H H H S S S -> Shared <- Internet
UNB’s Campus Network • Mainly Ethernet at 100 Mbs over copper and 1,000 Mbs (1 Gbs) over fiber • Switches (various) and switches combined with routers (Nortel Passport 8600)
UNB’s External Connections • NB/PEI Educational Research Network (other institutions of higher learning in provinces) • Alliant (about 45 Mbs over ATM over fiber) • CANet4 (about 2.5 Gbs over WDM over fiber)
UNB’s “big” routers • For connections to outside networks • Juniper M20 routers
Tour • Steven Birch
Tools • Linux • Command window • netstat • netstat –i • netstat –rn • ping • traceroute
Miscellaneous “unix” tools • Shell and pipes (“|”) • awk • grep • head • tail • grep • Etc.
SoHow Fast Is the Internet-- Or – How Long Will It Take To Download That File? Day 2
What is the Speed of the Internet? • Internet data flows across: • Copper wire • Fiber • Wireless (radio) • Physics tells us that these all represent electromagnetic propagation
Einstein Says • The speed of light, hence the speed of electromagnetic propagation is a constant • C = 300 x 106 m/s • Hence the speed of the Internet is: • 300 x 106 m/s
Well Not Exactly! • “C” is the speed of propagation in “free space” • From [Peterson] • Copper: 2.3 x 108 m/s • Fiber: 2.0 x 108 m/s • Radio: 3.0 x 108 m/s • “Speed” of the Internet is between 2.0 x 108 and 3.0 x 108 m/s
A File to Download 62,728 bytes from Stanford University [pipe]
Another File to Download 14,554 bytes from Petosa, Inc., Seattle ??? [accordion]
How Long Will It Take To Download? • One bit! • Distance (driving distance [mapquest]) • Stanford: 5288 km • Seattle: 5342 km • Speed: 2 x 108 m/s • D / S = 26.4 x 10-3 s pipe organ • D / S = 26.7 x 10-3 s accordion
How Long Will It Take To Download n Bits? • Size: 62,728 bytes (pipe organ jpeg) • Time for n bits: 62,728 x 8 x 26.4 x 10-3 • 13,248 s • 3.7 hours! • Is this correct?
Width of a bit • Depends on communications technology • On 100 Mbps Ethernet: 2.3 m • Time to send one bit (length of a bit) • 2.3 m / ( 2.3 x 108 m/s ) = 1 x 10-8 s • Bits per second • 1 bit / (1 x 10-8 s) = 100 x 106 b/s
Propagation Delay and Transmission Delay To get all the bits on the wire: Number of bits / Transmission rate = Transmission delay To get the last bit to the other end Distance / speed = Propagation delay 62,728 x 8 / (100 x 106) + 5,288 x 103 / (2.3 x 108) = 5.0 x 10-3 + 23 x 10-3 = 28 x 10-3 s
Error Detection and Packets • Data divided into packets; each packet has a header with error detection information,etc. • Packet overhead (typical) • 1460 bytes of data • 66 bytes of header • Adds 66 / 1460 = 4.5 % overhead • Pipe organ jpeg: • 62,728 + 4.5 % x 62,728 = 65,551 bytes
Full Mesh Connections • My machine has a wire to every other machine on the Internet!!! • Consider diameter of conduit to run this many wires into my office!!!
Packet Switches • Switches (“layer 2”) and routers (“layer 3”) • Store and forward packets
Delay Through Store and Forward Networks • Delay through each link: • Transmission delay + Propagation delay • “Assume” • All links have the same transmission rate • All links have the same propagation speed • Delay = n x (PackSize / TRate) + TotDist / Speed • Number of links = n
Calculation • “traceroute” shows number of routers • For pipe organ jpeg: 15 routers • No way to know number of switches: • Guess: 14 • Number of links = 30 • Calculation: • 30 x (65,551 x 8 / 2.5 Gbs) + 5,288 km / (2 x 108 m) = 6.32 x 10-3 + 26.4 x 10-3 s = 32.7 x 10-3 s
Sharing Cost and Resources • I don’t want to pay for the whole Internet myself • The others who share the cost “insist” on using it to transmit their data too • Contention at switches and routers when packets arrive destined for the same outgoing link • Queuing delay introduced • TotalDelay = TransDelay + PropDelay + QueueDelay • Unable to predict queuing delay • Pipe organ typical measured RTT (Round TripTime) 90 ms • TransDelay = 6.32 ms PropDelay = 26.4 ms
Flow Of Data Internet Screen Disk Server Application Client Application Send Buffers Receive Buffers advertised window
Flow Control • Receive buffer size • In operating system • Value may be set by application • Default determined by operating system • Advertised window • In every acknowledgement sent from receiver to sender • Amount of buffer free • BufferSize – AmountStillFull • Application may not have read all data yet
Effect of Window On Transmission Time • Assume “long path” i.e. large delay across network (trans + prop + queue) • Sender transmits one “window full” of packets, then waits • Receiver receives a “window full” and acknowledges receipt and advertises full window • I.e., application is infinitely fast • Sender receives acknowledgements and sends another full window of data • Effect: one window per round trip time
Calculation • Typical maximum advertised window (my Windows machine) 8760 bytes • Number of “window fulls” for pipe organ • 62,728 bytes / 8760 bytes = 7 • Round trip time is 90 ms • Total download time is 7 x 90 = 360 ms • Effective transmission time • 62,728 bytes / 360 ms = 174 KBs = 1.4 Mbs
Congestion and Packet Loss • To much contention for a switch or router output port exhausts buffer queue • Called congestion • Switch or router discards packets • TCP attempts to avoid waste involved in transmitting packets which will be discarded • Each TCP connection reduces effective transmission rate until no congestion occurs (congestion avoidance) • Each connection gets a “fair share”
TCP Congestion Avoidance • Sender maintains a “congestion” window • Actual window used for transmission is minimum of window advertised by the receiver and the congestion window • Congestion window starts at “one packet” • When an acknowledgement is received, congestion window is increased • When a packet is lost (and retransmitted) congestion window is reduced • Net transmission rate is WinSize / RTT
Performance Suggestions • All links in a path must be considered • Provisioning by your ISP, and their ISPs, etc. are important • All system components must be considered • Disk, processor, display, etc. • The advertised window (under control of the receiver) is important
Research Areas • Performance of various TCP algorithms under actual Internet conditions • Congestion avoidance, selective ack, explicit congestion notification • Incorporation of wireless links at the network edge • Interaction of TCP traffic with UDP traffic • RTP for real time multimedia flow