RE: Choosing a header compression algorithm

RUELLAN Herve <Herve.Ruellan@crf.canon.fr> Fri, 22 March 2013 18:06 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 ECE0621F8F53 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 22 Mar 2013 11:06:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.786
X-Spam-Level:
X-Spam-Status: No, score=-9.786 tagged_above=-999 required=5 tests=[AWL=-0.230, BAYES_00=-2.599, HELO_EQ_FR=0.35, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-8, SARE_SPEC_PROLEO_M2=0.692]
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 xDbTzX2aVlNk for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 22 Mar 2013 11:06:09 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id F35FA21F8F4A for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 22 Mar 2013 11:06:08 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UJ6L1-0002HS-T3 for ietf-http-wg-dist@listhub.w3.org; Fri, 22 Mar 2013 18:05:11 +0000
Resent-Date: Fri, 22 Mar 2013 18:05:11 +0000
Resent-Message-Id: <E1UJ6L1-0002HS-T3@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <Herve.Ruellan@crf.canon.fr>) id 1UJ6Ko-0000zJ-SG for ietf-http-wg@listhub.w3.org; Fri, 22 Mar 2013 18:04:58 +0000
Received: from inari-msr.crf.canon.fr ([194.2.158.67]) by maggie.w3.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <Herve.Ruellan@crf.canon.fr>) id 1UJ6Km-0006fc-T4 for ietf-http-wg@w3.org; Fri, 22 Mar 2013 18:04:58 +0000
Received: from mir-msr.corp.crf.canon.fr (mir-msr.corp.crf.canon.fr [172.19.77.98]) by inari-msr.crf.canon.fr (8.13.8/8.13.8) with ESMTP id r2MI4QsB020769; Fri, 22 Mar 2013 19:04:26 +0100
Received: from ADELE.crf.canon.fr (adele.fesl2.crf.canon.fr [172.19.70.17]) by mir-msr.corp.crf.canon.fr (8.13.8/8.13.8) with ESMTP id r2MI4QuT031357; Fri, 22 Mar 2013 19:04:26 +0100
Received: from ADELE.crf.canon.fr ([::1]) by ADELE.crf.canon.fr ([::1]) with mapi id 14.02.0342.003; Fri, 22 Mar 2013 19:04:26 +0100
From: RUELLAN Herve <Herve.Ruellan@crf.canon.fr>
To: Roberto Peon <grmocg@gmail.com>
CC: Mark Nottingham <mnot@mnot.net>, "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
Thread-Topic: Choosing a header compression algorithm
Thread-Index: AQHOJgaI2I9gxWQLAUOB6sMRXNhzJpixMSEAgAB5jdCAAEKngIAAFPgQ
Date: Fri, 22 Mar 2013 18:04:25 +0000
Message-ID: <6C71876BDCCD01488E70A2399529D5E5163F3D72@ADELE.crf.canon.fr>
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>
In-Reply-To: <CAP+FsNfFohSwrX2DxthNcnn+wDj6T5W7xpcg4yA56Gvt_nP3_Q@mail.gmail.com>
Accept-Language: en-US, fr-FR
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [172.20.7.30]
Content-Type: multipart/alternative; boundary="_000_6C71876BDCCD01488E70A2399529D5E5163F3D72ADELEcrfcanonfr_"
MIME-Version: 1.0
Received-SPF: none client-ip=194.2.158.67; envelope-from=Herve.Ruellan@crf.canon.fr; helo=inari-msr.crf.canon.fr
X-W3C-Hub-Spam-Status: No, score=-4.4
X-W3C-Hub-Spam-Report: AWL=-1.908, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-2.497
X-W3C-Scan-Sig: maggie.w3.org 1UJ6Km-0006fc-T4 34e421e26de06f5bb497adce5688b070
X-Original-To: ietf-http-wg@w3.org
Subject: RE: Choosing a header compression algorithm
Archived-At: <http://www.w3.org/mid/6C71876BDCCD01488E70A2399529D5E5163F3D72@ADELE.crf.canon.fr>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17120
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>

I think it would be good to move this from the compressors to the streamifier. In addition, it would be interesting to look at a more realistic streamifier that could for example unshard hosts (expecting that HTTP/2.0 will remove the sharding currently done by server developers).

Hervé.

From: Roberto Peon [mailto:grmocg@gmail.com]
Sent: vendredi 22 mars 2013 18:46
To: RUELLAN Herve
Cc: Mark Nottingham; ietf-http-wg@w3.org Group
Subject: Re: Choosing a header compression algorithm

Correct, delta2 uses a header group per host, however, the real benefits of this don't show up with the current streamifier, which removes the intermingling of requests to different hosts (which is a bit unrealistic, but does makes the graphs easier to parse visually).
This can end up really mattering to the compression in the cases where there is some ping-ponging between different host headers.

-=R

On Fri, Mar 22, 2013 at 9:01 AM, RUELLAN Herve <Herve.Ruellan@crf.canon.fr<mailto:Herve.Ruellan@crf.canon.fr>> wrote:
The results for HeaderDiff were not at all those I excepted.

I traced the difference to the number of compressor instances used to compress the sample files. The framework uses only one instance for all the files, while internally I used one instance for each file.

I noticed that the delta2 compressor seems to use one compression context for each host. I think this is the correct behavior to obtain realistic results. I will therefore update the HeaderDiff codec to create one compression context per host.

Hervé.

> -----Original Message-----
> From: Mark Nottingham [mailto:mnot@mnot.net<mailto:mnot@mnot.net>]
> Sent: vendredi 22 mars 2013 07:32
> To: ietf-http-wg@w3.org<mailto:ietf-http-wg@w3.org> Group
> Subject: Re: Choosing a header compression algorithm
>
>
> On 21/03/2013, at 6:11 PM, Mark Nottingham <mnot@mnot.net<mailto:mnot@mnot.net>> wrote:
>
> > 1) We need to do apples-to-apples comparison of these compressors to
> see how they behave under a range of constraints (especially, memory).
>
> To this point, a few runs across the header corpus that I collected
> (http_samples/mnot/*.har), using the current implementations (again, we
> need to verify these are honouring these limits correctly, and I believe
> headerdiff is going to be updated):
>
> 16384 Byte Buffer
> ----------------------
>
> * TOTAL: 5948 req messages
>                                         size  time | ratio min   max   std
>                          http1     3,460,925  0.22 | 1.00  1.00  1.00  0.00
>   delta2 (max_byte_size=16384)       630,668 15.89 | 0.18  0.03  0.76  0.11
>      headerdiff (buffer=16384)     1,699,918  9.65 | 0.49  0.03  0.90  0.21
>
> * TOTAL: 5948 res messages
>                                         size  time | ratio min   max   std
>                          http1     2,186,162  0.26 | 1.00  1.00  1.00  0.00
>   delta2 (max_byte_size=16384)       575,345 24.39 | 0.26  0.02  1.06  0.12
>      headerdiff (buffer=16384)       877,106 24.76 | 0.40  0.04  0.93  0.14
>
> [ Note that the efficiency actually goes *down* on headerdiff for requests
> when the buffer is larger here; Herve, any idea what's happening there? ]
>
> 8192 Byte Buffer
> ----------------------
>
> * TOTAL: 5948 req messages
>                                        size  time | ratio min   max   std
>                         http1     3,460,925  0.24 | 1.00  1.00  1.00  0.00
>   delta2 (max_byte_size=8192)       646,431 15.78 | 0.19  0.03  0.76  0.12
>      headerdiff (buffer=8192)     1,378,622  6.95 | 0.40  0.03  0.92  0.20
>
> * TOTAL: 5948 res messages
>                                        size  time | ratio min   max   std
>                         http1     2,186,162  0.43 | 1.00  1.00  1.00  0.00
>   delta2 (max_byte_size=8192)       592,260 20.28 | 0.27  0.02  1.06  0.12
>      headerdiff (buffer=8192)       914,362 15.55 | 0.42  0.05  0.93  0.14
>
>
> 4096 Byte Buffer
> ----------------------
>
> * TOTAL: 5948 req messages
>                                        size  time | ratio min   max   std
>                         http1     3,460,925  0.18 | 1.00  1.00  1.00  0.00
>   delta2 (max_byte_size=4096)       665,642 13.35 | 0.19  0.03  0.77  0.12
>      headerdiff (buffer=4096)     1,406,429  3.92 | 0.41  0.03  0.88  0.18
>
> * TOTAL: 5948 res messages
>                                        size  time | ratio min   max   std
>                         http1     2,186,162  0.21 | 1.00  1.00  1.00  0.00
>   delta2 (max_byte_size=4096)       610,764 15.48 | 0.28  0.02  1.06  0.13
>      headerdiff (buffer=4096)     1,009,185  7.58 | 0.46  0.05  0.93  0.13
>
> 2048 Byte Buffer
> ----------------------
>
> * TOTAL: 5948 req messages
>                                        size  time | ratio min   max   std
>                         http1     3,460,925  0.18 | 1.00  1.00  1.00  0.00
>   delta2 (max_byte_size=2048)       692,579 11.66 | 0.20  0.03  0.77  0.12
>      headerdiff (buffer=2048)     1,632,783  2.94 | 0.47  0.03  0.90  0.19
>
> * TOTAL: 5948 res messages
>                                        size  time | ratio min   max   std
>                         http1     2,186,162  0.20 | 1.00  1.00  1.00  0.00
>   delta2 (max_byte_size=2048)       633,785 12.47 | 0.29  0.02  1.22  0.13
>      headerdiff (buffer=2048)     1,088,829  4.75 | 0.50  0.05  0.93  0.13
>
> 1024 Byte Buffer
> ----------------------
>
> * TOTAL: 5948 req messages
>                                        size  time | ratio min   max   std
>                         http1     3,460,925  0.22 | 1.00  1.00  1.00  0.00
>   delta2 (max_byte_size=1024)       752,380 11.92 | 0.22  0.03  0.84  0.13
>      headerdiff (buffer=1024)     1,700,325  1.82 | 0.49  0.03  0.91  0.19
>
> * TOTAL: 5948 res messages
>                                        size  time | ratio min   max   std
>                         http1     2,186,162  0.23 | 1.00  1.00  1.00  0.00
>   delta2 (max_byte_size=1024)       671,975 11.42 | 0.31  0.02  1.22  0.13
>      headerdiff (buffer=1024)     1,118,599  3.53 | 0.51  0.05  0.93  0.13
>
> 512 Byte Buffer
> ---------------------
>
> * TOTAL: 5948 req messages
>                                       size  time | ratio min   max   std
>                        http1     3,460,925  0.17 | 1.00  1.00  1.00  0.00
>   delta2 (max_byte_size=512)     1,058,090 14.23 | 0.31  0.04  0.83  0.15
>      headerdiff (buffer=512)     2,120,833  1.43 | 0.61  0.03  0.93  0.16
>
> * TOTAL: 5948 res messages
>                                       size  time | ratio min   max   std
>                        http1     2,186,162  0.14 | 1.00  1.00  1.00  0.00
>   delta2 (max_byte_size=512)       721,525 12.22 | 0.33  0.03  1.22  0.13
>      headerdiff (buffer=512)     1,199,608  2.09 | 0.55  0.05  0.93  0.12
>
> 256 Byte Buffer
> ---------------------
>
> * TOTAL: 5948 req messages
>                                       size  time | ratio min   max   std
>                        http1     3,460,925  0.18 | 1.00  1.00  1.00  0.00
>   delta2 (max_byte_size=256)     1,517,520 18.62 | 0.44  0.04  0.84  0.19
>      headerdiff (buffer=256)     2,444,376  1.32 | 0.71  0.08  0.95  0.13
>
> * TOTAL: 5948 res messages
>                                       size  time | ratio min   max   std
>                        http1     2,186,162  0.23 | 1.00  1.00  1.00  0.00
>   delta2 (max_byte_size=256)       856,632 13.21 | 0.39  0.04  1.22  0.14
>      headerdiff (buffer=256)     1,201,814  1.65 | 0.55  0.05  0.93  0.12
>
> 32 Byte Buffer
> -------------------
>
> * TOTAL: 5948 req messages
>                                      size  time | ratio min   max   std
>                       http1     3,460,925  0.20 | 1.00  1.00  1.00  0.00
>   delta2 (max_byte_size=32)     2,357,457 28.18 | 0.68  0.51  0.84  0.05
>      headerdiff (buffer=32)     2,791,039  1.16 | 0.81  0.58  0.96  0.08
>
> * TOTAL: 5948 res messages
>                                      size  time | ratio min   max   std
>                       http1     2,186,162  0.21 | 1.00  1.00  1.00  0.00
>   delta2 (max_byte_size=32)     1,197,019 17.92 | 0.55  0.16  0.89  0.07
>      headerdiff (buffer=32)     1,434,721  1.32 | 0.66  0.19  0.95  0.07
>
> [ smaller buffer sizes caused errors in delta2 (at least) ]
>
> --
> Mark Nottingham   http://www.mnot.net/
>
>
>