Date: Tue, 24 Mar 2009 09:39:23 -0600 (MDT) From: "Peter" <fbsdq@peterk.org> To: freebsd-pf@freebsd.org Subject: SOLVED-pf + altq + cbq(borrow) not borrowing from parent - all LAN Message-ID: <59094.216.241.167.212.1237909163.squirrel@webmail.pknet.net>
next in thread | raw e-mail | index | archive | help
iH, cbq does not work as advertised child will not borrow from parent unless parent borrows from root So a tree did not work: root parent1 p1.child1(borrow) p1.child2(borrow) parent2 p2.child1(borrow) p2.child2(borrow) *child* does not borrow, unless parent is set to borrow from root. parent borrows no problem. Tried this on openbsd 4.4 - same results. short answer: '%s/cbq/hfsc/g' solution that's worked for me: altq on fxp0 bandwidth 100Mb hfsc queue {internal external} queue internal bandwidth 98Mb hfsc(default) queue external bandwidth 876Kb hfsc(upperlimit 876Kb) {poshta abakan usrx11 imvas } queue poshta bandwidth 70% hfsc(realtime 70%) queue abakan bandwidth 10% hfsc(realtime 10%) queue usrx11 bandwidth 10% hfsc(realtime 10%) queue imvas bandwidth 10% hfsc(realtime 10%) When I did not put in the upperlimit for 'external' queue, it would borrow up to 100Mb from root queue. - making the external queue children pointless. This way interal LAN goes at 98Mb, and external WAN is limited to 876Kb and then I break it up further by IPs. Downloading from usrx11 - speed = ~100KB as soon as I start a dl from poshta, usrx11 speed drops to ~12KB, and poshta speed goes to ~86KB. As soon as dl from poshta is cancelled, dl from usrx11 goes to ~100KB ]Peter[ >> >> Hello. I'm having the same problem. My system is 7.1-Stable i386. >> Here's entire pf.conf: > snip >> With this config, speed of traffic in queue www5 never goes higher >> than 250Kb. >> But, if queue localq is set to borrow, as follows: > snip >> then queue www5 is able to take the full bandwidth of 2Mb (which is >> correct). >> The physical link speed far surpasses 2Mb (actually, these are all >> virtual machines set up for testing on the same server), so this >> can't >> be a problem. > > iH, > Installed openbsd 4.4 [VM on ESX] - Still seeing the same problem - > Using one of the pf faq examples - still can't figure out what I'm > missing: > > OpenBSD openbsd.my.domain 4.4 GENERIC#1021 i386 > > # grep -v "^#" /etc/pf.conf |grep -v ^$ > set skip on lo0 > altq on vic0 cbq bandwidth 5Mb queue { std, ssh, ftp } > queue std bandwidth 1Mb cbq(default) > queue ssh bandwidth 500Kb { ssh_login, ssh_bulk } > queue ssh_login bandwidth 50% priority 4 cbq(borrow) > queue ssh_bulk bandwidth 50% cbq(borrow) > queue ftp bandwidth 500Kb priority 3 cbq(borrow red) > pass in quick on vic0 proto tcp from any to port 222 flags S/SA keep state > queue ssh_login > pass in on vic0 proto tcp from any flags S/SA keep state > pass out on vic0 proto tcp from any to any flags S/SA keep state queue > ssh_login > > pfctl -vvsq shows the 'ssh_login' queue is being used. > doing sftp transfer over sshd on port 222 [just to isolate it] > traffic stays at ~250Kb, does not borrow > > queue root_vic0 on vic0 bandwidth 5Mb priority 0 cbq( wrr root ) {std, > ssh, ftp} > [ pkts: 799 bytes: 781987 dropped pkts: 0 bytes: > 0 ] > [ qlength: 0/ 50 borrows: 0 suspends: 0 ] > [ measured: 32.4 packets/s, 271.97Kb/s ] > queue std on vic0 bandwidth 1Mb cbq( default ) > [ pkts: 115 bytes: 16978 dropped pkts: 0 bytes: > 0 ] > [ qlength: 0/ 50 borrows: 0 suspends: 0 ] > [ measured: 5.2 packets/s, 6.20Kb/s ] > queue ssh on vic0 bandwidth 500Kb {ssh_login, ssh_bulk} > [ 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 ssh_login on vic0 bandwidth 250Kb priority 4 cbq( borrow ) > [ pkts: 684 bytes: 765009 dropped pkts: 0 bytes: > 0 ] > [ qlength: 14/ 50 borrows: 508 suspends: 97 ] > [ measured: 27.2 packets/s, 265.77Kb/s ] > queue ssh_bulk on vic0 bandwidth 250Kb cbq( borrow ) > [ 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 ftp on vic0 bandwidth 500Kb priority 3 cbq( red borrow ) > [ pkts: 0 bytes: 0 dropped pkts: 0 bytes: > 0 ] > [ qlength: 0/ 50 borrows: 0 suspends: 0 ] > [ measured: 0.0 packets/s, 0 b/s ] > > > Changing the parent 'ssh' queue to borrow: > # grep -v "^#" /etc/pf.conf |grep -v ^$ > set skip on lo0 > altq on vic0 cbq bandwidth 5Mb queue { std, ssh, ftp } > queue std bandwidth 1Mb cbq(default) > queue ssh bandwidth 500Kb cbq(borrow) { ssh_login, ssh_bulk } > queue ssh_login bandwidth 50% priority 4 cbq(borrow) > queue ssh_bulk bandwidth 50% cbq(borrow) > queue ftp bandwidth 500Kb priority 3 cbq(borrow red) > pass in quick on vic0 proto tcp from any to port 222 flags S/SA keep state > queue ssh_login > pass in on vic0 proto tcp from any flags S/SA keep state > pass out on vic0 proto tcp from any to any flags S/SA keep state queue > ssh_login > > traffic pretty much uses up right near 5MB... > > So not a FreeBSD issue it almost seems like it. > Have not tried OpenBSD mailing list yet. > I'm misunderstanding how pf/cbq should work? > > ]Peter[ > > _______________________________________________ > freebsd-pf@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-pf > To unsubscribe, send any mail to "freebsd-pf-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?59094.216.241.167.212.1237909163.squirrel>