From owner-freebsd-questions@FreeBSD.ORG Wed Apr 23 06:55:50 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 209F51065673 for ; Wed, 23 Apr 2008 06:55:50 +0000 (UTC) (envelope-from zszalbot@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mx1.freebsd.org (Postfix) with ESMTP id B0C5F8FC17 for ; Wed, 23 Apr 2008 06:55:49 +0000 (UTC) (envelope-from zszalbot@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so380955uge.37 for ; Tue, 22 Apr 2008 23:55:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received:received:to:subject:x-php-script:mime-version:date:from:message-id:x-sender:received:user-agent:content-type:content-transfer-encoding; bh=s8y3rF35O9Wwx5kZkZuzp+QIjNVtt44+qs8klVLfWxU=; b=wI3urBiqxC8S0oMujAbIYbbPb0CJjBDYMoovZwQ3Fxv0H4l0N+1+v/2uQQtm7PFOQN3j566yUpTohnmxw0P7nBl9nf2SrJEoP5IewT4mdCwp/LNJot1qa6GlroT89SpNcxmJ+sL67KE8t3IZUnBhVfaNg8UBTsnb6VBvyvlf3cY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=to:subject:x-php-script:mime-version:date:from:message-id:x-sender:user-agent:content-type:content-transfer-encoding; b=FRzlqBw+yrKft1ukaKDen+g1ANHQkv1xs+Lb8XFxuo0CDBq69+T4EHXyVHfPQBVYKBRc0sZgXjrOM/zMk8kuVJrNsPg6b8sidTUBATvPMUEpChNzAI1zZN37VfnOBvbGkbMHHvq2efGO4dsZKd71SI+CUZSVMopv+kR7aXob04M= Received: by 10.67.115.6 with SMTP id s6mr8033918ugm.71.1208933748129; Tue, 22 Apr 2008 23:55:48 -0700 (PDT) Received: from lists.lc-words.com ( [83.19.156.210]) by mx.google.com with ESMTPS id k1sm2398724ugf.29.2008.04.22.23.55.46 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 22 Apr 2008 23:55:47 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by lists.lc-words.com (Postfix) with ESMTP id D1FAC2843B for ; Wed, 23 Apr 2008 08:55:44 +0200 (CEST) Received: from lists.lc-words.com ([127.0.0.1]) by localhost (szalbot.homedns.org [127.0.0.1]) (amavisd-maia, port 10024) with ESMTP id 03217-07 for ; Wed, 23 Apr 2008 08:55:44 +0200 (CEST) Received: by lists.lc-words.com (Postfix, from userid 80) id 6CA092843A; Wed, 23 Apr 2008 08:55:44 +0200 (CEST) To: freebsd-questions@freebsd.org X-PHP-Script: szalbot.homedns.org/roundcube/index.php for 192.168.11.1 MIME-Version: 1.0 Date: Wed, 23 Apr 2008 08:55:44 +0200 From: Zbigniew Szalbot Message-ID: <0cffa49967a87486dca37f253a3c60b5@localhost> X-Sender: zszalbot@gmail.com Received: from 192.168.11.1 [192.168.11.1] with HTTP/1.1 (POST); Wed, 23 Apr 2008 08:55:44 +0200 User-Agent: RoundCube Webmail Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Subject: pf traffic shaping and perfomance X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2008 06:55:50 -0000 Hello, I would like to implement traffic shaping using pf. I know I need to recompile kernel to be able to achieve this but I have a more general question. I used to have pf with traffic shaping on a Pentium III 866 before and as soon as I activated it, the http response of the box was noticably slower. Here are the defs I used then: #altq on $ext_if cbq bandwidth 512Kb queue { def, smtp, udp, http, \ #ssh, icmp } #queue def bandwidth 13% cbq(default borrow red) #queue smtp bandwidth 25% cbq(borrow red) priority 7 #queue udp bandwidth 10% cbq(borrow red) #queue http bandwidth 40% cbq(borrow red) #queue ssh bandwidth 10% cbq(borrow red) ##{ ssh_interactive, ssh_bulk } ##queue ssh_interactive priority 7 #queue ssh_bulk priority 0 #queue icmp bandwidth 2% cbq It is quite possible that I misconfigured the shaping (as seen above). What would be suggested traffic shaping rules to allow smooth mail operation (smtp taking up to 40% of allowed bandwidth) and http responses? If that matters, uname -v FreeBSD 7.0-RELEASE #0 Many thanks in advance! Zbigniew Szalbot