Uploaded by zalita284

congestion and QoS

advertisement
Computer Networks (2IC15)
Congestion control and QoS
Igor Radovanović
Thanks to
A. B. Forouzan
A. Tanenbaum
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
The main focus
Applicable for all layers
• Congestion control
– try to avoid traffic congestion
• Quality of Service
– create an appropriate environment for the traffic
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Data traffic
• peak data rate – max data rate of the traffic
• average data rate = (amount of data)/time
• effective bandwidth – the bandwidth the network needs
to allocate for the flow of traffic; f(ADR,PDR or MBS)
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Traffic profiles
• Constant-bit-rate traffic
• Variable-bit-rate traffic
• Bursty traffic
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Congestion
• Appears if the load on the network is greater than the
capacity of the network
– load: the number of packets sent to the network
– capacity: the number of packets a network can handle
• Why congestion occurs?
• Analogy:
– spitsuur
– “file op de A1 door een aanrijding”
• Congestion control: keep the load below capacity
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Congestion (cnt’d)
1. the packet is put at the end of the input queue
2. the processing module moves the packet from the
queue and forwards the packet
3. the packet is put in an appropriate output queue
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Network performance
• delay versus load
…+ queuing delay
transmission delay +
processing delay +
propagation delay
• delay is composed of…?
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Network performance (cnt’d)
• Throughput versus network load
• throughput:
number of packets passing
through the network
packets discarded
and retransmitted
• Power=throughputα/delay, 0<α≤1; α=1 → max power
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Congestion control and
resource allocation
•
“Two sides of the same coin.”
•
If the network resources are correctly allocated,
congestion can be avoided.
•
Network resources
1. Buffer space in the switches and routers
2. Digital bandwidth of the connection
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Taxonomy of resource allocation
mechanisms
•
Router-centric vs. Host-centric
– Address problem from either inside or outside a network
– Router-centric
• Routers decide upon packet dropping
– Host-centric
• An end host observes the network condition and adjusts behavior
accordingly
•
Reservation-based vs. Feedback-based
– ReB: an end host asks for a certain amount of resources at the time of the flow
establishment
– FB: an end host adjusts its sending rate according to the feedback from the
receiving host
• Feedback: either explicit or implicit
•
Window-based vs. Rate-based
– WB: mostly in combination with FB
– RaB: mostly in combination with ReB
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Congestion control
• Open-loop congestion control
– prevent congestion before it happens
• retransmission policy
– retransmission timers must optimize efficiency & prevent
congestion
• window policy
– Selective Repeat window is better than Go-back-N
• acknowledgement policy
– if not every packet is ACKed the sender may slow down
• discarding policy
– Example: in audio transmission – discard less sensitive
packets (quality of sound still preserved)
• admission policy
– QoS mechanism; switches (routers) first check resource
requirements of a flow before admitting it to the network
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Congestion control (cnt’d)
• Example: helicopter monitoring congestion on the roads
• Closed-loop congestion control
– back pressure
• congested router informs previous upstream router to reduce
the outgoing traffic
– choke point
• a packet sent by a router to the source (similar to ICMP
source quench)
– implicit signaling
• the delay in receiving an ACK can be a signal that a network
is congested
– explicit signaling
• a router can explicitly send a special bit (flag) in the packet to
the source or the destination
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Evaluation criteria
• Q1: Which resource allocation (congestion control)
mechanism is good?
• A1: Depends on the requirements….I know
• Q2: But what are the requirements?
• A2: Resources must be allocated EFECTIVELY and FAIRLY
– Effective: throughput vs. delay
• Q3: When is a mechanism effective? And when is it efficient?
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Congestion control in TCP
•
TCP assumes that the cause of lost segment is due to congestion in
the network
•
Retransmission of the lost packets does not solve congestion
problem – it aggravates it
•
In flow control, sender window size determined by the receiver
window – no information about the network congestion
•
If the network cannot deliver data to the receiver due to congestion,
it has to inform the sender to slow down
•
Congestion window: min (receiver window size, congestion window size)
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Congestion avoidance in TCP
1.
Slow Start (SS) & Additive Increase (AI) (AI=Congestion Avoidance)
•
•
•
start with the congestion window (cwnd) = max segment size
for each successfully received ACK increase the cwnd size by 1 until
the cwnd = threshold value; (exponential increase)
after that, for each successfully received ACK, increase the window
size by 1/n segments up to a size of the receiver window.
n=current congestion window (cwnd) size
Congestion
Avoidance
2. Multiplicative Decrease (MD)
•
•
3/1/2010
if a time-out occurs the
threshold is set to one
maximum segment size
(TCP Tahoe, TCP Reno).
if 3 duplicated ACKs received
the threshold is set to a half
of the cwnd size
(TCP Reno)
Slow Start
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Multiplicative
Decrease
TCP sender congestion control (AIMD)
Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Fairness
Assume that the transmission rate in each of the links is R bps.
R
R
R
A congestion-control mechanism is said to be fair if the average
transmission rate of each of the N connections is approximately R/N.
Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Is AIMD fair?
•
Assume two connections have
the same MSS and RTT
– i.e. if they have the same
window size then they have the
same throughput
•
•
Assume no other TCP and UDP
connections
Ignore Slow Start phase
– i.e. consider only CA (AI) mode
Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Quality of Service
• “The collective effect of service performance which
determines the degree of satisfaction of a user of the
service.” (ITU-T)
– service: A set of functions offered to a user by an organization.
– user: Any entity external to the network which utilizes
connections through the network for communication.
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Flow characteristics
•
Reliability – if lacking means that packets or ACKs are lost
– more important with FTP, SMTP than with audio conferencing
•
Delay – source to destination delay
– telephony, audio & video conferencing more prone to delay
•
Jitter – variation in delay for packets belonging to the same flow
– real-time audio & video cannot tolerate high jitter
•
3/1/2010
Bandwidth
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
QoS requirements
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Providing QoS
• Separate policy and mechanism
– Mechanism: marking packets to allow routers to distinguish
among packets belonging to different classes
– Policy: The manner in which a router distinguishes among
packets by treating them differently
• Packet-discarding policy
• Scheduling policy
• Leaky bucket
– Regulation of the rate at which a flow is allowed to inject
packets into the network
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Techniques to improve QoS
•
•
•
•
Scheduling
Traffic shaping
Resource reservation
Admission control
– Resource-related
• Dynamic resource provisioning (request – response)
– Policy-related
• Resource provisioning can be changed only on a relatively
long time scale (SLA based)
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Techniques to improve QoS
•
•
•
•
Scheduling
Traffic shaping
Resource reservation
Admission control
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Scheduling
FIFO queuing
Priority queuing
starvation problem
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Scheduling (cnt’d)
• weighted fair queuing
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Techniques to improve QoS
•
•
•
•
Scheduling
Traffic shaping
Resource reservation
Admission control
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Traffic shaping
• “Mechanism to control the amount and the rate of the
traffic sent to the network.”
• Leaky bucket
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Traffic shaping (cnt’d)
• Token bucket – to speed up transmission when large
bursts arrive
– future credits accumulated in the form of tokens
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Techniques to improve QoS
•
•
•
•
Scheduling
Traffic shaping
Resource reservation
Admission control
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Resource reservation
• “A flow of data needs resources such as buffer,
bandwidth, CPU time..”
• The quality can be improved by reserving these
resources in beforehand
– The flow doesn’t need to compete with other flows
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Techniques to improve QoS
•
•
•
•
Scheduling
Traffic shaping
Resource reservation
Admission control
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Admission control
• mechanism used by a router or a switch to accept or
reject a flow based on flow specifications
3/1/2010
Igor Radovanović, [email protected]
TU/e Computer Science, System Architecture and Networking
Download