Pfifo_fast is the default qdisc in Linux. It is a classful queing discipline that contains 3 numbers of classes of differing priority that are dequeued in numerical descending order of priority. That is how it is described in the man page. Sounds complicated? Actually it is really simple.
Have you ever watched how ferries are loaded? There are different queues for motorcycles, cars and trucks. Motorcycles are loaded first, then cars and last the trucks. In that way we can avoid unnecessary congestion on the other shore.
It is perfectly the same with our network traffic. Motorcycles is something like ssh packets. We want them to be as fast as they can be and not to be delayed by file transfers. Cars are our “normal traffic” like http. We do not want those packets delayed by file transfers as well. And last but not least there is our heavyweight traffic like file transfers (trucks).
Packets are prioritized by the TOS bits and mapped to one of the 3 queues with a priomap. That is like the steward who directs the vehicle driver to his queue.
Dequeueing (loading the ferry) then is ordered by priority. First we dequeue prio0 traffic (motorcycles/ssh).
Then we dequeue prio1 traffic (cars/http).
Finally we dequeue prio2 traffic (trucks/ftp).
That’s it. Actually not complicated at all. Isn’t it?