Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Mar 2016 02:15:32 +0700
From:      "David S." <david@zeromail.us>
To:        =?UTF-8?Q?Ermal_Lu=C3=A7i?= <eri@freebsd.org>
Cc:        "freebsd-pf@freebsd.org" <freebsd-pf@freebsd.org>
Subject:   Re: Invalid queue upload statistic
Message-ID:  <CANzCtXr40EyfiVP5Sm2DKKpqWEgjBabC68SfHjFVnw7a9m7J4A@mail.gmail.com>
In-Reply-To: <CAPBZQG3bSL%2B_LfBwS4zkvSzDrCYZJtCELu=eGT-8FyBh0BzN%2BQ@mail.gmail.com>
References:  <CANzCtXq997WoNZJKAmQWZ4bf8sRmYnrhOAoSv63G8%2BDvmxRDcg@mail.gmail.com> <CAPBZQG3bSL%2B_LfBwS4zkvSzDrCYZJtCELu=eGT-8FyBh0BzN%2BQ@mail.gmail.com>

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

Thank you for your response.

I know that the queu statistic is based on 5 second interval, and when I
trying to upload some files to the internet I can't view the real bits/sec.
The question is still same, why isn't happen on download queue?
This problem affect to my network monitoring graph, I use zabbix and please
see attached image for the comparison between upload and download.
For your additional info, I do the upload and download test at the same
time, please see below for the latest test:

queue  coba_down on igb1 bandwidth 2Mb qlimit 900 hfsc( realtime 2Mb
upperlimit 3Mb )
  [ pkts:      20320  bytes:   30037652  dropped pkts:      0 bytes:      0
]
  [ qlength:  13/900 ]
  [ measured:   158.4 packets/s, 1.87Mb/s ]

queue  coba_up on igb0 bandwidth 2Mb qlimit 900 hfsc( realtime 2Mb
upperlimit 3Mb )
  [ pkts:      21854  bytes:    1629807  dropped pkts:      0 bytes:      0
]
  [ qlength:   0/900 ]
  [ measured:   158.8 packets/s, 101.99Kb/s ]

#IFTOP
TX:             cum:   0.98GB   peak:   6.33Mb  rates:   6.29Mb  5.58Mb
 5.33Mb <--- seems my upload rule not work
RX:                     378MB           2.96Mb           2.96Mb  2.93Mb
 2.91Mb
TOTAL:                 1.35GB           9.26Mb           9.25Mb  8.51Mb
 8.23Mb

Thank you



Best regards,
David S.
------------------------------------------------
e. david@zeromail.us
w. http://blog.pnyet.web.id

On Sat, Mar 19, 2016 at 1:51 AM, Ermal Lu=C3=A7i <eri@freebsd.org> wrote:

>
>
> On Fri, Mar 18, 2016 at 5:38 PM, David S. <david@zeromail.us> wrote:
>
>> Dear All,
>>
>> This is my first post, my name is David and I'm currently developing
>> FreeBSD as a BGP router and traffic shaper for my network.
>>
>> I already setup PF + ALTQ and working great, the bandwidth speed is matc=
h
>> with my queue rule but the problem is the queue upload statistic. Before
>> continuing the story please review my pf.conf below:
>>
>> =3D=3D=3D
>> #/etc/pf.conf
>>
>> set limit states 10000000
>> set limit  frags 10000000
>> set limit src-nodes 5000000
>> set limit table-entries 20000000
>>
>>
>> coba_net=3D"{ 103.1.1.0/29, 103.1.2.0/28 }"
>>
>> altq on igb0 hfsc bandwidth 1000Mb queue {default_up,coba_up}
>> altq on igb1 hfsc bandwidth 1000Mb queue {default_down,coba_down}
>>
>> queue coba_up bandwidth 2Mb qlimit 900 hfsc (realtime 2Mb, upperlimit 3M=
b)
>> queue coba_down bandwidth 2Mb qlimit 900 hfsc (realtime 2Mb, upperlimit
>> 3Mb)
>>
>> pass quick on igb1.100 from $coba_net to any queue coba_down
>> pass quick on igb0 from $coba_net to any queue coba_up
>>
>> =3D=3D=3D
>>
>> The problem is queue upload statistic is invalid and the queue download
>> statistic is normal or match with my real bandwidth usage. I already do
>> test using speedtest.net or upload and download file from my server to m=
y
>> another server on AWS and the bandwidth is match with my queue setup.
>>
>> For an example, I try to upload some file to my server on AWS and the re=
al
>> bandwidth usage is 4.5Mbps and here is the result from the iftop compari=
ng
>> to pfctl -s queue -vv:
>>
>>
>> qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq=
qqqqqqqq
>> TX:             cum:   10.9MB   peak:   6.13Mb  rates:   4.59Mb  5.10Mb
>>  4.83Mb
>> RX:                     180KB            100Kb           75.3Kb  84.3Kb
>>  80.0Kb
>> TOTAL:                 11.0MB           6.23Mb           4.66Mb  5.18Mb
>>  4.91Mb
>>
>>
>>
>> queue  coba_up on igb0 bandwidth 2Mb qlimit 900 hfsc( realtime 2Mb
>> upperlimit 3Mb )
>>   [ pkts:       1606  bytes:     242657  dropped pkts:      0 bytes:
>> 0
>> ]
>>   [ qlength:   0/900 ]
>>   [ measured:     8.8 packets/s, 9.38Kb/s ]
>>
>>
>>
>
> This is for ~5 second interval so it will never show what you are
> expecting but the calculation done during that time frame.
>
>
>> But the download queue statistic is normal, please see below:
>>
>>
>> qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq=
qqqqqqqq
>> TX:             cum:    770MB   peak:   79.2Kb  rates:   61.5Kb  59.6Kb
>>  62.0Kb
>> RX:                    36.8MB           2.84Mb           2.83Mb  2.83Mb
>>  2.83Mb
>> TOTAL:                  806MB           2.91Mb           2.89Mb  2.89Mb
>>  2.89Mb
>>
>> queue  coba_down on igb1 bandwidth 2Mb qlimit 900 hfsc( realtime 2Mb
>> upperlimit 3Mb )
>>   [ pkts:      37847  bytes:   30114656  dropped pkts:      0 bytes:
>> 0
>> ]
>>   [ qlength:  32/900 ]
>>   [ measured:   248.4 packets/s, 3Mb/s ]
>>
>> Please help or give me some information to fix this problem, if any
>> information need please let me know.
>>
>> Best regards,
>> David Suhendrik.
>> ------------------------------------------------
>> e. david@zeromail.us
>> w. http://pnyet.web.id <http://blog.pnyet.web.id>;
>> _______________________________________________
>> freebsd-pf@freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-pf
>> To unsubscribe, send any mail to "freebsd-pf-unsubscribe@freebsd.org"
>>
>> --
>> Ermal
>>
>



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