From owner-freebsd-net@FreeBSD.ORG Thu Feb 5 19:32:02 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67DD3428 for ; Thu, 5 Feb 2015 19:32:02 +0000 (UTC) Received: from nm1.bullet.mail.gq1.yahoo.com (nm1.bullet.mail.gq1.yahoo.com [98.136.218.75]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C0DFDCB for ; Thu, 5 Feb 2015 19:32:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1423164721; bh=GyHMo1sLu2HcuYDT9ta/cfPh7d70PRmDcZHpDMAWLFI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=KRXBEdxE785a3ZM4iJRITPPj3ggwjpIjgL90rH7Wvprp2HkGNUGZSiXnH8DuCk3iOXIgP8nSfvolqWcObpvWWHXWl0Dq+lj3CnKFIBv+WXj+7xiqeKEwerI6wWOEsb2qK5AQfCciWfPymjw9jYjt7EZbpO38/7HKmZLaeQwX+nNf8XsUWfM5lIdijvtksH6/XF4hoUd7JQ9pzVU59qXyF2TgfaAkPbycpA6eyummrcmr5bsQZpyqAahy0L1cXMQOcoRGe0qKxEPJOrt/VMBdk1pXOa8J6IXJq5zPKjqSLrCURDdxF7/csgszrGyP9/Rt0AeKxH3h1jCimHxqkMjQOQ== Received: from [216.39.60.180] by nm1.bullet.mail.gq1.yahoo.com with NNFMP; 05 Feb 2015 19:32:01 -0000 Received: from [208.71.42.208] by tm16.bullet.mail.gq1.yahoo.com with NNFMP; 05 Feb 2015 19:32:01 -0000 Received: from [127.0.0.1] by smtp219.mail.gq1.yahoo.com with NNFMP; 05 Feb 2015 19:32:01 -0000 X-Yahoo-Newman-Id: 100257.22043.bm@smtp219.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: kN.Y_o8VM1mKTH7HyaCVR0f93rN2aD1Nm7BcgdVUwrWGTfW pnpDmR3WJQ8bQfq011harEqx257DEtARjAQyipl.aMKyZzczGuqwp03YZC0J LrFPaUwbl0YU4Dnto8KsbBrTQAbzI.6d2Q5qy05SBca0FS.fVX3xnB7kPI0B TQYTDwGYwItIuQRY6cBsXd.EZzbQI7zgSr7XU9Mn5v_uPb.oubo5pHxOL.2A 8yGOniLvER0.8rCFTSZjQR5qqtLgI0DlmUirj.LHNHZ2F9fHzzm6lRxHWNk1 Oc3SWhLg80ezv.VXgdGAmHr0TGEBntyray22Q8spKC9hMjjypNJ8FsNXROa_ PYRVUSuDKb2pKg2G6kPaEM.W5.M9fWm.7xiIZuOJXrG1RTjCmwObfr5eRpjX .6ywewcc5uLt.XkF12mabWvQ9m5PFLprxm3MUq4UvpVOSsuQBOA56ZyTkJm_ aontHQGkJ2w1iE_qAsHEMAjCwmVzwER93Ox4GhYyDO5MH.Hs5KxFsVB_fTVZ ljZhqsobyxyCLEkZ_IddHWnh9i8bNfj1oAzBU X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Subject: Re: Silly experiments with netisr Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_0FF2A146-5C2F-4C87-AC39-B784AF05DE53"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b4 From: Scott Long In-Reply-To: <54D3BE67.8060502@ignoranthack.me> Date: Thu, 5 Feb 2015 12:31:57 -0700 Message-Id: <752D84FB-0B65-47CF-973A-91C3697A28DC@yahoo.com> References: <54D3BE67.8060502@ignoranthack.me> To: sbruno@freebsd.org X-Mailer: Apple Mail (2.2070.6) Cc: FreeBSD Net X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 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, 05 Feb 2015 19:32:02 -0000 --Apple-Mail=_0FF2A146-5C2F-4C87-AC39-B784AF05DE53 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 5, 2015, at 12:03 PM, Sean Bruno = wrote: >=20 >=20 > Signed PGP part > Some questions came up around the office and we ended up doing some > quite silly things with lo0 and netcat. >=20 > If one runs a continuous netcat on localhost to another netcat = listener > on localhost that writes the output to /dev/null, netisr gets super = busy > doing stuff/things. >=20 > E.g. > -- listener running "nc -k -l 10000 > /dev/null" > - sender running in a while loop "nc -N localhost 10000 < > /var/tmp/testfile" >=20 > Interesting things start happening on the machine. top -SH shows = netisr > eating up about 1/2 of a cpu core. If you drop the MTU on lo0 to 1500 > (so that it looks like something in the real world), netisr will peg = out > a cpu core. This seems logical, in that smaller MTU means busier > netisr. Its interesting though. >=20 > Looking at some pmcstat things, shows that the system is busilly > chugging along in tcp_do_segment(). I wonder if this is meaningful in > anyway or just "interesting". Welcome to our workload. Granted, we don=E2=80=99t involve pf, but the = majority of our CPU processing right now is spent in TCP (with the rest = being spent in the VM, but that=E2=80=99s a different matter). FWIW, Randall has some optimizations in this area of the stack. They = aren=E2=80=99t huge, IIRC they=E2=80=99re only a few percent, but worth = looking at. Scott --Apple-Mail=_0FF2A146-5C2F-4C87-AC39-B784AF05DE53 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJU08UtAAoJEIxiMIkw8yo426gH/3DciyuCw+07veEWVKeLdZQq X+8qWGAYtVF6ghx4s0YBpHfR1f4xMT/9YFwounm84otn2xLPPSyrLAH258v/gYtb ZJ7Welj7Z+GJOoUJaRbGGvCFIwWd+dwEKb8FcqDyy0yvGI1W8XoLph9w0Y8hIx9o CCvV2Pv4KF/Ftr584gOZtiRtzsw00BsJ0Q/Q+aOBe4sK7M0eE25rpzvAlG82VP2x fQ+iFa4s6B1ckJ+Wo3ArsLIzh2UprFOIxB+ewlinXLWuMVHQ79wm5fXBiPEfQLq/ OUCCdqcmtytUM+XcogGTwGK2ld4sPYDxi9Jp98DnPYcbtKDHsX80mrW/nY6Vt2o= =cVSX -----END PGP SIGNATURE----- --Apple-Mail=_0FF2A146-5C2F-4C87-AC39-B784AF05DE53--