cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
343
Views
0
Helpful
2
Replies

Need help understanding WFQ

Velimir Filipov
Level 1
Level 1

Dear folks,

I am currently trying to deeply understand Weighted fair queuing (WFQ), how exactly it schedules packets for the outgoing hardware queue.

As far as I understand, the queueing in each queue is done in such way:

Packet enters the queue corresponding to its flow (based on src-dst-ip-port-prec). It gets a sequence number, which equals to the weight * packetsize + previous packet in the queue if any. When the outgoing interface is ready to transmit, scheduler picks the packet with lowest sequence number amongst all the queues.

Let's consider the following scenario. We have 3 tcp flows having same precedence - lets say 0.

Queue1 is FTP - big packets of 1500 byte size.

Queue2 is Telnet - small packets of lets say 100 byte size.

Queue3 is another Telnet - small packets of lets say 100 byte size.

All flows build up separate queue. Since all flows got same precedence, lets calculate the weight as 1, for easier computations. So seq equals to size + prevous packet in queue if any.

Ok let's say one packet arrive in each of the queues.

Queue1:   1500

SEQ        (1500)

Queue2:   100

SEQ        (100)

Queue3:   100

SEQ        (100)

I think it would go for a random decision to select one of the packets with same sequence value. Lets say it picks the packet in Queue2. Ok now Queue2 is empty.

Queue1:   1500

SEQ        (1500)

Queue2: 

SEQ     

Queue3:   100

SEQ        (100)

Then after the packet that was taken from Queue2 is transmited, it schedule the 100 byte packet in Queue3 for transmission as it has lower seq number, but imagine that during that transmission, new packet arrive in Queue2. As the queue is empty at that moment, the new packet gets seq of 100.

Queue1:   1500

SEQ        (1500)

Queue2:   100

SEQ        (100)

Queue3: 

SEQ    

Then it schedule the 100 byte packet in Queue2 for transmission, and during that new packet in Queue3 arrive, and that process keeps repeating.

Considering that scenario, it seems that the packet in Queue1 might never be transmited.

So my questions are:

1) Am I understanding the algorithm correctly as I have read many contraversary opinions and can this situation actually happen, when lower size packets totally starve the big size ones.

2) Also considering having multiple high precedence flows, each of them probably emptying its own queue at some point, and while other high prec flows gets transmited, it fills up the queue again and etc, would they totally starve low precedence traffic ?

Also as the maximum number of dynamic flows is limited to 4096 (default is 256 I think), at some point different flows might end up in a single queue.

Lets say 2 flows enter same queue, but one is having precedence 7 and the other one 0. Considering the fact that each queue is acting as FIFO, that would mean that the flow with precedence of 7 actually won't be prioritised over the one with prec of 0 (guess enabling WRED would workaround that).

3) Will two flows eventually end up in a single FIFO queue and get served in a FIFO way no matter their precedence ?

Can someone explain how exactly WFQ works ?

Thank you for reading and I am hoping that I can finally understand how this WFQ actually works.

Looking forward for your opinions.

Best regards.

2 Replies 2

Velimir Filipov
Level 1
Level 1

anyone ?

Duplicate post. 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card