Date: Thu, 14 Jul 2016 19:38:47 +0200 From: Julien Charbon <jch@freebsd.org> To: freebsd-net@freebsd.org, pkelsey@freebsd.org, np@FreeBSD.org Cc: k simon <chio1990@gmail.com>, hiren panchasara <hiren@strugglingcoder.info> Subject: Re: TCP stack lock contention with short-lived connections Message-ID: <508b340a-2e55-43e1-99d7-e4b53ca4687d@freebsd.org> In-Reply-To: <5635309e-3235-e574-9bd2-a7a484ac0825@freebsd.org> References: <op.w51mxed6ak5tgc@fri2jcharbon-m1.local> <op.w56mamc0ak5tgc@dul1rjacobso-l3.vcorp.ad.vrsn.com> <len481$sfv$2@ger.gmane.org> <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>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --2HhO8O9uRaD1aso3m468VOXiFxkG6HDBx Content-Type: multipart/mixed; boundary="voOVPM01S0Wwp9kEsjiph80hoCQ7VjDrf" From: Julien Charbon <jch@freebsd.org> To: freebsd-net@freebsd.org, pkelsey@freebsd.org, np@FreeBSD.org Cc: k simon <chio1990@gmail.com>, hiren panchasara <hiren@strugglingcoder.info> Message-ID: <508b340a-2e55-43e1-99d7-e4b53ca4687d@freebsd.org> Subject: Re: TCP stack lock contention with short-lived connections References: <op.w51mxed6ak5tgc@fri2jcharbon-m1.local> <op.w56mamc0ak5tgc@dul1rjacobso-l3.vcorp.ad.vrsn.com> <len481$sfv$2@ger.gmane.org> <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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?508b340a-2e55-43e1-99d7-e4b53ca4687d>