Priority queuing

Priority queuing (PRIQ) is a queuing policy that divides traffic into different priority levels. At an abstract level, it is essentially the same as the priority queue you may have learned about when studying data structures in computer science. Items are being pushed into the queue; when an item is pulled from the queue, it is always the highest priority item. This continues until the queue is empty.

Implementations of priority queuing differ in the number of levels, but in pfSense, there are seven levels, with seven being the highest priority. This is a flat hierarchy of priority levels. On each interface, priority queues are scanned for packets in descending order of priority. The highest priority queue is scanned first, then the next highest priority queue, and so forth. The packet at the head of the highest queue is chosen for sending. This procedure is repeated each time the traffic shaper chooses a packet to be sent.

A priority queue's behavior is defined by a set of rules that describe how packets should be assigned to priority queues. Packets can be classified by protocol or subprotocol type, which interface they come from, packet size, and so on. The advantage of PRIQ is that it is easy to configure and also easy to understand. It also ensures that absolute priority is given to traffic that is in the highest priority queue. The main disadvantage is that because priority always goes to higher level traffic and there is no way of circumventing this policy or for moving traffic to a higher level once it has been assigned a lower level of priority, lower priority traffic can be completely starved of bandwidth. In addition, having only seven priority levels limits the granularity of traffic shaping; an interface which relies solely on priority queuing can have at most seven separate queues.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset