3.7. Reducing the TCP Delayed ACK Timeout

On Red Hat Enterprise Linux, there are two modes used by TCP to acknowledge data reception:
Quick ACK
  • This mode is used at the start of a TCP connection so that the congestion window can grow quickly.
  • The acknowledgment (ACK) timeout interval (ATO) is set to tcp_ato_min, the minimum timeout value.
  • To change the default TCP ACK timeout value, write the required value in milliseconds to the /proc/sys/net/ipv4/tcp_ato_min file:
    ~]# echo 4 > /proc/sys/net/ipv4/tcp_ato_min
Delayed ACK
  • After the connection is established, TCP assumes this mode, in which ACKs for multiple received packets can be sent in a single packet.
  • ATO is set to tcp_delack_min to restart or reset the timer.
  • To change the default TCP Delayed ACK value, write the required value in milliseconds to the /proc/sys/net/ipv4/tcp_delack_min file:
    ~]# echo 4 > /proc/sys/net/ipv4/tcp_delack_min
TCP switches between the two modes depending on the current congestion.
Some applications that send small network packets could experience latencies due to the TCP quick and delayed acknowledgment timeouts, which previously were 40 ms by default. That means small packets from an application that seldom sends information through the network could experience a delay up to 40 ms to receive the acknowledgment that a packet has been received by the other side. To minimize this issue, both tcp_ato_min and tcp_delack_min timeouts are now 4 ms by default.
These default values are tunable and can be adjusted according to the needs of the user's environment, as described above.

Note

Using timeout values that are too low or too high might have a negative impact on the network throughput and latencies experienced by applications. Different environments might require different settings of these timeouts.