From owner-freebsd-net@FreeBSD.ORG Thu Feb 5 20:23:20 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E27B1DDA; Thu, 5 Feb 2015 20:23:20 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC930679; Thu, 5 Feb 2015 20:23:20 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id 2ACE8CE3EC; Thu, 5 Feb 2015 12:23:14 -0800 (PST) Date: Thu, 5 Feb 2015 12:23:14 -0800 From: hiren panchasara To: Scott Long Subject: Re: Silly experiments with netisr Message-ID: <20150205202314.GD69733@strugglingcoder.info> References: <54D3BE67.8060502@ignoranthack.me> <752D84FB-0B65-47CF-973A-91C3697A28DC@yahoo.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NklN7DEeGtkPCoo3" Content-Disposition: inline In-Reply-To: <752D84FB-0B65-47CF-973A-91C3697A28DC@yahoo.com> User-Agent: Mutt/1.5.23 (2014-03-12) 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 20:23:21 -0000 --NklN7DEeGtkPCoo3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 02/05/15 at 12:31P, Scott Long via freebsd-net wrote: >=20 > > 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". >=20 >=20 > Welcome to our workload. Granted, we don?t 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?s a different matter). >=20 > FWIW, Randall has some optimizations in this area of the stack. They are= n?t huge, IIRC they?re only a few percent, but worth looking at. Scott, It'd be great if you guys can share it. And yes, any small persentage would help :-) cheers, Hiren --NklN7DEeGtkPCoo3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJU09ExXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lOMcH/A7LKBCskK8AWfqWDcu6ULGp +8rRSwc0gmE0UlZ8yN+QTwACXMf41Lw8p1KydOBIuyK5HelkumqBiank9Xwecyim AGpNiynsqFmbXQ8NeM6oJuJNbn7JZyVz+bSSKuzSoWT1uJ5I1poXcZDIt3f2E+Si i4FjiTshlec4AqMIC1w4WcbJ73H+AuMVQQEnPEXGWYRTlFEfALLSOBtiLQqOaXqc aFBgv6qtZa4AS5t7Wyf6QxfwcV8wtNfK0HHRxpNyzvQioj0Lgy+tb2SybDL97bWB SRkh9VgU+ymbbJfid6nBZaS6m7dILV4l8e0V4/0L8KvnWyUeWFUmFRsGwcDgw9g= =Nymf -----END PGP SIGNATURE----- --NklN7DEeGtkPCoo3--