Re: TCPBacklogDrops during aggressive bursts of traffic

Eric Dumazet
2012-05-22T20:54:43Z

On Tue, 2012-05-22 at 18:45 +0200, Eric Dumazet wrote:

> This is not evident from the capture, you are mistaken.
>
> tcpdump captures packets before tcp stack, it doesnt say if they are :
>
> 1) queued in receive of ofo queue
> 2) queued in socket backlog
> 3) dropped because we hit socket rcvbuf limit
>
> If socket lock is hold by the user, packets are queued to backlog, or
> dropped.
>
> Then, when socket lock is about to be released, we process the backlog.
>
>

BTW, latest iproute2 ss util has nice information if you add -m :

misc/ss -m dst 192.168.99.2
State Recv-Q Send-Q Local Address:Port Peer Address:Port
ESTAB 3441896 0 192.168.99.1:44409 192.168.99.2:41197
skmem:(r5035136,rb6291456,t0,tb23080,f1149824,w0,o0)

Here you can see that for 3441896 bytes in TCP queue (payload),
we have 5035136 bytes in rmem_alloc,
and 6291456 'bytes' in sk_rcvbuf

It lacks the backlog len, I'll send a patch when net-next reopens.