On 02/05/15 at 11:13P, Adrian Chadd wrote: > On 5 February 2015 at 11:03, Sean Bruno <sbr...@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 > > 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.) > > > %SAMP IMAGE FUNCTION CALLERS > > 5.5 kernel in_cksumdata in_cksum_skip > > .. we're checksumming localhost tcp? :)
We can get rid of it with RXCSUM/TXCSUM flags on lo0 right? From man 4 lo If the transmit checksum offload capability flag is enabled on a loopback interface, checksums will not be generated by IP, UDP, or TCP for packets sent on the interface. Or am I missing something? cheers, Hiren
pgpE_0M6PyhF8.pgp
Description: PGP signature