Unit 4 Lec5

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 26

Congestion Control

Lecture Date: 14th April 2020, 10:50 A.M. to 11:30 A.M.


Congestion
 Congestion in a network may occur if the load on the network—the number of packets sent to the
network—is greater than the capacity of the network—the number of packets a network can
handle.
 Congestion control refers to the mechanisms and techniques to control the congestion and keep
the load below the capacity.
 When a packet arrives at the incoming interface, it undergoes three steps before departing:
1. The packet is put at the end of the input queue while waiting to be checked.
2. The processing module of the router removes the packet from the input queue once it reaches the
front of the queue and uses its routing table and the destination address to find the route.
Congestion
3. The packet is put in the appropriate output queue and waits its turn to be sent.
 In this case 2 issues can occur:
 First, if the rate of packet arrival is higher than the packet processing rate, the input
queues become longer and longer.
 Second, if the packet departure rate is less than the packet processing rate, the output
queues become longer and longer.
Congestion
Congestion: Network Performance
•Congestion control involves two factors that measure the performance of a
network: delay and throughput.
•Delay Versus Load
•When the load is much less than the capacity of the network, the
delay is at a minimum.
•This minimum delay is composed of propagation delay and
processing delay, both of which are negligible.
 In first case delay is increases when load is increased from the capacity because
we now need to add the waiting time in the queues (for all routers in the path) to
the total delay
 In second case, when the load is below the capacity of the network, the
throughput increases proportionally with the load. But if load is more than the
capacity then throughput decreases. At that time packet will be discarded.
Congestion Control
 Congestion control refers to techniques and mechanisms that can either prevent
congestion, before it happens, or remove congestion, after it has happened.
 Congestion Control techniques are broadly divided into categories: open-loop
congestion control (prevention) and closed-loop congestion control
(removal).
 In open-loop congestion control, policies are applied to prevent congestion
before it happens. This prevention can be implemented either by source or
destination.
 Closed-loop congestion control mechanisms try to alleviate congestion after it
happens.
Congestion Control: Open Loop Congestion
Control
1. Retransmission Policy: This policy may increase congestion in the network.
Packet may be retransmitted if it is lost or damaged. To optimize the efficiency
retransmission policy or retransmission timers must be designed.
2. Window Policy: Selective Repeat can be used in place of Go-back-n because
only lost or damaged packet will transmit only.
3. Discarding policy: In a discarding policy, router discards the corrupted or less
sensitive packet partially. For example, in audio transmission, if the policy is to
discard less sensitive packets when congestion is likely to happen, the quality of
sound is still preserved and congestion is prevented or alleviated.
Congestion Control: Open Loop Congestion
Control
4. Acknowledgement Policy: In this policy, single acknowledgement may be sent
for n packets when receiver wants to send a packet or a special timer expire.
5. Admission Policy: An admission policy is work before data transmission in the
network. First resource requirement and network flow is checked before the
transmission and also deny to establish virtual circuit congestion.
Congestion Control: Closed Loop Congestion
Control
1. Back Pressure: Backpressure is a node-to-node congestion control that starts
with a node and propagates, in the opposite direction of data flow, to the source.
The backpressure technique can be applied only to virtual circuit networks, in
which each node knows the upstream node from which a flow of data is
coming. Figure shows the idea of backpressure
Congestion Control: Closed Loop Congestion
Control

 Node III in the figure has more input data than it can handle. It drops some
packets in its input buffer and informs node II to slow down. Node II, in turn,
may be congested because it is slowing down the output flow of data. If node II is
congested, it informs node I to slow down, which in turn may create congestion.
If so, node I informs the source of data to slow down. This, in time, alleviates the
congestion.
Congestion Control: Closed Loop Congestion
Control
2. Choke Packet: A choke packet is a packet sent by a node to the source to inform it of
congestion. In the choke packet method, the warning is from the router, which has
encountered congestion, to the source station directly. There is no communication with the
intermediate nodes.
Congestion Control: Closed Loop Congestion
Control
3. Implicit Signaling: In implicit signaling, No direct communication for congestion is done.
Source keep sending packets to the networks. If no acknowledgement is received for some
time then source automatically assume that there is congestion in the network and slows down
self.
4. Explicit Signaling: In this, a signal is included in the packets that carrying the data. It is of
2 types:
(i) Forward Signaling: The receiver is informed about congestion so that prevention
policies can be implemented
(ii) Backward Signaling: The source is informed to slow down the congestion.
Congestion Control in TCP

 TCP uses Congestion window and congestion policy to avoid congestion.


1. Congestion Window: Sender window size is determined by available buffer
space in the receiver (rwnd) or by congestion in the network.
Actual window size = minimum (rwnd, cwnd)
2. Congestion Policy: It start with slow-start phase, increase the rate rapidly till
reach a threshold. After reaching the threshold, data rate is reduced to avoid
congestion. If congestion is detected then sender again follow slow-start or
congestion avoidance.
Congestion Policy in TCP
Slow START: Exponential Increase
 In this phase after every Round Trip Time (RTT) the congestion window size increments
exponentially. Initially congestion window (cwnd) starts with one maximum segment size
(MSS). The MSS is determined during the connection establishment.
 Slow start increases till it will not reach to threshold. In most implementation, the size of
ssthresh(slow-start threshold) is 65535 bytes.
 In the example shown in next slide, it is assumed that receiver window size is greater than
cwnd.
Congestion Control in TCP: Slow Start: Exponential Increase
Congestion Policy in TCP
Congestion Avoidance: Additive Increase
 To avoid the congestion, additive increase will be implemented rather exponential. This
phase is starts after the slow start phase reached to threshold value
Congestion Control in TCP: Congestion Avoidance: Additive Increase
Congestion Policy in TCP
Congestion Detection Phase: Multiplicative Decrement

 If congestion occurs, then congestion window size must be decreased so that


sender can guess that congestion has occurred. Now there is the need to
retransmit a segment. There are 2 cases for retransmission done:
(i) Retransmission Due to time-out: In this, no information about the segment. In
this case Following steps are taken:
a) Set value of threshold to one-half of the current window size.
b) It set cwnd to the size of 1 segment
c) It starts the slow-start phase again.
Congestion Policy in TCP
Congestion Detection Phase: Multiplicative Decrement

(ii) 3 Duplicate Acknowledgement Received: Some segments may be dropped or


some arrived safely for which acknowledgement is received. Following steps are
done:
a) Set the value of threshold to one half of the current window size
b)Set cwnd to the value of the threshold.
c) It starts the congestion avoidance phase
TCP Congestion Policy Summary
Congestion Control in TCP
•In Example, it is assumed that the maximum window size is 32 segments.
•The threshold is set to 16 segments (one-half of the maximum window
size).
•In the slow-start phase the window size starts from 1 and grows
exponentially until it reaches the threshold.
•After it reaches the threshold, the congestion avoidance (additive increase)
procedure allows the window size to increase linearly until a timeout occurs
or the maximum window size is reached.
•In Figure, the time-out occurs when the window size is 20. At this moment,
the multiplicative decrease procedure takes over and reduces the threshold to
one-half of the previous window size.
•The previous window size was 20 when the time-out happened so the new
threshold is now 10.
Congestion Control in TCP
•TCP moves to slow start again and starts with a window size of 1, and TCP
moves to additive increase when the new threshold is reached.
•When the window size is 12, a three-ACKs event happens. The
multiplicative decrease procedure takes over again.
•The threshold is set to 6 and TCP goes to the additive increase phase this
time.
•It remains in this phase until another time-out or another three ACKs happen.
Congestion Control in TCP

You might also like