6 - Congestion control & streaming Flashcards
Congestion Collapse
Increase in load -> Decrease in useful work
Cause of congestion collapse
- Spurious retransmission (solution is to have better timers and TCP congestion control)
- Undelivered packets (solution is to apply congestion control to all traffic)
Goals of Congestion Control
- User network resources efficiently
- Preserve fair allocation of resources
- Avoid congestion collapse
End-to-end (one approach to congestion control)
- No Feedback from network
- Congestion inferred by loss and delay
- Approach taken by TCP congestion control
Network-assisted (one approach to congestion control)
- Routers provide feedback
- > single bit
- > explicit rates
TCP Congestion Control
- Senders increase rate until packets are dropped
- TCP interprets packet loss as congestion and slows down.
- Congestion control has 2 parts:
- Increase algorithm - The sender must test the network to determine whether the network can sustain a higher sending rate
2. Decrease algorithm - the senders react to congestion to achieve optimal loss rates, delays in sending rates
- Increase algorithm - The sender must test the network to determine whether the network can sustain a higher sending rate
Window-based aka AIMD (Approach to adjusting rates)
A sender can only have a certain number of packets outstanding or in flight
Sender uses acks from the receiver to clock the retransmission of new data
If sender wants to increase rate, they must increase the window size
In TCP, every time a sender receives an acknowledgement, it increases the window size
Success: one packet increased window per round trip (“additive increase”)
Failure: window size reduced by half (“multiplicative decrease”)
common way of performing congestion control
Rate-based (Approach to adjusting rates)
- monitor loss rate
- uses timer to modulate
What does AIMD converge to?
Fairness and efficiency
Additive increase is applied
Increases efficiency
Multiplicative decrease is applied
Increases fairness
AIMD algorithm (TCP Congestion Control)
- Distributed, fair, efficient
- sawtooth behavior (rate vs time)
Data Center & TCP “Incast”
racks connected to switches
- High “fan-in”
- High bandwidth, low latency
- lots of parallel requests each with small amount of data
- small switch buffers
The throughput collapse that results from this phenomenon is called TCP Incast
Incast is a drastic reduction in application throughput that results when servers using TCP all simultaneously request data, leading to a gross underutilization of network capacity in many-to-one communication networks like a data center.
The filling up of the buffers here at the switches result in bursty retransmissions that overfill the switch buffers. These bursting retransmissions are caused by TCP timeouts
TCP timeouts can last hundreds of milliseconds.
Roundtrip time in a data center network is typically less than a millisecond, often microseconds.
Because the roundtrip times are so much less than TCP timeouts the centers will have to wait for the TCP timeout before they retransmit
An application throughput can be reduced as much as 90% as a result of link idle time
Barrier Synchronization & Idle Time
common request pattern
Whereby a client or an application might have many parallel threads and no forward progress can be made until all the responses for those threads are satisfied
The addition of more servers in the network induces an overflow of the switch buffer causing severe packet loss and inducing throughput collapse
Solution 1: Use fine grained TCP retransmission timers on the order of microseconds , rather than on the order of milliseconds , reducing the retransmission timeout for TCP, thus improves system throughput
Basic idea is that the timers need to operate on a granularity that’s close to the round-trip time of the network.
Solution 2: Have the client acknowledge every other packet rather than every packet, thus reducing the overall network load
Challenges for Media Streaming
- Large volume of data
- Data volume varies over time
- Low tolerance for delay variation
- Low tolerance for delay, period
(some loss is acceptable)
Video Compression
- Image compression -> spatial redundancy
- Compression across images -> temporal redundancy
Video compression uses a combo of static image compression on reference frames (or anchor frames or I frames) and derived frames (P)
MPEG