I'm just trying to understand how retransmission feature works in the case of TCP on my linux box, but on the internet you can find really different information most of which is outdated or wrong, so I decided to ask the question here.
When it comes to RTO, in the linux kernel (file include/net/tcp.h) you have two options:
#define TCP_RTO_MAX ((unsigned)(120*HZ))
#define TCP_RTO_MIN ((unsigned)(HZ/5))
So there's a possibility of setting minimum and maximum time for a packet to be retransmited. Both of the above parameters depend on HZ
, which can be specify in the kernel source, or you can customize it via CONFIG_HZ
, at least in the case of adm64:
$ egrep HZ /boot/config-4.1.0-2-amd64
...
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250
So the minimum RTO should be around 50ms (250/5). But when you check the following wireshark output, you can see something very different:
It's one second. Is there an option that can also influence the RTO time?