Re: Proposal to replace ACK block count with ACK length

Kazuho Oku <kazuhooku@gmail.com> Sat, 16 June 2018 01:57 UTC

Return-Path: <kazuhooku@gmail.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C9143130EB4 for <quic@ietfa.amsl.com>; Fri, 15 Jun 2018 18:57:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B0sx4AanLWJZ for <quic@ietfa.amsl.com>; Fri, 15 Jun 2018 18:57:15 -0700 (PDT)
Received: from mail-pf0-x232.google.com (mail-pf0-x232.google.com [IPv6:2607:f8b0:400e:c00::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D5C93130EA4 for <quic@ietf.org>; Fri, 15 Jun 2018 18:57:15 -0700 (PDT)
Received: by mail-pf0-x232.google.com with SMTP id a22-v6so5639172pfo.12 for <quic@ietf.org>; Fri, 15 Jun 2018 18:57:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=w1bZU0flOLMSWK9SvLgfkRvKFRpvORZXlNuJL1PDHuw=; b=E5S/BKRyutqEhGBW5jG1pYmmphGS9vo0PBQjtV4nM915M1VNSve82recY8+Uat9Zda 6wRgWwWzlYsWf4JnKX1l9mYsBvs9WrVyUyORmJjMaTqGGFVNHyQzQxeDp0ds7P/o6IwB 3r7xTtsmu7y2NYTwxxDTm3+Vk00nBehgyEDis8pFDtQydIpBd1RxB8oLxndB6mPt8MxB R/vUq78cjoj9me4LJbFh0cegfBxk/jcVIbpBmcMkC69aZSIju+VWgVHv+rfFnrg1pz1F XcWYW3BNa6biFtHmGI8GJ/21cwh4PlVHk68VHSupzOEHRCrs+8eELSG6Bb/LiwgaxXGA MOSg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=w1bZU0flOLMSWK9SvLgfkRvKFRpvORZXlNuJL1PDHuw=; b=uirpnX9ynQid4gyJQO2Ih+6Bn8/swEMlqMIX9bykkMSWrAA89SkdQv85WgvNXS1u2x q2i3F+xbLKUwbnQVuahn0ugQoES8fjldXUwU0+tkBwFlewNaC+qQXck7H4m0yY8ehgyN T53BFCFfy82Ro+oeCuyrm/Bnw8k3v5+6UVbQpAl06/5mC8/eoFUjGvUvTcbC/mTKGcKi QH5GbSINE1gwtjC1AHW60mFfAlPa1la69K8AHhqbCe7q2+0mTSSiHliobTc0cRcpfoOB bAeLngaFeB/3MyKmzQYeCGLfcXMEJl3zgqX8NN9byrN7UYVftZJs7eOYc1Edw0MXbOvj 390g==
X-Gm-Message-State: APt69E0x+IqLLCDZebjX/dHilvHu9rZMt2Yt4/iHN4U4tLAJGSBh4nik SSlt6x53QzX9KxR1JmybDlkvm/ccwtcyZ5tmRNI=
X-Google-Smtp-Source: ADUXVKILGc+y3PrxCt0lBCDvxAZAm4UnnZO9IQLKdiCXl1/dsmcO/BBtI4JWra4JTSc7a2qo9mkEYyUz7yVprvQY9b8=
X-Received: by 2002:a63:ba02:: with SMTP id k2-v6mr3710096pgf.179.1529114234226; Fri, 15 Jun 2018 18:57:14 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a17:90a:1181:0:0:0:0 with HTTP; Fri, 15 Jun 2018 18:57:13 -0700 (PDT)
In-Reply-To: <CABkgnnV_thWcAi=AdwV+Za5rXywiUvtOYpsNNp1y7=RvL2MvWA@mail.gmail.com>
References: <1F436ED13A22A246A59CA374CBC543998B832414@ORSMSX111.amr.corp.intel.com> <20180611154244.GA27622@ubuntu-dmitri> <CACpbDcdxzRxeiN93kKoj__vo2TERm4QZKqaesL=jr4wQUN1gXA@mail.gmail.com> <1F436ED13A22A246A59CA374CBC543998B833B91@ORSMSX111.amr.corp.intel.com> <CABcZeBOjjRrX+AsXdgcUKpL=ciL8U_U1+WVAhQv-ZjwGxkQxYw@mail.gmail.com> <MWHPR21MB0638068EFA850328793E55F6B67C0@MWHPR21MB0638.namprd21.prod.outlook.com> <CACpbDcdbTKKEh8dcshWM6-7vq2hBFJC1myL1+H6etpMMjth+wg@mail.gmail.com> <CABkgnnV_thWcAi=AdwV+Za5rXywiUvtOYpsNNp1y7=RvL2MvWA@mail.gmail.com>
From: Kazuho Oku <kazuhooku@gmail.com>
Date: Sat, 16 Jun 2018 10:57:13 +0900
Message-ID: <CANatvzyS0NY2+W2mzRPdwqTrm3hLd+QYBh=F68mw73Nfjx1apA@mail.gmail.com>
Subject: Re: Proposal to replace ACK block count with ACK length
To: Martin Thomson <martin.thomson@gmail.com>
Cc: Jana Iyengar <jri.ietf@gmail.com>, Praveen Balasubramanian <pravb@microsoft.com>, Eric Rescorla <ekr@rtfm.com>, QUIC WG <quic@ietf.org>, "Deval, Manasi" <manasi.deval@intel.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/R6dmGOT52YFbnbSE9c4en6NOwog>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.26
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 16 Jun 2018 01:57:18 -0000

2018-06-16 8:19 GMT+09:00 Martin Thomson <martin.thomson@gmail.com>:
> When we discussed this before, some people observed that this creates
> a need to encode in two passes.  That's the trade-off here.  (Not
> expressing an opinion.)

I am not sure if we have that trade-off.

ACK frame as currently defined needs to be generated in two-pass
because the size of the ACK Block Count field depends on the number of
blocks you would actually emit, unless the QUIC stack maintains the
number of gaps in the ACK queue.

And I think that the proposed change would be fine because it does not
necessary increase the size of the ACK frame, if we remove ACK Block
Count field in exchange.

Instead of relying on the field, a receiver of the ACK frame can read
blocks until it consumes the number of bytes specified by the length
of the frame.

> On Fri, Jun 15, 2018 at 3:51 PM Jana Iyengar <jri.ietf@gmail.com> wrote:
>>
>> I don't have a strong opinion on this. I'm certainly not opposed to it.
>> Does anyone have a strong opposition?
>>
>> On Fri, Jun 15, 2018 at 3:10 PM Praveen Balasubramanian <pravb@microsoft.com> wrote:
>>>
>>> I agree as well since this can help reduce per packet processing overhead. ACKs are going to be the second most common frame type so no objections to special casing.
>>>
>>>
>>>
>>> From: QUIC [mailto:quic-bounces@ietf.org] On Behalf Of Eric Rescorla
>>> Sent: Friday, June 15, 2018 9:11 AM
>>> To: Deval, Manasi <manasi.deval@intel.com>
>>> Cc: Jana Iyengar <jri.ietf@gmail.com>; QUIC WG <quic@ietf.org>
>>> Subject: Re: Proposal to replace ACK block count with ACK length
>>>
>>>
>>>
>>> I agree with Manasi here. This change would allow ack frame parsing to be more self-contained, which is an advantage for the parser and also potentially for parallelism (because you can quickly find the frame and then process it in parallel).
>>>
>>>
>>>
>>> -Ekr
>>>
>>>
>>>
>>>
>>>
>>> On Mon, Jun 11, 2018 at 5:22 PM, Deval, Manasi <manasi.deval@intel.com> wrote:
>>>
>>> In general, varints require some specific logic for parsing. To skip over any header, I have to read every single varint. As the code sees Stream and ACK headers most frequently, that is my focus.  The Stream frame has a length in its third field.
>>>
>>>
>>>
>>> ACK parsing, however, needs 6 + 2*num_blocks reads to identify length. There are two reads each for ‘largest acknowledged’, ‘ACK delay’ and ‘ACK block count’. The pain point is the total number of cycles parse an ACK. If I am processing 10M pps, where 10% - 30% of the packets have a piggybacked ACK, these cycles becomes a significant bottleneck.
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Manasi
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> From: QUIC [mailto:quic-bounces@ietf.org] On Behalf Of Jana Iyengar
>>> Sent: Monday, June 11, 2018 3:11 PM
>>> To: Deval, Manasi <manasi.deval@intel.com>; QUIC WG <quic@ietf.org>
>>> Subject: Re: Proposal to replace ACK block count with ACK length
>>>
>>>
>>>
>>> You're right that we no longer have the ability to skip an ACK frame, and this crept in when we moved to varints.
>>>
>>> I believe your problem though is generally true of most frames not just ACKs, since ids, packet numbers, and numbers in all frames are now all varints. To skip any frame, you'll need to parse the varint fields in those frames. If you have logic to process and skip varints, then skipping the ack block section is merely repeating this operation (2*num_block+1) times. Do you see specific value in skipping ACK frames over the other control frames?
>>>
>>>
>>>
>>>
>>>
>>> On Mon, Jun 11, 2018 at 8:43 AM Dmitri Tikhonov <dtikhonov@litespeedtech..com> wrote:
>>>
>>> On Mon, Jun 11, 2018 at 03:33:35PM +0000, Deval, Manasi wrote:
>>> > -        Moving the ACK length to the front of the ACK allows the
>>> >          flexibility of either reading the entire ACK or reading the
>>> >          first 16 bits and skipping over the length. This is a useful
>>> >          feature for the case where ACK processing is split into
>>> >          multiple layers. Depending on the processor this is run on,
>>> >          there are different advantages -
>>>
>>> Just a note.  In my experience, the cost of parsing an ACK frame is
>>> negligible compared to the cost of processing an ACK frame: that is,
>>> poking at various memory locations to discard newly ACKed packets.
>>>
>>>   - Dmitri.
>>>
>>>
>



-- 
Kazuho Oku