Re: Choosing a header compression algorithm

Roberto Peon <grmocg@gmail.com> Thu, 28 March 2013 00:48 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 (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id AD43F21F9221 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 27 Mar 2013 17:48:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.178
X-Spam-Level:
X-Spam-Status: No, score=-10.178 tagged_above=-999 required=5 tests=[AWL=-0.180, BAYES_00=-2.599, HTML_MESSAGE=0.001, J_CHICKENPOX_62=0.6, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qM9L9IANVuud for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 27 Mar 2013 17:48:03 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id CDF8221F91E4 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 27 Mar 2013 17:48:02 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UL0zv-0005l2-0R for ietf-http-wg-dist@listhub.w3.org; Thu, 28 Mar 2013 00:47:19 +0000
Resent-Date: Thu, 28 Mar 2013 00:47:19 +0000
Resent-Message-Id: <E1UL0zv-0005l2-0R@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <grmocg@gmail.com>) id 1UL0ze-0005k9-Aq for ietf-http-wg@listhub.w3.org; Thu, 28 Mar 2013 00:47:02 +0000
Received: from mail-oa0-f54.google.com ([209.85.219.54]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <grmocg@gmail.com>) id 1UL0zX-0003sM-Lf for ietf-http-wg@w3.org; Thu, 28 Mar 2013 00:47:02 +0000
Received: by mail-oa0-f54.google.com with SMTP id n12so9389587oag.41 for <ietf-http-wg@w3.org>; Wed, 27 Mar 2013 17:46:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=0Uz59hBwiPsAp6RABV4FXhxMyz3y5EkaegsreB1eF1E=; b=VmXhXyFcfOZ5hEFysEjErfku1mRk1jiZ/iZinHpbj7qi5ITFo5hzHNXp+plBhqulC/ IKXUwx6GD07d/ZGTCSnuBgmAMBGGvK1V0L3J5k+KyN67Hj4YcmunI0rLq/pgwd5ZvBYT R8h2RVEZtMAx6yUDmU3lv0k7Le+3t0eHuwEC10NWfPFknfeOeEOnHMa8tc4I2PzR8kp8 EAft/9qUm9SCmfOAu+q22pVdtm6+9GwEI4gKUR7MLr3w3U3vpyGizuyDK3BJyZkKnh4O c957T8A+YHHqAO6XtNJy3T/6Kn/kdGi+/gaWvDJVu8TR9PS3lVDCBtD8dYMTfASLdZ9l SkNA==
MIME-Version: 1.0
X-Received: by 10.60.13.162 with SMTP id i2mr16302870oec.121.1364431588712; Wed, 27 Mar 2013 17:46:28 -0700 (PDT)
Received: by 10.76.109.72 with HTTP; Wed, 27 Mar 2013 17:46:28 -0700 (PDT)
In-Reply-To: <CABP7RbfN0Gf_qJkkj1ugJaDyjLZhQp9xoL+8H2B+4mGH=AcZGA@mail.gmail.com>
References: <254AABEE-22B9-418E-81B0-2729902C4413@mnot.net> <A14105FB-ED1A-4B70-8840-9648847BCC3A@mnot.net> <6C71876BDCCD01488E70A2399529D5E5163F3C67@ADELE.crf.canon.fr> <CAP+FsNfFohSwrX2DxthNcnn+wDj6T5W7xpcg4yA56Gvt_nP3_Q@mail.gmail.com> <6C71876BDCCD01488E70A2399529D5E5163F3D72@ADELE.crf.canon.fr> <7CA7F3EB-A492-471A-8AC4-23293DD10840@mnot.net> <6C71876BDCCD01488E70A2399529D5E5163F4076@ADELE.crf.canon.fr> <CAP+FsNdztfCJjvP58ryVXDRgGyGSPO-37gRMjAuwikz2eviBiw@mail.gmail.com> <CAP+FsNdQ7mNbsaAiUqEF22Oh8KMaK3UWUWFzWE=K0jQbkM7t1Q@mail.gmail.com> <6C71876BDCCD01488E70A2399529D5E5163F4263@ADELE.crf.canon.fr> <CAP+FsNeXvn6UasR6e56A7pHtrkXg6A0NnrVGmRYNW49Qu2vxqg@mail.gmail.com> <CAP+FsNfy0ognTBaF7USBcP9dTL5bQsruav30FmGB70m_0JfjyA@mail.gmail.com> <CABP7RbfN0Gf_qJkkj1ugJaDyjLZhQp9xoL+8H2B+4mGH=AcZGA@mail.gmail.com>
Date: Wed, 27 Mar 2013 17:46:28 -0700
Message-ID: <CAP+FsNd-3OKwySXyq8zHSind=uVFip0mQx9kXiceqg_E_RkzVw@mail.gmail.com>
From: Roberto Peon <grmocg@gmail.com>
To: James M Snell <jasnell@gmail.com>
Cc: RUELLAN Herve <Herve.Ruellan@crf.canon.fr>, "agl@google.com" <agl@google.com>, Mark Nottingham <mnot@mnot.net>, "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="e89a8fb201182ab48c04d8f17cee"
Received-SPF: pass client-ip=209.85.219.54; envelope-from=grmocg@gmail.com; helo=mail-oa0-f54.google.com
X-W3C-Hub-Spam-Status: No, score=-3.4
X-W3C-Hub-Spam-Report: AWL=-2.648, 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: maggie.w3.org 1UL0zX-0003sM-Lf 818c0169625c3ab343e951ee4d2edc1d
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Choosing a header compression algorithm
Archived-At: <http://www.w3.org/mid/CAP+FsNd-3OKwySXyq8zHSind=uVFip0mQx9kXiceqg_E_RkzVw@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17162
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>

For larger buffer sizes, it can make a fair difference, but it is an easy
thing to change, for sure.
-=R


On Wed, Mar 27, 2013 at 5:29 PM, James M Snell <jasnell@gmail.com> wrote:

> On Wed, Mar 27, 2013 at 5:14 PM, Roberto Peon <grmocg@gmail.com> wrote:
> > I've checked in some changes to delta2 which expands and documents
> various
> > options for delta2 in the README.md.
> >
> > After running a number of variations of delta2, The following defaults
> look
> > good for small buffer sizes:
> >
> > delta2=max_entries=256, small_index=1
>
> Oh excellent. I had hit on this as well. To be honest, I'm not sure
> max_entry > 256 would ever really make much practical sense.
>
> - James
>
> >
> > small_index basically says use a uint8 instead of a uint16 for
> representing
> > indices, and is the kind of thing that could be messaged somewhere
> (opcode,
> > flag, whatever).
> >
> > The best headerdiff option which I believe is safe against CRIME in the
> > future is:
> >   headerdiff=delta_type=false,huffman
> >
> > I removed prefix matching from delta some months ago (~6 I think?) after
> > cogitating on it for a while and then speaking with security folks.. I
> just
> > couldn't come up with a way I could prove was safe, unlike the
> > atom-matching, which one can prove is no worse than a brute-force attack.
> >
> > I've appended runs with these values@4k buffer size for delta2 and
> > headerdiff below.
> > -=R
> >
> >
> >
> > * TOTAL: 5949 req messages
> >
> > size  time | ratio min   max   std
> >
> > http1     3,460,925  0.13 | 1.00  1.00  1.00  0.00
> >   delta2 (max_byte_size=4096, max_entries=256, small_index=1,
> hg_adjust=0,
> > implicit_hg_add=0, refcnt_vals=0)       664,683  4.16 | 0.19  0.02  0.83
> > 0.15
> >                                                          headerdiff
> > (buffer=4096, delta_type=false, huffman)       759,783  2.03 | 0.22  0.01
> > 0.78  0.18
> >
> > * TOTAL: 5948 res messages
> >
> > size  time | ratio min   max   std
> >
> > http1     2,186,162  0.12 | 1.00  1.00  1.00  0.00
> >   delta2 (max_byte_size=4096, max_entries=256, small_index=1,
> hg_adjust=0,
> > implicit_hg_add=0, refcnt_vals=0)       585,475  5.32 | 0.27  0.02  1.28
> > 0.13
> >                                                          headerdiff
> > (buffer=4096, delta_type=false, huffman)       543,047  3.29 | 0.25  0.02
> > 0.73  0.14
> >
> >
> >
>