| |
bit.listserv.openbsd-pf |
> But.... > If I change altq line and set bandwidth to something smaller - like 10Mb > Also if I use for example cbq in the following way (regardless if > altq on $int_if bandwidth <whatever> cbq queue {std, ftp, pri, ack} > queue std bandwidth 2Mb priority 1 cbq(default) > Transfers on ftp are around the same - 150 - 250 Kb, instead of what eg, when altq/cbq is 4Mb, 'pfctl -vvsq' is saying Kb/s and not Mb/s ? not to say it is the cause, but in the case of testing/debugging cbq, if i setup the following queues (i have HFSC in my ruleset normally, --- and then add the following to bottom of pf.conf --- and then do a 'nc -l 9999 < /dev/zero' on the test-host, and 'nc $TESTHOST 9999 > /dev/null' --- tested changing altq bw to 12Mb, still OK: --- added '(borrow)' to 'q-yp's cbq parameter: --- $TESTHOST is a ppro/200 with not much using it. if you don't have the luxury of using another unix host for use that to make sure you have your queues setup right and believe hth -- jared [ openbsd 3.9-current GENERIC ( mar 15 ) // i386 ]
> - problems show up. Throughput on ftp drops brutally to around 150 - 250 Kb
> bandwidth is or isn't explicitely set, and to what value):
> queue ftp bandwidth 4Mb priority 2 cbq
> queue pri bandwidth 2Mb priority 3 cbq
> queue ack bandwidth 2Mb priority 4 cbq
> they should be - around 4 Mb
i'd suggest tossing the priority lines. let them all rock the default of '1'.
after you're done and things work as you want, sure, put them back in
on the 'pri' queue, or all of them if you fancy.
naming them like this allowed me to not disturb the rest of my rules) :
altq on $e cbq bandwidth 100Mb queue {q-nfs q-yp q-smb q-bulk q-ack}
queue q-nfs bandwidth 2Mb cbq
queue q-yp bandwidth 4Mb cbq
queue q-smb bandwidth 2Mb cbq
queue q-bulk bandwidth 2Mb cbq(default)
queue q-ack bandwidth 2Mb cbq
---
pass on $e inet proto tcp from any to $TESTHOST port 9999 keep state queue( q-yp q-ack )
---
from another machine on the LAN, i see (take note of the bytecount to tell you how long
it ran) :
queue root_fxp0 bandwidth 100Mb priority 0 cbq( wrr root ) {q-nfs, q-yp, q-smb, q-bulk, q-ack}
[ pkts: 39135 bytes: 57231354 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 294.5 packets/s, 3.46Mb/s ]
queue q-nfs bandwidth 2Mb
[ pkts: 2 bytes: 872 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.0 packets/s, 9.24 b/s ]
queue q-yp bandwidth 4Mb
[ pkts: 38623 bytes: 57125390 dropped pkts: 0 bytes: 0 ]
[ qlength: 9/ 50 borrows: 0 suspends: 11443 ]
[ measured: 291.8 packets/s, 3.45Mb/s ]
queue q-smb bandwidth 2Mb
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue q-bulk bandwidth 2Mb cbq( default )
[ pkts: 509 bytes: 105014 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 2.8 packets/s, 4.95Kb/s ]
queue q-ack bandwidth 2Mb
[ pkts: 1 bytes: 78 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 0.0 packets/s, 0.83 b/s ]
---
queue root_fxp0 bandwidth 12Mb priority 0 cbq( wrr root ) {q-nfs, q-yp, q-smb, q-bulk, q-ack}
[ pkts: 47780 bytes: 69563473 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 300.4 packets/s, 3.51Mb/s ]
<...>
queue q-yp bandwidth 4Mb
[ pkts: 41537 bytes: 61442702 dropped pkts: 0 bytes: 0 ]
[ qlength: 10/ 50 borrows: 0 suspends: 12342 ]
[ measured: 293.7 packets/s, 3.48Mb/s ]
---
queue root_fxp0 bandwidth 12Mb priority 0 cbq( wrr root ) {q-nfs, q-yp, q-smb, q-bulk, q-ack}
[ pkts: 46407 bytes: 68365421 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 borrows: 0 suspends: 0 ]
[ measured: 747.3 packets/s, 8.81Mb/s ]
<...>
queue q-yp bandwidth 4Mb cbq( borrow )
[ pkts: 46171 bytes: 68317896 dropped pkts: 0 bytes: 0 ]
[ qlength: 3/ 50 borrows: 45802 suspends: 0 ]
[ measured: 743.7 packets/s, 8.80Mb/s ]
---
the test ( i find the netcat method to be delightful when testing/debugging
altq ), you might be able to get away with opening up chargen in
inetd.conf on the obsd host and then just telnetting to it from the
windows machine. as long as your telnet client doesn't suck eggs,
you should be able to get a not-terribly-bad rendition of the
netcat /dev/zero||/dev/null stuff.
your config -- then move over to seeing how the "real" client app
behaves and twiddle as needed.