Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Aug 2019 17:38:22 +0300
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        freebsd-net@freebsd.org
Subject:   Re: igb netstat input counters 2x?
Message-ID:  <52b37710-8eb3-7e08-ee04-4682deb93c76@yandex.ru>
In-Reply-To: <20190814002705.GD2342@funkthat.com>
References:  <20190814002705.GD2342@funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--QC5I8Les35Q23YMu4bkOKleND2YL3RHJI
Content-Type: multipart/mixed; boundary="SpA76jSROhuoysCdPdJ6UIS4n3RDA61UP";
 protected-headers="v1"
From: "Andrey V. Elsukov" <bu7cher@yandex.ru>
To: freebsd-net@freebsd.org
Message-ID: <52b37710-8eb3-7e08-ee04-4682deb93c76@yandex.ru>
Subject: Re: igb netstat input counters 2x?
References: <20190814002705.GD2342@funkthat.com>
In-Reply-To: <20190814002705.GD2342@funkthat.com>

--SpA76jSROhuoysCdPdJ6UIS4n3RDA61UP
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

On 14.08.2019 03:27, John-Mark Gurney wrote:
> 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.
>=20
> 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
>=20
> But the program was only reading 27MB/sec.  I decided to read the mac
> stats directly via:
> bytes=3D$(sysctl -n dev.igb.1.mac_stats.good_octets_recvd); while sleep=
 1; do
> 	nbytes=3D$(sysctl -n dev.igb.1.mac_stats.good_octets_recvd)
> 	echo $(($nbytes - $bytes)); bytes=3D$nbytes
> done
>=20
> and saw much more reasonable numbers:
> 31099740
> 30512488
> 30675974
>=20
> Which is more in line w/ the 27MB/sec that the program reports.
>=20
> I haven't looked at the code to see what could be causing the double
> counting.  Also, the output numbers appear to be accurate.
>=20
> This is with 13.0-CURRENT from the July 25th snapshot, which is r350322=
=2E

Does this doubling happens only with IBYTES counter? What about
IPACKETS? Also I'd check L2/L3 addresses to be sure that they by
accident are not broadcast/multicast.

--=20
WBR, Andrey V. Elsukov


--SpA76jSROhuoysCdPdJ6UIS4n3RDA61UP--

--QC5I8Les35Q23YMu4bkOKleND2YL3RHJI
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAl1VbmQACgkQAcXqBBDI
oXoIKggAnaVq0IpdhJ8Bv+91G2zd0Rm6/RTxyD6zofM+TPhLSgVZ1Wxk/ygcm6fa
lPi4GnXvrwhz2996ZUurbUC72gp6yJ0Trb25iGHYfwySCUhgmk6O3yRKmvq79Lu/
m4i8YYp4os59ccTPurEVGUWjYCn3AWz5tpq6hHnc/7FjokFvSEI6yaFPjOoVYJhP
/nn3D9QD9S2orRZx6Xeajwukq0LnUhmHnwNq+pvJwrW9aqjyL+OTs8XDdl9mcTEL
0AsT1oTei4lYA3ypMLcj5aKltdvxc6f5OWHgbBxLFlNET2E5fEK6rUGDoWdJcRxi
WKw5pA3Os2We/eJoV0Gi0Bf42GIBkA==
=aE5G
-----END PGP SIGNATURE-----

--QC5I8Les35Q23YMu4bkOKleND2YL3RHJI--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52b37710-8eb3-7e08-ee04-4682deb93c76>