dummynet issues

Kevin Smith kerbzo at gmail.com
Mon Nov 30 23:17:47 UTC 2009


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


More information about the freebsd-current mailing list