Wireless TCP Performance Issues

advertisement
Wireless TCP
Performance Issues
Issues, transport layer protocols
 Set up and maintain end-to-end connections
 Reliable end-to-end delivery of data
 Flow control
 Congestion control
 Udp?
Assume TCP for the rest of these slides
Tutorial: TCP 101
 The Transmission Control Protocol (TCP) is
the protocol that sends your data reliably
 Used for email, Web, ftp, telnet, p2p,…
 Makes sure that data is received correctly:
right data, right order, exactly once
 Detects and recovers from any problems
that occur at the IP network layer
 Mechanisms for reliable data transfer:
sequence numbers, acknowledgements,
timers, retransmissions, flow control...
TCP 101 (Cont’d)
 TCP is a connection-oriented protocol
SYN
SYN/ACK
GET URL
ACK
Web Client
Web Server
YOUR DATA HERE
FIN
ACK
FIN/ACK
TCP 101 (Cont’d)
 TCP slow-start and congestion avoidance
ACK
TCP 101 (Cont’d)
 TCP slow-start and congestion avoidance
ACK
TCP 101 (Cont’d)
 TCP slow-start and congestion avoidance
ACK
TCP 101 (Cont’d)
 This (exponential growth) “slow start”
process continues until either:
packet loss: after a brief recovery phase, you
enter a (linear growth) “congestion avoidance”
phase based on slow-start threshold found
 limit reached: slow-start threshold, or
maximum advertised receive window size
 all done: terminate connection and go home

CA: Additive Increase,
Multiplicative Decrease
 We have “additive increase” in the absence
of loss events
 After loss event, decrease congestion
window by half – “multiplicative decrease”

ssthresh = W/2
9
TCP Reno
Note how there is “Fast Recovery” after cutting Window in half
Window
Reached initial
ssthresh value;
switch to CA mode
Slow Start
Time
10
Detecting Packet Loss
 Assumption: loss
10
11
indicates congestion
 Option 1: time-out

Waiting for a time-out can
be long!
12
X
13
14
15
16
17
10
11
11
 Option 2: duplicate ACKs
 How many? At least 3.
11
11
Sender
Receiver
11
TCP Reno
Note how there is “Fast Recovery” after cutting Window in half
Window
Reached initial
ssthresh value;
switch to CA mode
Slow Start
Time
12
How do losses occur?
Congestion control assumes: due to congestion
 packets queue in router buffers
 if queue is full, arriving packets dropped (Drop-Tail)
packet being transmitted (delay)
A
B
packets queueing (delay)
free (available) buffers: arriving packets
dropped (loss) if no free buffers
How do losses occur?
In wireless (and mobile) environment ... We find
many other reasons …
A
Packet losses due to
- wireless characteristics (e.g., interference, bit errors, etc.)
- mobility (including handover issues)
Wireless, mobility: impact on higher layer protocols
 logically, impact
should be minimal …
best effort service model remains unchanged
 TCP and UDP can (and do) run over wireless, mobile
 … but performance-wise:
 packet loss/delay due to bit-errors (discarded packets,
delays for link-layer retransmissions), and handoff
 TCP interprets loss as congestion, will decrease
congestion window un-necessarily
 delay impairments for real-time traffic
 limited bandwidth of wireless links

Also, not all packet losses the
same …
 What happens when a packet loss occurs?
 Quiz Time...
Consider a 14-packet Web document
 For simplicity, consider only a single packet loss

17
SeqNum
Key: X Data Packet
+ Ack Packet
X
X
X
X
X
X
X
X
X
X
X
X
+
X
X
+
+
+
+
+
+
+
+
+
+
+
+
+
Time
18
?
SeqNum
Key: X Data Packet
+ Ack Packet
X
X
X
X
X
X
X
X
X
X
X
+
X
X
+
+
+
+
+
+
+
+
+
+
+
+
Time
19
SeqNum
Key: X Data Packet
+ Ack Packet
X
X
X
X
X
X
X
X
X
X
X
+
X
X
+
+
X
+
+
+
+
+
+
+
+
+
+
+
Time
20
SeqNum
Key: X Data Packet
+ Ack Packet
X
X
X
X
X
X
X
X
X
X
X
X
+
X
X
+
+
+
+
+
+
+
+
+
+
+
+
+
Time
21
Key: X Data Packet
+ Ack Packet
X
?
SeqNum
X
X
X
X
X
X
X
X
X
X
+
X
X
+
+
+
+
+
+
+
+
+
+
+
Time
22
Key: X Data Packet
+ Ack Packet
SeqNum
X
X
X
X
X
X
X
X
X
X
+
X
X
+
X
+ +
X
+
+
+
+
+
+
+
+
+
+
Time
23
SeqNum
Key: X Data Packet
+ Ack Packet
X
X
X
X
X
X
X
X
X
X
X
X
+
X
X
+
+
+
+
+
+
+
+
+
+
+
+
+
Time
24
SeqNum
Key: X Data Packet
+ Ack Packet
X
X
X
?
X
X
X
X
X
X
X
X
+
X
X
+
+
+
+
+
+
+
+
+
Time
25
SeqNum
Key: X Data Packet
+ Ack Packet
X
X
X
X
X
X
X
X
X
X
X
+
X
X
+
X
+ +++
+
+
+
+
+
+
+
+
Time
26
SeqNum
Key: X Data Packet
+ Ack Packet
X
X
X
X
X
X
X
X
X
X
X
X
+
X
X
+
+
+
+
+
+
+
+
+
+
+
+
+
Time
27
SeqNum
Key: X Data Packet
+ Ack Packet
?
X
+
X
+
Time
28
SeqNum
Key: X Data Packet
+ Ack Packet
X
X
X
X
X
X
+
+
+
+
+
X
X
X
+
+
+
+ +
X
Time
29
TCP 301 (Cont’d)
 Main observation:
 “Not all packet losses are created equal”
 Losses early in the transfer have a huge
adverse impact on the transfer latency
 Losses near the end of the transfer always
cost at least a retransmit timeout
 Losses in the middle may or may not hurt,
depending on congestion window size at the
time of the loss
30
TCP Reno
Note how there is “Fast Recovery” after cutting Window in half
Window
Reached initial
ssthresh value;
switch to CA mode
Slow Start
Time
32
Let’s reason about TCP throughput
 Wired: What’s the average throughout of
TCP as a function of window size and RTT?

Ignore slow start
 Let W be the window size when loss occurs.
 When window is W, throughput is W/RTT
 Just after loss, window drops to W/2,
throughput to W/2RTT.
 Average throughout: .75 W/RTT
 Loss rate proportional to 1/W2
33
TCP under lots of losses
 Throughput in terms of loss rate:
1.22  MSS
RTT L
 Wireless TCP versions or handling losses where
they occur …
34
Example #1
 Wireless TCP Performance Problems
Low capacity,
high error rate
Wireless
Access
Wired Internet
Hard to distinguish losses
here from losses here
High
capacity,
low
error
rate
Example #1 (Cont’d)
 Solution: “wireless-aware TCP” (I-TCP,
ProxyTCP, Snoop-TCP, split connections...)
Example trends and issues ...
 Middle boxes [e2e arguments, equation]
 Customized wireless TCP solutions
 Multi-path TCP
37
Example #2
 Wireless TCP Fairness Problems
D
DATA
ACK
Wireless
Bottleneck AP
Wired Internet
U
DATA
ACK
Loss of ACK = Loss of DATA
Example #3
 Multi-hop “ad hoc” networking
Kelly
Carey
Example #3 (Cont’d)
 Multi-hop “ad hoc” networking
Kelly
Carey
Example #3 (Cont’d)
 Multi-hop “ad hoc” networking
Kelly
Carey
Example #3 (Cont’d)
 Multi-hop “ad hoc” networking
Kelly
Carey
Example #3 (Cont’d)
 Multi-hop “ad hoc” networking
Kelly
Carey
Example #3 (Cont’d)
 Multi-hop “ad hoc” networking
Kelly
Carey
Example #3 (Cont’d)
 Multi-hop “ad hoc” networking
Kelly
Carey
Example #3 (Cont’d)
 Multi-hop “ad hoc” networking (e.g., TCP-F,
TCP-ELFN, etc.)
Kelly
Carey
Example #3 (Cont’d)
 Multi-hop “ad hoc” networking (e.g., TCP-F,
TCP-ELFN, etc.)
Kelly
Carey
Example #3 (Cont’d)
 Multi-hop “ad hoc” networking (e.g., TCP-F,
TCP-ELFN, etc.)
Kelly
Carey
Example #3 (Cont’d)
 Multi-hop “ad hoc” networking (e.g., TCP-F,
TCP-ELFN, etc.)
Kelly
Carey
Example #3 (Cont’d)
 Multi-hop “ad hoc” networking (e.g., TCP-F,
TCP-ELFN, etc.)
Kelly
Carey
TCP performance issues in adhoc networks
• Route failure
• TCP may lose a congestion window of packets
• Large RTT variation
• Degrades TCP throughput
• Route re-computations
• Incur extra delay
• Inflated re-transmission time-out
TCP performance issues in adhoc networks (cont’d)
• Network partition
• TCP may reset the connection if the
partition lasts for more than 100 sec.
• TCP enters slow-start phase after
cutting down its window size to 1
• Degrades TCP throughput
Summary of Wireless TCP
 TCP is the “four wheel drive” of TP’s
 Wireless is a newly emerging technology
with rapidly growing deployment popularity
 “TCP” and “Wireless” don’t fit together all
that well
 Making TCP smarter about wireless helps!
More slides
TCP performance issues in Ad-hoc networks
 Misinterpretation of packet loss
 E.g., packet loss/delay due to bit-errors (discarded packets,
delays for link-layer retransmissions), and handoff
 Frequent path breaks
 Network partitioning and remerging
 Path length effects
 Misinterpretation of congestion window
 Asymmetric link behavior
 Uni-directional paths
 Multi-path routing
 The use of sliding window
More interesting problems …
 Two interesting subproblems:
 Dynamic ad hoc routing: node movement can
disrupt the IP routing path at any time,
disrupting TCP connection; yet another way to
lose packets!!!; possible solution: Explicit Loss
Notification (ELN)? Handoff? Route prediction?

TCP flow control: the bursty nature of TCP
packet transmissions can create contention for
the shared wireless channel among forwarding
nodes; collisions between DATA and ACKs
possible solution: rate-based flow control? Burst
mode? Spatial reuse of channels?
Download