Thread (32 messages) flat view 32 messages, 8 authors, 2019-07-16

Re: [PATCH net 2/4] tcp: tcp_fragment() should apply sane memory limits

From: Jonathan Lemon <hidden>
Date: 2019-07-11 19:04:51


On 11 Jul 2019, at 11:28, Eric Dumazet wrote:
On 7/11/19 7:14 PM, Prout, Andrew - LLSC - MITLL wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help