'TCP/IP'에 해당되는 글 1건

  1. [2007/12/24] Slow Start

Slow Start

[CS/Study]

TCP data flow에서 flow control을 위해 필요한 기법이다.
발표 중에 좀 헷갈려서....ㄷㄷㄷ wikipedia에서 찾아보니 흠 그런뜻이었군.

Slow Start
Slow-start is part of the
congestion control strategy used by TCP, the data transmission protocol used by many Internet applications, such as HTTP and Secure Shell. Slow-start is used in conjunction with other algorithms to avoid sending more data than the network is capable of transmitting, that is, network congestion

=> slow start는 TCP에 의해 사용되는 congestion control의 한 부분이다. data 전송 프로토콜은 많은 internet application을 통해 사용된다(http나 secure shell과 같은). Slow start는 network congestion이라고 말하는 network의 허용 전송량보다 더 많은 데이터를 보내는 것을 막기 위해 다른 알고리즘과 결합하여 사용된다.

Algorithm

A slow-start algorithm consists of two distinct phases: the exponential growth phase, and the linear growth phase.
During the exponential growth phase, Slow-start works by increasing the TCP
congestion window each time the acknowledgment is received. It increases the window size by number of segments acknowledged. This happens until either an acknowledgment is not received for some segment or a predetermined threshold value is reached. If a loss event occurs, TCP assumes this it is due to network congestion and takes steps to reduce the offered load on the network. Once a loss event has occurred or the threshold has been reached, TCP enters the linear growth (congestion avoidance) phase. At this point, the window is increased by 1 segment for each RTT. This happens until a loss event occurs.
Although the strategy is referred to as "slow-start", its congestion window growth is quite aggressive.

=> Slow start 알고리즘은 두가지 다른 측면으로 구성된다. exponential growth 와 linear growth 측면으로 구성된다.
(책에 보면 이 부분은 자세히 안나와있어서.ㅠㅠ많이 헷갈렸다. exponential로 증가하면 빠른 시간내에 무한대로 늘어나고 linear면 좀더 느린데..-_-)
exponential growth일때는 slow start는 ack가 돌아오는 매 시간 마다 tcp congestion window의 증가에 의해 작동된다. 윈도우 size의 증가는 ack된 segment의 숫자에 의한다. 이 증가는 segment에 대한 ack가 도착하지 않거나 미리 지정해놓은 threshold value에 도착했을때 까지 발생한다. 만일 packet loss가 발생하게 되면 TCP는 network congestion의 끝이라고 보며, network에 load할 수 있는 양을 줄이는 단계에 들어간다. 한번 loss가 일어나거나, theshold에 도착하게 되면 TCP는 linear growth 단계로 들어간다. 이때 window는 RTT마다 1 segment마다 증가한다. 이것은 loss가 일어날때까지 계속 된다. 비록 이 방법은 slow-start라고 불리지만, congestion window의 증가는 상당히 적극적이다.

Basic Slow-Start

The algorithm begins in the exponential growth phase initially with a congestion window size (cwnd) of 1 or 2 segments and increases it by 1 Segment Size (SS) for each ACK received. This behavior effectively doubles the window size each round trip of the network. This behavior continues until the cwnd reaches the size of the receivers advertised window or until a loss occurs.
When a loss occurs half of the current cwnd is saved as a Slow Start Threshold (SSThresh) and slow start begins again from its initial cwnd. Once the cwnd reaches the SSThresh TCP goes into congestion avoidance mode where each ACK increases the cwnd by SS*SS/cwnd. This results in a linear increase of the cwnd.

=> 알고리즘은 exponential growth 측면부터 시작되는데 기본적으로 congestion window size가 1 또는 2 segments로 되어있고, ACK를 받을때 마다 1 segment size에 의해 congestion size가 증가된다. 이 방법은 각각의 네트워크 round trip마다 윈도우 사이즈를 2배 하는데 효율적이다. 이 것은 cwnd(congestion window)가 receiver의 window size에 도달하거나, loss가 발생할때 까지 계속 된다.(흠 receiver의 window size에 도달하면 cwnd는 멈추는 거구나.)
loss가 발생하였을때 현재의 cwnd의 반을 slow start threshold로 저장해두고, slow start는 초기 cwnd에서부터 다시 시작된다. cwnd가 Slow start threshold에 도착하게 되면 SSthresh TCP는 각각의 ACK에 대해 SS*SS/cwnd 에 의해 cwnd가 증가하는 congestion avoidance mode가 된다. 이 결과는 cwnd를 linear하게 증가시킨다.

TCP congestion window
Congestion Window(cwnd) controls startup and limits throughput in the face of loss.
=>cwnd 는 loss를 통해 제한되고 시작이 컨트롤 된다
cwnd gets larger after every new ACK
=> cwnd 는 새로운 ack후에 증가한다.
cwnd gets smaller when loss is detected
=> cwnd 는 loss가 발견되면 작아진다.
usable window=min(rwin,cwnd) <= 이부분이 가장 중요함. 가능한 윈도우 size는 receiver buffer의 window size와 congestion window size중 작은 것을 선택한다.


지난 시간 발표 때 이부분을 가장 어설프게 해서 조사해보았다.
해석은 뭐 믿거나 말거나..나의 짧은 영어 실력으로 한 것이므로...;;;

TAG.