Router Design: Table Lookups and Packet Scheduling EECS 122: Lecture 13

Similar documents
Network Layer Enhancements

EP2210 Scheduling. Lecture material:

EECS 122: Introduction to Computer Networks Switch and Router Architectures. Today s Lecture

Routers: Forwarding EECS 122: Lecture 13

Generic Architecture. EECS 122: Introduction to Computer Networks Switch and Router Architectures. Shared Memory (1 st Generation) Today s Lecture

Routers: Forwarding EECS 122: Lecture 13

Episode 5. Scheduling and Traffic Management

Master Course Computer Networks IN2097

Master Course Computer Networks IN2097

Overview Computer Networking What is QoS? Queuing discipline and scheduling. Traffic Enforcement. Integrated services

Packet Scheduling and QoS

Fair Queueing. Presented by Brighten Godfrey. Slides thanks to Ion Stoica (UC Berkeley) with slight adaptation by Brighten Godfrey

Congestion Control In the Network

Lecture 24: Scheduling and QoS

Queuing. Congestion Control and Resource Allocation. Resource Allocation Evaluation Criteria. Resource allocation Drop disciplines Queuing disciplines

Priority Traffic CSCD 433/533. Advanced Networks Spring Lecture 21 Congestion Control and Queuing Strategies

Episode 5. Scheduling and Traffic Management

Fairness, Queue Management, and QoS

Wireless Networks (CSC-7602) Lecture 8 (15 Oct. 2007)

TELE Switching Systems and Architecture. Assignment Week 10 Lecture Summary - Traffic Management (including scheduling)

COMP/ELEC 429/556 Introduction to Computer Networks

Resource allocation in networks. Resource Allocation in Networks. Resource allocation

Scheduling. Scheduling algorithms. Scheduling. Output buffered architecture. QoS scheduling algorithms. QoS-capable router

of-service Support on the Internet

EE 122: Router Support for Congestion Control: RED and Fair Queueing. Ion Stoica Oct. 30 Nov. 4, 2002

Lecture 21. Reminders: Homework 6 due today, Programming Project 4 due on Thursday Questions? Current event: BGP router glitch on Nov.

Computer Networking. Queue Management and Quality of Service (QOS)

Scheduling (Chapter 9) Outline

Overview. Lecture 22 Queue Management and Quality of Service (QoS) Queuing Disciplines. Typical Internet Queuing. FIFO + Drop tail Problems

Performance Evaluation of Scheduling Mechanisms for Broadband Networks

Core-Stateless Fair Queueing: Achieving Approximately Fair Bandwidth Allocations in High Speed Networks. Congestion Control in Today s Internet

048866: Packet Switch Architectures

Episode 5. Scheduling and Traffic Management

CS557: Queue Management

CS551 Router Queue Management

Introduction. Introduction. Router Architectures. Introduction. Recent advances in routing architecture including

Switch and Router Design. Packet Processing Examples. Packet Processing Examples. Packet Processing Rate 12/14/2011

Network Performance: Queuing

Network Performance: Queuing

Topic 4b: QoS Principles. Chapter 9 Multimedia Networking. Computer Networking: A Top Down Approach

Unit 2 Packet Switching Networks - II

CSE 123b Communications Software

CSE398: Network Systems Design

Improving QOS in IP Networks. Principles for QOS Guarantees

Chapter 6 Queuing Disciplines. Networking CS 3470, Section 1

Router s Queue Management

DiffServ Architecture: Impact of scheduling on QoS

Network Model for Delay-Sensitive Traffic

TOC: Switching & Forwarding

Lecture 22: Buffering & Scheduling. CSE 123: Computer Networks Alex C. Snoeren

Networking Acronym Smorgasbord: , DVMRP, CBT, WFQ

Introduction. Router Architectures. Introduction. Introduction. Recent advances in routing architecture including

TOC: Switching & Forwarding

MUD: Send me your top 1 3 questions on this lecture

Kommunikationssysteme [KS]

Quality of Service (QoS)

Overview. TCP & router queuing Computer Networking. TCP details. Workloads. TCP Performance. TCP Performance. Lecture 10 TCP & Routers

Basics (cont.) Characteristics of data communication technologies OSI-Model

Announcements. Quality of Service (QoS) Goals of Today s Lecture. Scheduling. Link Scheduling: FIFO. Link Scheduling: Strict Priority

TOC: Switching & Forwarding

Project Computer Networking. Resource Management Approaches. Start EARLY Tomorrow s recitation. Lecture 20 Queue Management and QoS

Announcements. Network Performance: Queuing. Goals of Today s Lecture. Window Scaling. Window Scaling, con t. Window Scaling, con t

Last Lecture: Network Layer

Network Support for Multimedia

Congestion Control and Resource Allocation

Lecture 5: Performance Analysis I

15-744: Computer Networking. Overview. Queuing Disciplines. TCP & Routers. L-6 TCP & Routers

Tutorial 9 : TCP and congestion control part I

Lecture 14: Congestion Control"

CSE 461 Quality of Service. David Wetherall

Configuring QoS CHAPTER

Advanced Computer Networks

CS 268: Computer Networking

TDDD82 Secure Mobile Systems Lecture 6: Quality of Service

Network layer (addendum) Slides adapted from material by Nick McKeown and Kevin Lai

Homework 1 Solutions:

Master Course Computer Networks IN2097

Lecture Outline. Bag of Tricks

Queuing Mechanisms. Overview. Objectives

Master Course Computer Networks IN2097

CS244 Advanced Topics in Computer Networks Midterm Exam Monday, May 2, 2016 OPEN BOOK, OPEN NOTES, INTERNET OFF

Real-Time Protocol (RTP)

Part1: Lecture 4 QoS

CS CS COMPUTER NETWORKS CS CS CHAPTER 6. CHAPTER 6 Congestion Control

Congestion. Can t sustain input rate > output rate Issues: - Avoid congestion - Control congestion - Prioritize who gets limited resources

Last time! Overview! 14/04/15. Part1: Lecture 4! QoS! Router architectures! How to improve TCP? SYN attacks SCTP. SIP and H.

Page 1. Quality of Service. CS 268: Lecture 13. QoS: DiffServ and IntServ. Three Relevant Factors. Providing Better Service.

Wireless Networks (CSC-7602) Lecture 8 (22 Oct. 2007) Seung-Jong Park (Jay) Fair Queueing

Week 7: Traffic Models and QoS

Mohammad Hossein Manshaei 1393

CPU Scheduling. The scheduling problem: When do we make decision? - Have K jobs ready to run - Have N 1 CPUs - Which jobs to assign to which CPU(s)

Congestion Control 3/16/09

Quality of Service (QoS)

TCP Congestion Control : Computer Networking. Introduction to TCP. Key Things You Should Know Already. Congestion Control RED

Congestion Control. Queuing Discipline Reacting to Congestion Avoiding Congestion. Issues

In-network Resource Allocation (Scribed by Ambuj Ojha)

Quality of Service (QoS)

CSCD 433/533 Advanced Networks Spring Lecture 22 Quality of Service

Scheduling Algorithms to Minimize Session Delays

Internet Services & Protocols. Quality of Service Architecture

Transcription:

Router Design: Table Lookups and Packet Scheduling EECS 122: Lecture 13 Department of Electrical Engineering and Computer Sciences University of California Berkeley

Review: Switch Architectures Input Queued Faster switch Two congestion points input interface output interface HOL Output Queued Backplane Slower switch Backplane speedup is N One point of congsestion R O C March 4, 2003 Abhay Parekh, EE122 S2003 2

Today Fast routing table lookups Exact and LPM How to resolve router congestion? Assume output queued Focus on scheduling Already covered packet dropping Defer the end-to-end issues to next lecture input interface output interface Backplane R O C March 4, 2003 Abhay Parekh, EE122 S2003 3

Route Lookup Exact Match MPLS/ATM: Direct lookup possible because of labels Ethernet: Global address space is flat and huge Hashing is an option but we won t discuss it Longest Prefix Match IP In Ethernet and IP routing it is useful to think of the search process as a traversal of a special kind of labeled tree called a Trie March 4, 2003 Abhay Parekh, EE122 S2003 4

Trees and Tries Binary Search Tree Binary Search Trie < > < > < > log 2 N 0 1 0 1 0 1 N entries 010 111 Nick Mckeown March 4, 2003 Abhay Parekh, EE122 S2003 5

Simple Tries and Exact Matching in Ethernet Each address in the routing table entry is of fixed length E.g. using a simple binary search trie it takes 48 steps to resolve an MAC address lookup When the table is much smaller than 2^48 (!), this seems like a lot of steps Instead of matching one bit per level, why not m bits per level? March 4, 2003 Abhay Parekh, EE122 S2003 6

Multiway Tries 16-ary Search Trie Ptr=0 means no children 0000, ptr 1111, ptr 0000, 0 1111, ptr 0000, 0 1111, ptr 000011110000 111111111111 Nick Mckeown March 4, 2003 Abhay Parekh, EE122 S2003 7

Why not just have one level? Memory required goes up with higher values of m Too many nodes with 0 pointers Having more levels in the tree allows potentially large subtrees of the balanced tree to be to cut off and not stored The right number of levels is a function of memory constraints March 4, 2003 Abhay Parekh, EE122 S2003 8

Simple Tries and LPM The routing table entry is a variable length prefix E.g. 01111111 00001111 0000100100 for 128.23.9.0/26 A balanced tree won t work Variable number of steps required March 4, 2003 Abhay Parekh, EE122 S2003 9

LPM in IP Routers Binary tries 0 1 Example Prefixes a b c d e f g h i a) 00001 b) 00010 c) 00011 d) 001 e) 0101 f) 011 g) 100 h) 1010 i) 1100 j) 11110000 j Nick Mckeown March 4, 2003 Abhay Parekh, EE122 S2003 10

LPM in IP Routers Patricia trie 0 1 Example Prefixes a b c d e f g h i j Skip 5 1000 a) 00001 b) 00010 c) 00011 d) 001 e) 0101 f) 011 g) 100 h) 1010 i) 1100 j) 11110000 Nick Mckeown March 4, 2003 Abhay Parekh, EE122 S2003 11

Associative Memory Content addressable memory is expensive, consumes power and is still slow, but makes the lookup problem easy For Ethernet compares incoming data to all entries in parallel For LPM do 32 exact matches in parallel Match prefixes of length 1 Match prefixes of length 2 Etc. Still not a practical, but this may change some day March 4, 2003 Abhay Parekh, EE122 S2003 12

Scheduling and Classification In a store and forward network, contention for router ports can result in considerable packet delay How do we manage this delay so that The network does not get swamped with retransmissions Certain kinds of applications are not victimized and bear an unfair share of the delay Delay sensitive applications are protected Every packet is separated into one of M classes At each port, have a separate queue for each class Very similar (and complimentary to) issues addressed by RED and other packet dropping mechanisms March 4, 2003 Abhay Parekh, EE122 S2003 13

Router Without any classification Model of FIFO router (output) queue A(t) B(t) R D(t) Classification and Scheduling Model of router queues Scheduling Discipline Router With M classes A(t) A 1 (t) A 2 (t) A M (t) R(f 1 ) R(f 2 ) D(t) R(f M ) Nick Mckeown March 4, 2003 Abhay Parekh, EE122 S2003 14

Classification Packet Class A way of receiving differentiated treatment from the output port scheduler Delay Sensitivity Loss Sensitivity Etc. More fields? harder the implementation How many queues? More queues? harder the implementation One for each priority One for each flow (example, VCI) Etc. March 4, 2003 Abhay Parekh, EE122 S2003 15

Motivating Example: FCFS A is an audio session Steady: (peak rate = avg. rate) B, C and D image files Burst (high peak rate) rate B C D A time A B C D What happens to A? March 4, 2003 Abhay Parekh, EE122 S2003 16

Delays build up for the steady session Arrivals At Node 1 At Node 2 rate L B 1 rate C A bits 1 time T time T A time Both links FCFS at rate 1 rate 1 A 1 rate A T time time March 4, 2003 Abhay Parekh, EE122 S2003 17

Hard to control performance with FCFS Bursty traffic can unfairly hold up steady traffic Makes steady traffic bursty in the process! Very difficult to analyze how a FCFS network will perform under reasonable traffic scenarios Only way to control performance is to make buffers very small Difficult for high speed traffic March 4, 2003 Abhay Parekh, EE122 S2003 18

Fairness Suppose there are N applications sharing the network Each application j can express its satisfaction with network performance in terms of U j (r), where r = (r 1,,r N ) is the rate allocated to the applications. Most common utility function is U j (r) =r for all j What is a fair allocation of the throughputs? Fairness is vague so there are many definitions Maximize the sum of utilities: May penalize some apps Max-Min Fair March 4, 2003 Abhay Parekh, EE122 S2003 19

Max-Min Fairness Let an assignment be (U 1 (r),,u N (r)) Given assignment, A, let MIN A be the smallest component of the vector A Pick an assignment * such that for any other assignment, A W * = MIN A There may be many max-min allocations Need to be able to classify packets by flow in order to implement Also needs a scheduling policy March 4, 2003 Abhay Parekh, EE122 S2003 20

Simplest Case N flows, U j (r) = r j Max-min fair rate computation: 1. Pick the unassigned flow, j, with the smallest rate 2. s j = min{r j, C/N} r1 r2 r3 C s2 s1 s3 3. C = C s j 4. N= N-1 5. go to 1 8 6 10 4 4 2 2 Why is this max-min fair? March 4, 2003 Abhay Parekh, EE122 S2003 21

Router Without any classification Model of FIFO router (output) queue A(t) B(t) R D(t) Classification and Scheduling Model of router queues Scheduling Discipline Router With M classes A(t) A 1 (t) A 2 (t) A M (t) R(f 1 ) R(f 2 ) D(t) R(f M ) Nick Mckeown March 4, 2003 Abhay Parekh, EE122 S2003 22

Scheduling Goals Flexibility Must be able to accommodate a wide range of performance objectives Must be fair Predictable/Analyzable Must have some way to determine if the performance objectives are met Implementable Cost Performance March 4, 2003 Abhay Parekh, EE122 S2003 23

Fluid Tracking Scheduling Policies The time taken to serve a packet of size L on a link of speed C is L/C. IDEALIZATION: Assume that L/C is infinitesimal In any positive interval can serve traffic from any subset of the traffic classes Traffic behaves as a fluid Design a fluid service discipline that is flexible and fair Approximate this ideal policy by a Tracking Service discipline with the true value of L/C March 4, 2003 Abhay Parekh, EE122 S2003 24

Generalized Processor Sharing Each class j has a weight w j If there is traffic to be served from class j at time t we say that it is Backloged at time t. B(t) is the set of backlogged classes at time t W(t) is the total weight of the backlogged classes at time t If there is even one backlogged class, the server operates at rate C This is called being work conserving Serve the classes in proportion to their weights If class j is backlogged at time t, give it service rate S j (t) = [w j /W(t)] * C March 4, 2003 Abhay Parekh, EE122 S2003 25

Generalized Processor Sharing Class 1 w 1 = w 2 Class 2 Delay =4 Delay =5 B(2)={1,2} B(4)={2} March 4, 2003 Abhay Parekh, EE122 S2003 26

Adjust weights to change delay Class 1 Class 2 3w 1 = w 2 Delay =5 Delay =4 B(2)={1,2} B(4)={1} March 4, 2003 Abhay Parekh, EE122 S2003 27

GPS Properties - I Let the sum of all the weights be F F = W(t) When j is backlogged, S j (t) = [w j /W(t)] * C = [w j /F] * C = g j g j is called the Backlog Clearing Rate If an arriving class j bit sees a queue of q class j bits it must leave in q/g i sec. This is an example of a delay bound Suppose audio class comes in at 64Kb/s and has BCR = 80Kb/s Set w j = (80000* F)/C Performance should be good regardless of how the other classes arrive Can t do this under FCFS March 4, 2003 Abhay Parekh, EE122 S2003 28

GPS Properties - II If a class has an average rate of r and we give it a weight so that g j < r j then does the class j queue blow up? Not if the aggregate incoming rate (rate summed over all classes) is less than C If it isn t some queue has to blow up under any service discipline Finding a delay bound is trickier Giving steady classes a BCR much higher than r j keeps them steady and doesn t hurt other classes March 4, 2003 Abhay Parekh, EE122 S2003 29

Treat Steady Sessions Well! w 1 = w 2 March 4, 2003 Abhay Parekh, EE122 S2003 30

Treat Steady Sessions Well! w 1 = w 2 w 1 >>>> w 2 March 4, 2003 Abhay Parekh, EE122 S2003 31

Weighted Fair Queueing Work Conserving Tracks GPS Simulates the arrivals in real-time in a GPS system. Serves entire packets (only one class at a time) Let F p be the time that the last bit of packet p departs the simulated GPS system WFQ attempts to serve packets in order of F p Also called Packetized Generalized Processor Sharing (PGPS) March 4, 2003 Abhay Parekh, EE122 S2003 32

WFQ/PGPS Example w 1 = w 2 March 4, 2003 Abhay Parekh, EE122 S2003 33

WFQ/PGPS Example: Fair Queueing w 1 = w 2 No packet finishes later under PGPS March 4, 2003 Abhay Parekh, EE122 S2003 34

WFQ Example II: Fair Queueing w 1 = w 2 Packets out of order Packet from Class 1 finishes late under WFQ Result: Maximum lateness is L max /C where L max is the maximum packet size allowed. WFQ never falls further behind. March 4, 2003 Abhay Parekh, EE122 S2003 35

Virtual Time Implementation (FQ) Measure service, instead of time V(t) slope rate at which every active flow receives service C link capacity N(t) number of active flows in fluid flow system at time t V(t) V ( t ) t = C N ( t ) time Service in fluid flow system 1 2 1 2 3 3 4 4 5 6 5 Ion Stoica March 4, 2003 Abhay Parekh, EE122 S2003 36 time

Fair Queueing Implementation Define k F i finishing time of packet k of flow i (in system virtual time reference system) k arrival time of packet k of flow i a i k L i length of packet k of flow i The finishing time of packet k+1 of flow i is F k + 1 i = max( V ( a k i + 1 ), F k i ) + L k + 1 i Ion Stoica March 4, 2003 Abhay Parekh, EE122 S2003 37

WFQ and Performance Since GPS is analyzable, WFQ can be analyzed as well using the relationships between the two This allows for predictable performance in the network WFQ implemented on most routers For core fast routers which are input queued more complicated tracking policies for GPS must be devised Meaning of class: Session Type of traffic CEO s traffic Etc. March 4, 2003 Abhay Parekh, EE122 S2003 38

Scheduling disciplines abound! Many improve WFQ Eg. WF 2 Q, Hierarchical FQ etc Some are much easier to implement Deficit Round Robin Non-Work Conserving alternatives Earliest Deadline First Each packet has a deadline not a class Most flexible service discipline March 4, 2003 Abhay Parekh, EE122 S2003 39

Summary Scheduling is an important mechanism to implement a policy on how to share the bandwidth of an output port Mainly used to manage delay Scheduling is only effective if packet buffers are large enough to matter Overprovisioning argument (popular but controversial) Virtual queues in TCP may make this small Scheduling should be used in conjunction with packet dropping March 4, 2003 Abhay Parekh, EE122 S2003 40

Next Lecture The effect of scheduling on end-to-end performance Signaling QoS/CoS March 4, 2003 Abhay Parekh, EE122 S2003 41