netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* empty ack packets
@ 2010-09-10  5:12 MK
  2010-09-10  5:29 ` Mitchell Erblich
  2010-09-10  7:06 ` Hagen Paul Pfeifer
  0 siblings, 2 replies; 4+ messages in thread
From: MK @ 2010-09-10  5:12 UTC (permalink / raw)
  To: netdev

Hello list,

I am looking at a tcpdump and I see that very very frequently, after
receiving a segment, my tcp is sending an empty ack back in a matter
of several (around 20 - 50) microseconds. And then after several more
microseconds, my tcp is sending some valid outgoing data. I am trying
to understand why it decided to send an empty ack back when that ack
could potentially have been delayed by microseconds and get
piggybacked on the outgoing data.

>From the code, it appears that the delayed ack timeout is 40 millisecs
so it is likely not the delack timer that is causing this. (And I do
not have the quickack option)

This is RHEL5 (2.6.18) kernel.

Does anybody have an idea as to what is happening?

Thanks a lot!!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: empty ack packets
  2010-09-10  5:12 empty ack packets MK
@ 2010-09-10  5:29 ` Mitchell Erblich
  2010-09-10  7:06 ` Hagen Paul Pfeifer
  1 sibling, 0 replies; 4+ messages in thread
From: Mitchell Erblich @ 2010-09-10  5:29 UTC (permalink / raw)
  To: MK; +Cc: netdev

MK,


	The 1st packet is probably generating window update information.

	If the TCP flow is in slow start, it should not be doing any delacks
	to keep as many normal acks in the flow.

	Mitchell Erblich

	
On Sep 9, 2010, at 10:12 PM, MK wrote:

> Hello list,
> 
> I am looking at a tcpdump and I see that very very frequently, after
> receiving a segment, my tcp is sending an empty ack back in a matter
> of several (around 20 - 50) microseconds. And then after several more
> microseconds, my tcp is sending some valid outgoing data. I am trying
> to understand why it decided to send an empty ack back when that ack
> could potentially have been delayed by microseconds and get
> piggybacked on the outgoing data.
> 
> From the code, it appears that the delayed ack timeout is 40 millisecs
> so it is likely not the delack timer that is causing this. (And I do
> not have the quickack option)
> 
> This is RHEL5 (2.6.18) kernel.
> 
> Does anybody have an idea as to what is happening?
> 
> Thanks a lot!!
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: empty ack packets
  2010-09-10  5:12 empty ack packets MK
  2010-09-10  5:29 ` Mitchell Erblich
@ 2010-09-10  7:06 ` Hagen Paul Pfeifer
  2010-09-10 10:57   ` MK
  1 sibling, 1 reply; 4+ messages in thread
From: Hagen Paul Pfeifer @ 2010-09-10  7:06 UTC (permalink / raw)
  To: MK; +Cc: netdev


On Fri, 10 Sep 2010 01:12:44 -0400, MK wrote:

> Hello list,

> 

> I am looking at a tcpdump and I see that very very frequently, after

> receiving a segment, my tcp is sending an empty ack back in a matter

> of several (around 20 - 50) microseconds. And then after several more

> microseconds, my tcp is sending some valid outgoing data. I am trying

> to understand why it decided to send an empty ack back when that ack

> could potentially have been delayed by microseconds and get

> piggybacked on the outgoing data.

> 

> From the code, it appears that the delayed ack timeout is 40 millisecs

> so it is likely not the delack timer that is causing this. (And I do

> not have the quickack option)

> 

> This is RHEL5 (2.6.18) kernel.

> 

> Does anybody have an idea as to what is happening?



The mechanism behind is called TCP Quick ACK and was introduced to raise

the Congestion Window more quickly for non-interactive streams. If the

stack detects that the stream is interactive (can piggy-back data) the

quick ACK is disabled. But the heuristic demand at least one packet to

detect that the flow is interactive. Currently the mechanism favor

non-interactive flows and generate at least on "unnecessary" ACK packet.

The alternative approach is to always delay the first ACK and after that

decide if a stream is interactive or not. But this will penalize bulk data

transfer, because the CW is raised slower and additionally, the first

return packet may not be triggered instantly. 



See the following discussion and patch where the mechanism is made

modifiable (I will drop a new patch but this take some time (vacation)):



http://kerneltrap.org/mailarchive/linux-netdev/2010/8/23/6283640



Hagen

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: empty ack packets
  2010-09-10  7:06 ` Hagen Paul Pfeifer
@ 2010-09-10 10:57   ` MK
  0 siblings, 0 replies; 4+ messages in thread
From: MK @ 2010-09-10 10:57 UTC (permalink / raw)
  To: Hagen Paul Pfeifer; +Cc: netdev@vger.kernel.org

Hagen,

My flow is most certainly in both directions. ( I am guessing that
means pingpong will be true and so no quickack by default unless I
explicitly enable it which I am not.)

Thanks....

On Friday, September 10, 2010, Hagen Paul Pfeifer <hagen@jauu.net> wrote:
>
> On Fri, 10 Sep 2010 01:12:44 -0400, MK wrote:
>> Hello list,
>>
>> I am looking at a tcpdump and I see that very very frequently, after
>> receiving a segment, my tcp is sending an empty ack back in a matter
>> of several (around 20 - 50) microseconds. And then after several more
>> microseconds, my tcp is sending some valid outgoing data. I am trying
>> to understand why it decided to send an empty ack back when that ack
>> could potentially have been delayed by microseconds and get
>> piggybacked on the outgoing data.
>>
>> From the code, it appears that the delayed ack timeout is 40 millisecs
>> so it is likely not the delack timer that is causing this. (And I do
>> not have the quickack option)
>>
>> This is RHEL5 (2.6.18) kernel.
>>
>> Does anybody have an idea as to what is happening?
>
> The mechanism behind is called TCP Quick ACK and was introduced to raise
> the Congestion Window more quickly for non-interactive streams. If the
> stack detects that the stream is interactive (can piggy-back data) the
> quick ACK is disabled. But the heuristic demand at least one packet to
> detect that the flow is interactive. Currently the mechanism favor
> non-interactive flows and generate at least on "unnecessary" ACK packet.
> The alternative approach is to always delay the first ACK and after that
> decide if a stream is interactive or not. But this will penalize bulk data
> transfer, because the CW is raised slower and additionally, the first
> return packet may not be triggered instantly.
>
> See the following discussion and patch where the mechanism is made
> modifiable (I will drop a new patch but this take some time (vacation)):
>
> http://kerneltrap.org/mailarchive/linux-netdev/2010/8/23/6283640
>
> Hagen
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-09-10 10:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-10  5:12 empty ack packets MK
2010-09-10  5:29 ` Mitchell Erblich
2010-09-10  7:06 ` Hagen Paul Pfeifer
2010-09-10 10:57   ` MK

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).