You are on page 1of 3

A Comparative Analysis of TCP Cubic and

Westwood Algorithms
Wafa Al Rusayyis

AbstractThe Purpose of this paper is to compare and analyze A. TCP Tahoe


different congestion control and avoidance mechanisms used for
TCP protocol, focusing on TCP Cubic and TCP Westwood. The TCP Tahoe can be considered as the first concept of TCP
paper starts with comparing the performance of TCP Cubic variant developed by Van Jacobson in 1986 in [1], and it is
and TCP Westwood with the classic TCP variance: TCP Tahoe based on the principle of conservation of packets, i.e. if the
and TCP Reno. The second part of the paper discuss both of connection is working at the available capacity of bandwidth,
TCP Cubic and TCP Westwood algorithms mechanisms, and
their performance target. Then finally, simulations scenarios are
then a packet is not inserted into the network unless a packet is
conducted using TCP Goodput to measure the performance of the taken out as well. Then if a loss packet occurs, the Slow Start
different algorithms. The simulation is done using Network Sim- Threshold (ssthresh) is set to half of the current congestion
ulator (NS3) for different scenarios including regular network, window (cwnd) value , then the cwnd reset to its initial value
LFN (Long Fat Network), and Lossy network. The simulation and increased exponentially during the slow start phase. Once
results are analyzed showing the different performances of the
algorithms, and which is more suitable for each network scenario.
the cwnd reaches the ssthresh, TCP switch to congestion
avoidance which as mentioned before, cwnd is increased
linearly per every new ACK received. The main disadvantage
of Tahoe is that it takes a whole timeout interval to detect a
I. I NTRODUCTION packet loss, and sometimes more in practical, plus it does not
support immediate sending of ACKs [1]. Figure 1 is showing
the TCP Tahoe-controlled data flow
Transmission Control Protocol (TCP) is the main protocol
beside Internet Protocol(IP) that is Internet is built around,
and as the network conditions always vary and the network
itself is not perfect, one of The most critical mechanisms
needed in TCP is congestion control to ensure the reliability
of connection. Congestion control is usually done through
different techniques (or stages). Original TCP (TCP Tahoe)
introduced the first three steps of control using Slow Start,
Additive Increase Multiplicative Decrease (AIMD), and fast
Fast Retransmit. Then TCP Reno included the Fast Recovery,
then TCP Vegas Introduces Congestion avoidance [1].
The main idea used usually in TCP is using congestion
window (cwnd) at the transmitter to get an estimation of
how much data can be transported without losing packets
Fig. 1. TCP Tahoe-controlled data flow [1]
in the network. In the beginning, the congestion window
is set to the minimum value (usually one segment), then
increasing the value exponentially by one segment for each
B. TCP Reno
incoming acknowledgement (ACK) using slow start algorithm
till reaching the slow start threshold (ssthresh) [1]. After In general, TCP Reno retains the same procedures done in
reaching this stage, the value of congestion window increased Tahoe, but adding an enhancement aiming for earlier detection
linearly by one segment per round-trip-time (RTT) using of lost packets, this technique is called Fast recovery. the main
congestion avoidance algorithm. To enhance these procedures idea is to set the Slow Start Threshold (ssthresh) to the value
a technique called Fast Retransmit is used, the main purpose is of half of the current cwnd instead of resetting the cwnd to the
to minimize the time a transmitter holds before retransmitting a initial value, so it does not move to the slow start stage, but
non received segment to be following receiving three repeated move directly to Congestion Avoidance stage, the difference
ACKs. Following that, the TCP sender move to a stage called can be seen in Figure 2 showing the TCP Reno-controlled
the fast recovery and stays in that stage till receiving the ACK data flow. The main disadvantage of Reno is that it does
of all segments in the last window. And as a start, the classic not perform well with high packet loss, as if that happens
TCP variance: TCP Tahoe and TCP Reno should be briefly it performs exactly like Tahoe. Figure 3 shows how the value
discussed [1][2]. of cwnd for both Tahoe and Reno [2].
is far from the maximum point, and slowly when it is close to
the maximum point (almost zero around Wmax ) as shown in
figure 4. This technique leads to high scalability over long fat
networks, while still being stable to normal TCP flows with
high fairness [4]. The second technique is to make the window
growth to be independent of RTT to increase and enhance the
fairness of bandwidth among the competing flows over fast
and long distance networks [3].
The third technique is to set a maximum to the window
increment Smax per second. This way forces the window to
grow linearly when it is far away from Wmax , it can be noticed
that this technique makes the growth function so close to the
Fig. 2. TCP Reno-controlled data flow [2] growth function of BIC, but in the case of CUBIC, the linear
increments in the case of short RTTs is real time dependent
[3].

Fig. 3. cwnd values for TCP Tahoe and Reno [2]

II. TCP CUBIC


Fig. 4. The Window Growth Function of CUBIC [3]
As more newer applications are appearing almost daily, the
need of better performance in networks is needed, of course
III. TCP W ESTWOOD
as Congestion control is one of the most vital issues, more
approaches are introduced to fit the needs of theses networks, Another algorithm and technique that will be simulated
one of these approaches is TCP CUBIC which optimized in the next section is TCP Westwood, which is designed to
for higher capacity networks with higher delay called long enhance the performance of lossy networks the main idea
fat networks (LFN), it is used by default in Linux kernel. here is to compute (estimate) the connection bandwidth from
TCP CUBIC is generally aiming to enhance the previous TCP the sender side, getting a parameter called bandwidth esti-
protocols (TCP BIC especially) by using a cubic function (1) mate (BWE) which is can be considered as the connections
as window growth function instead of using the linear function bandwidth bottleneck share [5]. BWE values can be computed
used in the these previous TCP protocols [3].

W (t) = C(t K)3 + Wmax (1)

where C is a scaling factor, t is the elapsed time from the


last window reduction, Wmax is the window
q size just before
3 Wmax
the last window reduction, and K = C , where is
a constant multiplication decrease factor applied for window
reduction at the time of loss event (i.e., the window reduces
to Wmax at the time of the last reduction).
Using this function as the window growth function, both the
scalability and the fairness are enhanced significantly. This Fig. 5. TCP Westwood Algorithm [5]
done using three techniques. First technique is to aggressively
increase the size of the window when the value of the window according to the ACKs reception rate, and if there are more
than 2 duplicate ACKs, or timeouts expirations, the congestion serve this kind of networks. This work can be considered as
window (cwin) and ssthresh are reset to be the multiplication a start for more advanced work in future, even by testing
of BWE and minimum RTT values. The algorithm provides the performance of more algorithms and approaches, or by
high compatibility with end to end TCP protocol standards, considering more complicated scenarios and network schemes.
leading to more stable, fair performance in the case of lossy
R EFERENCES
networksGangadhar.The algorithm works in case of the packet
loss is indicated by 3 duplicated ACKs as follows: [1] V. Jacobson, M. Karels, Congestion avoidance and control, Proc. ACM
SIGCOMM , 1988.
[2] V.Jacobson Modified TCP Congestion Control and Avoidance
Algorithm 1: TCP Westwood algorithm (Duplicated Alogrithms.Technical Report 30,Apr 1990.
ACKs) [3] Sangtae Ha , Injong Rhee , Lisong Xu, CUBIC: a new TCP-friendly
high-speed TCP variant, ACM SIGOPS Operating Systems Review, v.42
if (3 DUPACKs are received) then n.5, p.64-74, July 2008
ssthresh = (BW E RT T min)/segment size; [4] Ha, Sangtae, Injong Rhee, and Lisong Xu. CUBIC: a new TCP-friendly
high-speed TCP variant. ACM SIGOPS Operating Systems Review 42.5
if (cwin > ssthresh)/ congestion avoid. / then (2008): 64-74.
cwin = ssthresh; [5] Mascolo, Saverio, et al. TCP westwood: Bandwidth estimation for
end enhanced transport over wireless links. Proceedings of the 7th annual
international conference on Mobile computing and networking. ACM,
end 2001.
[6] Gangadhar, Siddharth, et al. TCP Westwood (+) protocol implementa-
While the TCP segment size in bits. On the other hand, in tion in ns3. Proceedings of the 6th International ICST Conference on
Simulation Tools and Techniques, 2013.
the case that timeout expiration is used to indicated packet [7] Levasseur, Brett, Mark Claypool, and Robert Kinicki. A TCP CUBIC
loss, both the congestion window and the slow start threshold implementation in ns-3. Proceedings of the 2014 Workshop on ns-3.
are set equal to 1 and BWE the whole algorithm can be shown ACM, 2014.
in figure 5. So as can be seen, the same behaviour of Reno is
somehow followed, but the algorithm provides faster recovery
by setting slow start threshold to the value of BWE [5]. The
algorithm works in case of the packet loss is indicated by
timeout expiration as follows:

Algorithm 2: TCP Westwood algorithm (Timeout)


if (coarse timeout expires) then
ssthresh = (BW E RT T min)/segment size;
if (ssthresh < 2) then
ssthresh = 2;
end
cwin = ssthresh;
end

IV. C ONCLUSION
Through the previous sections of this paper, A comparative
analysis and simulation are demonstrated to show the differ-
ence in performance of four TCP algorithms, including two of
the classic ones (i.e TCP Tahoe and Reno), and two advanced
ones (i.e TCP Cubic and Westwood). A brief about each of
these algorithms is presented at the beginning, then different
simulations are performed using Network Simulator NS3 with
different network scenarios (regular network, lossy network
(wireless), and long fat network). The simulations were per-
formed to show and compare the differences of performance
of each of these algorithms in each of the mentioned scenarios.
The simulations showed that both TCP Cubic and TCP
Westwood are giving better performance generally. And as
expected, for Long Fat Network, results show that the TCP
Cubic is giving the best performance among all the algorithms
as it designed espicially for this kind of networks, while
in lossy networks, the TCP Westwood is giving the best
performance, again it is expected result as it is designed to

You might also like