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

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

--cPi+lWm09sJ+d57q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 02/05/15 at 11:13P, Adrian Chadd wrote:
> On 5 February 2015 at 11:03, Sean Bruno <sbruno@ignoranthack.me> wrote:
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA512
> >
> > Some questions came up around the office and we ended up doing some
> > quite silly things with lo0 and netcat.
> >
> > 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.
> >
> > E.g.
> >   -- listener running "nc -k -l 10000 > /dev/null"
> >   -  sender running in a while loop "nc -N localhost 10000 <
> > /var/tmp/testfile"
> >
> > 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.
> >
> > 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".
> >
> > 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
> > %SAMP IMAGE      FUNCTION             CALLERS
> >   5.5 kernel     in_cksumdata         in_cksum_skip
>=20
> .. we're checksumming localhost tcp? :)

We can get rid of it with RXCSUM/TXCSUM flags on lo0 right?=20

=46rom man 4 lo

     If the transmit checksum offload capability flag is enabled on a loopb=
ack
     interface, checksums will not be generated by IP, UDP, or TCP for pack=
ets
     sent on the interface.

Or am I missing something?

cheers,
Hiren

--cPi+lWm09sJ+d57q
Content-Type: application/pgp-signature

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

iQF8BAEBCgBmBQJU0+NeXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4
QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lkl4IAKGAcQf+cVf2nk4BgjKHnbxY
xuKz1OuYPzfTx1znFEypkdR5CQCu/jmxttx3QQayM28aghQGMZjVyzw1fEIkVysM
hDqozcs9/H59OkmjNSXu365OIrQPhB6zXTdhLoh96UHeYEwFz1mJtH/J2Y//6r9i
Ct6jXvsfAfUPYh252FHd/oFqb3M6FVPVMYceONYBqyGOno5stte0jUo67IwoYzzw
ROolDGnkFXpK3nZZfc2g4We5jVlcq8daYB27HmllvEULZjpq5uv23fRCYqQDL09l
kU+8UxFPXfndLqUI36B7T2ugQ6BbHk542gycGdQuDmfttLTvdcH+hyeFpH40aeA=
=b3U8
-----END PGP SIGNATURE-----

--cPi+lWm09sJ+d57q--



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