Re: TCP Tuning for HTTP

"c^" <c@gryning.com> Sun, 08 November 2015 04:24 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@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 1AC311B315B for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sat, 7 Nov 2015 20:24:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.689
X-Spam-Level:
X-Spam-Status: No, score=-5.689 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, J_CHICKENPOX_37=0.6, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-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 d-0OOVCzDQ3R for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sat, 7 Nov 2015 20:24:25 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9B2531B3158 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sat, 7 Nov 2015 20:24:25 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1ZvHSl-00039m-4h for ietf-http-wg-dist@listhub.w3.org; Sun, 08 Nov 2015 04:20:19 +0000
Resent-Date: Sun, 08 Nov 2015 04:20:19 +0000
Resent-Message-Id: <E1ZvHSl-00039m-4h@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <c@gryning.com>) id 1ZvHSf-000390-Kk for ietf-http-wg@listhub.w3.org; Sun, 08 Nov 2015 04:20:13 +0000
Received: from mail-oi0-f41.google.com ([209.85.218.41]) by maggie.w3.org with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from <c@gryning.com>) id 1ZvHSd-00033a-Lw for ietf-http-wg@w3.org; Sun, 08 Nov 2015 04:20:13 +0000
Received: by oiad129 with SMTP id d129so84952058oia.0 for <ietf-http-wg@w3.org>; Sat, 07 Nov 2015 20:19:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gryning_com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=qeJpZtPyg7C70DkN1NSB2r/SDmb8hYPKWEsEcUAYez4=; b=BHX9sb9AHXr2R+nEFVvJMmB8mFktxygUFgsAidhxNTHO8Vp/jqOABdgdqKswyXoPEW /GBRWoV2cQIekmXUBT2yOalIwy696o1YG2rysah8O9PpD++KwjcVrjHsVH807pJJ3XVw lLgjopwbgpzuBZnYfygm9lSc3SCATfOL/kEx+Qs12VOrSEZ0Tg1o9g7mSe5S32t07+hH E4YAAFYWb9KT2FM++EUMr079RLUSgo5sjavI6oO560h6DbE7z2TF7IcT7whMpsBwpmyo VtWutW8gF7WCIFVHVEK0f2+le2nqxHjBGOpq0zRu5XHYGvTpQfZ8gdt1pTqWM8NeN+d8 pn/g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=qeJpZtPyg7C70DkN1NSB2r/SDmb8hYPKWEsEcUAYez4=; b=lx7t1XuxNudmwMETlddFhdrzkDGqcvXkSBw26BeJ8NxRmrrVWruqI5EpqYxMpRSvYm MJ/3VHKrcuLruH+STAOTEoE/6C4PUeUayFcmno3MxHwJrlMEVi0UguyEVkr7SF4eyYXE f+qp+675F5BZJ5CdDniujvZy91/qYAJyCU/pfd0T+nT2ZFLB088bBjcTjTWEYBL3G5Us MTCFl2pmUbTYUZXRvvAH51RoiSFpL5jjMdKUD1JqkI38cHAgnUJeYXDvodrPEdpD+XBL Z1qnUruy/Exnx/XfC9bjxftchvFyvCya1JSM6+1zj8jQOpplkoaYhw+2k0pgfTxQAIzV GxiQ==
X-Gm-Message-State: ALoCoQntIAmZnORik+wnJC7mjwup72wAiLNESgAo20jIiMecZ1a+IgB56esNP7AR42CS2E4ZRb/X
MIME-Version: 1.0
X-Received: by 10.202.102.98 with SMTP id a95mr11862421oic.90.1446956377917; Sat, 07 Nov 2015 20:19:37 -0800 (PST)
Received: by 10.202.0.76 with HTTP; Sat, 7 Nov 2015 20:19:37 -0800 (PST)
X-Originating-IP: [2001:4b10:0:8119:885e:3aa9:8a1f:b8b1]
Received: by 10.202.0.76 with HTTP; Sat, 7 Nov 2015 20:19:37 -0800 (PST)
In-Reply-To: <alpine.DEB.2.11.1511061651370.19082@tvnag.unkk.fr>
References: <alpine.DEB.2.11.1511061128150.19082@tvnag.unkk.fr> <88103DD2-02E7-4265-BC2B-F4526A15FC54@lukasa.co.uk> <alpine.DEB.2.11.1511061651370.19082@tvnag.unkk.fr>
Date: Sun, 08 Nov 2015 13:19:37 +0900
Message-ID: <CAK-1ke=_1feh=7gfjGihDqBoKKN=d1XCAS=6O6dCwPpdo4dYwg@mail.gmail.com>
From: c^ <c@gryning.com>
To: Daniel Stenberg <daniel@haxx.se>
Cc: HTTP Working Group <ietf-http-wg@w3.org>, Cory Benfield <cory@lukasa.co.uk>
Content-Type: multipart/alternative; boundary="001a114100e8e9608b0523ffc8a2"
Received-SPF: pass client-ip=209.85.218.41; envelope-from=c@gryning.com; helo=mail-oi0-f41.google.com
X-W3C-Hub-Spam-Status: No, score=-4.6
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1ZvHSd-00033a-Lw 3e08af3882bcbf22c79462f523427c34
X-Original-To: ietf-http-wg@w3.org
Subject: Re: TCP Tuning for HTTP
Archived-At: <http://www.w3.org/mid/CAK-1ke=_1feh=7gfjGihDqBoKKN=d1XCAS=6O6dCwPpdo4dYwg@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/30452
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 the server client split is probably a good one, although it's
probably more common/server specific...

I have something in my head to submit with regards to planning and
derivation of the TCP window scaling values. Unless someone beats me to it,
you'll have something in the next two days...

--
c%5e
On 7 Nov 2015 14:51, "Daniel Stenberg" <daniel@haxx.se> wrote:

> On Fri, 6 Nov 2015, Cory Benfield wrote:
>
> [1] = https://www.ietf.org/id/draft-stenberg-httpbis-tcp-00.txt
>>>
>>
>> The first draft looks great! This is a really good start. I have a few
>> small stylistic changes that I’ll propose as PRs to your repo, but wanted
>> to add some more detail for stuff that seems missing or needs elaboration.
>>
>
> The draft is on github and can be found here:
>    https://github.com/bagder/I-D/blob/gh-pages/httpbis-tcp/draft.md
>
> 1. net.core.somaxconn
>>
>> I did some digging here because I was interested in how this interacted
>> with the ‘backlog’ parameter to listen(). It seems that, on Linux,
>> net.core.somaxconn represents the maximum value. This means that the
>> maximum backlog on a listening socket is min(backlog, somaxconn). It would
>> probably help to elaborate this section, but elaborating that section
>> probably doesn’t make sense without also talking about the backlog argument
>> to listen() itself. I’m willing to submit some text for that if you’re
>> interested.
>>
>
> I'm interested! Please suggest improvements to whatever section you think
> you can improve. I'm here to help producing a document to help current and
> future implementers and I willingly take all the help I can get.
>
> Your description of somaxconn (“the number of incoming TCP SYNs allowed to
>> backlog”) is not actually accurate, I don’t think, because of the next
>> section.
>>
>
> Nah, it is a bit too simplistic I guess. I also didn't want to make a
> document that only lists lots of Linux-specific details but rather wanted
> to mention that there can be limits "in this style". I'm sure that limit
> will work slightly different in other operating systems.
>
> I also try to avoid exact numbers in the document for that reason. Also
> because fixed limits tend to grow old very fast while general advice may
> live on longer.
>
> 2. tcp_max_syn_backlog
>>
>> You don’t mention the setting related to net.core.somaxconn, which is
>> net.ipv4.tcp_max_syn_backlog.
>>
>
> Correct or not, I was thinking the specific SYN (flood) handling would be
> better referred to RFC 4987. You think this option is worth mentioning
> explicitly in this document?
>
> 3. Separate into client, server, and both optimisations.
>>
>
> I've struggled back and forth on how to group the different suggestions
> and I don't think I've found the perfect layout just yet. I'm not sure it
> will be that easy to make separate sections for client, server or both and
> have the text flow naturally. Maybe it is enough to just mention the
> different target use cases in the text when they are clearly distinct?
>
> It also most likely varies a lot depending what kind of servers or clients
> we're talking about.
>
> Thanks a lot for your feedback and help!
>
> --
>
>  / daniel.haxx.se