igb netstat input counters 2x?
John-Mark Gurney
jmg at funkthat.com
Wed Aug 14 00:27:16 UTC 2019
I'm doing some perf testing on an APU4 board, and I noticed that
it looks like the input netstat counters are 2x than what they should
be.
I was seeing 60MiB/sec via netstat -w 1 -I igb1:
40034 0 0 60760352 2538 0 177909 0
40700 0 0 61776228 2574 0 180300 0
But the program was only reading 27MB/sec. I decided to read the mac
stats directly via:
bytes=$(sysctl -n dev.igb.1.mac_stats.good_octets_recvd); while sleep 1; do
nbytes=$(sysctl -n dev.igb.1.mac_stats.good_octets_recvd)
echo $(($nbytes - $bytes)); bytes=$nbytes
done
and saw much more reasonable numbers:
31099740
30512488
30675974
Which is more in line w/ the 27MB/sec that the program reports.
I haven't looked at the code to see what could be causing the double
counting. Also, the output numbers appear to be accurate.
This is with 13.0-CURRENT from the July 25th snapshot, which is r350322.
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
More information about the freebsd-net
mailing list