QPACK - proposal to optimize compression

Brian Swander <briansw@microsoft.com> Mon, 07 May 2018 21:35 UTC

Return-Path: <briansw@microsoft.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 4D1B412D7E8 for <quic@ietfa.amsl.com>; Mon, 7 May 2018 14:35:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.01
X-Spam-Level:
X-Spam-Status: No, score=-2.01 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=microsoft.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 GsI7YTin3Wr1 for <quic@ietfa.amsl.com>; Mon, 7 May 2018 14:35:06 -0700 (PDT)
Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0719.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe45::719]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C7A57124234 for <quic@ietf.org>; Mon, 7 May 2018 14:35:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=sBJjhDUbnp3rkRKkrdYnlpLo5izY+IHiSvd26nd8pAI=; b=netE7Ou/Eb75xraM/xFKk7Kk3OiQjvGFQU/R2uG/DkK8c0FQALS4Ow9E1RZ/56V9kMBbGaNQ4u2aXJCkwHoYZahXSZOkyfk7Wuisaf6Hf5iEwMETVmzVRDUwzItLTnPpCgnDP6FEyxee+csQ5VQKVLWbh1zNVZJ5f4bnMu67Xu4=
Received: from DM5PR21MB0857.namprd21.prod.outlook.com (10.173.172.143) by DM5PR21MB0474.namprd21.prod.outlook.com (10.172.92.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.776.3; Mon, 7 May 2018 21:35:05 +0000
Received: from DM5PR21MB0857.namprd21.prod.outlook.com ([fe80::e926:e65e:c9a6:365d]) by DM5PR21MB0857.namprd21.prod.outlook.com ([fe80::e926:e65e:c9a6:365d%9]) with mapi id 15.20.0776.004; Mon, 7 May 2018 21:35:05 +0000
From: Brian Swander <briansw@microsoft.com>
To: "quic@ietf.org" <quic@ietf.org>
Subject: QPACK - proposal to optimize compression
Thread-Topic: QPACK - proposal to optimize compression
Thread-Index: AdPmSVy6766G9sm1TzOdAr1rcH/nrA==
Date: Mon, 07 May 2018 21:35:05 +0000
Message-ID: <DM5PR21MB0857F41DCB080F130E1436ADB39B0@DM5PR21MB0857.namprd21.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=briansw@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2018-05-07T21:35:04.6051258Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General
x-originating-ip: [2001:4898:80e8:a::7cc]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; DM5PR21MB0474; 7:CobFbAlPqGk/NiGlR4h0Y3V5sqVXCHu6IFQBAKDabmwDni87vOh+JBKPC1jCNR/pQzUm+VBB83Ndb9gJR+ksL+jW7swZbqgQMWK/7SKmjS2uNo1odQvnZCzVfjkwmRftwnfL7nhYfikVa6kJBI4g6ET93ku5gRWCJTyExTxHLHcl/EU7PQEFceZIhNIRM0v8YlBcjgAcUY78pm8gjcwsgxrLjMT166Y30NpPlvsBrPwUWT9sH2o3DVFTR7BgrfxF; 20:IWIk5GmKxk8TaxwPrhWZsctFMFwlJmq5ZUSkMjh1fwoSBtWLSHsMnk19Jb1nkf7Kh0myoBbox11dB9e1nAETZBmPKnW4SF8izvSa8gzmGgs10W8tIAgX7j3HUD3M2xvu4DTEz16MSRLE0saN0qKi6LtA1jXBgtlhVlcjUkwyw/4=
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7193020); SRVR:DM5PR21MB0474;
x-ms-traffictypediagnostic: DM5PR21MB0474:
x-microsoft-antispam-prvs: <DM5PR21MB04746553AA35BF0E10FE7D34B39B0@DM5PR21MB0474.namprd21.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(28532068793085)(21748063052155);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231254)(2018427008)(944501410)(52105095)(10201501046)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:DM5PR21MB0474; BCL:0; PCL:0; RULEID:; SRVR:DM5PR21MB0474;
x-forefront-prvs: 066517B35B
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(346002)(39860400002)(39380400002)(396003)(366004)(189003)(199004)(7736002)(86362001)(5660300001)(86612001)(55016002)(105586002)(10290500003)(6506007)(6346003)(316002)(102836004)(68736007)(486006)(97736004)(478600001)(9686003)(22452003)(476003)(25786009)(5640700003)(33656002)(6916009)(6306002)(186003)(6436002)(54896002)(74316002)(46003)(8990500004)(5630700001)(8936002)(6116002)(81156014)(2906002)(5250100002)(1730700003)(81166006)(8676002)(2501003)(10090500001)(2900100001)(99286004)(53936002)(2351001)(790700001)(106356001)(3280700002)(3660700001)(14454004)(7696005); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR21MB0474; H:DM5PR21MB0857.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts)
authentication-results: spf=none (sender IP is ) smtp.mailfrom=briansw@microsoft.com;
x-microsoft-antispam-message-info: bSBlVzmYe/HW0iGQ5grPN0KJHUPAfTCALpievZrQlcKLCJJMwRJpfRoLivzI088ItXlw1M8RiR190oo5bSIzyxAzLNzyzZwJbU5LCQlbquDyXlUqlYhGjKQSvMu9E5tAV5dYNzwoLbr206J0GXj8kKdUOp/1yHZh/5B6yGnmL9VyGFTjDPIxo4PSLqZQaUpG
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_DM5PR21MB0857F41DCB080F130E1436ADB39B0DM5PR21MB0857namp_"
MIME-Version: 1.0
X-MS-Office365-Filtering-Correlation-Id: 533bf5ab-7ac2-413d-9522-08d5b462661e
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 533bf5ab-7ac2-413d-9522-08d5b462661e
X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2018 21:35:05.4930 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR21MB0474
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/Aahe7gc8L0ECQIkOXQ2JrCZOVco>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.22
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: Mon, 07 May 2018 21:35:09 -0000

Please correct me if I'm wrong here.

It looks like the latest QPACK draft has been optimized to allow encode of both control and data streams in a single pass.
Because of this, we now must support that post-base encoding, and the multiple encoding formats that use Post-Base.
I.e. Literal Header Field with Name Reference and Literal Header Filter With Post-Base Name Reference, and similarly for Indexed Header Field.

To me, it seems like the simpler, more efficient option of removing post-base entirely could be better.   At the cost of requiring 2-pass encode, we can save a few bits for most headers since we would never need the post base header prefix.

So it's a question of looping thru the headers twice, vs. being less efficient on the wire.

I haven't profiled it, but I'd guess that double pass thru the headers isn't going to be that much slower than single pass.   Many of the headers are going to be encoded in both streams.   So the more efficient wire format may be more optimal.

bs