TCP Delayed Acknowledgment
   HOME

TheInfoList



OR:

TCP delayed acknowledgment is a technique used by some implementations of the
Transmission Control Protocol The Transmission Control Protocol (TCP) is one of the main protocols of the Internet protocol suite. It originated in the initial network implementation in which it complemented the Internet Protocol (IP). Therefore, the entire suite is commonly ...
in an effort to improve
network performance Network performance refers to measures of service quality of a network as seen by the customer. There are many different ways to measure the performance of a network, as each network is different in nature and design. Performance can also be model ...
. In essence, several ACK responses may be combined into a single response, reducing protocol overhead. However, in some circumstances, the technique can reduce application performance.


Method and advantages

As described in RFC 1122, a host may delay sending an ACK response by up to 500 ms. Additionally, with a stream of full-sized incoming segments, ACK responses should be sent for every second segment. Delayed ACKs can give the application the opportunity to update the TCP receive window and also possibly to send an immediate response along with the ACK. For certain protocols such as
Telnet Telnet is an application protocol used on the Internet or local area network to provide a bidirectional interactive text-oriented communication facility using a virtual terminal connection. User data is interspersed in-band with Telnet control i ...
, delayed ACKs can reduce the number of responses sent by the server by a factor of 3, by combining the ACK, window update and the response data into one segment.


Problems

The additional wait time introduced by the delayed ACK can cause further delays when interacting with certain applications and configurations. If
Nagle's algorithm Nagle's algorithm is a means of improving the efficiency of TCP/IP networks by reducing the number of packets that need to be sent over the network. It was defined by John Nagle while working for Ford Aerospace. It was published in 1984 as a Requ ...
is being used by the sending party, data will be queued by the sender until an ACK is received. If the sender does not send enough data to fill the
maximum segment size The maximum segment size (MSS) is a parameter of the ''options'' field of the TCP header that specifies the largest amount of data, specified in bytes, that a computer or communications device can receive in a single TCP segment. It does not count ...
(for example, if it performs two small writes followed by a blocking read) then the transfer will pause up to the ACK delay timeout. Linux 2.4.4+ supports a TCP_QUICKACK socket option that disables delayed ACK. For example, consider a situation where Bob is sending data to Carol. Bob's socket layer has less than a complete packet's worth of data remaining to send. Per Nagle's algorithm, it will not be sent until he receives an ACK for the data that has already been sent. At the same time, Carol's application layer will not send a response until it gets all of the data. If Carol is using delayed ACKs, her socket layer will not send an ACK until the timeout is reached. If the application is transmitting data in smaller chunks and expecting periodic acknowledgment replies, this negative interaction can occur. To prevent this delay, the application layer needs to continuously send data without waiting for acknowledgment replies. Alternatively, Nagle's algorithm may be disabled by the application on the sending side.


References

{{DEFAULTSORT:Tcp Delayed Acknowledgment Delayed Acknowledgment