-
Notifications
You must be signed in to change notification settings - Fork 1
Home
BitTorrent, an application to download and upload the file from and to the internet. Earlier when people used to download files using BitTorrent, many of them observed that while downloading or uploading the file Gmail, YouTube etc slows down. After this it was found that BitTorrent utilizes all the bandwidth for downloading and uploading the file and it doesn't allow others to utilize the bandwidth. To avoid this a protocol called TCP-Low Priority was developed. According to this protocol (take the example of BitTorrent itself) while downloading the file if some other application(High Priority) wants to use the bandwidth, it will allow that application to utilize the bandwidth and if no one is there for bandwidth utilization , it will utilize the bandwidth(Low Priority). It is same as saying "You First".
TCP Low Priority (TCP-LP), a distributed algorithm whose goal is to utilize only the excess network bandwidth as compared to the "fair share" of bandwidth targeted by TCP.
- TCP-LP uses one-way packet delay for congestion indication. The goal of TCP-LP is to provide low priority service in the presence of TCP traffic. To achieve this goal, it is necessary for TCP-LP to infer congestion earlier than TCP. TCP-LP and TCP implicitly coordinate in a distributed manner to provide the desired priority levels.
- TCP-LP measures one-way packet delays and employs a simple delay threshold-based method for early inference of congestion.
- TCP-LP obtains samples of one-way packet delays using the TCP timestamp option. Each TCP packet carries two four-byte timestamp fields. A TCP-LP sender timestamps one of these fields with its current clock value when it sends a data packet. On the other side, the receiver echoes back this timestamp value and in addition timestamps the ACK packet with its own current time. In this way, the TCP-LP sender measures one-way packet delays.
Formula for calculating the smoothed one way delay is given as follows:
Where,
di is the one way delay of the packet with sequence number i.
sdi is the smoothed one-way delay.
is the delay smoothing parameter.
- Whenever smoothed one-way delay exceeds a threshold within the range of the minimum and maximum delay, indication of congestion is inferred by a TCP-LP.
where,
dmin is minimum one-way packet delay.
dmax is maximum one-way packet delay.
is threshold parameter with value between 0 and 1.
TCP LP employs the following algorithm
- After receiving initial early congestion indication, TCP-LP halves its congestion window and enters an inference phase by starting an inference time-out timer. During this inference period, TCP-LP only observes responses from the network, without increasing its congestion window.
- If it receives another early congestion indication before the inference timer expires, this indicates the activity of cross traffic, and TCP-LP decreases its congestion window to one packet.
- Thus, with persistent congestion, it takes two roundtrip times for a TCP-LP flow to decrease its window to 1. Otherwise, after expiration of the inference timer, TCP-LP enters the additive-increase congestion avoidance phase and increases its congestion window by one per round-trip time.
- The value of the inference time-out timer indication (itti) is equal to three times the value of rtt.
new-ACK: indication that ACK packet has arrived
cong ind: congestion indication
itti: inference time-out timer indication
cwnd: congestion window
if (new ACK == 1)
if (cong ind == 1)
if (itti == 1)
cwnd = 1;
else
cwnd = cwnd/2;
endif
itt = 1;
else
if (itti != 1)
cwnd += 1/cwnd;
endif
endif
endif