mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
To: nivedita@us.ibm.COM (Nivedita Singhvi)
Cc: linux-kernel@vger.kernel.org
Subject: Re: Kernel 2.4.6 and 2.4.7 networking performance: Seeing serious delays
Date: Fri, 17 Aug 2001 03:06:14 +0400 (MSD)	[thread overview]
Message-ID: <200108162306.DAA00420@mops.inr.ac.ru> (raw)
In-Reply-To: <OF643DA24A.2BEBB0B0-ON88256AA9.0059AF34@boulder.ibm.com> from "Nivedita Singhvi" at Aug 15, 1 09:45:14 pm

Hello!

> I'm still wondering why the next ack isnt delayed as well, though.

Because out tcp is enough clever to understand that it made
a shit delaying ACK for previous packet. But not enough psychic
to foresee future and to avoid delay. :-)


> I dont believe we should still be in quickack mode, 

However, we are there. :-)


 4 0.000061 .100 .101 41359 > 4180 [PSH, ACK] Seq=4186558035 Ack=124141119 Win=5
840 Len=8
 5 0.000061 .101 .100 4180 > 41359 [ACK] Seq=124141119 Ack=4186558043 Win=5792 L
en=0

.101 quickacks

 6 0.002295 .101 .100 4180 > 41359 [PSH, ACK] Seq=124141119 Ack=4186558043 Win=5
792 Len=8

.101 leaves quickacks setting pingpong


 7 0.000098 .100 .101 41359 > 4180 [ACK] Seq=4186558043 Ack=124141127 Win=5840 L
en=0

.100 quickacks

 8 0.000111 .100 .101 41359 > 4180 [PSH, ACK] Seq=4186558043 Ack=124141127 Win=5
840 Len=8

.100 leaves quickacks setting pingpong


 9 0.000062 .101 .100 4180 > 41359 [PSH, ACK] Seq=124141127 Ack=4186558051 Win=5
792 Len=8
10 0.036399 .100 .101 41359 > 4180 [ACK] Seq=4186558051 Ack=124141135 Win=5840 L
en=0  <- DELAY

.100 experiences delack timeout, which is considered as an error.
It is really error. So, tcp clears pingpong and returns to quickack.

11 0.000074 .101 .100 4180 > 41359 [PSH, ACK] Seq=124141135 Ack=4186558051 Win=5
792 Len=1447
12 0.000362 .100 .101 41359 > 4180 [ACK] Seq=4186558051 Ack=124142582 Win=8682 L
en=0  

.100 quickacks

This loop would repeat infinitely, if connection were not closed.
Kernel sees that user replies fastly, switches to canonical BSD mode
to allow ack piggibacking and tries to delay ack, but silly user does
not want to reply more. So, we have reduced amount of timeouts twice,
but this is not a big win in this case.

I am writing this mostly because it is the best demonstration
why TCP_QUICKACK:=0 is invalidated. :-)


What's about advice to use TCP_NODELAY in this case, it is _absolutely_
wrong and in fact presents violation of protocol, this app sends silly
spagetti of pakets which must be coalesced. It is exactly the situation
when TCP_NODELAY is straight bug. This app should use TCP_CORK or,
even better from the viewpoint of performance, to coalesce writes at user user
level not abusing tcp.

Alexey

  reply	other threads:[~2001-08-17 16:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-15 17:30 Nivedita Singhvi
2001-08-16 23:06 ` Alexey Kuznetsov [this message]
2001-08-21  4:00 Nivedita Singhvi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200108162306.DAA00420@mops.inr.ac.ru \
    --to=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nivedita@us.ibm.COM \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®