From owner-freebsd-net@freebsd.org Thu Jul 14 17:45:05 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E62F0B99988 for ; Thu, 14 Jul 2016 17:45:05 +0000 (UTC) (envelope-from julien.charbon@gmail.com) Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7CBA91D5A; Thu, 14 Jul 2016 17:45:05 +0000 (UTC) (envelope-from julien.charbon@gmail.com) Received: by mail-wm0-f43.google.com with SMTP id o80so122593890wme.1; Thu, 14 Jul 2016 10:45:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to; bh=4DSWyi2MamA+UrkDmskBhbY5VpHbzKDKJ7X/FafWky8=; b=WX4VQP01xxgpSFdxVpG/r3xIIpRDExB43EHXeOzM/h9VlUAWgZKT95z3p81lg+kwny 1RQc6sKNK9aF85Jvc1a8kaNBKUfzisVM9oN5kMY4oimHwHsq4Fv0WaEnNBD09k0ufamT DD/iN/Jc7dDCK0aydXBZRCDqzBtlAAUi0ALfaMSwQGWFe/8zuR0w+7bu0oh6anrUB8ZF rv0sJNuUpiT5IV2TwozuETYpEXaMZzGZhswKFxK6qJpdmMbUVL0BLp1DlrlTI7O3oeSX gFl7N8tvraFfMQfiVnCNY+hvveDAlXlAnNXusECE0i19W5RRHhUpjnRbfLZJnRPSqe/b GngA== X-Gm-Message-State: ALyK8tL7EkAF7UHqrvFExRqFq8WIgruXTQdQeEIeqenfQZfRGZi3JysyObQJuCesWKtvUg== X-Received: by 10.28.141.4 with SMTP id p4mr36807644wmd.46.1468517935762; Thu, 14 Jul 2016 10:38:55 -0700 (PDT) Received: from [10.100.64.21] ([217.30.88.7]) by smtp.gmail.com with ESMTPSA id d64sm5216745wmc.22.2016.07.14.10.38.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jul 2016 10:38:54 -0700 (PDT) Subject: Re: TCP stack lock contention with short-lived connections To: freebsd-net@freebsd.org, pkelsey@freebsd.org, np@FreeBSD.org References: <537F39DF.1090900@verisign.com> <537FB51D.2060401@verisign.com> <53861209.2000306@verisign.com> <53880525.6000203@gmail.com> <5665A78E.3090401@freebsd.org> <5635309e-3235-e574-9bd2-a7a484ac0825@freebsd.org> Cc: k simon , hiren panchasara From: Julien Charbon Message-ID: <508b340a-2e55-43e1-99d7-e4b53ca4687d@freebsd.org> Date: Thu, 14 Jul 2016 19:38:47 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <5635309e-3235-e574-9bd2-a7a484ac0825@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2HhO8O9uRaD1aso3m468VOXiFxkG6HDBx" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2016 17:45:06 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --2HhO8O9uRaD1aso3m468VOXiFxkG6HDBx Content-Type: multipart/mixed; boundary="voOVPM01S0Wwp9kEsjiph80hoCQ7VjDrf" From: Julien Charbon To: freebsd-net@freebsd.org, pkelsey@freebsd.org, np@FreeBSD.org Cc: k simon , hiren panchasara Message-ID: <508b340a-2e55-43e1-99d7-e4b53ca4687d@freebsd.org> Subject: Re: TCP stack lock contention with short-lived connections References: <537F39DF.1090900@verisign.com> <537FB51D.2060401@verisign.com> <53861209.2000306@verisign.com> <53880525.6000203@gmail.com> <5665A78E.3090401@freebsd.org> <5635309e-3235-e574-9bd2-a7a484ac0825@freebsd.org> In-Reply-To: <5635309e-3235-e574-9bd2-a7a484ac0825@freebsd.org> --voOVPM01S0Wwp9kEsjiph80hoCQ7VjDrf Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, On 6/28/16 12:06 PM, Julien Charbon wrote: > On 12/7/15 4:36 PM, Julien Charbon wrote: >> On 30/05/14 06:12, k simon wrote: >>> Does any plan commit and MFC to the 10-stable ? >> >> I got a bit of interest of having the performance improvements for >> short-lived TCP connections in 10-stable. Just to share the current >> status to a wider audience: >> >> - I maintain a stack of our TCP performance related patches for >> 10.2-RELENG here: >> >> https://github.com/verisign/freebsd/commits/10.2/tcp-scale >=20 > Got more request to MFC TCP stack short-lived connection changes (see > below) in 10: >=20 > #1 Decrease lock contention within the TCP accept case by removing > the INP_INFO lock from tcp_usr_accept > https://svnweb.freebsd.org/base?view=3Drevision&revision=3D271119 >=20 > #2 In tcp_input(), don't acquire the pcbinfo global write lock for SYN > packets targeting a listening socket. > https://svnweb.freebsd.org/base?view=3Drevision&revision=3D271119 >=20 > #3 A connection in TIME_WAIT state before calling close() actually did > not received any RST packet. > https://svnweb.freebsd.org/base?view=3Drevision&revision=3D273014 >=20 > #4 Decompose TCP INP_INFO lock to increase short-lived TCP connections > scalability > https://svnweb.freebsd.org/base?view=3Drevision&revision=3D286227 >=20 > Fix a kernel assertion issue introduced with r286227 > https://svnweb.freebsd.org/base?view=3Drevision&revision=3D286443 >=20 > #5 Make clear that TIME_WAIT timeout expiration is managed solely by > tcp_tw_2msl_scan() > https://svnweb.freebsd.org/base?view=3Drevision&revision=3D286873 >=20 > If nobody complains, I plan to MFC them in stable/10. After actually > quite a bunch of tests as I see a lot of changes that might impact thes= e > MFCs (like TFO support, etc.). MFC over stable/10 of above commits done and tested here: https://github.com/verisign/freebsd/commits/10/tcp-scale Nothing particular, the result make stable/10 much closer to -CURRENT TCP locking-wise. Patrick and Navdeep, you might want to look (or not) at the last commit and glance if everything looks ok TFO-wise (Patrick) and Chelsio-wise (Navdeep): https://github.com/verisign/freebsd/commit/787ff2dec1ad8a7343f86c0f6e7591= 47fc64dac8 I did the diff with -CURRENT, and it looked quite the same than -CURRENT state. Will push these commits slowly in stable/10 if all good.= Thanks. -- Julien --voOVPM01S0Wwp9kEsjiph80hoCQ7VjDrf-- --2HhO8O9uRaD1aso3m468VOXiFxkG6HDBx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJXh84sAAoJEKVlQ5Je6dhxwfwIAI9IqC9latFLvTV9LJ+Y+r3L vAWWs9Qhzp7sNVXOcgs5ZPoT2PSOa36hoZuq4GCBlKnw72r82jOv7vIzY/USdkTR qhZRZpFPidbcdl18SArWkLKaVF/6D17xf9NRCekz1BpxQccZz3dlCpLJNSxGo2Xx DBb69UCEAmNjjuXEVcEm/AYa7r22rG0pm2yquN7Gcai6bJKPbOFqH7gw/2r6awJg O/qAx4AXbTVcJlhABax0tnToWCYN5fvxlxh8WZToz3C1HcXXVIAGRKhQSo93FH2C 4/d0wLLelVG/gPtqw2U9eayb5UIJCD9SVzhxmJj2RE/u3FuFpnsTMyaA6Fjcj4M= =W+ck -----END PGP SIGNATURE----- --2HhO8O9uRaD1aso3m468VOXiFxkG6HDBx--