This site uses cookies to deliver our services and to show you relevant ads and presentations. By clicking on "Accept", you acknowledge that you have read and understand our Cookie Policy , Privacy Policy , and our Terms of Use.
X

Download Computer Networking Connection PowerPoint Presentation


Login   OR  Register
X


Iframe embed code :



Presentation url :

X

Description :

View and free download Computer Networking Connection powerpoint presentation which is uploaded by search an active user in belonging ppt presentation Computers & Web category.

Tags :

Computer Networking Connection

Home / Computers & Web / Computers & Web Presentations / Computer Networking Connection PowerPoint Presentation

Computer Networking Connection PowerPoint Presentation

Ppt Presentation Embed Code   Zoom Ppt Presentation

About This Presentation


Description : View and free download Computer Networking Connection powerpoint presentation which is uploaded by s... Read More

Tags : Computer Networking Connection

Published on : Feb 10, 2014
Views : 346 | Downloads : 0


Download Now

Share on Social Media

             

PowerPoint is the world's most popular presentation software; you can create professional Computer Networking Connection powerpoint presentation with this powerful software easly. And give your presentation on Computer Networking Connection in conference, a school lecture, a business proposal or in webinar.

Uploader spend their valuable time to create this Computer Networking Connection powerpoint presentation slides, to share their knowledgable content with the world. This ppt presentation uploaded by onlinesearch in their relavent Computers & Web category is available for free download and use according to your industries likefinance,marketing,education,health and many more.

SlidesFinder.com provides a platform for marketers, presenters and educationists along with being the preferred search engine for professional PowerPoint presentations on the Internet to upload your Computer Networking Connection ppt presentation slides to BUILD YOUR CROWD!!

User Presentation
Related Presentation
Free PowerPoint Templates
Slide 1 - CS 268: Computer Networking L-6 Router Congestion Control
Slide 2 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks
Slide 3 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP
Slide 4 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency
Slide 5 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop
Slide 6 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy
Slide 7 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events
Slide 8 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload
Slide 9 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting
Slide 10 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP
Slide 11 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space
Slide 12 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes
Slide 13 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem
Slide 14 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users
Slide 15 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users
Slide 16 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion
Slide 17 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop)
Slide 18 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet
Slide 19 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002
Slide 20 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three
Slide 21 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three 21 Packet Marking Marking probability based on queue length Pb = maxp(avgq - minth) / (maxth - minth) Just marking based on Pb can lead to clustered marking Could result in synchronization Better to bias Pb by history of unmarked packets Pa = Pb/(1 - count*Pb)
Slide 22 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three 21 Packet Marking Marking probability based on queue length Pb = maxp(avgq - minth) / (maxth - minth) Just marking based on Pb can lead to clustered marking Could result in synchronization Better to bias Pb by history of unmarked packets Pa = Pb/(1 - count*Pb) 22 Packet Marking maxp is reflective of typical loss rates Paper uses 0.02 0.1 is more realistic value If network needs marking of 20-30% then need to buy a better link! Gentle variant of RED (recommended) Vary drop rate from maxp to 1 as the avgq varies from maxth to 2* maxth More robust to setting of maxth and maxp
Slide 23 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three 21 Packet Marking Marking probability based on queue length Pb = maxp(avgq - minth) / (maxth - minth) Just marking based on Pb can lead to clustered marking Could result in synchronization Better to bias Pb by history of unmarked packets Pa = Pb/(1 - count*Pb) 22 Packet Marking maxp is reflective of typical loss rates Paper uses 0.02 0.1 is more realistic value If network needs marking of 20-30% then need to buy a better link! Gentle variant of RED (recommended) Vary drop rate from maxp to 1 as the avgq varies from maxth to 2* maxth More robust to setting of maxth and maxp 23 Extending RED for Flow Isolation Problem: what to do with non-cooperative flows? Fair queuing achieves isolation using per-flow state – expensive at backbone routers How can we isolate unresponsive flows without per-flow state? RED penalty box Monitor history for packet drops, identify flows that use disproportionate bandwidth Isolate and punish those flows
Slide 24 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three 21 Packet Marking Marking probability based on queue length Pb = maxp(avgq - minth) / (maxth - minth) Just marking based on Pb can lead to clustered marking Could result in synchronization Better to bias Pb by history of unmarked packets Pa = Pb/(1 - count*Pb) 22 Packet Marking maxp is reflective of typical loss rates Paper uses 0.02 0.1 is more realistic value If network needs marking of 20-30% then need to buy a better link! Gentle variant of RED (recommended) Vary drop rate from maxp to 1 as the avgq varies from maxth to 2* maxth More robust to setting of maxth and maxp 23 Extending RED for Flow Isolation Problem: what to do with non-cooperative flows? Fair queuing achieves isolation using per-flow state – expensive at backbone routers How can we isolate unresponsive flows without per-flow state? RED penalty box Monitor history for packet drops, identify flows that use disproportionate bandwidth Isolate and punish those flows 24 Overview Queuing Disciplines RED RED Alternatives XCP
Slide 25 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three 21 Packet Marking Marking probability based on queue length Pb = maxp(avgq - minth) / (maxth - minth) Just marking based on Pb can lead to clustered marking Could result in synchronization Better to bias Pb by history of unmarked packets Pa = Pb/(1 - count*Pb) 22 Packet Marking maxp is reflective of typical loss rates Paper uses 0.02 0.1 is more realistic value If network needs marking of 20-30% then need to buy a better link! Gentle variant of RED (recommended) Vary drop rate from maxp to 1 as the avgq varies from maxth to 2* maxth More robust to setting of maxth and maxp 23 Extending RED for Flow Isolation Problem: what to do with non-cooperative flows? Fair queuing achieves isolation using per-flow state – expensive at backbone routers How can we isolate unresponsive flows without per-flow state? RED penalty box Monitor history for packet drops, identify flows that use disproportionate bandwidth Isolate and punish those flows 24 Overview Queuing Disciplines RED RED Alternatives XCP 25 FRED Fair Random Early Drop (Sigcomm, 1997) Maintain per flow state only for active flows (ones having packets in the buffer) minq and maxq  min and max number of buffers a flow is allowed occupy avgcq = average buffers per flow Strike count of number of times flow has exceeded maxq
Slide 26 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three 21 Packet Marking Marking probability based on queue length Pb = maxp(avgq - minth) / (maxth - minth) Just marking based on Pb can lead to clustered marking Could result in synchronization Better to bias Pb by history of unmarked packets Pa = Pb/(1 - count*Pb) 22 Packet Marking maxp is reflective of typical loss rates Paper uses 0.02 0.1 is more realistic value If network needs marking of 20-30% then need to buy a better link! Gentle variant of RED (recommended) Vary drop rate from maxp to 1 as the avgq varies from maxth to 2* maxth More robust to setting of maxth and maxp 23 Extending RED for Flow Isolation Problem: what to do with non-cooperative flows? Fair queuing achieves isolation using per-flow state – expensive at backbone routers How can we isolate unresponsive flows without per-flow state? RED penalty box Monitor history for packet drops, identify flows that use disproportionate bandwidth Isolate and punish those flows 24 Overview Queuing Disciplines RED RED Alternatives XCP 25 FRED Fair Random Early Drop (Sigcomm, 1997) Maintain per flow state only for active flows (ones having packets in the buffer) minq and maxq  min and max number of buffers a flow is allowed occupy avgcq = average buffers per flow Strike count of number of times flow has exceeded maxq 26 FRED – Fragile Flows Flows that send little data and want to avoid loss minq is meant to protect these What should minq be? When large number of flows  2-4 packets Needed for TCP behavior When small number of flows  increase to avgcq
Slide 27 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three 21 Packet Marking Marking probability based on queue length Pb = maxp(avgq - minth) / (maxth - minth) Just marking based on Pb can lead to clustered marking Could result in synchronization Better to bias Pb by history of unmarked packets Pa = Pb/(1 - count*Pb) 22 Packet Marking maxp is reflective of typical loss rates Paper uses 0.02 0.1 is more realistic value If network needs marking of 20-30% then need to buy a better link! Gentle variant of RED (recommended) Vary drop rate from maxp to 1 as the avgq varies from maxth to 2* maxth More robust to setting of maxth and maxp 23 Extending RED for Flow Isolation Problem: what to do with non-cooperative flows? Fair queuing achieves isolation using per-flow state – expensive at backbone routers How can we isolate unresponsive flows without per-flow state? RED penalty box Monitor history for packet drops, identify flows that use disproportionate bandwidth Isolate and punish those flows 24 Overview Queuing Disciplines RED RED Alternatives XCP 25 FRED Fair Random Early Drop (Sigcomm, 1997) Maintain per flow state only for active flows (ones having packets in the buffer) minq and maxq  min and max number of buffers a flow is allowed occupy avgcq = average buffers per flow Strike count of number of times flow has exceeded maxq 26 FRED – Fragile Flows Flows that send little data and want to avoid loss minq is meant to protect these What should minq be? When large number of flows  2-4 packets Needed for TCP behavior When small number of flows  increase to avgcq 27 FRED Non-adaptive flows Flows with high strike count are not allowed more than avgcq buffers Allows adaptive flows to occasionally burst to maxq but repeated attempts incur penalty
Slide 28 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three 21 Packet Marking Marking probability based on queue length Pb = maxp(avgq - minth) / (maxth - minth) Just marking based on Pb can lead to clustered marking Could result in synchronization Better to bias Pb by history of unmarked packets Pa = Pb/(1 - count*Pb) 22 Packet Marking maxp is reflective of typical loss rates Paper uses 0.02 0.1 is more realistic value If network needs marking of 20-30% then need to buy a better link! Gentle variant of RED (recommended) Vary drop rate from maxp to 1 as the avgq varies from maxth to 2* maxth More robust to setting of maxth and maxp 23 Extending RED for Flow Isolation Problem: what to do with non-cooperative flows? Fair queuing achieves isolation using per-flow state – expensive at backbone routers How can we isolate unresponsive flows without per-flow state? RED penalty box Monitor history for packet drops, identify flows that use disproportionate bandwidth Isolate and punish those flows 24 Overview Queuing Disciplines RED RED Alternatives XCP 25 FRED Fair Random Early Drop (Sigcomm, 1997) Maintain per flow state only for active flows (ones having packets in the buffer) minq and maxq  min and max number of buffers a flow is allowed occupy avgcq = average buffers per flow Strike count of number of times flow has exceeded maxq 26 FRED – Fragile Flows Flows that send little data and want to avoid loss minq is meant to protect these What should minq be? When large number of flows  2-4 packets Needed for TCP behavior When small number of flows  increase to avgcq 27 FRED Non-adaptive flows Flows with high strike count are not allowed more than avgcq buffers Allows adaptive flows to occasionally burst to maxq but repeated attempts incur penalty 28 CHOKe CHOse and Keep/Kill (Infocom 2000) Existing schemes to penalize unresponsive flows (FRED/penalty box) introduce additional complexity Simple, stateless scheme During congested periods Compare new packet with random pkt in queue If from same flow, drop both If not, use RED to decide fate of new packet
Slide 29 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three 21 Packet Marking Marking probability based on queue length Pb = maxp(avgq - minth) / (maxth - minth) Just marking based on Pb can lead to clustered marking Could result in synchronization Better to bias Pb by history of unmarked packets Pa = Pb/(1 - count*Pb) 22 Packet Marking maxp is reflective of typical loss rates Paper uses 0.02 0.1 is more realistic value If network needs marking of 20-30% then need to buy a better link! Gentle variant of RED (recommended) Vary drop rate from maxp to 1 as the avgq varies from maxth to 2* maxth More robust to setting of maxth and maxp 23 Extending RED for Flow Isolation Problem: what to do with non-cooperative flows? Fair queuing achieves isolation using per-flow state – expensive at backbone routers How can we isolate unresponsive flows without per-flow state? RED penalty box Monitor history for packet drops, identify flows that use disproportionate bandwidth Isolate and punish those flows 24 Overview Queuing Disciplines RED RED Alternatives XCP 25 FRED Fair Random Early Drop (Sigcomm, 1997) Maintain per flow state only for active flows (ones having packets in the buffer) minq and maxq  min and max number of buffers a flow is allowed occupy avgcq = average buffers per flow Strike count of number of times flow has exceeded maxq 26 FRED – Fragile Flows Flows that send little data and want to avoid loss minq is meant to protect these What should minq be? When large number of flows  2-4 packets Needed for TCP behavior When small number of flows  increase to avgcq 27 FRED Non-adaptive flows Flows with high strike count are not allowed more than avgcq buffers Allows adaptive flows to occasionally burst to maxq but repeated attempts incur penalty 28 CHOKe CHOse and Keep/Kill (Infocom 2000) Existing schemes to penalize unresponsive flows (FRED/penalty box) introduce additional complexity Simple, stateless scheme During congested periods Compare new packet with random pkt in queue If from same flow, drop both If not, use RED to decide fate of new packet 29 CHOKe Can improve behavior by selecting more than one comparison packet Needed when more than one misbehaving flow Does not completely solve problem Aggressive flows are punished but not limited to fair share Not good for low degree of multiplexing  why?
Slide 30 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three 21 Packet Marking Marking probability based on queue length Pb = maxp(avgq - minth) / (maxth - minth) Just marking based on Pb can lead to clustered marking Could result in synchronization Better to bias Pb by history of unmarked packets Pa = Pb/(1 - count*Pb) 22 Packet Marking maxp is reflective of typical loss rates Paper uses 0.02 0.1 is more realistic value If network needs marking of 20-30% then need to buy a better link! Gentle variant of RED (recommended) Vary drop rate from maxp to 1 as the avgq varies from maxth to 2* maxth More robust to setting of maxth and maxp 23 Extending RED for Flow Isolation Problem: what to do with non-cooperative flows? Fair queuing achieves isolation using per-flow state – expensive at backbone routers How can we isolate unresponsive flows without per-flow state? RED penalty box Monitor history for packet drops, identify flows that use disproportionate bandwidth Isolate and punish those flows 24 Overview Queuing Disciplines RED RED Alternatives XCP 25 FRED Fair Random Early Drop (Sigcomm, 1997) Maintain per flow state only for active flows (ones having packets in the buffer) minq and maxq  min and max number of buffers a flow is allowed occupy avgcq = average buffers per flow Strike count of number of times flow has exceeded maxq 26 FRED – Fragile Flows Flows that send little data and want to avoid loss minq is meant to protect these What should minq be? When large number of flows  2-4 packets Needed for TCP behavior When small number of flows  increase to avgcq 27 FRED Non-adaptive flows Flows with high strike count are not allowed more than avgcq buffers Allows adaptive flows to occasionally burst to maxq but repeated attempts incur penalty 28 CHOKe CHOse and Keep/Kill (Infocom 2000) Existing schemes to penalize unresponsive flows (FRED/penalty box) introduce additional complexity Simple, stateless scheme During congested periods Compare new packet with random pkt in queue If from same flow, drop both If not, use RED to decide fate of new packet 29 CHOKe Can improve behavior by selecting more than one comparison packet Needed when more than one misbehaving flow Does not completely solve problem Aggressive flows are punished but not limited to fair share Not good for low degree of multiplexing  why? 30 Stochastic Fair Blue Same objective as RED Penalty Box Identify and penalize misbehaving flows Create L hashes with N bins each Each bin keeps track of separate marking rate (pm) Rate is updated using standard technique and a bin size Flow uses minimum pm of all L bins it belongs to Non-misbehaving flows hopefully belong to at least one bin without a bad flow Large numbers of bad flows may cause false positives
Slide 31 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three 21 Packet Marking Marking probability based on queue length Pb = maxp(avgq - minth) / (maxth - minth) Just marking based on Pb can lead to clustered marking Could result in synchronization Better to bias Pb by history of unmarked packets Pa = Pb/(1 - count*Pb) 22 Packet Marking maxp is reflective of typical loss rates Paper uses 0.02 0.1 is more realistic value If network needs marking of 20-30% then need to buy a better link! Gentle variant of RED (recommended) Vary drop rate from maxp to 1 as the avgq varies from maxth to 2* maxth More robust to setting of maxth and maxp 23 Extending RED for Flow Isolation Problem: what to do with non-cooperative flows? Fair queuing achieves isolation using per-flow state – expensive at backbone routers How can we isolate unresponsive flows without per-flow state? RED penalty box Monitor history for packet drops, identify flows that use disproportionate bandwidth Isolate and punish those flows 24 Overview Queuing Disciplines RED RED Alternatives XCP 25 FRED Fair Random Early Drop (Sigcomm, 1997) Maintain per flow state only for active flows (ones having packets in the buffer) minq and maxq  min and max number of buffers a flow is allowed occupy avgcq = average buffers per flow Strike count of number of times flow has exceeded maxq 26 FRED – Fragile Flows Flows that send little data and want to avoid loss minq is meant to protect these What should minq be? When large number of flows  2-4 packets Needed for TCP behavior When small number of flows  increase to avgcq 27 FRED Non-adaptive flows Flows with high strike count are not allowed more than avgcq buffers Allows adaptive flows to occasionally burst to maxq but repeated attempts incur penalty 28 CHOKe CHOse and Keep/Kill (Infocom 2000) Existing schemes to penalize unresponsive flows (FRED/penalty box) introduce additional complexity Simple, stateless scheme During congested periods Compare new packet with random pkt in queue If from same flow, drop both If not, use RED to decide fate of new packet 29 CHOKe Can improve behavior by selecting more than one comparison packet Needed when more than one misbehaving flow Does not completely solve problem Aggressive flows are punished but not limited to fair share Not good for low degree of multiplexing  why? 30 Stochastic Fair Blue Same objective as RED Penalty Box Identify and penalize misbehaving flows Create L hashes with N bins each Each bin keeps track of separate marking rate (pm) Rate is updated using standard technique and a bin size Flow uses minimum pm of all L bins it belongs to Non-misbehaving flows hopefully belong to at least one bin without a bad flow Large numbers of bad flows may cause false positives 31 Stochastic Fair Blue False positives can continuously penalize same flow Solution: moving hash function over time Bad flow no longer shares bin with same flows Is history reset does bad flow get to make trouble until detected again? No, can perform hash warmup in background
Slide 32 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three 21 Packet Marking Marking probability based on queue length Pb = maxp(avgq - minth) / (maxth - minth) Just marking based on Pb can lead to clustered marking Could result in synchronization Better to bias Pb by history of unmarked packets Pa = Pb/(1 - count*Pb) 22 Packet Marking maxp is reflective of typical loss rates Paper uses 0.02 0.1 is more realistic value If network needs marking of 20-30% then need to buy a better link! Gentle variant of RED (recommended) Vary drop rate from maxp to 1 as the avgq varies from maxth to 2* maxth More robust to setting of maxth and maxp 23 Extending RED for Flow Isolation Problem: what to do with non-cooperative flows? Fair queuing achieves isolation using per-flow state – expensive at backbone routers How can we isolate unresponsive flows without per-flow state? RED penalty box Monitor history for packet drops, identify flows that use disproportionate bandwidth Isolate and punish those flows 24 Overview Queuing Disciplines RED RED Alternatives XCP 25 FRED Fair Random Early Drop (Sigcomm, 1997) Maintain per flow state only for active flows (ones having packets in the buffer) minq and maxq  min and max number of buffers a flow is allowed occupy avgcq = average buffers per flow Strike count of number of times flow has exceeded maxq 26 FRED – Fragile Flows Flows that send little data and want to avoid loss minq is meant to protect these What should minq be? When large number of flows  2-4 packets Needed for TCP behavior When small number of flows  increase to avgcq 27 FRED Non-adaptive flows Flows with high strike count are not allowed more than avgcq buffers Allows adaptive flows to occasionally burst to maxq but repeated attempts incur penalty 28 CHOKe CHOse and Keep/Kill (Infocom 2000) Existing schemes to penalize unresponsive flows (FRED/penalty box) introduce additional complexity Simple, stateless scheme During congested periods Compare new packet with random pkt in queue If from same flow, drop both If not, use RED to decide fate of new packet 29 CHOKe Can improve behavior by selecting more than one comparison packet Needed when more than one misbehaving flow Does not completely solve problem Aggressive flows are punished but not limited to fair share Not good for low degree of multiplexing  why? 30 Stochastic Fair Blue Same objective as RED Penalty Box Identify and penalize misbehaving flows Create L hashes with N bins each Each bin keeps track of separate marking rate (pm) Rate is updated using standard technique and a bin size Flow uses minimum pm of all L bins it belongs to Non-misbehaving flows hopefully belong to at least one bin without a bad flow Large numbers of bad flows may cause false positives 31 Stochastic Fair Blue False positives can continuously penalize same flow Solution: moving hash function over time Bad flow no longer shares bin with same flows Is history reset does bad flow get to make trouble until detected again? No, can perform hash warmup in background 32 Overview Queuing Disciplines RED RED Alternatives XCP
Slide 33 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three 21 Packet Marking Marking probability based on queue length Pb = maxp(avgq - minth) / (maxth - minth) Just marking based on Pb can lead to clustered marking Could result in synchronization Better to bias Pb by history of unmarked packets Pa = Pb/(1 - count*Pb) 22 Packet Marking maxp is reflective of typical loss rates Paper uses 0.02 0.1 is more realistic value If network needs marking of 20-30% then need to buy a better link! Gentle variant of RED (recommended) Vary drop rate from maxp to 1 as the avgq varies from maxth to 2* maxth More robust to setting of maxth and maxp 23 Extending RED for Flow Isolation Problem: what to do with non-cooperative flows? Fair queuing achieves isolation using per-flow state – expensive at backbone routers How can we isolate unresponsive flows without per-flow state? RED penalty box Monitor history for packet drops, identify flows that use disproportionate bandwidth Isolate and punish those flows 24 Overview Queuing Disciplines RED RED Alternatives XCP 25 FRED Fair Random Early Drop (Sigcomm, 1997) Maintain per flow state only for active flows (ones having packets in the buffer) minq and maxq  min and max number of buffers a flow is allowed occupy avgcq = average buffers per flow Strike count of number of times flow has exceeded maxq 26 FRED – Fragile Flows Flows that send little data and want to avoid loss minq is meant to protect these What should minq be? When large number of flows  2-4 packets Needed for TCP behavior When small number of flows  increase to avgcq 27 FRED Non-adaptive flows Flows with high strike count are not allowed more than avgcq buffers Allows adaptive flows to occasionally burst to maxq but repeated attempts incur penalty 28 CHOKe CHOse and Keep/Kill (Infocom 2000) Existing schemes to penalize unresponsive flows (FRED/penalty box) introduce additional complexity Simple, stateless scheme During congested periods Compare new packet with random pkt in queue If from same flow, drop both If not, use RED to decide fate of new packet 29 CHOKe Can improve behavior by selecting more than one comparison packet Needed when more than one misbehaving flow Does not completely solve problem Aggressive flows are punished but not limited to fair share Not good for low degree of multiplexing  why? 30 Stochastic Fair Blue Same objective as RED Penalty Box Identify and penalize misbehaving flows Create L hashes with N bins each Each bin keeps track of separate marking rate (pm) Rate is updated using standard technique and a bin size Flow uses minimum pm of all L bins it belongs to Non-misbehaving flows hopefully belong to at least one bin without a bad flow Large numbers of bad flows may cause false positives 31 Stochastic Fair Blue False positives can continuously penalize same flow Solution: moving hash function over time Bad flow no longer shares bin with same flows Is history reset does bad flow get to make trouble until detected again? No, can perform hash warmup in background 32 Overview Queuing Disciplines RED RED Alternatives XCP 33 How does XCP Work? Feedback = + 0.1 packet
Slide 34 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three 21 Packet Marking Marking probability based on queue length Pb = maxp(avgq - minth) / (maxth - minth) Just marking based on Pb can lead to clustered marking Could result in synchronization Better to bias Pb by history of unmarked packets Pa = Pb/(1 - count*Pb) 22 Packet Marking maxp is reflective of typical loss rates Paper uses 0.02 0.1 is more realistic value If network needs marking of 20-30% then need to buy a better link! Gentle variant of RED (recommended) Vary drop rate from maxp to 1 as the avgq varies from maxth to 2* maxth More robust to setting of maxth and maxp 23 Extending RED for Flow Isolation Problem: what to do with non-cooperative flows? Fair queuing achieves isolation using per-flow state – expensive at backbone routers How can we isolate unresponsive flows without per-flow state? RED penalty box Monitor history for packet drops, identify flows that use disproportionate bandwidth Isolate and punish those flows 24 Overview Queuing Disciplines RED RED Alternatives XCP 25 FRED Fair Random Early Drop (Sigcomm, 1997) Maintain per flow state only for active flows (ones having packets in the buffer) minq and maxq  min and max number of buffers a flow is allowed occupy avgcq = average buffers per flow Strike count of number of times flow has exceeded maxq 26 FRED – Fragile Flows Flows that send little data and want to avoid loss minq is meant to protect these What should minq be? When large number of flows  2-4 packets Needed for TCP behavior When small number of flows  increase to avgcq 27 FRED Non-adaptive flows Flows with high strike count are not allowed more than avgcq buffers Allows adaptive flows to occasionally burst to maxq but repeated attempts incur penalty 28 CHOKe CHOse and Keep/Kill (Infocom 2000) Existing schemes to penalize unresponsive flows (FRED/penalty box) introduce additional complexity Simple, stateless scheme During congested periods Compare new packet with random pkt in queue If from same flow, drop both If not, use RED to decide fate of new packet 29 CHOKe Can improve behavior by selecting more than one comparison packet Needed when more than one misbehaving flow Does not completely solve problem Aggressive flows are punished but not limited to fair share Not good for low degree of multiplexing  why? 30 Stochastic Fair Blue Same objective as RED Penalty Box Identify and penalize misbehaving flows Create L hashes with N bins each Each bin keeps track of separate marking rate (pm) Rate is updated using standard technique and a bin size Flow uses minimum pm of all L bins it belongs to Non-misbehaving flows hopefully belong to at least one bin without a bad flow Large numbers of bad flows may cause false positives 31 Stochastic Fair Blue False positives can continuously penalize same flow Solution: moving hash function over time Bad flow no longer shares bin with same flows Is history reset does bad flow get to make trouble until detected again? No, can perform hash warmup in background 32 Overview Queuing Disciplines RED RED Alternatives XCP 33 How does XCP Work? Feedback = + 0.1 packet 34 Feedback = - 0.3 packet How does XCP Work?
Slide 35 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three 21 Packet Marking Marking probability based on queue length Pb = maxp(avgq - minth) / (maxth - minth) Just marking based on Pb can lead to clustered marking Could result in synchronization Better to bias Pb by history of unmarked packets Pa = Pb/(1 - count*Pb) 22 Packet Marking maxp is reflective of typical loss rates Paper uses 0.02 0.1 is more realistic value If network needs marking of 20-30% then need to buy a better link! Gentle variant of RED (recommended) Vary drop rate from maxp to 1 as the avgq varies from maxth to 2* maxth More robust to setting of maxth and maxp 23 Extending RED for Flow Isolation Problem: what to do with non-cooperative flows? Fair queuing achieves isolation using per-flow state – expensive at backbone routers How can we isolate unresponsive flows without per-flow state? RED penalty box Monitor history for packet drops, identify flows that use disproportionate bandwidth Isolate and punish those flows 24 Overview Queuing Disciplines RED RED Alternatives XCP 25 FRED Fair Random Early Drop (Sigcomm, 1997) Maintain per flow state only for active flows (ones having packets in the buffer) minq and maxq  min and max number of buffers a flow is allowed occupy avgcq = average buffers per flow Strike count of number of times flow has exceeded maxq 26 FRED – Fragile Flows Flows that send little data and want to avoid loss minq is meant to protect these What should minq be? When large number of flows  2-4 packets Needed for TCP behavior When small number of flows  increase to avgcq 27 FRED Non-adaptive flows Flows with high strike count are not allowed more than avgcq buffers Allows adaptive flows to occasionally burst to maxq but repeated attempts incur penalty 28 CHOKe CHOse and Keep/Kill (Infocom 2000) Existing schemes to penalize unresponsive flows (FRED/penalty box) introduce additional complexity Simple, stateless scheme During congested periods Compare new packet with random pkt in queue If from same flow, drop both If not, use RED to decide fate of new packet 29 CHOKe Can improve behavior by selecting more than one comparison packet Needed when more than one misbehaving flow Does not completely solve problem Aggressive flows are punished but not limited to fair share Not good for low degree of multiplexing  why? 30 Stochastic Fair Blue Same objective as RED Penalty Box Identify and penalize misbehaving flows Create L hashes with N bins each Each bin keeps track of separate marking rate (pm) Rate is updated using standard technique and a bin size Flow uses minimum pm of all L bins it belongs to Non-misbehaving flows hopefully belong to at least one bin without a bad flow Large numbers of bad flows may cause false positives 31 Stochastic Fair Blue False positives can continuously penalize same flow Solution: moving hash function over time Bad flow no longer shares bin with same flows Is history reset does bad flow get to make trouble until detected again? No, can perform hash warmup in background 32 Overview Queuing Disciplines RED RED Alternatives XCP 33 How does XCP Work? Feedback = + 0.1 packet 34 Feedback = - 0.3 packet How does XCP Work? 35 Congestion Window = Congestion Window + Feedback Routers compute feedback without any per-flow state How does XCP Work? XCP extends ECN and CSFQ
Slide 36 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three 21 Packet Marking Marking probability based on queue length Pb = maxp(avgq - minth) / (maxth - minth) Just marking based on Pb can lead to clustered marking Could result in synchronization Better to bias Pb by history of unmarked packets Pa = Pb/(1 - count*Pb) 22 Packet Marking maxp is reflective of typical loss rates Paper uses 0.02 0.1 is more realistic value If network needs marking of 20-30% then need to buy a better link! Gentle variant of RED (recommended) Vary drop rate from maxp to 1 as the avgq varies from maxth to 2* maxth More robust to setting of maxth and maxp 23 Extending RED for Flow Isolation Problem: what to do with non-cooperative flows? Fair queuing achieves isolation using per-flow state – expensive at backbone routers How can we isolate unresponsive flows without per-flow state? RED penalty box Monitor history for packet drops, identify flows that use disproportionate bandwidth Isolate and punish those flows 24 Overview Queuing Disciplines RED RED Alternatives XCP 25 FRED Fair Random Early Drop (Sigcomm, 1997) Maintain per flow state only for active flows (ones having packets in the buffer) minq and maxq  min and max number of buffers a flow is allowed occupy avgcq = average buffers per flow Strike count of number of times flow has exceeded maxq 26 FRED – Fragile Flows Flows that send little data and want to avoid loss minq is meant to protect these What should minq be? When large number of flows  2-4 packets Needed for TCP behavior When small number of flows  increase to avgcq 27 FRED Non-adaptive flows Flows with high strike count are not allowed more than avgcq buffers Allows adaptive flows to occasionally burst to maxq but repeated attempts incur penalty 28 CHOKe CHOse and Keep/Kill (Infocom 2000) Existing schemes to penalize unresponsive flows (FRED/penalty box) introduce additional complexity Simple, stateless scheme During congested periods Compare new packet with random pkt in queue If from same flow, drop both If not, use RED to decide fate of new packet 29 CHOKe Can improve behavior by selecting more than one comparison packet Needed when more than one misbehaving flow Does not completely solve problem Aggressive flows are punished but not limited to fair share Not good for low degree of multiplexing  why? 30 Stochastic Fair Blue Same objective as RED Penalty Box Identify and penalize misbehaving flows Create L hashes with N bins each Each bin keeps track of separate marking rate (pm) Rate is updated using standard technique and a bin size Flow uses minimum pm of all L bins it belongs to Non-misbehaving flows hopefully belong to at least one bin without a bad flow Large numbers of bad flows may cause false positives 31 Stochastic Fair Blue False positives can continuously penalize same flow Solution: moving hash function over time Bad flow no longer shares bin with same flows Is history reset does bad flow get to make trouble until detected again? No, can perform hash warmup in background 32 Overview Queuing Disciplines RED RED Alternatives XCP 33 How does XCP Work? Feedback = + 0.1 packet 34 Feedback = - 0.3 packet How does XCP Work? 35 Congestion Window = Congestion Window + Feedback Routers compute feedback without any per-flow state How does XCP Work? XCP extends ECN and CSFQ 36 How Does an XCP Router Compute the Feedback? Congestion Controller Fairness Controller Goal: Divides  between flows to converge to fairness Looks at a flow’s state in Congestion Header Algorithm: If  > 0  Divide  equally between flows If  < 0  Divide  between flows proportionally to their current rates MIMD AIMD Goal: Matches input traffic to link capacity & drains the queue Looks at aggregate traffic & queue Algorithm: Aggregate traffic changes by   ~ Spare Bandwidth ~ - Queue Size So,  =  davg Spare -  Queue  Congestion Controller Fairness Controller
Slide 37 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three 21 Packet Marking Marking probability based on queue length Pb = maxp(avgq - minth) / (maxth - minth) Just marking based on Pb can lead to clustered marking Could result in synchronization Better to bias Pb by history of unmarked packets Pa = Pb/(1 - count*Pb) 22 Packet Marking maxp is reflective of typical loss rates Paper uses 0.02 0.1 is more realistic value If network needs marking of 20-30% then need to buy a better link! Gentle variant of RED (recommended) Vary drop rate from maxp to 1 as the avgq varies from maxth to 2* maxth More robust to setting of maxth and maxp 23 Extending RED for Flow Isolation Problem: what to do with non-cooperative flows? Fair queuing achieves isolation using per-flow state – expensive at backbone routers How can we isolate unresponsive flows without per-flow state? RED penalty box Monitor history for packet drops, identify flows that use disproportionate bandwidth Isolate and punish those flows 24 Overview Queuing Disciplines RED RED Alternatives XCP 25 FRED Fair Random Early Drop (Sigcomm, 1997) Maintain per flow state only for active flows (ones having packets in the buffer) minq and maxq  min and max number of buffers a flow is allowed occupy avgcq = average buffers per flow Strike count of number of times flow has exceeded maxq 26 FRED – Fragile Flows Flows that send little data and want to avoid loss minq is meant to protect these What should minq be? When large number of flows  2-4 packets Needed for TCP behavior When small number of flows  increase to avgcq 27 FRED Non-adaptive flows Flows with high strike count are not allowed more than avgcq buffers Allows adaptive flows to occasionally burst to maxq but repeated attempts incur penalty 28 CHOKe CHOse and Keep/Kill (Infocom 2000) Existing schemes to penalize unresponsive flows (FRED/penalty box) introduce additional complexity Simple, stateless scheme During congested periods Compare new packet with random pkt in queue If from same flow, drop both If not, use RED to decide fate of new packet 29 CHOKe Can improve behavior by selecting more than one comparison packet Needed when more than one misbehaving flow Does not completely solve problem Aggressive flows are punished but not limited to fair share Not good for low degree of multiplexing  why? 30 Stochastic Fair Blue Same objective as RED Penalty Box Identify and penalize misbehaving flows Create L hashes with N bins each Each bin keeps track of separate marking rate (pm) Rate is updated using standard technique and a bin size Flow uses minimum pm of all L bins it belongs to Non-misbehaving flows hopefully belong to at least one bin without a bad flow Large numbers of bad flows may cause false positives 31 Stochastic Fair Blue False positives can continuously penalize same flow Solution: moving hash function over time Bad flow no longer shares bin with same flows Is history reset does bad flow get to make trouble until detected again? No, can perform hash warmup in background 32 Overview Queuing Disciplines RED RED Alternatives XCP 33 How does XCP Work? Feedback = + 0.1 packet 34 Feedback = - 0.3 packet How does XCP Work? 35 Congestion Window = Congestion Window + Feedback Routers compute feedback without any per-flow state How does XCP Work? XCP extends ECN and CSFQ 36 How Does an XCP Router Compute the Feedback? Congestion Controller Fairness Controller Goal: Divides  between flows to converge to fairness Looks at a flow’s state in Congestion Header Algorithm: If  > 0  Divide  equally between flows If  < 0  Divide  between flows proportionally to their current rates MIMD AIMD Goal: Matches input traffic to link capacity & drains the queue Looks at aggregate traffic & queue Algorithm: Aggregate traffic changes by   ~ Spare Bandwidth ~ - Queue Size So,  =  davg Spare -  Queue  Congestion Controller Fairness Controller 37 (Proof based on Nyquist Criterion) Getting the devil out of the details … Congestion Controller Fairness Controller No Parameter Tuning Algorithm: If  > 0  Divide  equally between flows If  < 0  Divide  between flows proportionally to their current rates Need to estimate number of flows N RTTpkt : Round Trip Time in header Cwndpkt : Congestion Window in header T: Counting Interval No Per-Flow State
Slide 38 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three 21 Packet Marking Marking probability based on queue length Pb = maxp(avgq - minth) / (maxth - minth) Just marking based on Pb can lead to clustered marking Could result in synchronization Better to bias Pb by history of unmarked packets Pa = Pb/(1 - count*Pb) 22 Packet Marking maxp is reflective of typical loss rates Paper uses 0.02 0.1 is more realistic value If network needs marking of 20-30% then need to buy a better link! Gentle variant of RED (recommended) Vary drop rate from maxp to 1 as the avgq varies from maxth to 2* maxth More robust to setting of maxth and maxp 23 Extending RED for Flow Isolation Problem: what to do with non-cooperative flows? Fair queuing achieves isolation using per-flow state – expensive at backbone routers How can we isolate unresponsive flows without per-flow state? RED penalty box Monitor history for packet drops, identify flows that use disproportionate bandwidth Isolate and punish those flows 24 Overview Queuing Disciplines RED RED Alternatives XCP 25 FRED Fair Random Early Drop (Sigcomm, 1997) Maintain per flow state only for active flows (ones having packets in the buffer) minq and maxq  min and max number of buffers a flow is allowed occupy avgcq = average buffers per flow Strike count of number of times flow has exceeded maxq 26 FRED – Fragile Flows Flows that send little data and want to avoid loss minq is meant to protect these What should minq be? When large number of flows  2-4 packets Needed for TCP behavior When small number of flows  increase to avgcq 27 FRED Non-adaptive flows Flows with high strike count are not allowed more than avgcq buffers Allows adaptive flows to occasionally burst to maxq but repeated attempts incur penalty 28 CHOKe CHOse and Keep/Kill (Infocom 2000) Existing schemes to penalize unresponsive flows (FRED/penalty box) introduce additional complexity Simple, stateless scheme During congested periods Compare new packet with random pkt in queue If from same flow, drop both If not, use RED to decide fate of new packet 29 CHOKe Can improve behavior by selecting more than one comparison packet Needed when more than one misbehaving flow Does not completely solve problem Aggressive flows are punished but not limited to fair share Not good for low degree of multiplexing  why? 30 Stochastic Fair Blue Same objective as RED Penalty Box Identify and penalize misbehaving flows Create L hashes with N bins each Each bin keeps track of separate marking rate (pm) Rate is updated using standard technique and a bin size Flow uses minimum pm of all L bins it belongs to Non-misbehaving flows hopefully belong to at least one bin without a bad flow Large numbers of bad flows may cause false positives 31 Stochastic Fair Blue False positives can continuously penalize same flow Solution: moving hash function over time Bad flow no longer shares bin with same flows Is history reset does bad flow get to make trouble until detected again? No, can perform hash warmup in background 32 Overview Queuing Disciplines RED RED Alternatives XCP 33 How does XCP Work? Feedback = + 0.1 packet 34 Feedback = - 0.3 packet How does XCP Work? 35 Congestion Window = Congestion Window + Feedback Routers compute feedback without any per-flow state How does XCP Work? XCP extends ECN and CSFQ 36 How Does an XCP Router Compute the Feedback? Congestion Controller Fairness Controller Goal: Divides  between flows to converge to fairness Looks at a flow’s state in Congestion Header Algorithm: If  > 0  Divide  equally between flows If  < 0  Divide  between flows proportionally to their current rates MIMD AIMD Goal: Matches input traffic to link capacity & drains the queue Looks at aggregate traffic & queue Algorithm: Aggregate traffic changes by   ~ Spare Bandwidth ~ - Queue Size So,  =  davg Spare -  Queue  Congestion Controller Fairness Controller 37 (Proof based on Nyquist Criterion) Getting the devil out of the details … Congestion Controller Fairness Controller No Parameter Tuning Algorithm: If  > 0  Divide  equally between flows If  < 0  Divide  between flows proportionally to their current rates Need to estimate number of flows N RTTpkt : Round Trip Time in header Cwndpkt : Congestion Window in header T: Counting Interval No Per-Flow State 38 Lessons TCP alternatives TCP being used in new/unexpected ways Key changes needed Routers FIFO, drop-tail interacts poorly with TCP Various schemes to desynchronize flows and control loss rate Fair-queuing Clean resource allocation to flows Complex packet classification and scheduling Core-stateless FQ & XCP Coarse-grain fairness Carrying packet state can reduce complexity
Slide 39 - CS 268: Computer Networking L-6 Router Congestion Control 2 TCP & Routers RED XCP Assigned reading [FJ93] Random Early Detection Gateways for Congestion Avoidance [KHR02] Congestion Control for High Bandwidth-Delay Product Networks 3 Overview Queuing Disciplines RED RED Alternatives XCP 4 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: Bandwidth: which packet to serve (transmit) next Buffer space: which packet to drop next (when required) Queuing also affects latency 5 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop 6 Typical Internet Queuing FIFO + drop-tail Simplest choice Used widely in the Internet FIFO (first-in-first-out) Implies single class of traffic Drop-tail Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: FIFO: scheduling discipline Drop-tail: drop policy 7 FIFO + Drop-tail Problems Leaves responsibility of congestion control to edges (e.g., TCP) Does not separate between different flows No policing: send more packets  get more service Synchronization: end hosts react to same events 8 Active Queue Management Design active router queue management to aid congestion control Why? Routers can distinguish between propagation and persistent queuing delays Routers can decide on transient congestion, based on workload 9 Active Queue Designs Modify both router and hosts DECbit: congestion bit in packet header Modify router, hosts use TCP Fair queuing Per-connection buffer allocation RED (Random Early Detection) Drop packet or set bit in packet header as soon as congestion is starting 10 Overview Queuing Disciplines RED RED Alternatives XCP 11 Internet Problems Full queues Routers are forced to have have large queues to maintain high utilizations TCP detects congestion from loss Forces network to have long standing queues in steady-state Lock-out problem Drop-tail routers treat bursty traffic poorly Traffic gets synchronized easily  allows a few flows to monopolize the queue space 12 Design Objectives Keep throughput high and delay low Accommodate bursts Queue size should reflect ability to accept bursts rather than steady-state queuing Improve TCP performance with minimal hardware changes 13 Lock-out Problem Random drop Packet arriving when queue is full causes some random packet to be dropped Drop front On full queue, drop packet at head of queue Random drop and drop front solve the lock-out problem but not the full-queues problem 14 Full Queues Problem Drop packets before queue becomes full (early drop) Intuition: notify senders of incipient congestion Example: early random drop (ERD): If queue length > drop level, drop each new packet with fixed probability p Does not control misbehaving users 15 Random Early Detection (RED) Detect incipient congestion, allow bursts Keep power (throughput/delay) high Keep average queue size low Assume hosts respond to lost packets Avoid window synchronization Randomly mark packets Avoid bias against bursty traffic Some protection against ill-behaved users 16 RED Algorithm Maintain running average of queue length If avgq < minth do nothing Low queuing, send packets through If avgq > maxth, drop packet Protection from misbehaving sources Else mark packet in a manner proportional to queue length Notify sources of incipient congestion 17 RED Operation Min thresh Max thresh Average Queue Length minth maxth maxP 1.0 Avg queue length P(drop) 18 RED Algorithm Maintain running average of queue length Byte mode vs. packet mode – why? For each packet arrival Calculate average queue size (avg) If minth ≤ avgq < maxth Calculate probability Pa With probability Pa Mark the arriving packet Else if maxth ≤ avg Mark the arriving packet 19 Queue Estimation Standard EWMA: avgq = (1-wq) avgq + wqqlen Special fix for idle periods – why? Upper bound on wq depends on minth Want to ignore transient congestion Can calculate the queue average if a burst arrives Set wq such that certain burst size does not exceed minth Lower bound on wq to detect congestion relatively quickly Typical wq = 0.002 20 Thresholds minth determined by the utilization requirement Tradeoff between queuing delay and utilization Relationship between maxth and minth Want to ensure that feedback has enough time to make difference in load Depends on average queue increase in one RTT Paper suggest ratio of two Current rule of thumb is factor of three 21 Packet Marking Marking probability based on queue length Pb = maxp(avgq - minth) / (maxth - minth) Just marking based on Pb can lead to clustered marking Could result in synchronization Better to bias Pb by history of unmarked packets Pa = Pb/(1 - count*Pb) 22 Packet Marking maxp is reflective of typical loss rates Paper uses 0.02 0.1 is more realistic value If network needs marking of 20-30% then need to buy a better link! Gentle variant of RED (recommended) Vary drop rate from maxp to 1 as the avgq varies from maxth to 2* maxth More robust to setting of maxth and maxp 23 Extending RED for Flow Isolation Problem: what to do with non-cooperative flows? Fair queuing achieves isolation using per-flow state – expensive at backbone routers How can we isolate unresponsive flows without per-flow state? RED penalty box Monitor history for packet drops, identify flows that use disproportionate bandwidth Isolate and punish those flows 24 Overview Queuing Disciplines RED RED Alternatives XCP 25 FRED Fair Random Early Drop (Sigcomm, 1997) Maintain per flow state only for active flows (ones having packets in the buffer) minq and maxq  min and max number of buffers a flow is allowed occupy avgcq = average buffers per flow Strike count of number of times flow has exceeded maxq 26 FRED – Fragile Flows Flows that send little data and want to avoid loss minq is meant to protect these What should minq be? When large number of flows  2-4 packets Needed for TCP behavior When small number of flows  increase to avgcq 27 FRED Non-adaptive flows Flows with high strike count are not allowed more than avgcq buffers Allows adaptive flows to occasionally burst to maxq but repeated attempts incur penalty 28 CHOKe CHOse and Keep/Kill (Infocom 2000) Existing schemes to penalize unresponsive flows (FRED/penalty box) introduce additional complexity Simple, stateless scheme During congested periods Compare new packet with random pkt in queue If from same flow, drop both If not, use RED to decide fate of new packet 29 CHOKe Can improve behavior by selecting more than one comparison packet Needed when more than one misbehaving flow Does not completely solve problem Aggressive flows are punished but not limited to fair share Not good for low degree of multiplexing  why? 30 Stochastic Fair Blue Same objective as RED Penalty Box Identify and penalize misbehaving flows Create L hashes with N bins each Each bin keeps track of separate marking rate (pm) Rate is updated using standard technique and a bin size Flow uses minimum pm of all L bins it belongs to Non-misbehaving flows hopefully belong to at least one bin without a bad flow Large numbers of bad flows may cause false positives 31 Stochastic Fair Blue False positives can continuously penalize same flow Solution: moving hash function over time Bad flow no longer shares bin with same flows Is history reset does bad flow get to make trouble until detected again? No, can perform hash warmup in background 32 Overview Queuing Disciplines RED RED Alternatives XCP 33 How does XCP Work? Feedback = + 0.1 packet 34 Feedback = - 0.3 packet How does XCP Work? 35 Congestion Window = Congestion Window + Feedback Routers compute feedback without any per-flow state How does XCP Work? XCP extends ECN and CSFQ 36 How Does an XCP Router Compute the Feedback? Congestion Controller Fairness Controller Goal: Divides  between flows to converge to fairness Looks at a flow’s state in Congestion Header Algorithm: If  > 0  Divide  equally between flows If  < 0  Divide  between flows proportionally to their current rates MIMD AIMD Goal: Matches input traffic to link capacity & drains the queue Looks at aggregate traffic & queue Algorithm: Aggregate traffic changes by   ~ Spare Bandwidth ~ - Queue Size So,  =  davg Spare -  Queue  Congestion Controller Fairness Controller 37 (Proof based on Nyquist Criterion) Getting the devil out of the details … Congestion Controller Fairness Controller No Parameter Tuning Algorithm: If  > 0  Divide  equally between flows If  < 0  Divide  between flows proportionally to their current rates Need to estimate number of flows N RTTpkt : Round Trip Time in header Cwndpkt : Congestion Window in header T: Counting Interval No Per-Flow State 38 Lessons TCP alternatives TCP being used in new/unexpected ways Key changes needed Routers FIFO, drop-tail interacts poorly with TCP Various schemes to desynchronize flows and control loss rate Fair-queuing Clean resource allocation to flows Complex packet classification and scheduling Core-stateless FQ & XCP Coarse-grain fairness Carrying packet state can reduce complexity Discussion XCP Misbehaving routers Deployment (and incentives) RED Parameter setting 39