tcp timeout parameter

 

Timeout during connection establishment:

tcp_syn_retries :

For a new connection, how many SYN connection requests the kernel has to send before deciding to give up.

tcp_synack_retries :

For the remote connection request SYN, the kernel will send a SYN + ACK datagram to confirm the receipt of the last SYN connection request packet. This is the second step of the so-called three-way handshake mechanism. This determines the number of SYN+ACKs sent by the kernel before giving up the connection.

 

Timeout during data transmission:

tcp_retries1:

Once the retransmission exceeds the threshold tcp_retries1, the main action is to update the routing cache.
To avoid problems caused by routing changes.

tcp_retries2:

Will give up the retransmission and close the TCP stream

In addition: It is not the real number of retransmissions that really limits the number of retransmissions.
Instead, use tcp_retries1 or tcp_retries2 as the boundary and rto_base (such as TCP_RTO_MIN 200ms) as the initial RTO, and calculate a timeout value. If the retransmission interval exceeds this timeout, it is considered that the threshold is exceeded.

 

Established connection, no data transmission timeout:

tcp_keepalive_time

tcp_keepalive_probes

tcp_keepalive_intvl

 

Ways to reduce time_wait:

For tcp_tw_reuse & tcp_tw_recycle to take effect, tcp_timestamp must be turned on at the same time

Guess you like

Origin blog.csdn.net/zgb40302/article/details/114976728