Re: Reference set in HPACK
Kaoru Maeda <kaorumaeda.ml@gmail.com> Wed, 02 July 2014 13:55 UTC
Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 78E301A010A for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 2 Jul 2014 06:55:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.652
X-Spam-Level:
X-Spam-Status: No, score=-7.652 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_HI=-5, RP_MATCHES_RCVD=-0.651, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
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 fPBsNxKeAl99 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 2 Jul 2014 06:55:48 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 30DDF1A00E8 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 2 Jul 2014 06:55:48 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1X2KyU-0003d5-FX for ietf-http-wg-dist@listhub.w3.org; Wed, 02 Jul 2014 13:53:26 +0000
Resent-Date: Wed, 02 Jul 2014 13:53:26 +0000
Resent-Message-Id: <E1X2KyU-0003d5-FX@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <kaorumaeda.ml@gmail.com>) id 1X2KyM-0003c8-J7 for ietf-http-wg@listhub.w3.org; Wed, 02 Jul 2014 13:53:18 +0000
Received: from mail-ob0-f193.google.com ([209.85.214.193]) by lisa.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <kaorumaeda.ml@gmail.com>) id 1X2KyL-0008Qs-F0 for ietf-http-wg@w3.org; Wed, 02 Jul 2014 13:53:18 +0000
Received: by mail-ob0-f193.google.com with SMTP id uz6so3429529obc.4 for <ietf-http-wg@w3.org>; Wed, 02 Jul 2014 06:52:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IDry4YYEYkVrMsKiuIapMDh+LhX7hsnzAA5h6XB5DgU=; b=GoWxOgCpivPppaGrAVizRwlafX+mM5T1kdl3qlytanQgfUPHiGkMEMy1U2wxdqylH+ ZcowK7uOXuSHo0QQUeUZyn3c8vkNPzCWldsf62Fh7ARw5jw9Vu6h74dXYPBEsQGfPTkj XDumpR1/p4hqgS/8WsetVE0HC1g+6/QT6aPyhgTwMY8kTNZGe4AxAUT/482xjsvSpp0h nbFuxxe4I6KKUyfxoN+XIdJQIYny9zaVX/K2bvi79zoKpBetsvz3cZkJBcyuPY8ou3W0 XlAhrSZS9B//aYz2jC/7U4CpJOjl8cyW4F1XCDTIJiYNzYXRrGxu0pQsNpssLsZUYANH QAJQ==
MIME-Version: 1.0
X-Received: by 10.182.128.202 with SMTP id nq10mr17839032obb.77.1404309171448; Wed, 02 Jul 2014 06:52:51 -0700 (PDT)
Received: by 10.76.99.104 with HTTP; Wed, 2 Jul 2014 06:52:51 -0700 (PDT)
In-Reply-To: <1F0B6FCE-9143-42C2-AB92-500D266C1BE7@apple.com>
References: <20140702.143041.283993814131065692.kazu@iij.ad.jp> <CAP+FsNexzVzt+YV7oBeMdGrMoajbMVj1Z90XvQfaCuNMDjYdHg@mail.gmail.com> <1F0B6FCE-9143-42C2-AB92-500D266C1BE7@apple.com>
Date: Wed, 02 Jul 2014 22:52:51 +0900
Message-ID: <CAFDeSfeAyUQ86Owr512L7wzv_bashOJ6OPk4qxx1pdd1DnDP2Q@mail.gmail.com>
From: Kaoru Maeda <kaorumaeda.ml@gmail.com>
To: HTTP Working Group <ietf-http-wg@w3.org>
Cc: Roberto Peon <grmocg@gmail.com>, Michael Sweet <msweet@apple.com>, Kazu Yamamoto <kazu@iij.ad.jp>
Content-Type: multipart/alternative; boundary="089e015371cc51aefa04fd36359e"
Received-SPF: pass client-ip=209.85.214.193; envelope-from=kaorumaeda.ml@gmail.com; helo=mail-ob0-f193.google.com
X-W3C-Hub-Spam-Status: No, score=-0.8
X-W3C-Hub-Spam-Report: DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1X2KyL-0008Qs-F0 15dac028137fdbd4f9b53e2be55d7c23
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Reference set in HPACK
Archived-At: <http://www.w3.org/mid/CAFDeSfeAyUQ86Owr512L7wzv_bashOJ6OPk4qxx1pdd1DnDP2Q@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/25140
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>
Another advantage of removing reference set is that the order of header fields is preserved. This removes the needs for the following rule: - section-8.1.2.3 To preserve the order of multiple occurrences of a header field with the same name, its ordered values are concatenated into a single value using a zero-valued octet (0x0) to delimit them. After decompression, header fields that have values containing zero octets (0x0) MUST be split into multiple header fields before being processed. Cookie now preserves the order of key-value pairs even if they are split for "better-compression". This might be important with regard to request signing. -- Kaoru Maeda 2014-07-02 19:52 GMT+09:00 Michael Sweet <msweet@apple.com>: > Roberto, > > On Jul 2, 2014, at 1:39 AM, Roberto Peon <grmocg@gmail.com> wrote: > > You're basing conclusions on today's data, instead of looking forward as > to what might happen when the set of headers sent adapts to the compression > method, making it significantly more likely for items in the reference set > to be emitted. > > > Isn't that basically confirming what Kazu found: the reference set doesn't > help with today's headers? > > Here is running code that demonstrates that the reference set does not > contribute significantly to the performance of HPACK. Unless you can > demonstrate a significant improvement from (simple) server/client changes, > your assertion that things will improve doesn't have any evidence to > support it. > > My observation is that the headers emitted by most web sites are not > controlled by the web site developer, they will rely on the underlying web > server and scripting engine (PHP, Perl, Python, Ruby, etc.) to do that. > The only header they generally do control is Set-Cookie, and then only for > their own site (i.e. not for the advertising networks that are used). What > changes on the server side would be useful here to get the full benefit of > the reference table? > > (And IMHO if we do have this information then it should be in the HPACK > spec...) > > > > > You may want to look at how many of those entries would be regularized if > HPACK was in use and servers/clients intended on sending headers that were > similar. > -=R > > > On Tue, Jul 1, 2014 at 10:30 PM, Kazu Yamamoto <kazu@iij.ad.jp> wrote: > >> Hi, >> >> As you may remember, I implemented several HPACK *encoding* algorithms >> and calculated compression ratio. I tried it again based on HPACK >> 08. I have 8 algorithms. >> >> - Naive -- No compression >> - Naive-H -- Using Huffman only >> - Static -- Using static table only >> - Static-H -- Using static table and Huffman >> - Linear -- Using header table >> - Linear-H -- Using header table and Huffman >> - Diff -- Using header table and reference set >> - Diff-H -- Using header table, reference set and Huffman >> >> The implementations above pass all test cases in >> https://github.com/http2jp/hpack-test-case/. Using this test cases as >> input, I calculated compression ratio again. The ratio is calculated >> by dividing the number of bytes after compression by that before >> compression. >> >> Here is results: >> >> Naive 1.10 >> Naive-H 0.86 >> Static 0.84 >> Static-H 0.66 >> Linear 0.39 >> Linear-H 0.31 >> Diff 0.39 >> Diff-H 0.31 >> >> Linear-H and Diff-H results in almost the same. To my calculation, >> Diff-H is only 1.6 byte shorter than Linear-H in average. This means >> that reference set does NOT much contribute to compress headers >> although it is very difficult to implement. >> >> I have NOT seen any header examples for which reference set work >> effectively so far. >> >> So, if the authors of HPACK want to retain reference set, I would like >> to see evidence that there are some cases in which reference set >> contributes the compression ratio. HPACK 08 says "Updated Huffman >> table, using data set provided by Google". So, I guess that the >> authors can calculate the compression ratio based on this data. >> >> If there is not such an evidence, I would like to strongly recommend >> to remove reference set from HPACK. This makes HPACK much simpler, so >> implementations gets bug less and inter-operability is improved. Plus, >> the order of headers is reserved always. >> >> Regards, >> >> --Kazu >> >> >> >> >> >> > > _________________________________________________________ > Michael Sweet, Senior Printing System Engineer, PWG Chair > >
- Reference set in HPACK Kazu Yamamoto ( 山本和彦 )
- Re: Reference set in HPACK Roberto Peon
- Re: Reference set in HPACK Mark Nottingham
- Re: Reference set in HPACK Kazu Yamamoto ( 山本和彦 )
- Re: Reference set in HPACK Kazu Yamamoto ( 山本和彦 )
- Re: Reference set in HPACK Kazu Yamamoto ( 山本和彦 )
- Re: Reference set in HPACK Roberto Peon
- Re: Reference set in HPACK Poul-Henning Kamp
- Re: Reference set in HPACK Roberto Peon
- Re: Reference set in HPACK Roberto Peon
- Re: Reference set in HPACK Poul-Henning Kamp
- Re: Reference set in HPACK Greg Wilkins
- Re: Reference set in HPACK Roberto Peon
- Re: Reference set in HPACK Roberto Peon
- RE: Reference set in HPACK K.Morgan
- Re: Reference set in HPACK Roberto Peon
- RE: Reference set in HPACK K.Morgan
- RE: Reference set in HPACK K.Morgan
- Re: Reference set in HPACK Poul-Henning Kamp
- Re: Reference set in HPACK Poul-Henning Kamp
- RE: Reference set in HPACK K.Morgan
- Re: Reference set in HPACK Michael Sweet
- Re: Reference set in HPACK Kaoru Maeda
- Re: Reference set in HPACK Johnny Graettinger
- Re: Reference set in HPACK Martin Thomson
- Re: Reference set in HPACK Eric J. Bowman
- Re: Reference set in HPACK Roberto Peon
- Re: Reference set in HPACK Eric J. Bowman
- Re: Reference set in HPACK Roberto Peon
- Re: Reference set in HPACK Eric J. Bowman
- RE: Reference set in HPACK RUELLAN Herve
- Re: Reference set in HPACK Eric J. Bowman
- Compression ratio of 09 (was: Reference set in HP… Kazu Yamamoto ( 山本和彦 )