Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advanced Computer Networks

Similar presentations


Presentation on theme: "Advanced Computer Networks"— Presentation transcript:

1 Advanced Computer Networks
CS716 Advanced Computer Networks By Dr. Amir Qayyum 1

2 Lecture No. 37

3 Congestion Control Basics: problem, terminology, approaches, metrics
Solutions Router-based: queuing disciplines Host-based: TCP congestion control Router-based congestion avoidance DECbit RED gateways Quality of service

4 Router-based Congestion Avoidance

5 DECbit: Destination Experiencing Congestion bit
Developed for Digital Network Architecture Basic idea One bit allocated in packet header Any router experiencing congestion sets bit Destination returns bit to source Source adjusts rate based on bits Note that responsibility is shared Routers identify congestion Hosts act to avoid congestion

6 DECbit (continued) Routers Calculate average queue length
Averaging interval spans last busy+idle cycles busy: queue is non-empty idle: queue is empty Set DECbit when: average queue length >= 1 Why 1? Maximizes power function Smaller values result in more idle time Larger values result in more queuing delay

7 DECbit – Average Queue Length

8 DECbit (continued) Hosts
Count number of marked packets in last congestion window of packets Increase congestion window by 1 if less than 50% of packets marked Decrease congestion window by factor of 7/8 if greater than or equal to 50% of packets marked Why 50%? Maximizes power function Resurfaced as Explicit Congestion Notification (ECN) in last few years, proposed TCP extension

9 Congestion Control Basics: problem, terminology, approaches, metrics
Solutions Router-based: queuing disciplines Host-based: TCP congestion control Router-based congestion avoidance DECbit RED gateways Quality of service

10 Random Early Detection (RED) Gateways
Developed for use with TCP Basic idea Implicit rather than explicit notification When a router is “almost” congested Drop packets randomly Responsibility is again shared Router identifies, host acts Relies on TCP’s response to dropped packets

11 Weighted Running Average Queue length

12 Random Early Detection (RED) Gateways
Hosts Implement TCP congestion control Back off when a packet is dropped Routers calculate average queue length (as exponential moving average) length = (A) measurement + (1 – A) length Routers act based on average queue length Below minimum length, keep new packets Above maximum length, drop new packets Between the two, drop randomly

13 RED Thresholds on a FIFO Queue

14 Drop Probability Function for RED

15 Random Early Detection (RED) Gateways
Router drop probability depends on two factors Relation of average queue length to bounds Number of packets (count) since Last drop, or Length outside random drop range

16 Random Early Detection (RED) Gateways
Router calculates Base probability for drop: baseProb = MaxP × (length – minThresh) /(maxThresh – minThresh) Actual probability for drop prob = baseProb / (1 – baseProb × count)

17 Random Early Detection (RED) Gateways
Parameter values MaxP is typically 0.02 (drops roughly 1 in 50 packets at midpoint) min (threshold) is typically max/2 Choosing parameters Carefully tuned to maximize power function Confirmed through simulation But answer depends on accuracy of traffic model May create oscillating behavior in the Internet

18 Tuning the RED Gateways
Drops roughly in proportion to flow bandwidths Queue size changes Due to difference in input/output rates Not related absolute magnitude of those rates min must allow reasonable link utilization Difference between min and max thresholds Large enough to absorb burstiness In practice, can use max = 2 × min Use penalty box for offenders!

19 Host-based Congestion Avoidance

20 TCP Vegas – Basic Idea Watch for signs of queue growth
In particular, difference between Increasing congestion window Stable throughput (presumably at maximum capacity) Keep just enough “extra data” in the network Time to react if bandwidth decreases Data available if bandwidth increases

21 Trace of TCP Vegas Congestion Avoidance Mechanism

22 TCP Vegas - Implementation
Estimate un-congested RTT, baseRTT, as minimum measured RTT Calculate expected throughput as congestion window / baseRTT Measure throughput each RTT Mark time of sending distinguished packet Calculate data sent between send time and receipt of ACK

23 TCP Vegas - Implementation
Act to keep the difference between estimated and actual throughput in a specified range Below min threshold, increase congestion window Above max threshold, decrease congestion window Additive decrease used only to avoid congestion Want between 1 and 3 packets of extra data (used to pick min/max thresholds)

24 Congestion Control & Resource Allocation
Basics: problem, terminology, approaches, metrics Solutions Router-based: queuing disciplines Host-based: TCP congestion control Router-based congestion avoidance DECbit RED gateways Quality of service

25 Quality of Service Outline Realtime Applications Integrated Services
Differentiated Services

26 Quality of Service How “good” are late data and low-throughput channels? It depends on the application. Do you care if... your takes 1/2 hour to reach your friend? you have to spend 1/2 hour to make a cheaper plane reservation on the Web? your call to Rescue-15 takes 1/2 hour to go through your nifty new IP phone service?

27 Quality of Service High-throughput allows new classes of applications
Some are sensitive to network delay, e.g. voice, video Called real-time applications Control applications (e.g. factories) More an issue of possible starvation (see below) But fit within QoS framework

28 Quality of Service How to achieve timely delivery
When actual RTT small (less than 2/3) relative to acceptable delay, retransmit When base RTT (no queuing delay) large (greater than 2) relative to acceptable delay, impossible Otherwise possible, but not through retransmission

29 Quality of Service Within the United States, for example
Base RTT (no queuing delay) peaks around 75 ms Actual RTT is often ms Humans notice about 50 ms delay for voice When in comparable regime, retransmission cannot satisfy, so... Use erasure codes across packets (e.g. FEC) , or Support delay preferences in the network, called quality of service, or QoS

30 QoS Granularity Fine-grained: guarantees for individual flows, used in RSVP and ATM virtual circuits between applications Coarse-grained: guarantees for flow, used in DIFFSERV and ATM VC’s between routers IETF is standardizing extensions …

31 Real Time Applications
Require “deliver on time” assurances Must come from inside the network Example application (audio) Sample voice once every 125µs Each sample has a playback time Packets experience variable delay in network Add constant factor to playback time: playback point Microphone Speaker Sampler A D converter Buffer D A


Download ppt "Advanced Computer Networks"

Similar presentations


Ads by Google