[lkml]   [2012]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: TCP Delayed ACK in FIN/ACK
On Sat, 2012-08-04 at 16:51 +0200, richard -rw- weinberger wrote:
> On Sat, Aug 4, 2012 at 4:45 PM, Sławek Janecki <> wrote:
> > I have a node.js client ( requesting some data from http
> > rest service from server (
> > Client is simply using nodejs http.request() method (agent=false).
> > Client is on Ubuntu 11.10 box.
> > Why client sends FIN ACK after 475ms? Why so slow? He should send FIN
> > ACK immediately.
> > I have many situations like this. About 1% of whole traffic is request
> > with delayed FIN ACK.
> > Cpu idle on the client is about 99%, so nothing is draining CPU.
> > How to debug this? What could it be? Is there any sysctl option I need to tune?
> > I think this behaviour is the Delayed ACK feature of RFC1122 TCP stack.
> >
> > Link to tcpdump picture (done on a client machine) :
> >
> >
> > Can you tell why kernel delayed that FIN/ACK.
> > In tcpflow data there is exacly one ACK per packet comming from server.
> > Why kernel delayed client FIN/ACK.
> > It could avoid sending ACK every 'data' packet.
> > But it choose to delay FIN/ACK?
> > Is this possible? Is this a bug?
> >
> > I've also posted question on stackexchange:
> >
> >
> > Please help.
> CC'ing netdev.

I see nothing wrong in this tcpdump. You should strace the application

FIN/ACK is sent when client closes its socket (or calls shutdown()), and
not in reply of FIN sent by the server.

Kernel has no additional delay. I suspect your client is slow processing
the server answer, then close() its socket _after_ data processing.

Its possible tcp_send_fin() has to loop while allocating one skb under
very high memory pressure, and it seems we have no counters for this
case. But if it _was_ ever happening, you would have lot of messages in
kernel log (dmesg) about alloc_skb_clone() failures.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2012-08-04 19:01    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean