{"id":345,"date":"2010-01-26T13:19:51","date_gmt":"2010-01-26T13:19:51","guid":{"rendered":"http:\/\/mccltd.net\/blog\/?p=345"},"modified":"2015-02-21T09:26:24","modified_gmt":"2015-02-21T09:26:24","slug":"wrr-queue-parameters","status":"publish","type":"post","link":"http:\/\/darenmatthews.com\/blog\/?p=345","title":{"rendered":"WRR Queue &#8211; Parameters"},"content":{"rendered":"<p>The 3550 WRR (weighted round robin) scheduler algorithm utilises <strong>four<\/strong> configurable queues at each interface of the switch. Let\u2019s consider just FastEthernet ports for simplicity in this post. For each queue, the following important parameters could be configured:<!--more--><\/p>\n<p>1) WRR scheduling weight. Defines how much attention the queue is given in case of congestion. The weight essentially defines the number of packets taken from queue each time WRR scheduler runs through queues in sequence. WRR weights are defined per-interface using the command <strong>wrr-queue bandwidth w1 w2 w3 w4<\/strong>. Theoretically, if each queue holds packets of approximately the same size, the proportion of bandwidth guaranteed to queue number \u201ck\u201d (k=1..4) is: wk=wk\/(w1+w2+w3+w4) [this formula does not hold strict if packet sizes are much different]. If queue 4 is turned into priority by using <strong>priority-queue out<\/strong>, than it\u2019s weight is ignored in computations (w4 is set to 0 in the above formula). The currently assigned weights could be verified as follows:<\/p>\n<pre><strong>SW4:<\/strong>\r\ninterface FastEthernet 0\/1\r\n wrr-queue bandwidth 10 20 30 40\r\n\r\nRack1SW4#<strong>show mls qos interface queueing<\/strong>\r\nFastEthernet0\/1\r\nEgress expedite queue: dis\r\nwrr bandwidth weights:\r\nqid-weights\r\n 1 - 10\r\n 2 - 20\r\n 3 - 30\r\n 4 - 40\r\n...<\/pre>\n<p>2) Queue size. Number of buffers allocated to hold packets when the queue is congested. When a queue grow up to this limit, further packets are dropped. The queue size value is not explicitly configurable per FastEthernet interface. Rather, each queue is mapped to one of eight <strong>globally<\/strong> configurable \u201clevels\u201d. Each level, in turn, is assigned the number of buffers available to queues mapped to this level. Therefore, the mapping is as following: <strong>queue-id -&gt; global-level -&gt; number-of-buffers<\/strong>. By default, each of eight levels is assigned the value of \u201c100?. This means that every queue mapped to this level will have 100 buffers allocated. The interface-level command to assign a level to a queue is <strong>wrr-queue min-reserve Queue-id Global-level<\/strong>. By default, queues 1 through 4 are mapped to levels 1 through 4. Look at the following example and verification:<\/p>\n<pre><strong>SW4:<\/strong>\r\nmls qos min-reserve 1 10\r\nmls qos min-reserve 2 20\r\nmls qos min-reserve 3 30\r\nmls qos min-reserve 4 40\r\n!\r\n! Assign 40 buffers to queue 1\r\n! Assign 30 buffers to queue 2\r\n! Assign 20 buffers to queue 3\r\n! Assign 10 buffers to queue 4\r\n!\r\ninterface FastEthernet0\/1\r\n wrr-queue min-reserve 1 4\r\n wrr-queue min-reserve 2 3\r\n wrr-queue min-reserve 3 2\r\n wrr-queue min-reserve 4 1\r\n\r\nRack1SW4#<strong>show mls qos interface fastEthernet 0\/1 buffers<\/strong>\r\nFastEthernet0\/1\r\nMinimum reserve buffer size:\r\n 10 20 30 40 100 100 100 100\r\nMinimum reserve buffer level select:\r\n 4 3 2 1<\/pre>\n<p>3) CoS values to Queue-ID (1,2,3,4) mapping table (per-port). Defines (per-interface) which outgoing packets are mapped to this queue based on the calculated CoS value. The interface-level command to define the mappings is <strong>wrr-queue cos-map Queue-ID Cos1 [Cos2] [Cos3] \u2026 [Cos8]<\/strong>. For example:<\/p>\n<pre><strong>SW4:<\/strong>\r\ninterface FastEthernet0\/1\r\n wrr-queue cos-map 1 0 1 2\r\n wrr-queue cos-map 2 3 4\r\n wrr-queue cos-map 3 6 7\r\n wrr-queue cos-map 4 5\r\n\r\nRack1SW4#<strong>show mls qos interface fastEthernet 0\/1 queueing<\/strong>\r\nFastEthernet0\/1\r\nEgress expedite queue: dis\r\nwrr bandwidth weights:\r\nqid-weights\r\n 1 - 10\r\n 2 - 20\r\n 3 - 30\r\n 4 - 40\r\n<strong>Cos-queue map:<\/strong>\r\ncos-qid\r\n 0 - 1\r\n 1 - 1\r\n 2 - 1\r\n 3 - 2\r\n 4 - 2\r\n 5 - 4\r\n 6 - 3\r\n 7 - 3<\/pre>\n<p>Note that the CoS value is either based on the original CoS field from the incoming frame (if CoS was trusted) or is calculated using the global DSCP to CoS mapping table (for IP packets).<\/p>\n<p>Note that for GigabitEthernet ports on the 3550 platform, the configuration options are more flexible \u2013 you can specify queue-depths per-interface, configure drop thresholds, map DSCP value to thresholds and define the drop strategy.<\/p>\n<p>POST COURTESY OF:<\/p>\n<p><a href=\"blog.internetworkexpert.com\">blog.internetworkexpert.com<\/a>\u00a0 specifically: <a href=\"http:\/\/blog.internetworkexpert.com\/2008\/07\/20\/undestanding-wrr-queue-parameters\/\">http:\/\/blog.internetworkexpert.com\/2008\/07\/20\/undestanding-wrr-queue-parameters\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The 3550 WRR (weighted round robin) scheduler algorithm utilises four configurable queues at each interface of the switch. Let\u2019s consider just FastEthernet ports for simplicity in this post. For each queue, the following important parameters could be configured:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[83,76],"tags":[21],"_links":{"self":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/345"}],"collection":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=345"}],"version-history":[{"count":3,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/345\/revisions"}],"predecessor-version":[{"id":2130,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/345\/revisions\/2130"}],"wp:attachment":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=345"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}