[tcpm] An issue in RFC3517? (Re: end-of-stream loss recovery (TCP SACK) )

Yoshifumi Nishida <nishida@sfc.wide.ad.jp> Tue, 22 February 2011 05:27 UTC

Return-Path: <yoshifumi.nishida@gmail.com>
X-Original-To: tcpm@core3.amsl.com
Delivered-To: tcpm@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 6F5FD3A681A for <tcpm@core3.amsl.com>; Mon, 21 Feb 2011 21:27:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.977
X-Spam-Level:
X-Spam-Status: No, score=-102.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vBSD4QXvt9XU for <tcpm@core3.amsl.com>; Mon, 21 Feb 2011 21:27:16 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 817743A680A for <tcpm@ietf.org>; Mon, 21 Feb 2011 21:27:15 -0800 (PST)
Received: by wyb42 with SMTP id 42so1038740wyb.31 for <tcpm@ietf.org>; Mon, 21 Feb 2011 21:27:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:date:x-google-sender-auth :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=3sIO1P3IyycDA+I369JoKup0oyADzHgA0yNNUkNiWPk=; b=UVP4bpxy2TMl+Cao6n36BQ9ktYc5f8PaKwX8dyf25AK1WXXH4Whk8bvJ9OuaX1VPcC ngt/bDKwg5CiS0ZOwx/J77mvY3DOql/ePyAE/h6nM8YBLPjBLQ06lXvTB/CB0slzrcaC EU+RtoTIoBQyydZ9g0KD3zZbJFguZkVdkyQFg=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; b=mPVKCeed9q7QnIlK46z/KJt0F3P1HFUArQluAywE5vBvVimTliWtdGrMFUriGih+dQ DnyZ8568RDv5ig4G4yXOovJN7Hm3786En2dRITUHUpg+XuxbaYMhVSmyWBfueeC78yYt euJTNLsA7bwez0/UMozmcP7zixnlknUk4CVKM=
MIME-Version: 1.0
Received: by 10.216.150.164 with SMTP id z36mr1927720wej.52.1298352477652; Mon, 21 Feb 2011 21:27:57 -0800 (PST)
Sender: yoshifumi.nishida@gmail.com
Received: by 10.216.174.129 with HTTP; Mon, 21 Feb 2011 21:27:57 -0800 (PST)
Date: Mon, 21 Feb 2011 21:27:57 -0800
X-Google-Sender-Auth: uChnXuOuGaj7p6Q1unUDaeEBpLg
Message-ID: <AANLkTinO89fKh4S2=ZHZ8ypCc8n5Te43P2CQV_Ta0kDY@mail.gmail.com>
From: Yoshifumi Nishida <nishida@sfc.wide.ad.jp>
To: "Scheffenegger, Richard" <rs@netapp.com>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: tcpm@ietf.org
Subject: [tcpm] An issue in RFC3517? (Re: end-of-stream loss recovery (TCP SACK) )
X-BeenThere: tcpm@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TCP Maintenance and Minor Extensions Working Group <tcpm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tcpm>
List-Post: <mailto:tcpm@ietf.org>
List-Help: <mailto:tcpm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 22 Feb 2011 05:27:17 -0000

Hello Richard and all.

I've been thinking about the issue Richard brought up and I think it's
valid and worth for discussion.
I personally think this is a minor issue in RFC3517. (also in RFC3517bis)

Please allow me to explain this issue once more and please correct me
if I misunderstand something.

Let's say, we have a pair of SACK TCP sender and receiver and when
cwnd=5, sender transmits S1, S2, S3 .. S5 packets.
Now, if we lost S1, S5, segments here, we will see the following sequence.

1: When S2 S3 S4 arrives at the receiver side, the receiver sends back
dupacks with SACK info to the sender.
2: When the sender receives the 3rd dupack, it retransmits S1 and
enters loss recovery phase.
3: When S1 arrives at the receiver side, the receiver sends back a
cumulative ACK for S4.
4: When the ACK for S4 arrives, the sender process this ACK by the
following steps
    4.1: It's not greater than RecoveryPoint, so TCP cannot exit loss
recovery phase yet.
    4.2: Use update() and setpipe() and find it has only 1 outstanding segment.
    4.3: Since cwnd - pipe >= 1MSS, tcp tries to send one or more segments.
    4.4: Use NextSeg() to find the packet to be sent

Here, I think there is one minor issue in NextSeg().
When TCP checks if S5 can be sent with the rule (1) in NextSeg(), it
fails. ( because (1.b) and (1.c) return false.)
Rule (2) can be applicable "if there are available unsent data". But,
let's think about the case where there's no available unsent data.
Now, TCP is going to apply Rule (3) for S5, but again it fails (
because (1.b) returns false. )
Here, TCP cannot send any packets even though there is a chance to
send a retransmit packet.

To summarize, I think the logic in RFC3517 can stall in some
situations even though there are packets can be sent.
This might cause the lost of ack clocking and unnecessary timeouts.

I think the solution would be simple. Don't apply (1.b) to the Rule
(3) in NextSeg().
I mean, change Rule (3) in NextSeg() from

          If the conditions for rules (1) and (2) fail, but there exists
          an unSACKed sequence number 'S3' that meets the criteria for
          detecting loss given in steps (1.a) and (1.b) above
          (specifically excluding step (1.c)) then one segment of up to
          SMSS octets starting with S3 MAY be returned.

To

          If the conditions for rules (1) and (2) fail, but there exists
          an unSACKed sequence number 'S3' that meets the criteria for
          detecting loss given in steps (1.a)  above
          (specifically excluding step (1.b) and step (1.c)) then one
segment of up to
          SMSS octets starting with S3 MAY be returned.

I might need more time to think about this, but I think removing (1.b)
from (3) will not be very harmful.

Thanks,
--
Yoshifumi Nishida
nishida@sfc.wide.ad.jp

2010/11/15 Scheffenegger, Richard <rs@netapp.com>:
>
> Hi group,
>
> Following up on the discussion prior to IETF79, I submitted a draft spec to discuss TCP SACK loss recovery at end-of-stream.
>
> I believe there was also split concensus if that should be refined further to get into RFC3517bis (as it is - IMHO - a minor change under very specific circumstances to TCP SACK), or as a standalone document. I have one preference, but refrain from pursuing it actively, as there are more senior members who know better than me on these details.
>
> Thanks a lot for your time!
>
> Richard Scheffenegger
>
>
>
> A new version of I-D, draft-scheffenegger-tcpm-sack-loss-recovery-00.txt has been successfully submitted by Richard Scheffenegger and posted to the IETF repository.
>
> Filename:        draft-scheffenegger-tcpm-sack-loss-recovery
> Revision:        00
> Title:           Improving SACK-based loss recovery for TCP
> Creation_date:   2010-11-15
> WG ID:           Independent Submission
> Number_of_pages: 12
>
> Abstract:
> This note clarifies the behavior of TCP SACK while doing loss recovery close to the end-of-stream.  This allows TCP SACK to never exhibit worse loss recovery characteristics than TCP NewReno under identical circumstances.
>
>
>
>
>
>> -----Original Message-----
>> From: Yoshifumi Nishida [mailto:nishida@sfc.wide.ad.jp]
>> Sent: Sonntag, 24. Oktober 2010 08:41
>> To: tcpm@ietf.org
>> Subject: Re: [tcpm] end-of-stream loss recovery (RFC2018 SACK errata?)
>>
>> 2010/10/23 Ethan Blanton <eblanton@cs.ohiou.edu>:
>>
>> > S1 ... S7 are sent.  S1, S6, and S7 are lost.  The sender
>> retransmits
>> > S1, gets a cumulative ACK for S6, retransmits S6, then gets a
>> > cumulative ACK for S7.  Should it retransmit S7?  Did the original
>> > transmission or the retransmission trigger the cum ACK for S7?
>> > Consider the case were S6 was not lost in the first place,
>> but delayed
>> > in the network for ~1RTT.  Now consider interaction with
>> timestamps,
>> > DSACK, etc. where this potentially *can* be disambiguated.
>>
>> In my feeling, this depends on the pipe size.
>> if cwnd - pipe >= 1 SMSS, we can send at least 1 packet.
>> In this example, S8 will be sent. ( rule (2) in NextSeg()
>> will be applied) If S8 can arrive at the receiver
>> successfully, the sender can get good estimation for lost
>> packets by the ACK for S8. Then, it can retransmit proper packets.
>>
>> However, as Richard already pointed out, if this is the end
>> of transmission, there is no S8.
>> In this case, I think retransmitting S7 will not be harmful so much.
>>
>> If this is not the end of transmission (e.g. application
>> stall), I'm not very sure whether we should retransmit a packet.
>>
>> Thanks,
>> --
>> Yoshifumi Nishida
>> nishida@sfc.wide.ad.jp
>> _______________________________________________
>> tcpm mailing list
>> tcpm@ietf.org
>> https://www.ietf.org/mailman/listinfo/tcpm
>>
>