![Page 1: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/1.jpg)
Congestion Manager
Nick FeamsterM.I.T. Laboratory for Computer Science
6.829 Computer NetworksOctober 24, 2001
![Page 2: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/2.jpg)
Outline
Motivation (problem CM solves?) Sharing info on concurrent flows Enable application adaptation CM Architecture The CM API (and tradeoffs) More about the CM Framwork... Implementation Limitations
![Page 3: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/3.jpg)
Motivation
End-systems supply much functionality Reliability In-order delivery Demultiplexing Message boundaries Connection abstraction Congestion control
Of these, congestion control is the only functionality required by all communications applications!
![Page 4: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/4.jpg)
Problem...
"Multimedia Transmissions Drive Net Toward Gridlock" Sara Robinson, NYT, 8/23/99
![Page 5: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/5.jpg)
Today’s End-System Architecture
TCP’s AIMD solves the problem, right?
Telephony
Today’s Internet
Yesterday’sProtocols
HTTP
Streaming
Interactive Games...
Doesn’t enable application adaptation Streaming (e.g., audio, video, etc.) Doesn’t handle concurrent flows e.g., WWW any application that would benefit from shared information
![Page 6: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/6.jpg)
Adaptation
Transport
Network
Link
Application
Little information is transferred across layers to
applications Increasing number of non-TCP applications
CM exports a simple adaptation API
![Page 7: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/7.jpg)
Concurrent Flows: Web of Troubles
Web browsers perform concurrent downloads Simultaneous dowloading for embedded images Proxies can multiplex requests Aggressive downloading => Higher Throughput But... Why slow start each connection? Loss information is not shared between flows More connections = More bandwidth! (fair?) Concurrent streams are competing, should be cooperating!
What can we do to ensure fair behavior and yet gain some of the benefits of concurrent downloads?
CM abstracts all congestion-related information into one place.
![Page 8: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/8.jpg)
The Big Picture
API
CM Protocol
RTSP Audio
TransportInstances
Manager
TCP1 TCP2 UDP
RTP Video
Congestion
HTTP FTP
Applications
IP
CM performs all congestion related tasks for macroflow. Applications adapt using the CM-exported API. Frees transport/app protocols from reimplementing CC.
![Page 9: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/9.jpg)
Questions
What to send? API When to send? Congestion controller Who should send? Scheduler What’s the network state? Application feedback/CM Probing OR...can avoid modifying receiver stack if applications provide
feedback.
![Page 10: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/10.jpg)
CM Architecture
CongestionController
Scheduler
Application Application
Hints Dispatch
Responder
DetectorCongestionProber
SENDER RECEIVER
![Page 11: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/11.jpg)
CM Architecture
feedback
API CallbacksData
Sender Receiver
Controller
CM
Congestion Scheduler
Flow Integration Per−Flow Scheduling
Separate congestion management from transport. Multiple applications and protocols can share congestion info. Separate congestion control and scheduling.
![Page 12: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/12.jpg)
Macroflows
All streams on a "macroflow" share congestion state What is a "macroflow"? Streams grouped by: Destination address? Address and port? End host application? Let the application group flows into macroflows that
share state Quickly detecting good macroflows...
![Page 13: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/13.jpg)
The CM API
State Management cm_open() -- returns stream ID cm_close() -- closes session cm_mtu() -- get path MTU for flow Data transmission options Buffered send Request/callback Rate callback Application Notification cm_update() -- get new rate cm_notify() -- tell CM about any losses Queries: cm_query()
![Page 14: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/14.jpg)
Different applications, different needs
Buffered Send Data-driven applications (send a single file and exit) Request/Callback TCP (retransmission decision) Asynchronous apps, last minute adaptation... Video streaming apps, last minute decisions, etc. Rate Callback Synchronous event-driven apps (rate-clocked)
Buffering reduces application control, limits the application to do "last minute adaptation"...
![Page 15: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/15.jpg)
Request/Callback API
− Request Transmission
Application
Socket
IP
TCP
CM
Application
Socket
IP
TCP − Retransmissions− Flow Control− Congestion Control
Standard TCP TCP/CM
− Calls cm_notify
− Connection Handling−Receive send callback− Update with losses
Application achieves TCP-like behavior,
but has control over what to send .
![Page 16: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/16.jpg)
Asynchronous Transmission for Everyone?
Request API works for asynchronous sources -- asyncronous() { wait for (event) { get_data(); send(); }
What about synchronous sources? (e.g., audio) do_every_10_ms () { get_data(); send(); }
![Page 17: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/17.jpg)
Synchronous Transmission
Asynchronous callbacks are not appropriate for
applications that must transmit at a constant rate (e.g., audio servers)
A more appropriate API: Register info on RTT, rate thresholds cmapp_update(newrate, new_rtt, new_rttdev) Application adjusts sending interval, packet size, etc.
![Page 18: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/18.jpg)
Congestion Controller
Obtains feedback about past transmissions Adjusts the aggregate transmission rate between sender
and receiver Decides when a macroflow should send Modular: Congestion control algorithms on
per-macroflow basis
![Page 19: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/19.jpg)
Example: Layered Video
MPEG Server
loss rates/RTTs
RTP/RTCP
MPEG Client
RTP/RTCP
callbacks
CM
data loss/RTT/requests data loss/RTT/requests
RTSP
Internet
SR−RTP
Track loss rates and RTT using RTP/RTCP, report to CM Callbacks from CM control sending rates
![Page 20: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/20.jpg)
Congestion Control Layered Video
Goal: Smooth transmission rate => constant quality video
![Page 21: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/21.jpg)
Scheduler
Decides which flow on a macroflow should send Hints from application/receiver to prioritize flows Plug in other scheduling algorithms...
![Page 22: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/22.jpg)
Feedback
Required for stable end-to-end congestion control Probing Protocol optional, can use application feedback instead Application cm_update() no changes to receiver stack Frequency?
![Page 23: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/23.jpg)
Probing Protocol
Sender periodically sends out probes Receiver responds with Last received sequence number (i.e., this one) SN of last probe received Bytes in between Reordering...? Reverse window choices later. Lost probes...? Exponential aging Minimim RTT fpr half-life (why stable?)
![Page 24: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/24.jpg)
Application Feedback
10 2 3 4 5 6 7 8 90
10 2 3 4 5 6 7 8 9 10 2 3 4 5 6 7 8 91 2
0 13
V P RC Payload Type=RR Length
SSRC of packet sender (Receiver ID)
fraction lost cumulative number of lost packets
extended highest sequence number received
Timestamp Echo (LSR)
Processing Time (DLSR)
Window Size (kB) Padding
ADU Sequence Number
ADU Fragment Length (bytes)
ADU Offet (bytes)
SSRC_1 (SSRC of first source)
Interarrival Jitter
![Page 25: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/25.jpg)
CM Implementation
Stream requests, updatescmapp_send()cmapp_update()
cm_notify()
User−level libraryimplements API
CongestionController
Scheduler
libcm
TCP UDP−CC
IP
kernel API
Control socket for callbacksSystem calls (ioctl)
App
IP notifies CM about data transfer on output
![Page 26: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/26.jpg)
Related Work: HTTP/TCP Interactions
Connection Establishment 3-Way Handshake, Timeouts (what’s the RTO?) "Stop and Reload" ...manual SYN retransmit Persistent Connections Good: Can avoid slow-start, 3-way handshake, etc. Bad: What’s the congestion window? Solutions: pacing, slowly decrease window, etc. Nagle’s Algorithm: limits number of small packets sent Good: Interactive apps (e.g., ssh) send fewer small packets. Bad: HTTP response delayed if not aligned on packet boundaries.
![Page 27: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/27.jpg)
Limitations?
Buggy/malicious applications Incorrect loss, RTT reports Application "hogging" bandwidth of macroflow Aging of congestion information Detriment of low feedback frequency Macroflow granularity Current research is addressing this... Multicast applications
![Page 28: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/28.jpg)
Conclusion
CongestionController
Scheduler
Application Application
Hints Dispatch
Responder
DetectorCongestionProber
SENDER RECEIVER
![Page 29: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/29.jpg)
Conclusion
The Congestion Manager Architecture: Separates transport protocol from congestion control algorithms Gives application control over what data to send Callback-based architecture allows last minute
adaptation by adaptation. Applications can benefit from sharing information about
congestion.
Buffering reduces application control, limits the application to do "last minute adaptation"...
![Page 30: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/30.jpg)
Congestion Controller
May want to use something besides TCP’s AIMD What applications may be harmed by high oscillations? CM allows separation of congestion control algorithms
from transport!
![Page 31: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/31.jpg)
Why Sockets?
What about other kernel to user communication: Signals Conflict with other applications Receiving a signal is expensive System Calls Requires threading support... Semaphores Most network apps use sockets instead (??)
![Page 32: Congestion Manager - MIT OpenCourseWare · Congestion Manager Nick Feamster M.I.T. Laboratory for Computer Science 6.829 Computer Networks October 24, 2001](https://reader033.vdocuments.net/reader033/viewer/2022042801/5ace0f337f8b9a875a8e8bef/html5/thumbnails/32.jpg)
Application-Specific Congestion Control
t
w(t) AIMD
SQRT
Applications can employ congestion control algorithms
that are more amenable to the task. ...and can experiment with different types of algorithms with relative ease.