A Simulation Analysis of The TCP Control Algorithms
A Simulation Analysis of The TCP Control Algorithms
Georgi Kirov
Abstract: The paper focuses on the different congestion control mechanisms implemented by the
Transmission Control Protocol (TCP). The publication presents an experimental estimation of the following
TCP control algorithms: Slow-Start and Congestion Avoidance without Fast Retransmit, Tahoe that includes
Fast Retransmit and Fast Recovery, and Reno using a modified version of the Fast Recovery. The state of
the art of the TCP control approaches is described. The advantages and drawbacks of the above-mentioned
algorithms are investigated through the simulation analysis. The TCP performance analysis is based on
different scenarios of the network simulation with low percentages of the packet loss.
Key words: TCP Control Algorithms, Network Simulation, Network Performance.
INTRODUCTION
The state of the art of the network congestion shows that it is very difficult problem
because there is no way to determine network condition. The congestion occurs when
there is a lot of traffic in the networks [1, 2, 5]. The congestion control can be defined as a
multicriterial optimization task that has to estimate the following uncertain input
parameters: number of users and applications that use the network, network capacity,
congestion points, etc.
Rapidly increasing bandwidths [3] and great variety of software applications have
created a recognized need for increased attention to TCP flow-control mechanisms [10]. In
order to optimize the network utilization the expert researches are focused on the
managing of TCP flow-control window. The main purpose of the paper is to analyse the
abilities of the TCP control mechanisms for automatically and dynamically defining of
optimum window size for a given connection.
The paper is organized as follows: the sections from 1 to 4 describe the basic
principles of the different TCP control algorithms, the next section presents a simulation
research of the TCP congestion control approaches, the last section presents a
comparative analysis of the simulation results and concluding remarks.
-- IIIB.14-1--
International Conference on Computer Systems and Technologies - CompSysTech’ 2005
SENDER RECEIVER
cwnd=1 Packet0
ASK1
cwnd=2 Packet1
Packet2
ASK2
cwnd=4 ASK3 Packet3
Packet4
Packet5
Packet6
Packet7
CONGESTION AVOIDANCE
Congestion avoidance is the algorithm that tries to solve the problem with lost
packets. The congestion occurs when the rate at which packets arrive at routers is more
than routers can send [5]. In general, there are two indications of packet loss: a timeout
occurring and the receipt of duplicate ACKs.
Congestion avoidance [7] and slow start are different control algorithms that work
together. The combined control mechanism introduces two parameters to adjust the
amount of data being injected into the network: a congestion window (cwnd), and a slow
start threshold size (ssthresh). The window size is defined by the following formula:
where cwnd is a window that sender can transmit, advertised_window is flow control
window, which is sent from receiver side.
When the new connection starts, TCP sets cwnd to one packet, ssthresh to arbitrary
high value (65535 bytes), and starts slow start mode. In the case of a congestion
(indicated by a timeout or the reception of duplicate ACKs), one-half of the current window
size is saved in ssthresh. and cwnd is set to one packet (i.e., slow start). TCP triggers
Slow start at the beginning of a transfer and the window exponentially increases: send one
segment, then two, then four, and so on every time an ACK is received. The TCP works in
the slow start mode until window size reaches ssthresh [10]. After that TCP performs
congestion avoidance. It dictates that cwnd will be incremented by segsize*segsize/cwnd
each time an ACK is received, where segsize is the segment size and cwnd is maintained
in bytes. This is a linear growth of cwnd, compared to slow start exponential growth
(Figure 2) [9].
-- IIIB.14-2--
International Conference on Computer Systems and Technologies - CompSysTech’ 2005
Network
Window Size capacity
The best
window size
ssthresh
Time
Slow Slow Congestion Slow Congestion
Start Start Avoidance Start Avoidance
FAST RETRANSMIT
The old TCP detects the network congestion and lost packets by the timeout
mechanism. When a packet is sent, TCP sets up its own timer to the retransmission
timeout period (RTO) for this packet. If receiver correctly receives packet, TCP generates
an immediate acknowledgment (ACK) corresponding to the data packet before the timer is
expired. TCP assumes that the network is OK. After that TCP automatically informs the
timer of the received ACK packet and waits for the other ACK packets. In the case, that
TCP doesn’t receive required ACK within RTO period, the sender will retransmit the packet
whose timer is expired. Further, TCP starts slow-start and sets cwnd to 1 and ssthresh to
(old cwnd / 2) (Figure 3).
SEN DER R E C E IV E R
cw n d = 2 P ac k et 1
P ac k et 2
of packet1
ASK1
Time-out
D u p licate A S K
R e tr a n sm
it -P a c k e t1
cw n d = 1
A SK 3
Slow Congestion Congestion
Start Avoidance Avoidance
Time
-- IIIB.14-3--
International Conference on Computer Systems and Technologies - CompSysTech’ 2005
FAST RECOVERY
Fast recovery regards the stage after the moment of the congestion. In the last
several years some modifications of the TCP fast recovery algorithm have been involved
(Tahoe, Reno, Vegas) that distinguish themselves on the basis of their congestion-control
mechanisms. The Thaoe’s algorithm [4, 10] operates as follows (Figure 2):
• After fast retransmit the TCP sets window size to 0 and sstresh to old window
size/2.
• TCP starts slow start.
• When window size reaches ssthresh, TCP triggers to congestion avoidance.
The other variant of the fast recovery is supposed by Reno. In comparison with the
above algorithm it has following differences [4]:
• If the packet loss is caused by RTO (congestion is serious) window size is set to 1
and do Start slow
• In the case that packet loss is indicated by duplicate ACK, congestion is not
serious. It means at least the receiver successfully receives three packets. Then,
congestion avoidance, but not slow start is performed (Figure 4), i.e. window size
is set to old_window_size/2.
-- IIIB.14-4--
International Conference on Computer Systems and Technologies - CompSysTech’ 2005
In this scenario the congestion window size and sent segment sequence number of
the TCP control algorithms are studied when the packet loss is low (1%). The Figure 6
illustrates simultaneously the performance and the congestion window size of the Tahoe
and Reno mechanisms. It confirms the consideration in the chapter 2 that Reno is more
effective.
-- IIIB.14-5--
International Conference on Computer Systems and Technologies - CompSysTech’ 2005
The Figure 7 shows the sent segment sequence number in respect to the time. It
depicts that Reno is slightly better than Tahoe algorithm. The worst is Slow Start without
Fast Retransmit support.
REFERENCES
[1] Douglas, C., Internetworking with TCP/IP (2), Prentice-Hall, Inc., 1991.
[2] Douglas, C., Internetworking with TCP/IP (3), Prentice-Hall, Inc., 1991.
[3] Ewerlid, A., Reliable communication over wireless links, in Nordic Radio Symp.
(NRS), Sweden, Apr. 2001.
[4] Fall, K., S. Floyd, Simulation-based Comparisons of Tahoe, Reno, and SACK
TCP. Computer Communication Review, 26(3), July 1996, pp. 5-21.
[5] Firoiu, V., M. Borden, "A study of active queue management for congestion
control," in Proc. IEEE INFOCOM, March 2000.
[6] Jacobson, V., Congestion Avoidance and Control, Computer Communication
Review, 18(4), August 1988, pp. 314-329.
[7] Jacobson, V., Congestion Avoidance and Control, in Proceedings of SIGCOMM
'88 Workshop, ACM SIGCOMM, ACM Press, Stanford, CA, 1988, pp. 314-329.
[8] Padhye, J., S. Floyd, On Inferring TCP Behavior”, Computer Communications
Review ACM-SIGCOMM, Vol. 31, August 2001.
[9] Schilke, A., TCP over Satellite Links, Seminar Broadband Networking Technology,
TU Berlin, 1997.
[10] Stevens, W., TCP Slow Start, Congestion Avoidance, Fast Retransmit, and Fast
Recovery Algorithms, RFC 2001, 1999, http://www.faqs.org/rfcs/rfc2001.html
-- IIIB.14-6--