I sent this email back in March when I was running 3.5 and didn't look
into this further because this was an older release--but now I'm running
3.7 and I have the same issue. Any ideas? No one on misc@ seems to...
Melameth, Daniel D. wrote:
> I sent something similar to this to misc@ with nary a response so I
> hope someone on this specialized list can shed some light on this...
>
>
> I implemented altq's priq a while back in the hope of "speeding up" my
> overall 'net connection by prioritizing empty TCP ACKs. However, I
> noticed that I was never coming close to my 256Kb/s upload cap since I
> did this and looked into it a little bit further today.
>
>
> It appears an expected bandwidth value for altq in this scenario:
>
> altq on $ext_if priq bandwidth 240Kb queue { tcp_ack, default }
>
> ..limits my upload speed to about half (128Kb/s) of what I should get
> and doubling this value:
>
> altq on $ext_if priq bandwidth 480Kb queue { tcp_ack, default }
>
> ..gives me my 256Kb/s back.
>
> Details below... Any thoughts appreciated.
>
>
> $ uname -mrsv
> OpenBSD 3.5 GENERIC#34 i386
>
> Snippet from my normal pf.conf:
>
> altq on $ext_if priq bandwidth 240Kb queue { tcp_ack, default }
> queue tcp_ack priority 7
> queue default priority 1 priq ( default )
> ..
> nat on $ext_if from $int_if:network to ! $modem -> ( $ext_if:0 )
> nat on $ext_if from $int_if:network to $modem -> $ext_alias
> ..
> pass in quick on $ext_if inet proto tcp from ! $int_if:network to
> \ ( $ext_if:0 ) port ssh flags S/SA keep state queue (
> default,
> tcp_ack )
> ..
> pass out quick on $ext_if inet proto tcp to any flags S/SA \
> keep state queue ( default, tcp_ack )
>
> Output of pfctl -vvs queue during a large FTP upload:
>
> $ sudo pfctl -vvs queue
> queue tcp_ack priority 7
> [ pkts: 5 bytes: 270 dropped pkts: 0 bytes:
> 0 ]
> [ qlength: 0/ 50 ]
> queue default priq( default )
> [ pkts: 862 bytes: 754536 dropped pkts: 0 bytes:
> 0 ]
> [ qlength: 9/ 50 ]
>
> queue tcp_ack priority 7
> [ pkts: 5 bytes: 270 dropped pkts: 0 bytes:
> 0 ]
> [ qlength: 0/ 50 ]
> [ measured: 0.0 packets/s, 0 b/s ]
> queue default priq( default )
> [ pkts: 952 bytes: 827452 dropped pkts: 0 bytes:
> 0 ]
> [ qlength: 11/ 50 ]
> [ measured: 18.0 packets/s, 116.67Kb/s ]
>
> queue tcp_ack priority 7
> [ pkts: 8 bytes: 432 dropped pkts: 0 bytes:
> 0 ]
> [ qlength: 0/ 50 ]
> [ measured: 0.3 packets/s, 129.60 b/s ]
> queue default priq( default )
> [ pkts: 1052 bytes: 907197 dropped pkts: 0 bytes:
> 0 ]
> [ qlength: 10/ 50 ]
> [ measured: 19.0 packets/s, 122.13Kb/s ]
>
>
> Simply updating my pf.conf with:
>
> altq on $ext_if priq bandwidth 480Kb queue { tcp_ack, default }
>
> ..and reloading my rules with:
>
> $ sudo pfctl -f /etc/pf.conf
>
> ..during the current same FTP upload process gives:
>
> $ sudo pfctl -vvs queue
> queue tcp_ack priority 7
> [ pkts: 0 bytes: 0 dropped pkts: 0 bytes:
> 0 ]
> [ qlength: 0/ 50 ]
> queue default priq( default )
> [ pkts: 53 bytes: 54598 dropped pkts: 0 bytes:
> 0 ]
> [ qlength: 7/ 50 ]
>
> queue tcp_ack priority 7
> [ pkts: 0 bytes: 0 dropped pkts: 0 bytes:
> 0 ]
> [ qlength: 0/ 50 ]
> [ measured: 0.0 packets/s, 0 b/s ]
> queue default priq( default )
> [ pkts: 233 bytes: 212130 dropped pkts: 0 bytes:
> 0 ]
> [ qlength: 5/ 50 ]
> [ measured: 36.0 packets/s, 252.05Kb/s ]
>
> queue tcp_ack priority 7
> [ pkts: 3 bytes: 162 dropped pkts: 0 bytes:
> 0 ]
> [ qlength: 0/ 50 ]
> [ measured: 0.3 packets/s, 129.60 b/s ]
> queue default priq( default )
> [ pkts: 410 bytes: 369754 dropped pkts: 0 bytes:
> 0 ]
> [ qlength: 2/ 50 ]
> [ measured: 35.7 packets/s, 252.12Kb/s ]
>
>
> So what's going on? Why is the first altq statement not allowing me
> to get close to my maximum (when there is mostly nothing in the higher
> priority queue)?