Re: Fibonaccing CID lengths

Kazuho Oku <kazuhooku@gmail.com> Thu, 23 May 2019 03:37 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 8E457120147 for <quic@ietfa.amsl.com>; Wed, 22 May 2019 20:37:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 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] 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 oZFLaTnK9KQj for <quic@ietfa.amsl.com>; Wed, 22 May 2019 20:37:08 -0700 (PDT)
Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) (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 9F611120025 for <quic@ietf.org>; Wed, 22 May 2019 20:37:07 -0700 (PDT)
Received: by mail-lj1-x22b.google.com with SMTP id q16so4032322ljj.8 for <quic@ietf.org>; Wed, 22 May 2019 20:37:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=pkvKZLyC9b53Mag0i/YMKd9pozAX0pxeMJTfxPIXmb8=; b=jo+ljWDV68QsgXtdH6eNCI+HAnWXyacUsBm7RS/S0WTX+OoDlOo+12sD5k1e2FnRR8 EgX2Lw11wqGZoO2qXwSkrJM2vQzYr09q1ENCSomqxC0dbyQ9jJvL28mbWICbPxuLe6vF AUNfAhKU5dOqMYOx0rf09P953K0r7MymUWSx5kdRNdQnu5aK7vhFgHpAZtRFYmbPwjwv uVdftNwb8JKdlFbqLIoi8bIo7Z9yi2mXDYK6IIm9+n6zfyRPpqWllHycy1M+qcaEyZtX IBteGERe2ZoAPSs0ztGBSbKtj/CDSjrPr0ANOa0d+XYqytNgDa+XMWHNUfNS3rkHd+v3 9fdA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=pkvKZLyC9b53Mag0i/YMKd9pozAX0pxeMJTfxPIXmb8=; b=CxU+J/6pGLLd1jSp7OdVpLuQP9cgLICSjOZxlIPOX4ko2pBuVbkz1O0R5CKoNf65Om Wh5kFo74/riHyKdU2NIJXI6aYpynVuJEHML6Hi+u8qUXUa9JhSsa4bZrPvmurnkOqx1F BO0sm5JV0c2j40s9IpGKTydhlClFAgdgOJAtO3WfIMkIjEFpILx/6HJiOcoUwmosaW5E f8Zg63bE9Q5ZtHn/eeCiGhr67kyXbBgOe5Jztyj5uWd4b2f5OQwitNoP24dY/vqWeyI9 7E46Yy1jLhcr8qsYgsIAZTxNgtS4U6N65zyvESFH8IyqdafDOoKT3r1T0uZbwC2IqAqd QM0g==
X-Gm-Message-State: APjAAAUNkmhYI7mDcl0c68KulqYPAZ9qbD77qv8Evt8KJ1H4J1IE/kmD 38cnSRe4xkGBMql4LHAvUEPsfcCT3TbdmtYzKr8=
X-Google-Smtp-Source: APXvYqxBRAC7csDKBPSKIsIIAf/7xGxRT340vjUebecmL3KuV4vq6EmaG5aRKiqvdX5gBvPtIzO4quMS9vyLM9bqLz8=
X-Received: by 2002:a2e:298d:: with SMTP id p13mr46431520ljp.64.1558582625864; Wed, 22 May 2019 20:37:05 -0700 (PDT)
MIME-Version: 1.0
References: <20190522141238.GA23472@ubuntu-dmitri> <CAN1APdfBMeKGzsdLR__OLUHQ7pg=YM76C2Qxn6VDCXu680JQyA@mail.gmail.com> <ab64bdc2-805b-a86d-c525-41d076deac40@huitema.net> <20190522200406.GA28789@ubuntu-dmitri>
In-Reply-To: <20190522200406.GA28789@ubuntu-dmitri>
From: Kazuho Oku <kazuhooku@gmail.com>
Date: Thu, 23 May 2019 04:36:54 +0100
Message-ID: <CANatvzx4rxk6UU48omk-EfpoYzfg_zWR+N49zMWi_5rv722uQg@mail.gmail.com>
Subject: Re: Fibonaccing CID lengths
To: Christian Huitema <huitema@huitema.net>, Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>, IETF QUIC WG <quic@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/DsJF_K-VL38UwvDtwy9AfM-LEG4>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
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: Thu, 23 May 2019 03:37:09 -0000

2019年5月22日(水) 21:04 Dmitri Tikhonov <dtikhonov@litespeedtech.com>:
>
> On Wed, May 22, 2019 at 10:19:38AM -0700, Christian Huitema wrote:
> > Yes, that looks like a proposal that we should seriously consider.
>
> While the example is lighthearted, the proposal is serious: that is,
> remap 0 - 15 values of the nybble to a different set.  Do we need to
> represent every intermediate number between 0 and 48 (the maximum of
> the current PR)?

The question is what you gain by compressing the length to 4 bits.

I'd argue that the downside of compression is that endpoints would be
required to use a CID that is longer than necessary. For example, if
we are to allow only CID length of even-number bytes, there would be
in average one byte (8-bit) overhead per CID. That dwarfs the benefit
of saving 4-bit in the length of the CIDL field.

While I think using a 4-bit CIDL field could be beneficial for
avoiding ossification, I think I might agree with Martin Duke that
CIDL is currently an invariant that we are happy to accept
ossification.

So, what's the benefit?

>
> What if instead we do the following:
>
>      0 -> 0
>      1 -> 1
>      2 -> 2
>      3 -> 3
>      4 -> 4
>      5 -> 6
>      6 -> 8
>      7 -> 12
>      8 -> 16
>      9 -> 20
>      10 -> 24
>      11 -> 28
>      12 -> 32
>      13 -> 40
>      14 -> 48
>      15 -> 64
>
> This is as valid an approach as encoding the length in 8 bits and
> having to deal with invalid values or using a varint and having
> to deal with even more invalid values.
>
>   - Dmitri.
>


-- 
Kazuho Oku