[Mod: Split off from: https://forums.freebsd.org/threads/...oip-and-data-with-pf-and-dummynet-prio.103775]
Nice. I have shaping activated, but not sure if it helps anything - I didn't notice problems in voice quality, which could mean that there are none, or that the traffic shaper is good enough, or that the network isn't saturated when I do voice calls.
I am not sure what all these options do, how they influence each other or how that could be effectively tested.
Issue: you need to know your technical saturation limit, and stay some 3% below, so that there is actually a bulge of data before the pipe from which prioritizing can happen. This is fine with a hard-clocked link (constant bw), but DSL isn't hard-clocked; you get some bw that is dependent on current line-interferences and whatever.
Issue: clocking (kern.hz). dummynet doesn't behave well when that is put low. But setting kern.hz to some 2000 or 4000 can significantly change energy consumption. And this is not for a gaming rig latency, it is for 24/7 ops. Not nice.
noerror: some things gave back "UDP: no buffer space" when the dummynet would throttle them, but they would not give back errors when the uplink would throttle them. Never found time to figure out why (would need a deep-dive into network stuff).
When I try to reconfigure at runtime, I usually get kernel crash: qfq_dequeue BUG/* non-workconserving leaf.
At some point it all went over my head. Here are some bad inter-provider peerings, I am doing long-haul (>200ms) mass-data transfers, TCP congestion-control does also influence things (and has/had bugs), so I really don't know where to start to do comparable measurements.
And then the telco switched to VDSL, and 90% of the painful problems just went away. Even backup over VPN (mtu=1500, have the kernel fragment everything) just works. Even VPN inside VPN (have the kernel triple-fragment everything) gets somehow along.
So for now this matter is left as it is, until some day I might find the mood to read the source and try to really understand the ideas of the design (documentation is unsat).
Nice. I have shaping activated, but not sure if it helps anything - I didn't notice problems in voice quality, which could mean that there are none, or that the traffic shaper is good enough, or that the network isn't saturated when I do voice calls.
Code:
$f pipe 1 config bw 6250kbit/s queue 28Kbytes mask $nomask buckets 2048 sched config type qfq # WAN uplink
$f pipe 2 config bw 20200kbit/s queue 25 mask $nomask buckets 2048 sched config type qfq # WAN dwnlnk
I am not sure what all these options do, how they influence each other or how that could be effectively tested.
Issue: you need to know your technical saturation limit, and stay some 3% below, so that there is actually a bulge of data before the pipe from which prioritizing can happen. This is fine with a hard-clocked link (constant bw), but DSL isn't hard-clocked; you get some bw that is dependent on current line-interferences and whatever.
Issue: clocking (kern.hz). dummynet doesn't behave well when that is put low. But setting kern.hz to some 2000 or 4000 can significantly change energy consumption. And this is not for a gaming rig latency, it is for 24/7 ops. Not nice.
Code:
# Outbound gen.
$f queue 11 config pipe 1 weight 1 mask $outmask buckets 2048 maxlen 1492 queue 32Kbytes droptail
# Outbound prio (VoIP)
$f queue 12 config pipe 1 weight 95 mask $outmask buckets 64 maxlen 1492 queue 20Kbytes droptail
# Outbound bulk
$f queue 13 config pipe 1 weight 20 mask $outmask buckets 64 maxlen 1492 queue 32Kbytes droptail noerror
noerror: some things gave back "UDP: no buffer space" when the dummynet would throttle them, but they would not give back errors when the uplink would throttle them. Never found time to figure out why (would need a deep-dive into network stuff).
When I try to reconfigure at runtime, I usually get kernel crash: qfq_dequeue BUG/* non-workconserving leaf.
At some point it all went over my head. Here are some bad inter-provider peerings, I am doing long-haul (>200ms) mass-data transfers, TCP congestion-control does also influence things (and has/had bugs), so I really don't know where to start to do comparable measurements.
And then the telco switched to VDSL, and 90% of the painful problems just went away. Even backup over VPN (mtu=1500, have the kernel fragment everything) just works. Even VPN inside VPN (have the kernel triple-fragment everything) gets somehow along.
So for now this matter is left as it is, until some day I might find the mood to read the source and try to really understand the ideas of the design (documentation is unsat).
Strange. I thought higher weight means higher prio, and only values 1-100 are allowed.
- dummynet has queues 1 and 3 for voice and 2 and 4 for data traffic. A prio scheduler is used, and it uses queue weight to determine priority, with lower weight meaning higher priority. The voice queues have weight 0, data queues weight 1.