Side_1_360

(Dana P.) #1
illustrated in Figure 11 (one maximum segment
size is assumed to be equal to 8 kbyte). The con-
gestion window continues to grow until a time-
out occurs or the receiver’s window is reached.
This part of the algorithm is called slow start.

A parameter called thresholdis also used. This
is initially set to 64 kbytes. When a timeout
occurs, the threshold is reduced to half of the
current congestion window. That is, assuming
that a timeout occurs when the congestion win-
dow is 80 kbyte (as in Figure 11), the next
threshold will be 40 kbyte. Moreover, the con-
gestion window is set to one segment size (equal
to 8 kbyte in Figure 11). So after a timeout, the
slow start approach is again applied until the
threshold is reached.

When the congestion window is greater or equal
to the current threshold, its size is increased by
one segment size (i.e. in a linear manner) as
shown in Figure 11.

The two algorithms described above, slow start
and congestion avoidance, are essential parts of
TCP. Slow start and congestion avoidance are
independent algorithms with different objec-
tives. When congestion occurs TCP slows down
its transfer rate of packets. Then the slow start
algorithm is invoked again. These algorithms
require that two variables are maintained for
each TCP connection, a congestion window,
cwnd, and a slow start threshold size, ssthresh.
Then, these operates as follows (ref. [RFC
2001]):


  1. Initialise cwndto one segment and ssthresh
    to 65535 bytes.

  2. The TCP output routine never sends more
    than the minimum of cwndand the receiver’s
    announced window.

  3. When congestion occurs (timeout or duplicate
    acknowledgements), one-half of the current
    window size is saved in ssthresh. Further-
    more, when a timeout occurs, cwndis set to
    one segment.

  4. When new data is acknowledged, cwndis
    increased as: i) in slow start (cwndis less or
    equal to ssthrresh) increase by one segment –
    in effect a doubling of the window for each
    round-trip time; ii) in congestion avoidance
    increase by segsize*segsize/cwnd(segsizeis
    the segment size), which is a linear growth.


5.4 TCP Timers

TCP works with several timers, at least concep-
tually. The retransmission timeris started when
a segment is sent. If an acknowledgement is
received before the timer expires, the timer is
stopped. On the other hand, if the timer expires
before the segment is acknowledged, the seg-
ment is retransmitted and the timer is restarted.
A main question is how to set a proper value of
this timer. Setting it too short will result in many
unnecessary retransmitted packets. Setting it too
long will result in long retransmission delays
and possible low throughput. Therefore, it is
desirable to have an algorithm that dynamically
adjusts the timer value based on measurements
of the round-trip delay. A variable, round-trip
time (RTT)is maintained by TCP, which is an
estimate of the round-trip delay. Whenever an
acknowledgement arrives, the TCP entity mea-
sures how long the acknowledgement took. It
then updates RTT, for the next interval i+ 1,
using a smoothing factor, say a:

RTTi+1= a⋅RTTi+ (1 – a) ⋅T

where Tis the last measured round-trip time.
Typically (ref. [Tane96]), ais 7/8. Then, TCP
commonly uses a value b⋅RTTas the value of
the retransmission timer. One proposal is to set
bin proportion to the deviation of the round-trip
time. However, to simplify the calculations the
deviation, D, can be updated as:

Di+1= c⋅Di+ (1 – c) ⋅|RTT– T|

where cis a smoothing factor. A commonly used
(ref. [Tane96]) value of the timeout is then
RTT+ 4 ⋅D.

When a timeout occurs, one has to decide how to
update the variables. According to the so-called

Figure 11 Illustration of the
congestion algorithm; slow
start, thresholds (maximum
segment size assumed to
be 8 kbyte)


slow start slow start

threshold

threshold

timeout

congestion window (kbyte)

88

80

72

64

56

48

40

32

24

16

8
Free download pdf