Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Feb 2015 13:48:22 -0800
From:      hiren panchasara <hiren@strugglingcoder.info>
To:        sbruno@freebsd.org
Cc:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   Re: Silly experiments with netisr
Message-ID:  <20150205214822.GF69733@strugglingcoder.info>
In-Reply-To: <54D3C23F.5090501@ignoranthack.me>
References:  <54D3BE67.8060502@ignoranthack.me> <CAJ-VmonX%2B_8g1Z1d6M4atC0_YriJq6scaXGF27yapfg5WyfGUg@mail.gmail.com> <54D3C23F.5090501@ignoranthack.me>

next in thread | previous in thread | raw e-mail | index | archive | help

--AH+kv8CCoFf6qPuz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 02/05/15 at 11:19P, Sean Bruno wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>=20
> On 02/05/15 11:13, Adrian Chadd wrote:
> > On 5 February 2015 at 11:03, Sean Bruno <sbruno@ignoranthack.me>
> > wrote:
> >>=20
> > 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 <=20
> > /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=20
> > chugging along in tcp_do_segment().  I wonder if this is meaningful
> > in anyway or just "interesting".
> >=20
> > PMC: [FR_RETIRED_X86_INSTRUCTIONS] Samples: 267614 (100.0%) ,
> > 12350 unresolved
> >=20
> >> UHm, on a recent intel, use CPU_CLK_UNHALTED instead, so you get
> >> an idea of which instructions are spending the most time doing
> >> "stuff". Some instructions are costlier than others (eg things
> >> that cause memory bus stalls.)
>=20
> Oh right.  Hrm, running this on an AMD system.  I should have thought
> about that one.
>=20
> >=20
> > %SAMP IMAGE      FUNCTION             CALLERS 5.5 kernel
> > in_cksumdata         in_cksum_skip
> >=20
> >> .. we're checksumming localhost tcp? :)
> >=20
>=20
> Yeah, and the ipv6 checksumming cannot be turned off apparently.
>=20
> % ifconfig lo0
> lo0: flags=3D8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 1500
> 	options=3D600000<RXCSUM_IPV6,TXCSUM_IPV6>
> 	inet6 ::1 prefixlen 128
> 	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
> 	inet 127.0.0.1 netmask 0xff000000
> 	nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL>
> 	groups: lo
> % ifconfig lo0 -rxcsum6
> ifconfig: -rxcsum6: Operation not supported

https://svnweb.freebsd.org/base?view=3Drevision&revision=3D238871

A workaround, apparently.

cheers,
Hiren

--AH+kv8CCoFf6qPuz
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)

iQF8BAEBCgBmBQJU0+UlXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4
QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lEy4H/RvAxYJOjz0XXWoIDBnFb+9/
Tns389eMRtIseu8qZxI6YI6BBHYx37Hu/kk0c+N0tMTqE2eyimIN/yKpRdbEd0/u
IMaWRLq/rDG1/vSscTUAA3yN+nYYd3ZJtmZKb0lI6QH5feYIldmDQZwBfgsi49I8
LudUvwX01e921L5EaLgge/nV2yW2j7dsOwKttaHFE080hAZEFDuh8v+L3eQ3XbK2
O+Roqfzw9MRCsd/EPfaJJRqr907dyfTLizVZoJwlgJn6OYxwqeFFaZ+fTWC1QSd4
+qJZz+dpFrLpG2w6s4aiASiyWXZaYx8l26elvtrt5PrQ96zdOPUQsYx7dq797hM=
=JsL9
-----END PGP SIGNATURE-----

--AH+kv8CCoFf6qPuz--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150205214822.GF69733>