]> git.ipfire.org Git - thirdparty/knot-resolver.git/commit
daemon: decrease tcp backlog to 128
authorTomas Krizek <tomas.krizek@nic.cz>
Tue, 31 Mar 2020 15:32:09 +0000 (17:32 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 1 Apr 2020 09:44:39 +0000 (11:44 +0200)
commit6e0c68be675d2c4f664e772dd1971ab1f9c44093
tree70b8239fb30a79cd71b37f9730badb9099e22410
parentae812d2cf5cce63114090c97a38446a66d70a898
daemon: decrease tcp backlog to 128

From our TCP benchmarks, values over 128 don't seem to have any
measurable benefits, even with hundreds of thousands of connections.

On the contrary, during very high TCP and CPU load, smaller backlog
seems to dramatically improve latency for clients that keep idle TCP
connections.

During normal/low load, smaller backlog doesn't seem to have any
benefits.

When measured against "aggressive" clients that immediately close the
TCP connection once their query is answered, backlog smaller than 128
was measured to hurt performance.

The application's backlog size is ultimately limited by
net.core.somaxconn, which has been set to 128 prior to Linux 5.4.
Therefore, this change only affects newer kernels and those who have
manually set this value to a higher size.

For more, see
https://gitlab.labs.nic.cz/knot/knot-resolver/-/merge_requests/968
NEWS
daemon/engine.c