On Sat, 9 Jan 2016 11:11:27 -0700 Daniel Melameth <dan...@melameth.com> wrote:
> You NEED to set a max on your ROOT queues. I came to this conclusion as well. But not only on root queues. For example, when max is set on root queue but only bandwidth on child queues, no shaping takes place: queue upload on $if_ext bandwidth 850K max 850K queue bulk parent upload bandwidth 350K default queue slow parent upload bandwidth 500K queue download on $if_int bandwidth 8500K max 8500K queue bulk parent download bandwidth 3500K default queue slow parent download bandwidth 5000K The only way I can shape traffic to set values is by setting both bandwidth and max on all the queues. Bandwidth and max values must be equal per queue, and sum of child queue bandwidths must be equal to parent queue bandwidth: queue upload on $if_ext bandwidth 850K max 850K queue bulk parent upload bandwidth 350K max 350K default queue slow parent upload bandwidth 500K max 500K queue download on $if_int bandwidth 8500K max 8500K queue bulk parent download bandwidth 3500K max 3500K default queue slow parent download bandwidth 5000K max 5000K So, while fixed-bandwidth queues seem to work, they have the disadvantage of wasted bandwidth reserved for traffic which is not currently on wire. I have also noticed that min value setting does not reserve bandwidth. No shaping takes place with the following queue definition: queue upload on $if_ext bandwidth 850K max 850K queue bulk parent upload bandwidth 350K min 350K default queue slow parent upload bandwidth 500K min 500K queue download on $if_int bandwidth 8500K max 8500K queue bulk parent download bandwidth 3500K min 3500K default queue slow parent download bandwidth 5000K min 5000K Let's take a look at this queue definition: queue upload on $if_ext bandwidth 850K min 850K max 850K queue bulk parent upload bandwidth 350K min 150K max 800K default queue slow parent upload bandwidth 500K min 100K max 800K queue download on $if_int bandwidth 8500K min 8500K max 8500K queue bulk parent download bandwidth 3500K min 1500K max 8000K default queue slow parent download bandwidth 5000K min 1000K max 8000K I guess it is clear what was intended with it: - limit outbound traffic to 850K, inbound to 8.5M - both child queues can take up to 800K/8M if there is no traffic from the other queue on the wire - if traffic from both queues is on the wire, requesting maximum possible bandwidth, shape bulk to 350K/3.5M and slow to 500K/5M. Under no circumstances let slow queue starve bulk queue under 150K/1.5M, and under no circumstances let bulk queue starve slow queue under 100K/1M However, it does no shaping at all. Bulk queue becomes completely starved with slow queue. Not only bulk queue doesn't get shaped to 350K/3.5M - it doesn't get its min 150K/1.5M either. > prio is useless when shaping--see > http://marc.info/?l=openbsd-misc&m=140127924031145&w=2. Thank you for reminding me I've been trying to make this work more than year and half ago. Back in time I thought "it's completely new, perhaps I'll wait a release or two, it'll get better". But obviously it didn't. Could it be that removing the ability to prioritize traffic already in queues prevents throttling? Or, to cut the long story short, if someone can paste queue definition which accomplishes 'give both queues max bandwidth, but throttle traffic from first queue when traffic from the second one arrives', I will be more than happy to quit bothering misc@ list readers with my rants and observations. -- Before enlightenment - chop wood, draw water. After enlightenment - chop wood, draw water. Marko Cupać https://www.mimar.rs/