Obscure kernel settings to increase performance of Linux TCP servers
tldp.org
tldp.org
Tuning can be fun. Almost as fun as fixing obscure problems with modem AT strings. ;)
Normally the RTO is set to 200ms. This is conservative in case you have long distance TCP connections. However when your systems are in a same data center environment where round trip times are sub-millisecond the default is two orders of magnitude too high and should be tuned down.
> The default is 0, since this feature is not implemented yet (kernel version 2.2.12).
2.2.12 was last modified in August of 1999. 2.2.14 was released by January 2000, so it's not like 2.2.12 was around forever.
Don't go screwing around with your kernel settings based on this document.
> the default settings have been tweaked by domain experts
> over decades to be reasonably good for the general case.
Yes, but look at default configurations such as those of Apache and Mysql - you'll find that the default settings have been finely honed for environments that were common ten years ago... Even settings need updating - optima are moving targets.The two most common encountered problems are incast TCP collapse and slow clients.
https://everythingisdata.wordpress.com/2009/09/25/fine-grain...
http://www.pdl.cmu.edu/Incast/
http://conferences.sigcomm.org/sigcomm/2009/workshops/wren/p...
(For TCP testing: iperf... remember to account for protocol overhead, bits/bytes)
Handling slow clients is app-specific, so there's no general advice other than don't get clever. Clever -> !debuggable -> !maintainable -> !scalable.
Actually it seems someone just copypasted the whole set of sysctls from the kernel ip-sysctl.txt, as the list includes the most common settings such as net/ipv4/ip_forward, net/ipv4/tcp_keepalive_time and net/ipv4/ip_local_port_range.
/proc/sys/net/ipv4/tcp_abort_on_overflow
because figuring out when you need it is awful.