26
1 #6 in Mid-Term Most answered: many users thru the same bottleneck -> increased queueing delay -> increased e2e latency Possible reasons behind much delay queueing delay on a bottleneck link retransmission delay due to packet losses server located far away; increased prop delay server located on a slow network; increased tx delay server overload How to detect a bottleneck? traceroute comparison with other downlaods assume a role of a network manager: more info available

1 #6 in Mid-Term Most answered: many users thru the same bottleneck -> increased queueing delay -> increased e2e latency Possible reasons behind

Embed Size (px)

Citation preview

Page 1: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

1

#6 in Mid-Term

Most answered: many users thru the same bottleneck -> increased queueing delay -> increased e2e latency

Possible reasons behind much delay queueing delay on a bottleneck link retransmission delay due to packet losses server located far away; increased prop delay server located on a slow network; increased tx delay server overload

How to detect a bottleneck? traceroute comparison with other downlaods assume a role of a network manager: more info available

Page 2: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

2

2004.5.6.

Last ClassTCP connection set upTCP connection tear-downSliding window revisited

This ClassTriggering transmission

Page 3: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

3

Triggering Transmission

TCP has to decide when to tx

Page 4: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

4

TCP Send Buffer

TCP

Sending Application

LastByteAcked LastByteSent

LastByteWritten

Page 5: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

5

Triggering Transmission

TCP has to decide when to txWhen it has more than MSSWhen it is told “PUSH”When a timer expires

* Without worrying about flow control

Page 6: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

6

Silly Window Syndrome

When AdvertisedWindow < MSS if sender transmits aggressively

Page 7: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

7

Silly WindowSender Receiver

ACK

opens win=10 ACK

opens win=1000

data=10

data=1000

ACK

data=10

Page 8: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

8

Silly Window Syndrome

When AdvertisedWindow < MSS if sender transmits aggressively

How to avoid it?not to introduce a small segment receiver waits till MSS space is available before advertizing a window open from zero

Page 9: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

9

Then what about Telnet?

What should we do when we have only a few bytes to send? use a clock-based timer or self-clocking

Nagle’s Algorithmif available data and window >= MSS

send a full segment

elseif unACKed data in flight

buffer new data till a new ACKelse

send all the new data now

Page 10: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

10

Adaptive Retransmission

RTT estimationEstRTT = a X EstRTT + (1-a) x SampleRTTTO = 2 x EstRTT

Karn/Patridge AlgorithmSampleRTT for those segments sent only once

Jacobson/Karels Algorithm Take the variance of SampleRTT into consideration

Diff = SampleRTT – EstRTTEstRTT = EstRTT + (b x Diff)Dev = Dev + b(|Diff|-Dev)TO = A x EstRTT + B x Dev

Page 11: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

11

TCP Header

0 3115 16

Destination Port NumberSource Port Number

Sequence Number

Urgent Pointer

Acknowledgement Number

HeaderLength Reserved Window Size

TCP Checksum

URG

ACK

PSH

RST

SYN

FIN

Page 12: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

12

TCP Extension

TCP 32-bit Sequence NumberAdd a 32-bit timestamp

TCP 16-bit Window SizeAdd a scaling factor

Timestampcourse timer granularity = 500msAdd a system clock to the data pkt

Page 13: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

13

Keeping the pipe full

Time until 32-bit number space wraps around1.5 Mbps – 6.4 hr100 Mbps – 13 min1.2 Gbps – 28 sec

Window size for 100 ms RTT1.5 Mbps – 18 KB100 Mbps – 1.2 MB1.2 Gbps – 14.8 MB

Page 14: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

14

Alternative Design Choices

TCP is not a panacea for all applications

Consider Explicit connection setup/tear-downByte-stream vs message-streamwindow-based vs rate-based

Page 15: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

15

Congestion Control

End-to-end approach in detecting congestionNo ack for some timeDuplicate acks

Network-assisted approachRouters provide explicit feedback IBM SNA, DEC DECnet, ATM ABR, TCP ECN

Page 16: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

16

Scheduling vs. Drop Policies

Schduling policydetermines the order in which packets are transmitted

FIFO, Priority Queueing, Fair Queueing Drop policy

determines which packets to dropTail drop (drop-tail), RED

Page 17: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

17

FIFO

Page 18: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

18

Priority Queueing

Main idea: mark each packet with a priority

Routers implement multiple FIFO queues Packets in a queue with the highest

priority are served first Problem?

Bad people mark their packets with a high priority

High-priority queue can starve out all other queues

Page 19: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

19

Fair Queueing

Main idea: maintain a separate queue per flow to isolate.

Round-robinService

Page 20: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

20

Calculate Fi =max(Fi-1 , Ai) + Pi and process packets with lowest Fi first Fi : expected finish time if done bit-by-bit

Ai: arrival time of packet i

Pi : # of bit-rounds for packet i

Currently served

Which packetshould finish first,

blue or yellow?

Page 21: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

21

Time

Bit-round

1 2 3 4 5 6 7 8 9

Yellow should be served first!

F F F

Page 22: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

22

FQ and WFQ

FQSources are not aware of FQ

WFQ It assigns different weights to queues It can assign queue not per flow, but per class

How do you assign fair weights? Both are work-conserving

Never idle when there is work to do

Page 23: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

23

sender receiver

At what rate to send?

How do you figure out the bottleneck bandwidth?

Page 24: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

24

Sending rate increases linearly

TIMERTT RTTRTTRTT

1)()1( txtxAdditive increase

Page 25: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

25

What about doubling each time?

TIMERTT RTTRTTRTT

Cwnd=1 Cwnd=2 Cwnd=4 Cwnd=8

)(2)1( txtx Multiplicative increase

Page 26: 1 #6 in Mid-Term  Most answered:  many users thru the same bottleneck -> increased queueing delay -> increased e2e latency  Possible reasons behind

26

When to stop increasing?

Finite world, finite beginningssthresh = set to an arbitrary large number (65KB)

Sender rate exceeds RcvWindowOnly transmit min(cwnd, RcvWindow)

Packets start to be dropped at the bottleneckSending rate exceeds bottleneck b/w

Another user shares the bottleneckContention for shared resource