On Sat, Apr 29, 2006 at 09:49:18AM +0000, Michal Soltys wrote: > > But.... > > If I change altq line and set bandwidth to something smaller - like 10Mb > - problems show up. Throughput on ftp drops brutally to around 150 - 250 Kb > > Also if I use for example cbq in the following way (regardless if > bandwidth is or isn't explicitely set, and to what value): > > altq on $int_if bandwidth <whatever> cbq queue {std, ftp, pri, ack} > > queue std bandwidth 2Mb priority 1 cbq(default) > queue ftp bandwidth 4Mb priority 2 cbq > queue pri bandwidth 2Mb priority 3 cbq > queue ack bandwidth 2Mb priority 4 cbq > > Transfers on ftp are around the same - 150 - 250 Kb, instead of what > they should be - around 4 Mb
just to be clear, you're definately not confusing b with B, right? 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, 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. if i setup the following queues (i have HFSC in my ruleset normally, 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 --- and then add the following to bottom of pf.conf --- pass on $e inet proto tcp from any to $TESTHOST port 9999 keep state queue( q-yp q-ack ) --- and then do a 'nc -l 9999 < /dev/zero' on the test-host, and 'nc $TESTHOST 9999 > /dev/null' 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 ] --- tested changing altq bw to 12Mb, still OK: --- 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 ] --- added '(borrow)' to 'q-yp's cbq parameter: --- 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 ] --- $TESTHOST is a ppro/200 with not much using it. if you don't have the luxury of using another unix host for 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. use that to make sure you have your queues setup right and believe your config -- then move over to seeing how the "real" client app behaves and twiddle as needed. hth -- jared [ openbsd 3.9-current GENERIC ( mar 15 ) // i386 ]