Modified Deficit Round Robin

MDRR is a queuing feature implemented only in the Cisco 12000 series router family. Because the 12000 series does not support CBWFQ and LLQ, MDRR serves in place of these features. Its main claims to fame are better fairness than legacy queuing methods such as priority queuing and custom queuing, and that it supports a priority queue (like LLQ). For the CCIE Routing and Switching qualifying exam, you need to understand how MDRR works at the conceptual level, but you don't need to know how to configure it.

..— MDRR allows classifying traffic into seven round-robin queues (0-6), with one additional priority { j®*ic queue. When no packets are placed into the priority queue, MDRR normally services its queues in a round-robin approach, cycling through each queue once per cycle. With packets in the priority queue, MDRR has two options for how to include the priority queue in the queue service algorithm:

■ Strict priority mode

■ Alternate mode

Strict priority mode serves the priority queue whenever traffic is present in that queue. The benefit 1 Topic is, of course, that this traffic gets the first service regardless of what is going on in the other queues. The downside is that it may lead to queue starvation in other queues if there is always traffic in the priority queue. In this mode, the priority queue also can get more than the configured bandwidth percentage, because this queue is served more than once per cycle.

By contrast, alternate mode serves the priority queue in between serving each of the other queues. Let's say that five queues are configured: 0, 1, 2, 3, and the priority queue (P). Assuming that there is always traffic in each queue, here is how it would be processed: 0, P, 1, P, 2, P, 3, P, and so on. The result is that queue starvation in non-priority queues does not occur, because each queue is being served. The drawback of this mode is that it can cause jitter and additional latency for the traffic in the priority queue, compared to strict priority mode.

Two terms in MDRR, unique to this queuing method, help to differentiate MDRR from other queuing tools:

MDRR supports two types of scheduling, one of which uses the same general algorithm as the Topic legacy CQ feature in Cisco IOS routers (other than the 12000 series). MDRR removes packets from a queue until the quantum value (QV) for that queue has been removed. The QV quantifies a number of bytes and is used much like the byte count is used by the CQ scheduler. MDRR repeats the process for every queue, in order from 0 through 7, and then repeats this round-robin process. The end result is that each queue gets some percentage bandwidth of the link.

MDRR deals with the CQ scheduler's problem by treating any "extra" bytes sent during a cycle as a "deficit." If too many bytes were taken from a queue, next time around through the queues, the number of extra bytes sent by MDRR is subtracted from the QV. In effect, if more than the QV is sent from a queue in one pass, that many fewer bytes are taken in the next pass. As a result, averaged over many passes through the cycle, the MDRR scheduler provides an exact bandwidth reservation.

Figure 13-7 shows an example of how MDRR works. In this case, MDRR is using only two queues, with QVs of 1500 and 3000, respectively, and with all packets at 1000 bytes in length.

Figure 13-7 MDRR: Making Up Deficits

1st MDRR Pass Through the Queues

Note: All Packets are 1000 bytes long!

Queue1

PS

PS

P4

P3

P2

P1

Queue2

P12

P11

P10

P9

PS

P7

Ending Q1 Deficit Count = -500

Beginning Q1 Deficit Count = 3000

Beginning Q1 Deficit Count = 1500

Ending Q1 Deficit Count = -500

Beginning Q1 Deficit Count = 3000

Ending Q1 Deficit Count = 0

2nd MDRR Pass Through the Queues

Ending Q1 Deficit Count = 0

2nd MDRR Pass Through the Queues

Some discussion of how to interpret Figure 13-7 may help you digest what is going on. The figure shows the action during the first round-robin pass in the top half of the figure, and the action during the second pass in the lower half of the figure. The example begins with six packets (labeled P1 through P6) in queue 1, and six packets (labeled P7 through P12) in queue 2. Each arrowed line to the right sides of the queues, pointing to the right, represents the choice by MDRR to send a single packet.

When a queue first fills, the queue's deficit counter (DC) is set to the QV for that queue, which is 1500 for queue 1 and 3000 for queue 2. In Figure 13-7, MDRR begins by taking one packet from queue 1, decrementing the DC to 500, and deciding that the DC is still greater than 0. Therefore, MDRR takes a second packet from queue 1, decrementing the DC to -500. MDRR then moves on to queue 2, taking three packets, after which the deficit counter (DC) for queue 2 has decremented to 0.

That concludes the first round-robin pass through the queues. MDRR has taken 2000 bytes from queue 1 and 3000 bytes from queue 2, giving the queues 40 percent and 60 percent of link bandwidth, respectively.

In the second round-robin pass, shown in the lower half of Figure 13-7, the process begins by MDRR adding the QV for each queue to the DC for each queue. Queue 1's DC becomes 1500 + (-500), or 1000, to begin the second pass. During this pass, MDRR takes P3 from queue 1, decrements DC to 0, and then moves on to queue 2. After taking three more packets from queue 3, decrementing queue 2's DC to 0, MDRR completes the second pass. Over these two round-robin passes, MDRR has taken 3000 bytes from queue 1 and 6000 bytes from queue 2— which is the same ratio as the ratio between the QVs. In other words, MDRR has exactly achieved the configured bandwidth ratio between the two queues.

The deficit feature of MDRR provides a means that, over time, gives each queue a guaranteed bandwidth based on the following formula:

QV for Queue X Sum of All QVs

For additional examples of the operation of the MDRR deficit feature, refer to http:// www.cisco.com/warp/public/63/toc_18841.html. Alternatively, you can go to Cisco.com and search for "Understanding and Configuring MDRR and WRED on the Cisco 12000 Series Internet Router."

Was this article helpful?

+1 0

Responses

  • enzo
    What is modified deficit round robin?
    3 years ago

Post a comment