From owner-freebsd-pf@FreeBSD.ORG Mon Mar 23 16:03:58 2009 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 668CB10656EA for ; Mon, 23 Mar 2009 16:03:58 +0000 (UTC) (envelope-from fbsdq@peterk.org) Received: from poshta.pknet.net (poshta.pknet.net [216.241.167.213]) by mx1.freebsd.org (Postfix) with SMTP id 1C56A8FC1B for ; Mon, 23 Mar 2009 16:03:57 +0000 (UTC) (envelope-from fbsdq@peterk.org) Received: (qmail 45176 invoked from network); 23 Mar 2009 16:03:57 -0000 Received: from poshta.pknet.net (HELO pop.pknet.net) (216.241.167.213) by poshta.pknet.net with SMTP; 23 Mar 2009 16:03:57 -0000 Received: from 216.241.167.212 (SquirrelMail authenticated user fbsdq@peterk.org) by webmail.pknet.net with HTTP; Mon, 23 Mar 2009 10:03:57 -0600 (MDT) Message-ID: <62927.216.241.167.212.1237824237.squirrel@webmail.pknet.net> Date: Mon, 23 Mar 2009 10:03:57 -0600 (MDT) From: "Peter" To: "forn" User-Agent: SquirrelMail/1.4.11 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: freebsd-pf@freebsd.org Subject: Re: more tests - pf + altq + cbq(borrow) not borrowing from parent - all LAN X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2009 16:04:09 -0000 > > 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[