Network Performance Queuing EE 122 Intro to Communication Networks Fall 2006 MW 4 5 30 in Donner 155 Vern Paxson TAs Dilip Antony Joseph and Sukun Kim http inst eecs berkeley edu ee122 Materials with thanks to Jennifer Rexford Ion Stoica and colleagues at Princeton and UC Berkeley 1 Announcements Additional reading for today s lecture Peterson Davie 3 4 2 1 Goals of Today s Lecture Finish discussion of Window Scaling TCP Throughput Equation Computes approximate long running TCP performance for a given packet loss probability p Relationship between performance and queuing Router architecture Modeling of queuing systems Little s Law FIFO queuing Active Queue Management RED Explicit Congestion Notification ECN 3 Window Scaling Problem 16 bits of advertised window only allows 65 535 bytes in flight Can significantly restrict throughput Solution TCP window scaling option negotiated in initial SYN exchange shift cnt specifies scaling factor for units used in window advertisement E g shift cnt 5 advertised window is 25 32 byte units 4 2 Window Scaling con t Q Now how large can the window be A Clearly must not exceed 232 If it does then can t disambiguate data in flight So scaling 16 In fact somewhat subtle requirements limit window to 230 to allow receiver to determine whether data fits in the offered window So scaling 14 5 Window Scaling con t Now we can go fast Suppose in a high speed LAN with RTT 1 msec we can transmit at 1 GB s What problem arises if packets are occasionally delayed in the network for 10 msec Sequence number wrap can t tell earlier delayed segments from later instances Fix another TCP option to associate high res timestamps with TCP segments Essentially adds more bits to sequence space Side effect no more need for Karn Partridge restriction not to compute RTT for ACKs of retransmitted packets 6 3 TCP Throughput Equation Consider a network path for which packets are lost with probability p independently Suppose a TCP connection achieves a maximum window size of W packets when using the path On AIMD cut due to packet loss window goes to W 2 Thus average window is w 3 4 W Total number of packets in the sawtooth W 2 W 2 1 W 2 2 W Sawtooth spans about W 2 RTT s Total packets 3 4 W W 2 3W2 8 Therefore 3W2 8 1 p 7 TCP Throughput Equation con t Given 3W2 8 1 p then in terms of the average window w 3 4 3 w 2 8 1 p since w 3 4 W 16 9 w2 8 3p w2 3 2p w sqrt 3 2 sqrt p For packets of B bytes throughput is T w B RTT sqrt 1 5 B RTT sqrt p Implications T 1 5B RTT p Long term throughput falls as 1 RTT Long term throughput falls as 1 sqrt p Non TCP transport can use equation to provide TCP friendly congestion control 8 4 Where Does Loss p Come From Anyway Routers Queuing 9 Generic Router Architecture Input and output interfaces are connected through an interconnect Interconnect can be implemented by Shared memory input interface output interface Interconnect Low capacity routers e g PC based routers Shared bus Medium capacity routers Point to point switched bus High capacity routers Packets fragmented into cells Essentially a network inside the router 10 5 Shared Memory 1st Generation Shared Backplane CP M em Li n U In te e rfa c or e y CPU Buffer Memory Route Table Line Interface Line Interface Line Interface MAC MAC MAC Typically 0 5Gbps aggregate capacity Limited by rate of shared memory Slide by Nick McKeown 11 Shared Bus 2nd Generation CPU Typically 5Gb s aggregate capacity Limited by shared bus Route Table Buffer Memory Line Card Line Card Line Card Buffer Memory Buffer Memory Buffer Memory Fwding Cache Fwding Cache Fwding Cache MAC MAC MAC Slide by Nick McKeown 12 6 Point to Point Switch 3rd Generation Switched Backplane Li CPIn ne Uterf ac M e em or y Line Card CPU Card Line Card Local Buffer Memory Routing Table Local Buffer Memory Fwding Table Fwding Table MAC MAC Typically 100Gbps aggregate capacity Slide by Nick McKeown 13 What a Router Looks Like Cisco GSR 12416 Juniper M160 19 19 Capacity 160Gb s Power 4 2kW Lines of Code 8M circa year 2000 Capacity 80Gb s Power 2 6kW 3ft 6ft 2ft Slide courtesy Nick McKeown 2 5ft 14 7 Input Interface Packet forwarding decide to which output interface to forward each packet based on the information in packet header Examine packet header Lookup in forwarding table Update packet header Question do we send the packet to the output interface immediately input interface output interface Interconnect 15 Output Functions Buffer management decide when and which packet to drop Scheduler decide when and which packet to transmit Buffer Scheduler 1 2 16 8 Output Queued Routers Only output interfaces store packets input interface Advantages output interface Backplane Easy to design algorithms only one congestion point Disadvantages Requires an output speedup Ro C of N where N is the number of interfaces not feasible RO C 17 Input Queued Routers Input interfaces store packets input interface Easier to build since only need R C output interface Backplane Though need to implement back pressure to know when to send But harder to build efficiently due to contention and head of line blocking C R 18 9 Head of line Blocking Cell at head of an input queue cannot be transferred thus blocking the following cells Cannot be transferred because is blocked by orange cell Input 1 Output 1 Input 2 Output 2 Input 3 Cannot be transferred because output buffer overflow Output 3 Modern high speed routers use combination of input output queuing with flow control multiple virtual queues 19 5 Minute Break Questions Before We Proceed 20 10 Simple Queuing FIFO and Drop Tail Most of today s routers Transmission via FIFO scheduling First in first out queue Packets transmitted in the order they arrive Buffer management drop tail If the queue is full drop the incoming packet 21 Queuing Example P bits Q bits P 1 Kbit R 1 Mbps P R 1 ms Packet arrival Q t Time ms 0 0 5 1 7 7 5 Delay for packet that arrives at time t d t Q t R P R 2 Kb 1 5 Kb 1 Kb 0 5 Kb Time packet 1 d 0 1ms packet 2 d 0 5 1 5ms packet 3 d 1 2ms 22 11 Queuing Theory Enormous literature exists on mathematical modeling of queues Abstractions Arrivals customers comes to the system according to some probability distribution F of interarrival times Arrival rate is designated e g packets sec System has a set of servers 1 Each arrival has a service time taken from another probability distribution G Questions Given F G how much delay do customers see Unfortunately most solutions require F with only 23 weak correlations
View Full Document