Bug 202885 - tcp_syn_retries wrong default
Summary: tcp_syn_retries wrong default
Status: RESOLVED CODE_FIX
Alias: None
Product: Documentation
Classification: Unclassified
Component: man-pages (show other bugs)
Hardware: All Linux
: P1 low
Assignee: documentation_man-pages@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-12 08:14 UTC by vrafaeli
Modified: 2020-05-04 10:23 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description vrafaeli 2019-03-12 08:14:11 UTC
http://manpages.ubuntu.com/manpages/bionic/man7/tcp.7.html

Here it states tcp_syn_retries is 5 by default.
I haven't touched the defaults and I see 6 on my PC. I'm using Ubuntu 18.04.2 (did live upgrade from 16.04).
Comment 1 vrafaeli 2019-03-12 08:16:36 UTC
I also tried to report this bug via mail to linux-man@vger.kernel.org with cc to linux-man@vger.kernel.org, but got rejected as SPAM.
Comment 2 vrafaeli 2019-03-12 10:41:12 UTC
I did some more checks. Others also have 6 as default. This gives a timeout of around 128 seconds. And checking the retransmission algorithm with Wireshark, I guess a default of 5 would give a timeout of around 64 seconds.
Comment 3 Michael Kerrisk 2020-05-04 10:23:39 UTC
Thanks for the report and further info. I applied the patch below.

Closing this bug now.

diff --git a/man7/tcp.7 b/man7/tcp.7
index 2c4c6f15a..5d950951b 100644
--- a/man7/tcp.7
+++ b/man7/tcp.7
@@ -811,12 +811,18 @@ the urgent pointer:
 the urgent pointer points to the first byte after the urgent data.
 Enabling this option may lead to interoperability problems.
 .TP
-.IR tcp_syn_retries  " (integer; default: 5; since Linux 2.2)"
+.IR tcp_syn_retries  " (integer; default: 6; since Linux 2.2)"
 .\" Since 2.1.38
 The maximum number of times initial SYNs for an active TCP
 connection attempt will be retransmitted.
 This value should not be higher than 255.
-The default value is 5, which corresponds to approximately 180 seconds.
+The default value is 6, which corresponds to retrying for up to
+approximately 127 seconds.
+Before Linux 3.7,
+.\" commit 6c9ff979d1921e9fd05d89e1383121c2503759b9
+the default value was 5, which
+(in conjunction with calculation based on other kernel parameters)
+corresponded to approximately 180 seconds.
 .TP
 .IR tcp_synack_retries " (integer; default: 5; since Linux 2.2)"
 .\" Since 2.1.38

Note You need to log in before you can comment on or make changes to this bug.