From owner-freebsd-ipfw@FreeBSD.ORG Mon Nov 30 23:17:47 2009 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 631301065670; Mon, 30 Nov 2009 23:17:47 +0000 (UTC) (envelope-from kerbzo@gmail.com) Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226]) by mx1.freebsd.org (Postfix) with ESMTP id B707D8FC0A; Mon, 30 Nov 2009 23:17:46 +0000 (UTC) Received: by ewy26 with SMTP id 26so4686467ewy.3 for ; Mon, 30 Nov 2009 15:17:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=a6xupEk0/kuIRrWk0juylhNtV5KBBa6/mWCDprMweL4=; b=Us4coXnw4EaibMuD3/QxBp2kww0VDqvfNo7YYKBQjrXLFyW9opPXqKKFJVHj+DXwxt VxV4F5wHhbq3kpWtaLHiHX1nqcw65ChAtFHdsmlN2VdepOtoxM9UrXhvUH/a8PVku9dx Qj6ydX/5FT3h4BAqG3Ay55trZtlqK0sEZZxbc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=JcCpacQcxkkSFD6AO46lIYQ4L/233pqdA0U7QzgAzFxKHtxqHXZ19F13+X/mBZFQV7 cp2aFCuoPsZcSFjhadmF7W9N5DILM2v9SDNc1xVwsJzVEx1o/XX+j+eexD9qwK492WAF Qrf73tS7pgDe9+4U5wHtkccop4Q6QeBsFEtcA= Received: by 10.216.86.14 with SMTP id v14mr1662980wee.183.1259623064800; Mon, 30 Nov 2009 15:17:44 -0800 (PST) Received: from kerbzo.local (host98-2-dynamic.56-79-r.retail.telecomitalia.it [79.56.2.98]) by mx.google.com with ESMTPS id j8sm11296106gvb.2.2009.11.30.15.17.40 (version=SSLv3 cipher=RC4-MD5); Mon, 30 Nov 2009 15:17:44 -0800 (PST) Message-ID: <4B145292.3010503@gmail.com> Date: Tue, 01 Dec 2009 00:17:38 +0100 From: Kevin Smith User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Ben Kelly References: <4B129960.9030107@gmail.com> <4B12B6B9.3030106@bsd.com.br> <4B12C32F.3060709@gmail.com> <4B12C543.2070204@mgwigglesworth.net> <4B141A77.4030102@gmail.com> <20091130201222.GC72710@lath.rinet.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-ipfw@freebsd.org, freebsd-current@freebsd.org, Oleg Bulyzhin Subject: Re: dummynet issues X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2009 23:17:47 -0000 Ben Kelly wrote: > On Nov 30, 2009, at 3:12 PM, Oleg Bulyzhin wrote: >> Please show your pipe/queue configuration commands and your ipfw ruleset. >> sysctl net.inet.ip.fw & sysctl net.inet.ip.dummynet output would not hurt too. > > I've also run into the problem recently on 9-CURRENT (last synced on 11/13/2009). My configuration looks like: > > # Configure traffic shaping. > $fw pipe 10 config bw 950Kbit/s > $fw queue 10 config pipe 10 weight 100 > $fw queue 20 config pipe 10 weight 1 > > # Shape traffic to avoid ACK starvation when our upload is saturated. > $fw add 6100 queue 10 tcp from any to any tcpflags ack iplen 0-80 out via $oif > $fw add 6110 queue 10 udp from any to any iplen 0-80 out via $oif > $fw add 6120 queue 20 tcp from any to any \{ not tcpflags ack or not iplen 0-80 \} out via $oif > $fw add 6130 queue 20 udp from any to any not iplen 0-80 out via $oif > > The output of the sysctl elements are: > > gate# sysctl net.inet.ip.fw > net.inet.ip.fw.dyn_keepalive: 1 > net.inet.ip.fw.dyn_short_lifetime: 5 > net.inet.ip.fw.dyn_udp_lifetime: 10 > net.inet.ip.fw.dyn_rst_lifetime: 1 > net.inet.ip.fw.dyn_fin_lifetime: 1 > net.inet.ip.fw.dyn_syn_lifetime: 20 > net.inet.ip.fw.dyn_ack_lifetime: 300 > net.inet.ip.fw.static_count: 42 > net.inet.ip.fw.dyn_max: 4096 > net.inet.ip.fw.dyn_count: 232 > net.inet.ip.fw.curr_dyn_buckets: 256 > net.inet.ip.fw.dyn_buckets: 256 > net.inet.ip.fw.default_to_accept: 0 > net.inet.ip.fw.tables_max: 128 > net.inet.ip.fw.default_rule: 65535 > net.inet.ip.fw.verbose_limit: 0 > net.inet.ip.fw.verbose: 0 > net.inet.ip.fw.one_pass: 0 > net.inet.ip.fw.autoinc_step: 100 > net.inet.ip.fw.enable: 1 > gate# sysctl net.inet.ip.dummynet > net.inet.ip.dummynet.debug: 0 > net.inet.ip.dummynet.pipe_byte_limit: 1048576 > net.inet.ip.dummynet.pipe_slot_limit: 100 > net.inet.ip.dummynet.io_pkt_drop: 1601 > net.inet.ip.dummynet.io_pkt_fast: 146359 > net.inet.ip.dummynet.io_pkt: 26208842 > net.inet.ip.dummynet.io_fast: 0 > net.inet.ip.dummynet.tick_lost: 0 > net.inet.ip.dummynet.tick_diff: 1352176 > net.inet.ip.dummynet.tick_adjustment: 239751 > net.inet.ip.dummynet.tick_delta_sum: -494 > net.inet.ip.dummynet.tick_delta: 1 > net.inet.ip.dummynet.red_max_pkt_size: 1500 > net.inet.ip.dummynet.red_avg_pkt_size: 512 > net.inet.ip.dummynet.red_lookup_depth: 256 > net.inet.ip.dummynet.max_chain_len: 16 > net.inet.ip.dummynet.expire: 1 > net.inet.ip.dummynet.search_steps: 0 > net.inet.ip.dummynet.searches: 0 > net.inet.ip.dummynet.extract_heap: 16 > net.inet.ip.dummynet.ready_heap: 0 > net.inet.ip.dummynet.hash_size: 64 > > Thanks for the help. > > - Ben Hi, this is my pipe/queue configuration: /sbin/ipfw pipe 1 config bw 256kbits/s /sbin/ipfw queue 3 config pipe 1 weight 40 mask all /sbin/ipfw queue 4 config pipe 1 weight 50 mask all /sbin/ipfw add queue 3 all from any to any out via tun\? uid asterisk /sbin/ipfw add queue 3 all from any to any 80 out via tun\? /sbin/ipfw add queue 3 all from any to any 53 out via tun\? /sbin/ipfw add queue 3 all from me 4300 to any out via tun\? /sbin/ipfw add queue 3 all from me 1194 to any out via tun\? /sbin/ipfw add queue 4 all from any to any out via tun\? tcpflags \!syn,ack not jail ${MLDONKEYJID:=1} /sbin/ipfw add queue 4 all from any to any out via tun\? not jail ${MLDONKEYJID:=1} /sbin/ipfw queue 1 config pipe 1 weight 1 gred 0.8/16/39/1 mask all /sbin/ipfw queue 2 config pipe 1 weight 2 gred 0.02/3/6/0.06 mask all /sbin/ipfw add queue 2 all from any to any out via tun\? iplen 40 /sbin/ipfw add queue 2 all from any to any out via tun\? iplen 41 /sbin/ipfw add queue 2 all from any to any out via tun\? iplen 42 /sbin/ipfw add queue 2 all from any to any out via tun\? iplen 43 /sbin/ipfw add queue 2 all from any to any out via tun\? iplen 44 /sbin/ipfw add queue 2 all from any to any out via tun\? iplen 45 /sbin/ipfw add queue 2 all from any to any out via tun\? iplen 46 /sbin/ipfw add queue 2 all from any to any out via tun\? iplen 47 /sbin/ipfw add queue 2 all from any to any out via tun\? iplen 48 /sbin/ipfw add queue 2 all from any to any out via tun\? iplen 49 /sbin/ipfw add queue 2 all from any to any out via tun\? iplen 50 /sbin/ipfw add queue 2 all from any to any out via tun\? iplen 51 /sbin/ipfw add queue 2 all from any to any out via tun\? iplen 52 /sbin/ipfw add queue 2 all from any to any out via tun\? iplen 53 /sbin/ipfw add queue 2 all from any to any out via tun\? iplen 55 /sbin/ipfw add queue 2 all from any to any out via tun\? iplen 56 /sbin/ipfw add queue 2 all from any to any out via tun\? iplen 57 /sbin/ipfw add queue 1 all from any to any out via tun\? jail ${MLDONKEYJID:=1} and these are some system settings: net.inet.ip.dummynet.debug: 0 net.inet.ip.dummynet.pipe_byte_limit: 1048576 net.inet.ip.dummynet.pipe_slot_limit: 100 net.inet.ip.dummynet.io_pkt_drop: 1316 net.inet.ip.dummynet.io_pkt_fast: 146311 net.inet.ip.dummynet.io_pkt: 3006844 net.inet.ip.dummynet.io_fast: 0 net.inet.ip.dummynet.tick_lost: 0 net.inet.ip.dummynet.tick_diff: 18983852 net.inet.ip.dummynet.tick_adjustment: 17727039 net.inet.ip.dummynet.tick_delta_sum: 453 net.inet.ip.dummynet.tick_delta: 1000 net.inet.ip.dummynet.red_max_pkt_size: 1500 net.inet.ip.dummynet.red_avg_pkt_size: 512 net.inet.ip.dummynet.red_lookup_depth: 256 net.inet.ip.dummynet.max_chain_len: 16 net.inet.ip.dummynet.expire: 1 net.inet.ip.dummynet.search_steps: 3047766 net.inet.ip.dummynet.searches: 3006844 net.inet.ip.dummynet.extract_heap: 16 net.inet.ip.dummynet.ready_heap: 0 net.inet.ip.dummynet.hash_size: 64 net.inet.ip.fw.dyn_keepalive: 1 net.inet.ip.fw.dyn_short_lifetime: 5 net.inet.ip.fw.dyn_udp_lifetime: 10 net.inet.ip.fw.dyn_rst_lifetime: 1 net.inet.ip.fw.dyn_fin_lifetime: 1 net.inet.ip.fw.dyn_syn_lifetime: 20 net.inet.ip.fw.dyn_ack_lifetime: 300 net.inet.ip.fw.static_count: 68 net.inet.ip.fw.dyn_max: 4096 net.inet.ip.fw.dyn_count: 0 net.inet.ip.fw.curr_dyn_buckets: 256 net.inet.ip.fw.dyn_buckets: 256 net.inet.ip.fw.default_to_accept: 1 net.inet.ip.fw.tables_max: 128 net.inet.ip.fw.default_rule: 65535 net.inet.ip.fw.verbose_limit: 0 net.inet.ip.fw.verbose: 1 net.inet.ip.fw.one_pass: 0 net.inet.ip.fw.autoinc_step: 100 net.inet.ip.fw.enable: 1 Please don't hexitate to ask me for further infos. Thank you for your help, regards, -- Kevin