Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 06 Jan 2018 14:06:16 +0200
From:      "Andriy Voskoboinyk" <s3erios@gmail.com>
To:        "David Wolfskill" <david@catwhisker.org>
Cc:        wireless@freebsd.org
Subject:   Re: Something seems "off" counting outbound traffic (wlan? iwn?)
Message-ID:  <op.zce48qheiew4ia@localhost>
In-Reply-To: <20180103153312.GJ1258@albert.catwhisker.org>
References:  <20180103153312.GJ1258@albert.catwhisker.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Wed, 03 Jan 2018 17:33:12 +0200 =D0=B1=D1=83=D0=BB=D0=BE =D0=BD=D0=B0=D0=
=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE David Wolfskill  =

<david@catwhisker.org>:

Hi,

https://reviews.freebsd.org/D10728 fixes output stats (I cannot check it=

with Intel 4965 - sometimes firmware throws an exception - with or witho=
ut
this patch - that's why it is not in the tree yet).

> I recently configured my "perimeter device" (a 4-homed FreeBSD box
> named "bats"; see <http://www.catwhisker.org/~david/FreeBSD/upgrade.ht=
ml>
> for a diagram) to make use of FQ-CoDel for outbound traffic on the
> Internet-facing NIC (em2, in this case).
>
> I failed to find a way to monitor the traffic rates in a way that I
> found suitably convenient, so I cobbled up a Perl script to grab the
> output of "netstat -nibdf link" at intervals (timed via Time::HiRes), =
do
> the arithmetic, and display the results.
>
> For the perimeter device, it seems to work as expected.
>
> For my laptop, using the wlan0 (iwn0) NIC, the report of input traffic=

> looks reasonable, but output ... makes no sense at all to me.
>
> As illustration, I'll show the reported results for both bats and my
> laptop while I run a "speed" test from  =

> <http://beta.speedtest.net/run?r=3Df>;
> note that my Internet connection is (residential) ADSL.  Here's what m=
y
> ISP stated about it (from a conversation some time back):
>
> | The line is at 6M/768K with good synch readings and I don't see
> | any reason you wouldn't be able to get 5.1Mbps/640Kbps out of
> | it which is about the yield after overhead.
>
> Note that I start the test just after the script has reported fro the
> first interval (which I have specified as 5 seconds for this):
>
> bats(11.1-S)[18] net_mon -e -w 5 -c 15 em{1,2}
> em1:    172.17.0.1/16       Ethernet autoselect (1000baseT <full-duple=
x>)
> em2:    198.144.209.73/24   Ethernet autoselect (10baseT/UTP  =

> <half-duplex>)
>
>                                     em1                               =
                =

> em2
> Time                       In                       =

> Out                      In                      Out
> Rate/sec          Bits   Errs  Drops   Bits   Errs  Drops  Coll     =

> Bits   Errs  Drops   Bits   Errs  Drops  Coll
> 1514993320.453     3.5K   0.0    0.0    3.3K   0.0    0.0   0.0    =

> 403.0K   0.0    0.0  173.2K   0.0    0.0   1.8
> 1514993325.454    24.1K   0.0    0.0   16.4K   0.0    0.0   0.0     =

> 31.0K   0.0    0.0   27.9K   0.0    0.0   0.0
> 1514993330.454    22.4K   0.0    0.0  525.3K   0.0    0.0   0.0      =

> 1.5M   0.0    0.0  142.2K   0.0    0.0   1.4
> 1514993335.455   143.9K   0.0    0.0    5.1M   0.0    0.0   0.0      =

> 5.3M   0.0    0.0  340.5K   0.0    0.0  34.2
> 1514993340.455   135.4K   0.0    0.0    5.0M   0.0    0.0   0.0      =

> 5.4M   0.0    0.0  227.8K   0.0    0.0   8.8
> 1514993345.454   104.1K   0.0    0.0    4.2M   0.0    0.0   0.0      =

> 5.4M   0.0    0.0  249.2K   0.0    0.0  25.6
> 1514993350.453   544.1K   0.0    0.0  544.4K   0.0    0.0   0.0    =

> 858.5K   0.0    0.0  644.5K   0.0    0.0   5.4
> 1514993355.454   585.0K   0.0    0.0   34.1K   0.0    0.0   0.0    =

> 868.0K   0.0    0.0  658.0K   0.0    0.0  17.2
> 1514993360.454   483.4K   0.0    0.0   31.8K   0.0    0.0   0.0      =

> 1.4M   0.0    0.0  635.2K   0.0    0.0  22.2
> 1514993365.454   254.9K   0.0    0.0   25.1K   0.0    0.0   0.0    =

> 115.6K   0.0    0.0  317.2K   0.0    0.0   2.8
> 1514993370.454   822.4    0.0    0.0    1.6K   0.0    0.0   0.0      =

> 9.6K   0.0    0.0   14.8K   0.0    0.0   0.2
> 1514993375.454     2.3K   0.0    0.0    2.3K   0.0    0.0   0.0    =

> 720.5K   0.0    0.0  108.0K   0.0    0.0   0.2
> 1514993380.455     3.2K   0.0    0.0    2.8K   0.0    0.0   0.0    =

> 358.9K   0.0    0.0  210.6K   0.0    0.0   0.6
> 1514993385.454     1.0K   0.0    0.0    1.9K   0.0    0.0   0.0      =

> 1.1M   0.0    0.0   97.2K   0.0    0.0   2.8
> 1514993390.455   566.3    0.0    0.0    1.2K   0.0    0.0   0.0    =

> 433.5K   0.0    0.0  219.9K   0.0    0.0   1.0
> bats(11.1-S)[19]
>
>
> g1-252(11.1-S)[22] net_mon -e -w 5 -c 15
> wlan0:  172.17.1.252/16     IEEE 802.11 Wireless Ethernet MCS mode 11n=
g
>
>                                     wlan0
> Time                       In                      Out
> Rate/sec          Bits   Errs  Drops   Bits   Errs  Drops  Coll
> 1514993320.941     4.2K   0.0    0.0    0.0    5.8    0.0   0.0
> 1514993325.924    14.3K   0.0    0.0    0.0   12.0    0.0   0.0
> 1514993330.906   985.3K   0.0    0.0  160.6   55.6    0.0   0.0
> 1514993335.911     5.1M   0.0    0.0    0.0  246.9    0.0   0.0
> 1514993340.938     5.0M   0.0    0.0    0.0  241.9    0.0   0.0
> 1514993345.903     4.0M   0.0    0.0    0.0  184.3    0.0   0.0
> 1514993350.903   235.2K   0.0    0.0    0.0   62.6    0.0   0.0
> 1514993355.919    35.5K   0.0    0.0    0.0   51.2    0.0   0.0
> 1514993360.904    29.1K   0.0    0.0    0.0   45.3    0.0   0.0
> 1514993365.975    19.9K   0.0    0.0    0.0   21.5    0.0   0.0
> 1514993370.922     1.6K   0.0    0.0    0.0    1.6    0.0   0.0
> 1514993375.905     2.8K   0.0    0.0    0.0    2.8    0.0   0.0
> 1514993380.968   897.5    0.0    0.0    0.0    1.0    0.0   0.0
> 1514993386.035     1.7K   0.0    0.0    0.0    1.4    0.0   0.0
> 1514993390.957     1.6K   0.0    0.0    0.0    1.2    0.0   0.0
> g1-252(11.1-S)[23]
>
>
> Note that even for the "upload" phase of the test, the laptop is
> showing negligible outbound *traffic* -- but a *lot* of outbound
> "errors."
>
> Can someone make sense of this?
>
> Thanks!
>
> Peace,
> david



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