There are many kernel tuning articles online (e.g. ArchWiki).
However, are those adjustments really better than the default? If they are, why aren’t they the default, or, what’s the rationale behind the default values? (Perhaps they need to be proven safe?)
In particular I’m interested in the following options, as I don’t understand the rest much…
net.ipv4.tcp_ecn = 2
Enabling on outgoing connections (1) seems safe-ish according to Wikipedia (less than 1% & Apple).
net.ipv4.tcp_fastopen = 1
As I understand it, 3 (0x1+0x2) only enables the support, to use it application still need to explicitly set it. So why server support is disabled?
net.ipv4.tcp_mtu_probing = 0
It seems PLPMTUD (1) is intending to replace PMTUD. Does it have any downsides?
net.ipv4.tcp_slow_start_after_idle = 1
Many posts says “This setting kills persistent single connection performance” or something thereof. Is it true? RTO is usually about 200ms so I imagine the reduction is indeed pretty frequent. Also RFC 2861 is obsoleted by RFC 7661. Though the RFC says the reduction is conservative and the slow-start is quick.
Found reason for ECN.
The defaults work for most peoples networking needs.
But there are use cases that will require specific tuning for performance etc reasons.
What is the problem that you need to solve that has lead you to look into tuning the network?
TBH no problem, but purely curiosity.
I used to be in terrible network conditions and there were these tuning guides for server setup to make the ends as good as possible, that’s how I was made aware of the options. Now I’m just looking over the configs to see if anything is useful to my local machines, but also trying to understand these options better than before lest I add a bunch of snake oil .
I guess it’s true that most don’t need them (example), but still some of the options sound nice to have, so I’m curious as to why the choice of defaults.
If it ain't broke don't fix it has been good advice over the years, particularly when applied to software.
As long as your system is performing satisfactorily one should not tweak things. Doing so may introduce problems that at times can be difficult to recover from. It is nice to be aware of options, but sometimes not so nice to apply those options without full understanding of the consequences.
Configuring the network can somewhat be better understood by using the man pages
man NetworkManager.conf for a lot of information about available options for tweaking.
The sysctl knobs will tune the tcp stack at a deeper level then networkmanager or systemd-networkd can do. There are cases where this is very important,
but that is rarely the case outside a enterprise production env i suspect.
Some of the knobs tune rfc compatibility that can depend on all clients supporting the rfc in question, for example.