Priority queuing

Priority queuing is much like regular queuing, with the addition of each queue having a priority level. These queues are similar to queues you may have been introduced to in a course on data structures. Items are being pushed into, and pulled out of, the queue. An item pulled out of a queue is always the highest priority item, and the process continues until the queue is empty.

Priority queuing tends to ensure that high-priority traffic is handled. We can even set it up so that high-priority queues get all the bandwidth. For example, imagine a series of queues of different priority in which the highest priority queues start to fill up. When they do, we start to treat certain queues as high-priority queues and halt low-priority queues until the high-priority queues start to empty. This lessens the chance that prioritized traffic will be rejected as a result of a queue reaching its maximum capacity.

The way pfSense implements priority queues is that there are seven levels, with seven being the highest priority. Thus, there is a flat hierarchy of priority levels. pfSense scans each interface, and then queues are scanned for packets in descending order of priority. The highest priority queue is scanned first, followed by the next highest priority queue, until all queues have been scanned. The packet at the head of the highest queue is the packet that gets sent first.

The behavior of a priority queue is set by rules that describe the manner in which packets should be assigned to the queues. Packets can be classified in a number of different ways. They can be classified by protocol or subprotocol type, by the interface they come in on, by the packet size, and by a number of other different criteria.

The main advantage of PRIQ is easy to see. It is easy to configure, easy to understand, and it also guarantees that absolute priority goes to packets that are in the highest priority queue. The primary disadvantage is that priority always goes to the highest priority queue. This may not seem like a problem, but there is no way of circumventing this arrangement, or for moving traffic from a lower to a higher level of priority. As a result, lower priority traffic can be completely starved of bandwidth. Moreover, in pfSense, we only have seven levels of priority. This limits somewhat the granularity of traffic shaping. Hence, we begin our search for a more sophisticated form of queuing.

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

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