Distributed Systems 3. Network Quality of Service (QoS) Paul Krzyzanowski [email protected] 1 10/1/2012 © 2012 Paul KrzyzanowskiWhat factors matter for network performance? • Bandwidth (bit rate) – Average number of bits per second through the network • Delay (latency) – Average time for data to get from one endpoint to its destination • Jitter – Variation in end-to-end delay • Loss (packet errors and dropped packets) – Percentage of packets that don’t reach their destination 2 10/1/2012 © 2012 Paul KrzyzanowskiWhy do we care? • We want to provide users with – Good interactive performance – Glitch-free, delay-free streaming video – Good quality IP telephony 3 10/1/2012 © 2012 Paul KrzyzanowskiQuality of Service Goals • Provide applications with the data flow performance they need: – Bandwidth, delay, jitter, loss • Examples – VoIP: low bandwidth, low latency (<150 ms), low jitter (<30 ms) – Video streaming: high bandwidth, longer latency OK – Remote login: low bandwidth, relatively low latency, high reliability – File transfer: high bandwidth, high latency OK, high jitter OK , high reliability 4 10/1/2012 © 2012 Paul KrzyzanowskiWhy do we have QoS problems? • We don’t have unlimited resources! – On-host resources • Multiple processes may want to send packets – Network • Available bandwidth • Bandwidth mismatch – Network routing & switching • Processing delays • Buffer space in routers & switches – Too many queued packets → queue overflow & dropped packets → congestion • Address quality of service with resource allocation & prioritization 5 10/1/2012 © 2012 Paul KrzyzanowskiContributors to congestion Bandwidth mismatch Aggregation Extra traffic resulting from – Faulty hardware/firmware – Excess retransmission from data corruption – High-traffic apps or misbehaving hosts (e.g., malware generating floods) Congestion leads to packet loss 10 Gbps 50 Mbps 1 Gbps 1 Gbps 6 10/1/2012 © 2012 Paul KrzyzanowskiContributors to latency • Packetization on host – Create IP & MAC packets • Serialization – Send data onto the network – One packet at a time – others are queued • Propagation delay • Processing delay on routers – Input queue → output queue and packet inspection • Queuing delay – Wait for interface to be available 7 10/1/2012 © 2012 Paul KrzyzanowskiContributors to jitter • Packets arrive at a router or switch at the same time – Used to lead to collision on a shared link – Buffers store packets – Transmitted FIFO, not all at once! – Dequeuing creates jitter • Dynamic re-routing • Transport layer – Caching out of order packets → delayed delivery • Out-of-order packets need to be buffered • May need to be retransmitted – Retransmission • Transport-layer retransmission • End-to-end (huge!) jitter FIFO output queue 8 10/1/2012 © 2012 Paul KrzyzanowskiContributors to packet loss • Buffer overrun on routers/switches (queue full) • Bad transmission lines (e.g., signal degradation & noise) • Faulty hardware 9 10/1/2012 © 2012 Paul KrzyzanowskiQoS Aware Networks • A QoS-aware network will allow an application to specify its needs and will reserve sufficient capacity in the network to meet those goals • Admission Control – Applications request a particular quality of service from the network – If the request is granted, the application has the contract • Traffic Control – Classifies, queues, and schedules traffic within the network 10 10/1/2012 © 2012 Paul KrzyzanowskiService Models for QoS • No QoS (best effort) – Default behavior for IP with no QoS – No preferential treatment – Host is not involved in specifying service quality needs • Soft QoS (Differentiated Services) – No explicit setup – Identify one type of service (data flow) vs. another – Certain classes get preferential treatment over others • Hard QoS – Network makes commitment to deliver the required quality of service – Host makes a reservation • Traffic flows are reserved 11 10/1/2012 © 2012 Paul KrzyzanowskiApproaches to Network Resource Allocation • Router-based vs. Host-based – Router-based • Each router decides which packet to forward & when – Host-based • Each host observes network conditions and adjusts its behavior • Reservation vs. feedback-based – Reservation-based • Host asks for specific capacity from the network • Each router allocates buffer space for that flow to satisfy the request. • If a router cannot grant, reservation is denied – Feedback-based • Hosts sends data without reserving resources • Host gets congestion feedback from a router or detects packet loss & adjusts its transmission rate 12 10/1/2012 © 2012 Paul KrzyzanowskiCongestion Control • Congestion: – Caused by more incoming traffic than we can route • Three approaches – Admission control (input) • Prevent congestion that has been detected from getting worse • Do not allow packets for a specific flow, new flows, new virtual circuits – Choke packets (feedback) – Queue management (output) 13 10/1/2012 © 2012 Paul KrzyzanowskiCongestion Control: Choke Packets • If a router determines congestion, send back a “choke packet” – Packet contains destination address identifying the port that is congested – This is a request from the router not to send packets to that destination (voluntary) • IP handles congestion by dropping packets • Explicit Congestion Notification (ECN) allows end-to-end notification of congestion (RFC 3168) 14 10/1/2012 © 2012 Paul KrzyzanowskiControlling Jitter • Multiple queues per output port • Queue based on priority • Each packet is assigned to a queue – Layer 2: 802.1p priority bits, MPLS EXP field – Layer 3: IP ToS bits, protocol type, source/destination address – Layer 4: port numbers – Any combinations output queues Classifier Scheduler Incoming packet Transmitted packet 15 10/1/2012 © 2012 Paul KrzyzanowskiControlling Jitter: scheduling packets • Simplest was a single FIFO queue • Round robin from multiple queues – Each class of service gets a fair share – not what we want • Priority – If there are always packets in a high priority queue, we get head of line blocking (simply packets holding up other packets) • Weighted Fair Queuing (WFQ) – Each queue gets a priority and a minimum % of link speed output queues Classifier Scheduler Incoming
View Full Document