On 11 Jul 2019, at 11:28, Eric Dumazet wrote:
On 7/11/19 7:14 PM, Prout, Andrew - LLSC - MITLL wrote:
In my opinion, if a small SO_SNDBUF below a certain value is no
longer supported, then SOCK_MIN_SNDBUF should be adjusted to reflect
this. The RCVBUF/SNDBUF sizes are supposed to be hints, no error is
returned if they are not honored. The kernel should continue to
function regardless of what userspace requests for their values.
It is supported to set whatever SO_SNDBUF value and get terrible
performance.
It always has been.
The only difference is that we no longer allow an attacker to fool TCP
stack
and consume up to 2 GB per socket while SO_SNDBUF was set to 128 KB.
The side effect is that in some cases, the workload can appear to have
the signature of the attack.
The solution is to increase your SO_SNDBUF, or even better let TCP
stack autotune it.
nobody forced you to set very small values for it.
I discovered we have some production services that set SO_SNDBUF to
very small values (~4k), as they are essentially doing interactive
communications, not bulk transfers. But there's a difference between
"terrible performance" and "TCP stops working".
--
Jonathan