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
#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 - PowerPoint PPT Presentation
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
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
2
2004.5.6.
Last ClassTCP connection set upTCP connection tear-downSliding window revisited
This ClassTriggering transmission
3
Triggering Transmission
TCP has to decide when to tx
4
TCP Send Buffer
TCP
Sending Application
LastByteAcked LastByteSent
LastByteWritten
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
6
Silly Window Syndrome
When AdvertisedWindow < MSS if sender transmits aggressively
7
Silly WindowSender Receiver
ACK
opens win=10 ACK
opens win=1000
data=10
data=1000
ACK
data=10
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
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
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
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
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
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
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
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
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
17
FIFO
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
19
Fair Queueing
Main idea: maintain a separate queue per flow to isolate.
Round-robinService
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?
21
Time
Bit-round
1 2 3 4 5 6 7 8 9
Yellow should be served first!
F F F
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
23
sender receiver
At what rate to send?
How do you figure out the bottleneck bandwidth?
24
Sending rate increases linearly
TIMERTT RTTRTTRTT
1)()1( txtxAdditive increase
25
What about doubling each time?
TIMERTT RTTRTTRTT
Cwnd=1 Cwnd=2 Cwnd=4 Cwnd=8
)(2)1( txtx Multiplicative increase
26
When to stop increasing?
Finite world, finite beginningssthresh = set to an arbitrary large number (65KB)