20
Delay in Packet Switched Networks Required reading: Kurose § 1.4 CSE 3214, Winter 2016 Instructor: N. Vlajic 1

Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

  • Upload
    lekhue

  • View
    266

  • Download
    8

Embed Size (px)

Citation preview

Page 1: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

Delay in Packet Switched NetworksRequired reading:

Kurose § 1.4

CSE 3214, Winter 2016Instructor: N. Vlajic

1

Page 2: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

Network nodes

Message

Subscriber B

Subscriber A Message

Message

How do we characterize the performance of a network?!

2

Page 3: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

Delay in Packet-Switched Networks

Network Delay – average time for a block of data to go from an application onone system to corresponding application on another system• 4 types of delay contribute to overall delay:

Link/Network Performance Measures: throughput and delay

Link Throughput – capacity potentially available for an application –generally expressed in “bit per second” [bps]• effective capacity my be reduced by application multiplexing

and protocol overhead (header bits, acknowledgments, etc.)

ontransmissinpropagatioqueueingprocessingtotal ddddd +++=

effective throughput

3

Page 4: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

Delay in Packet-Switched Networks (cont.)

A

B nodal processing queueing

transmission

propagation

Processing Delay: time required to process a packet – to check for bit errors,to determine output links, etc.(a) at source prior to sending,(b) at any intermediate router, and (c) at destination prior to delivering to application• on the order of 10-6·seconds or less – often negligible

Queueing Delay: time spent waiting in a queue at any point along the route• depends on intensity and nature of traffic arriving at queue(s)• on the order of 10-6·seconds to 10-3·seconds

4

Page 5: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

Delay in Packet-Switched Networks (cont.)

Propagation Delay: time for one bit to propagate from source to destinationat propagation speed of the link• depends on physical medium of the link• on the order of 10-6·seconds• negligible for two routers on the same LAN; significant for

two geostationary satellites

[m/sec] s[m] d[sec] d npropagatio =

distance betweensource and

destination [m]

propagation speedof medium [m/s]

Transmission Delay: time to send out / absorb all of the packet bits• also known as “store-and-forward” delay• on the order of 10-6·seconds to 10-3·seconds• negligible for transmission rates ≥ 10 Mbps; significant

for large packets sent over low-speed links

[bps]R [bit] L[sec] d ontransmissi = packet size [bits]

link transmissionrate [bps]

5

Page 6: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

destination

How long does it take for the parcels/loadto arrive to the destination ?!

volume: v

distance: d

Step 1: load parcels tightly/loosely onto the track (transmission delay)

Step 2: drive truck to the destination (propagtion delay)

6

Page 7: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

http://www.ccs-labs.org/teaching/rn/animations/propagation/

7

Page 8: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

Delay in Packet-Switched Networks (cont.)

Example [ network delay – one packet, one hop ]Suppose that a user at one end of Canada sends a 1-Mbit file to a remote server on theother end over a data link operating at 64 kbps.Assume that we are using a fiber optic link with a propagation rate of the speed of light, approximately 3 · 108 m/sec, and that the distance is 4800 km.Ignore any processing or queueing delays.

What is the overall network delay, i.e. time to transmit the file?

ontransmissinpropagatiototal ddd +=

[sec] 15.625[bps] 1064

[bits] 10[bps] R[bits] Ld 3

6

ontransmissi =⋅

==

[sec] 0.016[m/sec] 103

[m] 104800[m/sec] s

[m] dd 8

3

npropagatio =⋅

⋅==

transmission delay >> propagation delayA high-speed channel would reduce the overall delay.

A B …

R=64 [kbps]

d=4800 [km]

8

Page 9: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

Delay in Packet-Switched Networks (cont.)

Example [ network delay – one packet, one hop ]For the same problem, now suppose that we have a 1-Gbps link.

What is the overall network delay, i.e. time to transmit the file, in this case?

ontransmissinpropagatiototal ddd +=

Propagation delay still the same:

[sec] 0.001[bps] 10[bits] 10

[bps] R[bits] Ld 9

6

ontransmissi ===

[sec] 0.017dtotal =

[sec] 0.016d npropagatio =

Increasing data rate beyond certain value on a long (e.g satellite) linkwill not noticeably speed up file delivery.

A B …

R=64 [kbps]

d=4800 [km]

9

Page 10: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

Example [ network delay – one packet, multiple hops ]

A message needs to be transmitted over a path that involves two intermediate switches. For simplicity assume that the propagation delay and the bit rate of the transmission linesare the same, and ignore any queueing delay.

What is the overall end-to-end message delay in case of datagram packet switching?

Draw corresponding diagrams.

Network nodes

Message

Subscriber B

Subscriber A Message

Message

dpropagation – time for 1st bit to transit from router A to router B

dtransmission – time for router B to absorb all packet bits

Router A Router B

Packet vs. Virtual Circuit Switching Delay 10

Page 11: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

(1) delay in case of datagram packet switching

t

t

t

t

overall delay

Source

Destination

dpropagation

Switch 1

Switch 2

dtransmission

dprocessing

1-hop delay

2 intermediate routers ⇒ 3 hops between source and destination

dtotal = 3*dpropagation + 3*dtransmission + 3*dprocessing

transmission begins(1st bit leaves source)

last bit leaves source

last bit reaches Switch 1

packetprocessed

Packet vs. Virtual Circuit Switching Delay (cont.)

Switch 1 cannot startprocessing packet

until it receives all bits

11

Page 12: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

Example [ network delay – multiple packets, multiple hops ]

Delay Comparison – Multiple Packets 12

Page 13: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

Example [ network delay – multiple packets, multiple hops ]Assume:

N = number of hops L = message length [bits]R = data rate [bps] P = packet size [bits] (payload + header)H = packet overheaddpropagation = propagation delay per hop [sec]

Compute end-to-end delay for datagram switching, assuming:N=4, L=3200, R=9600, P=1024, H=16, dpropagation=0.001.Ignore any queueing or processing delay.

message length

packet size

header

Network nodes

Message

Subscriber B

Subscriber A Message

Message

Message

Delay Comparison – Multiple Packets (cont.) 13

Page 14: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

d = D1 + D2 + D3 + D4, whereD1 = Time to transmit entire 1st packet over all hopsD2 = Time to transmit entire 2nd packetD3 = Time to transmit entire 3rd packetD4 = Time to transmit entire 4th packet

t

t

t

t

Delay

S

D

dpropagation R1

R2

dtransmission

R3

t

P1 P2 P3 P4

P1 P2 P3 P4

P1 P2 P3 P4

P1 P2 P3 P4

(2) delay in case of datagram packet switching

There are P – H = 1024 – 16 = 1008 data bits per packet.A message of 3200 bits require four packets: Np = 4.(3200 bits/1008 bits/packet = 3.17 packets which we round up to 4 packets.)

time to absorbthe rest of the

message

Delay Comparison – Multiple Packets (cont.)

R1

14

Page 15: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

Let:

T = transmission time for one packet = P/R

D1 = N*dpropagation + 4*T == 4*dpropagation + 4*P/R == 4 x 0.001 + 4*1024/9600 == 0.427

D2 = D3 = D4 = T == (P/R) == (1024/9600) == 0.107

d = 0.427 + 3*0.107 == 0.748 sec

Delay Comparison – Multiple Packets (cont.) 15

Page 16: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

Relationship between Packet Sizeand Transmission Time

– by breaking message into smallerpackets, nodes can begin transmitting1st packet as soon as it has arrived,without waiting for 2nd packet

• this overlap in packet transmissioncan result in considerably shorteroverall delay – smaller packet willsooner be received / absorbed atthe destination

• however, process of using more andsmaller packets eventually results inincreased rather than reduced delay,since each packet must contain aheader (more overhead)

• in contrast to transmission delay, pro-cessing and queueing delays always increase as # of packets increases

• packet-switched network designers must consider all factors whenattempting to find an optimum packetsize

Delay Comparison – Multiple Packets (cont.) 16

Page 17: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

Queueing Delay and Packet Loss

Queueing Delay – most complex component of network delay• unlike the other tree delays (dprocessing, dtransmission, dpropagation)

queueing delay can vary from packet to packet!

• example: 10 packets arrive at an empty queue at the sametime ⇒ 1st packet transmitted will suffer no queue. delay,last packet transmitted will suffer relatively large queueingdelay

• when characterizing queueing delay, one typically usesprobabilistic and statistical measures, such as: averagequeueing delay, average queue size, probability thatqueue exceeds some specific size, etc.

queue

Calculation of queueing delay (for known λ and w) discussed earlier!!!

17

Page 18: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

Queueing Delay and Packet Loss (cont.)

Traffic Intensity – plays critical role in estimating extent of queueing delay

L = packet size [bits/packet]a = average packet arrival rate [packet/sec]R = output transmission rate [bps]

• ρ = La/R ≈ 0: average queueing delay small

• ρ = La/R → 1: delay becomes large

• ρ = La/R > 1: average rate at which bits arrive exceeds the rate at which bits can be transmitted(a) infinite queue ⇒ qeueing delay → ∞

(b) finite queue ⇒ router drops packets

RLaintensity traffic =

La [bps] R[bps]

arrival bit rate - λ

akaserver utilization

departure bit rate - µ

(Router Utilization)

18

Page 19: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

http://www.ccs-labs.org/teaching/rn/animations/queue/index.htm

19

Page 20: Delay in Packet Switched Networks - eecs.yorku.ca€¦ · Delay in Packet-Switched Networks. Network Delay – average time for a block of data to go from an application on. one system

Queueing Delay and Packet Loss (cont.)

Example [ average queueing delay ]

Assume La/R=1 (average arrival bit rate = average departure bit rate).Determine the average queueing delay in the following two cases:(a) Packets arrive periodically – one packet of size L every L/R seconds.(b) Packets arrive in bursts, but periodically – N packet every (L/R)*N seconds.

(b) 1st packet: no queueing delay2nd packet: delay = L/R [sec]3rd packet: delay = 2*L/R [sec]…

Nth packet: delay = (N-1)*L/R [sec]

average delay = ???

(a) Every packet will arrive at an emptyqueue ⇒ no queueing delay.

Typically, arrivals do not follow any pattern and packets are spaced apart by random amount of time ⇒ La/R is not usually sufficient to fully characterize delay statistics !

20