Re: Reference set in HPACK

Roberto Peon <grmocg@gmail.com> Wed, 02 July 2014 07:46 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 BAFB41A0AA8 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 2 Jul 2014 00:46:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.441
X-Spam-Level:
X-Spam-Status: No, score=-7.441 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, DKIM_SIGNED=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, T_DKIM_INVALID=0.01] 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 lTNoqIy-DX4t for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 2 Jul 2014 00:46:14 -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 B04541A0ABB for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 2 Jul 2014 00:46:14 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1X2FCn-0005LN-Hf for ietf-http-wg-dist@listhub.w3.org; Wed, 02 Jul 2014 07:43:49 +0000
Resent-Date: Wed, 02 Jul 2014 07:43:49 +0000
Resent-Message-Id: <E1X2FCn-0005LN-Hf@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <grmocg@gmail.com>) id 1X2FCf-0005Ke-ML for ietf-http-wg@listhub.w3.org; Wed, 02 Jul 2014 07:43:41 +0000
Received: from mail-oa0-f52.google.com ([209.85.219.52]) by lisa.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <grmocg@gmail.com>) id 1X2FCe-0001o6-OG for ietf-http-wg@w3.org; Wed, 02 Jul 2014 07:43:41 +0000
Received: by mail-oa0-f52.google.com with SMTP id j17so11884842oag.11 for <ietf-http-wg@w3.org>; Wed, 02 Jul 2014 00:43:14 -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=elI1pK0sbqugNpIvXyqF/H9S0qVv8HJy+afddg539xg=; b=tzT97ERak/vEb5yFyGyF3ryyPkKmXWr5dsqyk6q+JuCsl21yPfa5wpFtF4m/1Z0gJl fHwKF4sgPtatKYl6YSt/JuZezgdmz5cFCSBNTAYZFaFHLstpQ7ghD/mVK+D884h+2CIE 7GHezlavqhfwJem7Pfua/IW5gZ8Vnq5gbizyXvuKaUr6og5r+Qc1llPeevH42pFOaKYE Z11LVwWKWyRbXiqRW27MbsvLgJ760tCf8z3wFfTyxQqsalm/V1FMMT3Uu1hujCNPNrBd gD95LxfmCi8bmx5nEsxTLc1dhwTQZRTvpKSjhD9B7EKjP7zqzEUpfHU4tCBDKpkBSKLS T91A==
MIME-Version: 1.0
X-Received: by 10.60.140.227 with SMTP id rj3mr22064647oeb.10.1404286994906; Wed, 02 Jul 2014 00:43:14 -0700 (PDT)
Received: by 10.76.108.12 with HTTP; Wed, 2 Jul 2014 00:43:14 -0700 (PDT)
In-Reply-To: <19819.1404285745@critter.freebsd.dk>
References: <20140702.143041.283993814131065692.kazu@iij.ad.jp> <CAP+FsNexzVzt+YV7oBeMdGrMoajbMVj1Z90XvQfaCuNMDjYdHg@mail.gmail.com> <20140702.145215.1023037072984695261.kazu@iij.ad.jp> <CAP+FsNc+xW1gKma0McrgXtPpwR0BCubHkvHhUbcHHyn1Sd6t0g@mail.gmail.com> <19403.1404282862@critter.freebsd.dk> <CAP+FsNf=RvMaGLr2Dx+VUVwimb6+bxdEgNyV7aL2xPOiFBJcGg@mail.gmail.com> <19819.1404285745@critter.freebsd.dk>
Date: Wed, 02 Jul 2014 00:43:14 -0700
Message-ID: <CAP+FsNc9Te7fzTEeKyqWJEAXg6CW9WEGu9qDAQv6c0UP91O+1w@mail.gmail.com>
From: Roberto Peon <grmocg@gmail.com>
To: Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc: Kazu Yamamoto <kazu@iij.ad.jp>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="047d7b2e50c07e834204fd310b9c"
Received-SPF: pass client-ip=209.85.219.52; envelope-from=grmocg@gmail.com; helo=mail-oa0-f52.google.com
X-W3C-Hub-Spam-Status: No, score=-3.5
X-W3C-Hub-Spam-Report: AWL=-2.714, 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 1X2FCe-0001o6-OG 81b009aab18c71eaf2370704426e527b
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Reference set in HPACK
Archived-At: <http://www.w3.org/mid/CAP+FsNc9Te7fzTEeKyqWJEAXg6CW9WEGu9qDAQv6c0UP91O+1w@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/25075
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>

On Wed, Jul 2, 2014 at 12:22 AM, Poul-Henning Kamp <phk@phk.freebsd.dk>
wrote:

> In message <CAP+FsNf=
> RvMaGLr2Dx+VUVwimb6+bxdEgNyV7aL2xPOiFBJcGg@mail.gmail.com>, Roberto Peon
> writes:
> >--047d7b2e50c07345ea04fd30267d
>
> >That is orthogonal-- small data frames are necessary for latency as well,
>
> I don't dispute that, I just dispute the value chosen for "small".
>
> But back to your two saved packets:
>
> I just tried loading a typical well engineered major news site over
> HTTP/1 and captured a tcpdump.
>
> A total of 1891906 bytes were sent in the TCP packets and 146 HTTP
> transactions performed.
>
> 1718723 of those byes are accounted for by Content-Length (there
> is a single chunked object but I can't be bothered to tally it from
> the tcpdump).
>
> If the 1718723 bytes optimistically had been sent on a single TCP
> in one direction from a single server, that would take 1193 packets
> (without HTTP/2 overhead of framing).
>
> Your proposed saving of 2 packets can therefore never exceed a
> 0.17% ratio for this particular case.
>
> In practice 15 different servers were involved and just the
> distribution of content over 15 TCP connections alone adds
> 7.5 packets on average in "rounding error", in addition to
> the three-way handshakes and so on.
>
> It also reduces the chances of the few bytes shaved by the reference
> set from saving any packets (as opposed to having a few byts
> less in a packet).
>
> If I remeber my statistics right, your already pretty slim chances
> of shaving a packet is reduced by sqrt(15), since the reference
> set doesn't do anything for you cross-site.
>
> So provided the byte for byte savings previously quoted are correct
> on average you'd probably save half a packet out of the total 1200.
>
> That is 0.04 %.
>
> Unless you have actual non-contrived data that shows a remarkably
> better outcome than that, the reference set is not worth the added
> complexity.
>


Your analysis seems a bit flawed.

>From the server side, server push is most likely to be used during
slowstart, and during the time that the initial resource (e.g. the HTML)
would be sent.
Inlining is the technique most often used to reduce the number of request.
It is a strategy that works well most of the time for cold pageloads, but
it also harms latency for subsequent navigations deeper into the site as
those resources cannot be cached.
For server push to be effective, it should not take significantly more time
than inlining. Its primary benefit ends up being to navigations after the
first cold page load, though it can also remove a single RT from a cold
page load assuming the window opens enough to allow that (which is not
certain).
When server push becomes adopted better (there is a chicken and egg issue
now which is hopefully being addressed), sites change how they present
resources to HTTP2 connections, and the number of resources for a page
seems likely to increase as folks get to abandon inlining, spriteing, etc.

For a client which is creating a new connection, e.g. on a browser restart,
it may have a great many requests to send. I often have 20 or more tabs
open, for instance. In cases such as these there are a fair number of
requests which will look more similar and which should be sent in the first
few packets.
-=R



>
> --
> Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
> phk@FreeBSD.ORG         | TCP/IP since RFC 956
> FreeBSD committer       | BSD since 4.3-tahoe
> Never attribute to malice what can adequately be explained by incompetence.
>