On 2007/11/16 12:49, Calomel wrote: > I have to agree with Girish. Take some time and find out the average > bandwidth for your link. ... > You could also use a script. If you know what the current upload bandwidth > amount is then you could vary the "altq on $ExtIf bandwidth 744Kb" line to > reflect this.
Say you have a 10Mb ethernet feed, plugged into an unmanaged switch with a bunch of other people in the building connecting to other ports, who sometimes use up all available bandwidth on the uplink, and other times use nothing. Now you want to take whatever of that uplink is available to you, and share it fairly between users, giving priority to some over others. Obviously if you set a queue at 10Mb you'll have problems sometimes. But if you set it at the "average", you'll A) miss out on a lot of bandwidth most of the time and B) still have problems when the connection is heavily used by people in the building who aren't downstream of your PF box. Similar sort of deal with a normal shared-access satellite system. Someone please correct me if I'm wrong, but I think that congestion is defined as "bw wanted > bw configured on the interface in the 'altq on' definition". Problem there is you can't tell what is available at a given time. >From what you quoted Jonathan: "Queues with a higher priority are preferred during congestion over queues with a lower priority as long as both queues share the same parent" OpenBSD's pf.conf(5) fits a little more information into about the same space: "Priq queues with a higher priority are always served first. Cbq and Hfsc queues with a higher priority are preferred in the case of overload." I don't think it's possible to do exactly what's wanted with the existing altq disciplines. Priq would starve out lower priority queues; cbq/hfsc would have the problem that they can't identify an overload on this sort of uplink.