Calculation of Expected Traffic on IQE PIC Queues
This topic discusses the following topics related to calculating the expected traffic flow on IQE PIC queues:
Excess Bandwidth Calculations Terminology
The following terms are used in this discussion of IQE PIC queue calculations:
CIR mode—A physical interface is in CIR mode when one of more of its “children” (logical interfaces in this case) have a guaranteed rate configured, but some logical interfaces have a shaping rate configured.
Default mode—A physical interface is in default mode if none of its “children” (logical interfaces in this case) have a guaranteed rate or shaping rate configured.
Excess mode—A physical interface is in excess mode when one of more of its “children” (logical interfaces in this case) have an excess rate configured.
PIR mode—A physical interface is in PIR mode if none of its “children” (logical interfaces in this case) have a guaranteed rate configured, but some logical interfaces have a shaping rate configured.
Excess Bandwidth Basics
This basic example illustrates the interaction of the guaranteed rate, the shaping rate, and the excess rate applied to four queues. The same concepts extend to logical interfaces (units) and cases in which the user does not configure an explicit value for these parameters (in that case, the system uses implicit parameters).
In this section, the term “not applicable” (NA) means that the feature is not explicitly configured. All traffic rates are in megabits per second (Mbps).
The hardware parameters derived from the configured rates are relatively straightforward except for the excess weight. The excess rate is translated into an absolute value called the excess weight. The scheduler for an interface picks a logical unit first, and then a queue within the logical unit for transmission. Logical interfaces and queues that are within their guaranteed rates are picked first, followed by those in the excess region. If the transmission rate for a logical interface or queue is more than the shaping rate, the scheduler skips the logical interface or queue. Scheduling in the guaranteed region uses straight round-robin, whereas scheduling in the excess region uses weighed round-robin (WRR) based on the excess weights. The excess weights are in the range from 1 to 127, but they are transparent to the user and subject to change with implementation. The weights used in this example are for illustration only.
This example uses a logical interface with a transmit rate (CIR) of 10 Mbps and a shaping rate (PIR) of 10 Mbps. The user has also configured percentage values of transmit rate (CIR), shaping rate (PIR), and excess rate as shown in Table 1.
Queue |
Transmit Rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Traffic Sent To Queue |
---|---|---|---|---|
Q0 |
5% |
5% |
10% |
10 Mbps |
Q1 |
30% |
80% |
50% |
10 Mbps |
Q2 |
10% |
15% |
30% |
10 Mbps |
Q3 |
15% |
35% |
30% |
10 Mbps |
The values used by the hardware based on these parameters are shown in Table 2.
Queue |
Transmit Rate (CIR) |
Shaping Rate (PIR) |
Excess Weight |
Expected Traffic Rate |
---|---|---|---|---|
Q0 |
0.5 Mbps |
0.5 Mbps |
10 |
0.5 Mbps |
Q1 |
3 Mbps |
8 Mbps |
50 |
5.19 Mbps |
Q2 |
1 Mbps |
1.5 Mbps |
30 |
1.5 Mbps |
Q3 |
1.5 Mbps |
3.5 Mbps |
30 |
2.81 Mbps |
Totals: |
6 Mbps |
13.5 Mbps |
120 |
10 Mbps (maximum output) |
There are a number of important points regarding excess bandwidth calculations:
The guaranteed rates should add up to less than the logical interface guaranteed rate (10 Mbps).
Shaping rates (PIRs) can be oversubscribed.
Excess rates can be oversubscribed. This rate is only a ratio at which the sharing occurs.
Each queue receives the minimum of the guaranteed bandwidth because each queue is transmitting at its full burst if it can.
The excess (remaining) bandwidth is shared among the queues in the ratio of their excess rates. In this case, the excess bandwidth is the logical interface bandwidth minus the sum of the queue transmit rates, or 10 Mbps – 6 Mbps = 4 Mbps.
However, transmission rates are capped at the shaping rate (PIR) of the queue. For example, Queue 0 gets 0.5 Mbps.
Queue 0 also gets a guaranteed transmit rate (CIR) of 0.5 Mbps and is eligible for excess bandwidth calculated as 4 Mbps (10 Mbps – 6 Mbps) multiplied by 10/127. However, because the shaping rate (PIR) for Queue 0 is 0.5 Mbps, the expected traffic rate is capped at 0.5 Mbps.
Queue 1 gets its guaranteed transmit rate (CIR) of 3 Mbps. Because Queue 0 has already been dealt with, Queue 1 is eligible for sharing the excess bandwidth along with Queue 2 and Queue 3. So Queue 1 is entitled to an excess bandwidth of 4 Mbps multiplied by 50 / (30 + 30 + 50), or 1.81 Mbps.
In the same way, Queue 2 is eligible for its guaranteed transmit rate (CIR) of 1 Mbps and an excess bandwidth of 4 Mbps multiplied by 30 / (30 + 30 + 50), or 1.09 Mbps. However, because Queue 2 has a shaping rate (PIR) of 1.5 Mbps, the bandwidth of Queue 2 is capped at 1.5 Mbps. The additional 0.59 Mbps can be shared by Queue 1 and Queue 3.
Queue 3 is eligible for an excess of 4 Mbps multiplied by 30 / (30 + 30 + 50), or 1.09 Mbps. This total of 2.59 Mbps is still below the shaping rate (PIR) for Queue 3 (3.5 Mbps).
The remaining bandwidth of 0.59 Mbps (which Queue 2 could not use) is shared between Queue 1 and Queue 3 in the ratio 50/30. So Queue 3 can get 0.59 multiplied by 30 / (50 + 30), or 0.22 Mbps. This gives a total of 2.81 Mbps.
Therefore, Queue 1 gets 3 Mbps + 1.82 Mbps + (0.59 Mbps * 50 / (50 + 30)), or approximately 5.19 Mbps.
Logical Interface Modes on IQE PICs
On IQE PICs, scheduling occurs level-by-level. That is, based on the parameters configured on the logical interface, the scheduler first picks a logical interface to transmit from. Then, based on the configuration of the underlying queues, the IQE PIC selects one of the queues to transmit from. Therefore, it is important to understand how different logical interface parameters are configured or derived (not explicitly configured), and also how the same values are established at the queue level.
In the following examples, assume that the bandwidth available at the physical interface level is 400 Mbps and there are four logical interfaces (units) configured. A per-unit scheduler is configured, so the logical interfaces operate in different modes depending on the parameters configured.
If no class-of-service parameters are configured on any of the logical interfaces, the interface is in default mode. In default mode, the guaranteed rate (CIR) available at the physical interface (400 Mbps) is divided equally among the four logical interfaces. Each of the four gets a guaranteed rate (CIR) of 100 Mbps. Because none of the four logical interfaces have a shaping rate (PIR) configured, each logical interface can transmit up to the maximum of the entire 400 Mbps. Because there is no excess rate configured on any of the logical interfaces, each of the four gets an equal, minimum excess weight of 1. The configured and hardware-derived bandwidths for this default mode example are shown in Table 3.
Logical Interface |
Configured |
Hardware |
|||||
---|---|---|---|---|---|---|---|
Guaranteed rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Guaranteed Rate |
Shaping Rate |
Excess Weight |
||
Unit 0 |
NA |
NA |
NA |
100 Mbps |
400 Mbps |
1 |
|
Unit 1 |
NA |
NA |
NA |
100 Mbps |
400 Mbps |
1 |
|
Unit 2 |
NA |
NA |
NA |
100 Mbps |
400 Mbps |
1 |
|
Unit 3 |
NA |
NA |
NA |
100 Mbps |
400 Mbps |
1 |
If a subset of the logical interfaces (units) have a shaping rate (PIR) configured, but none of them have a guaranteed rate (CIR) or excess rate, then the physical interface is in PIR mode. Furthermore, if the sum of the shaping rates on the logical interfaces is less than or equal to the physical interface bandwidth, the physical interface is in undersubscribed PIR mode. If the sum of the shaping rates on the logical interfaces is more than the physical interface bandwidth, the physical interface is in oversubscribed PIR mode. These modes are the same as on other PICs, where only a shaping rate and guaranteed rate can be configured.
In undersubscribed PIR mode, the logical interfaces with a configured shaping rate receive preferential treatment over those without a configured shaping rate. For logical interfaces with a shaping rate configured, the guaranteed rate is set to the shaping rate. For the logical interfaces without a shaping rate, the remaining logical interface bandwidth is distributed equally among them. Excess weights for the logical interfaces with a shaping rate are set to an implementation-dependent value proportional to the shaping rate. Excess weights for the logical interfaces without a shaping rate are set to the minimum weight (1). However, although the excess weights for the configured logical interfaces are never used because the logical interfaces cannot transmit above their guaranteed rates, the excess weights are still determined for consistency with oversubscribed mode. Also, logical interfaces without a configured shaping rate can transmit up to a maximum of the physical bandwidth of the other queues that are not transmitting. Therefore, the shaping rate (PIR) is set to the physical interface bandwidth on these interfaces.
The configured and hardware-derived bandwidths for the undersubscribed PIR mode example are shown in Table 4. Note that the sum of the shaping rates configured on the logical interfaces (500 Mbps) is more than the physical interface bandwidth (400 Mbps).
Logical Interface |
Configured |
Hardware |
|||||
---|---|---|---|---|---|---|---|
Guaranteed rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Guaranteed Rate |
Shaping Rate |
Excess Weight |
||
Unit 0 |
NA |
100 Mbps |
NA |
100 Mbps |
100 Mbps |
127 |
|
Unit 1 |
NA |
200 Mbps |
NA |
200 Mbps |
200 Mbps |
63 |
|
Unit 2 |
NA |
NA |
NA |
50 Mbps |
400 Mbps |
1 |
|
Unit 3 |
NA |
NA |
NA |
50 Mbps |
400 Mbps |
1 |
In the oversubscribed PIR mode, where the sum of the configured shaping rates on the logical interfaces exceeds the physical interface bandwidth, we cannot set the guaranteed rate to the shaping rate because this might result in the sum of the guaranteed rates exceeding the physical interface bandwidth, which is not possible. In this mode, we want the logical interfaces with shaping rates configured to share the traffic proportionally when these logical interfaces are transmitting at full capacity. This could not happen if the guaranteed rate was set to the shaping rate. Instead, in hardware, we set the guaranteed rates to a “scaled down” shaping rate, so that the sum of the guaranteed rates of the logical interfaces do not exceed the physical interface bandwidth. Because there is no remaining bandwidth once this is done, the other logical interfaces receive a guaranteed rate of 0. Excess weights are set proportionally to the shaping rates and for logical interfaces without a shaping rate, the excess weight is set to a minimum value (1). Finally, the shaping rate is set to the shaping rate configured on the logical interface or to the physical interface bandwidth otherwise.
When the sum of shaping rate at a logical interface is greater than the interface's bandwidth and a rate limit is applied to one of the logical interface queues, the bandwidth limit for the queue is based on a scaled down logical interface shaping rate value rather than the configured logical interface shaping rate.
The configured and hardware-derived bandwidths for the oversubscribed PIR mode example are shown in Table 5. Note that the sum of the shaping rates configured on the logical interfaces (300 Mbps) is less than the physical interface bandwidth (400 Mbps).
Logical Interface |
Configured |
Hardware |
|||||
---|---|---|---|---|---|---|---|
Guaranteed rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Guaranteed Rate |
Shaping Rate |
Excess Weight |
||
Unit 0 |
NA |
100 Mbps |
NA |
80 Mbps |
100 Mbps |
50 |
|
Unit 1 |
NA |
150 Mbps |
NA |
120 Mbps |
150 Mbps |
76 |
|
Unit 2 |
NA |
250 Mbps |
NA |
200 Mbps |
250 Mbps |
127 |
|
Unit 3 |
NA |
NA |
NA |
0 Mbps |
400 Mbps |
1 |
If none of the logical interfaces have an excess rate configured, but at least one of the logical interfaces has a guaranteed rate (CIR) configured, then the physical interface is in CIR mode. In this case, the guaranteed rates are set in hardware to the configured guaranteed rate on the logical interface. For logical interfaces that do not have a guaranteed rate configured, the guaranteed rate is set to 0. The hardware shaping rate is set to the value configured on the logical interface or to the full physical interface bandwidth otherwise. The excess weight is calculated proportional to the configured guaranteed rates. Logical interfaces without a configured guaranteed rate receive a minimum excess weight of 1.
The configured and hardware-derived bandwidths for the CIR mode example are shown in Table 6. In CIR mode, the shaping rates are ignored in the excess weight calculations. So although logical unit 1 has an explicitly configured PIR and logical unit 3 does not, they both receive the minimum excess weight of 1.
Logical Interface |
Configured |
Hardware |
|||||
---|---|---|---|---|---|---|---|
Guaranteed rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Guaranteed Rate |
Shaping Rate |
Excess Weight |
||
Unit 0 |
50 Mbps |
100 Mbps |
NA |
50 Mbps |
100 Mbps |
127 |
|
Unit 1 |
NA |
150 Mbps |
NA |
0 Mbps |
150 Mbps |
1 |
|
Unit 2 |
100 Mbps |
NA |
NA |
100 Mbps |
400 Mbps |
63 |
|
Unit 3 |
NA |
NA |
NA |
0 Mbps |
400 Mbps |
1 |
If one of the logical interfaces has an excess rate configured, then the physical interface is in excess rate mode. Strictly speaking, this mode only matters for the calculation of excess weights on the logical interface. The hardware guaranteed and shaping rates are determined as described previously. In excess rate mode, the excess weights are set to a value based on the configured excess rate. Logical interfaces which do not have excess rates configured receive a minimum excess weight of 1.
Because the excess rate only makes sense above the guaranteed rate, you cannot configure an excess rate in PIR mode (PIR mode has only shaping rates configured). You must configure at least one guaranteed rate (CIR) on a logical interface to configure an excess rate.
The excess rate is configured as a percentage in the range from 1 through 100. The configured value is used to determine the excess weight in the range from 1 through 127.
The configured and hardware-derived bandwidths for the excess rate mode example are shown in Table 7. When an excess rate is configured on one or more logical interfaces, the shaping rate and the guaranteed rate are both ignored in the excess weight calculations. So logical unit 2 gets a minimum excess weight of 1, even though it has a guaranteed rate configured.
Logical Interface |
Configured |
Hardware |
|||||
---|---|---|---|---|---|---|---|
Guaranteed rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Guaranteed Rate |
Shaping Rate |
Excess Weight |
||
Unit 0 |
50 Mbps |
100 Mbps |
20% |
50 Mbps |
100 Mbps |
50 |
|
Unit 1 |
NA |
150 Mbps |
50% |
0 Mbps |
150 Mbps |
127 |
|
Unit 2 |
100 Mbps |
NA |
NA |
100 Mbps |
400 Mbps |
1 |
|
Unit 3 |
NA |
NA |
50% |
0 Mbps |
400 Mbps |
127 |
Default Rates for Queues on IQE PICs
The IQE PIC operates at the queue level as well as at the logical unit level. This section discusses how the IQE PIC derives hardware values from the user configuration parameters. First, the default behavior without explicit configuration is investigated, along with the rules used to derive hardware parameters from the scheduler map configuration of the transmit rate, shaping rate, and excess rate. For more information about configuring schedulers and scheduler maps, see How Schedulers Define Output Queue Properties.
When you do not configure any CoS parameters, a default scheduler map is used to establish four queues: best-effort, expedited-forwarding, assured-forwarding, and network-control. Each queue has the default transmit rate, shaping rate, and excess rate shown in Table 8.
Queue |
Transmit Rate |
Shaping Rate |
Excess Rate |
---|---|---|---|
best-effort (Q0) |
95% |
100% |
95% |
expedited-forwarding (Q1) |
0% |
100% |
0% |
assured-forwarding (Q2) |
0% |
100% |
0% |
network-control (Q3) |
5% |
100% |
5% |
When you configure a scheduler map to change the defaults, the IQE PIC hardware derives the values for each of the three major parameters: transmit rate, shaping rate, and excess rate.
The transmit rate is determined as follows:
If a transmit rate is configured, then:
If the transmit rate is configured as an absolute bandwidth value, the configured value is used by the hardware.
If the transmit rate is configured as a percentage, then the percentage is used to calculate an absolute value used by the hardware, based on the guaranteed rate (CIR) configured at the logical interface or physical interface level. The CIR itself can be a default, configured, or derived value.
If the transmit rate is configured as a remainder, then the remaining value of the logical interface (unit) guaranteed rate (CIR) is divided equally among the queues configured as remainder.
If a transmit rate is not configured, then the default transmit rate is derived based on remainder (for backward compatibility).
If an excess rate is configured on any of the queues in a scheduler map, then the transmit rate on the queue is set to 0.
The shaping rate is determined as follows:
If a shaping rate is configured:
If the shaping rate is configured as an absolute bandwidth value, the configured value is used by the hardware.
If the shaping rate is configured as a percentage, then the percentage is used to calculate an absolute value used by the hardware, based on the guaranteed rate (CIR) configured at the logical interface or physical interface level. Although it seems odd to base a shaping rate (PIR) on the CIR instead of a PIR, this is done so the shaping rate can be derived on the same basis as the transmit rate.
If a shaping rate is not configured, then the default shaping rate is set to the shaping rate configured at the logical interface or physical interface level.
The excess rate is determined as follows:
If an excess rate is configured on a queue, the value is used to derive an excess weight used by the IQE PIC hardware. The excess weight determines the proportional share of the excess bandwidth for which each queue can contend. The excess rate can be:
Percentage in the range from 1 through 100. This value is scaled to a hardware excess weight. Excess rates can add up to more than 100% for all queues under a logical or physical interface.
If an excess rate is not configured on a queue, then the default excess rate is one of the following:
If a transmit rate is configured on any of the queues, then the excess weight is proportional to the transmit rates. Queues that do not have a transmit rate configured receive a minimum weight of 1.
If a transmit rate is not configured on any of the queues, but some queues have a shaping rate, then the excess weight is proportional to the shaping rates. Queues that do not have a shaping rate configured receive a minimum weight of 1.
If no parameters are configured on a queue, then the queue receives a minimum weight of 1.
Sample Calculations of Excess Bandwidth Sharing on IQE PICs
The following four examples show calculations for the PIR mode. In PIR mode, the transmit rate and shaping rate calculations are based on the shaping rate of the logical interface. All calculations assume that one logical interface (unit) is configured with a shaping rate (PIR) of 10 Mbps and a scheduler map with four queues.
The first example has only a shaping rate (PIR) configured on the queues, as shown in Table 9.
Queue |
Transmit Rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Traffic Sent To Queue |
---|---|---|---|---|
Q0 |
NA |
80% |
NA |
10 Mbps |
Q1 |
NA |
50% |
NA |
1 Mbps |
Q2 |
NA |
40% |
NA |
0 Mbps |
Q3 |
NA |
30% |
NA |
5 Mbps |
The way that the IQE PIC hardware interprets these parameters is shown in Table 10.
Queue |
Transmit Rate |
Shaping Rate |
Excess Weight |
Expected Output Rate |
---|---|---|---|---|
Q0 |
2.5 Mbps |
8.0 Mbps |
50 |
6 Mbps |
Q1 |
2.5 Mbps |
5.0 Mbps |
31 |
1 Mbps |
Q2 |
2.5 Mbps |
4.0 Mbps |
25 |
0 Mbps |
Q3 |
2.5 Mbps |
3.0 Mbps |
19 |
3 Mbps |
In this first example, all four queues are initially serviced round-robin. Because there are no transmit rates configured on any of the queues, they receive a default “remainder” transmit rate of 2.5 Mbps per queue. But because there are shaping rates configured, the excess weights are calculated based on the shaping rates. For the traffic sent to each queue, Queue 0 and Queue 3 get their transmit rates of 2.5 Mbps and Queue 1 gets 1 Mbps. The remaining 4 Mbps is excess bandwidth and is divided between Queue 0 and Queue 3 in the ratio of the shaping rates (80/30). So Queue 3 expects an excess bandwidth of 4 Mbps * (30% / (80% + 30%)) = 1.09 Mbps. However, because the shaping rate on Queue 3 is 3 Mbps, Queue 3 can transmit only 3 Mbps and Queue 0 receives the remaining excess bandwidth and can transmit at 6 Mbps.
Note that if there were equal transmit rates explicitly configured, such as 2.5 Mbps for each queue, the excess bandwidth would be split based on the transmit rate (equal in this case), as long as the result in below the shaping rate for the queue.
The second example has a shaping rate (PIR) and transmit rate (CIR) configured on the queues, as shown in Table 11.
Queue |
Transmit Rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Traffic Sent To Queue |
---|---|---|---|---|
Q0 |
50% |
80% |
NA |
10 Mbps |
Q1 |
40% |
50% |
NA |
5 Mbps |
Q2 |
10% |
20% |
NA |
5 Mbps |
Q3 |
NA |
5% |
NA |
1 Mbps |
The way that the IQE PIC hardware interprets these parameters is shown in Table 12.
Queue |
Transmit Rate |
Shaping Rate |
Excess Weight |
Expected Output Rate |
---|---|---|---|---|
Q0 |
5.0 Mbps |
8.0 Mbps |
63 |
5 Mbps |
Q1 |
4.0 Mbps |
5.0 Mbps |
50 |
4 Mbps |
Q2 |
1.0 Mbps |
2.0 Mbps |
12 |
1 Mbps |
Q3 |
0.0 Mbps |
0.5 Mbps |
1 |
0.0 Mbps |
In this second example, because the transmit rates are less than the shaping rates, each queue receives its transmit rate.
The third example also has a shaping rate (PIR) and transmit rate (CIR) configured on the queues, as shown in Table 13.
Queue |
Transmit Rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Traffic Sent To Queue |
---|---|---|---|---|
Q0 |
50% |
80% |
NA |
10 Mbps |
Q1 |
40% |
50% |
NA |
5 Mbps |
Q2 |
5% |
20% |
NA |
0 Mbps |
Q3 |
NA |
5% |
NA |
1 Mbps |
The way that the IQE PIC hardware interprets these parameters is shown in Table 14.
Queue |
Transmit Rate |
Shaping Rate |
Excess Weight |
Expected Output Rate |
---|---|---|---|---|
Q0 |
5.0 Mbps |
8.0 Mbps |
66 |
5.27 Mbps |
Q1 |
4.0 Mbps |
5.0 Mbps |
53 |
4.23 Mbps |
Q2 |
0.5 Mbps |
2.0 Mbps |
13 |
0.0 Mbps |
Q3 |
0.5 Mbps |
0.5 Mbps |
1 |
0.5 Mbps |
In this third example, all four queues are initially serviced round-robin. However, Queue 2 has no traffic sent to its queue. So Queue 0, Queue 1, and Queue 3 all get their respective transmit rates, a total of 9.5 Mbps. The remaining 0.5 Mbps is used by Queue 3, because the transmit rate is the same as the shaping rate. Once this traffic is sent, Queue 0 and Queue 1 share the excess bandwidth in the ratio of their transmit rates, which total 9 Mbps. In this case, Queue 0 = 5 Mbps + (0.5 Mbps * 5/9) = 5.27 Mbps. Queue 1 = 4 Mbps + (0.5 Mbps * 4/9) = 4.23 Mbps.
The fourth example has a shaping rate (PIR), transmit rate (CIR), and excess rate configured on the queues, as shown in Table 15.
Queue |
Transmit Rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Traffic Sent To Queue |
---|---|---|---|---|
Q0 |
30% |
80% |
50% |
10 Mbps |
Q1 |
25% |
50% |
10% |
5 Mbps |
Q2 |
10% |
20% |
30% |
0 Mbps |
Q3 |
5% |
5% |
NA |
1 Mbps |
The way that the IQE PIC hardware interprets these parameters is shown in Table 16.
Queue |
Transmit Rate |
Shaping Rate |
Excess Weight |
Expected Output Rate |
---|---|---|---|---|
Q0 |
3.0 Mbps |
8.0 Mbps |
70 |
6.33 Mbps |
Q1 |
2.5 Mbps |
5.0 Mbps |
14 |
3.17 Mbps |
Q2 |
1.0 Mbps |
2.0 Mbps |
42 |
0.0 Mbps |
Q3 |
0.5 Mbps |
0.5 Mbps |
1 |
0.5 Mbps |
In this fourth example, all four queues are initially serviced round-robin. Queue 3 gets 0.5 Mbps of guaranteed bandwidth but cannot transmit more because the shaping rate is the same. Queue 2 has no traffic to worry about at all. Queue 0 and Queue 1 get the respective transmit rates of 3.0 Mbps and 2.5 Mbps. The excess bandwidth of 4 Mbps is divided between Queue 0 and Queue 1 in the ratio on their excess rates. So Queue 1 gets 2.5 Mbps (the guaranteed rate) + 4 Mbps (the excess) + (10% / (50% + 10%)) = 3.17 Mbps. Queue 0 gets the rest, for a total of 6.33 Mbps.
You can configure only an excess rate on the queues, as shown in Table 17.
Queue |
Transmit Rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Traffic Sent To Queue |
---|---|---|---|---|
Q0 |
NA |
NA |
50% |
10 Mbps |
Q1 |
NA |
NA |
40% |
10 Mbps |
Q2 |
NA |
NA |
30% |
10 Mbps |
Q3 |
NA |
NA |
20% |
10 Mbps |
The way that the IQE PIC hardware interprets these excess rate parameters is shown in Table 18.
Queue |
Transmit Rate |
Shaping Rate |
Excess Weight |
Expected Output Rate |
---|---|---|---|---|
Q0 |
0 Mbps |
10.0 Mbps |
45 |
3.57 Mbps |
Q1 |
0 Mbps |
10.0 Mbps |
40 |
2.86 Mbps |
Q2 |
0 Mbps |
10.0 Mbps |
30 |
2.14 Mbps |
Q3 |
0 Mbps |
10.0 Mbps |
20 |
1.43 Mbps |
In this excess rate example, there are no transmit or shaping rates configured on any of the queues, only excess rates, so bandwidth division happens only on the basis of the excess rates. Note that all the transmit (guaranteed) rates are set to 0. Usually, when there are no excess rates configured, the queue transmit rate is calculated by default. But when there is an excess rate configured on any of the queues, the transmit rate is set to 0. The excess bandwidth (all bandwidths in this case) is shared in the ratio of the excess weights. So Queue 0 receives 10 Mbps * (50 / (50 + 40+ 30+ 20)) = 3.57 Mbps.
It is possible to configure rate limits that result in error conditions. For example, consider the configuration shown in Table 19.
Queue |
Transmit Rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Traffic Sent To Queue |
---|---|---|---|---|
Q0 |
NA |
80% |
NA |
10 Mbps |
Q1 |
NA |
50% |
NA |
5 Mbps |
Q2 |
NA |
20% |
NA |
5 Mbps |
Q3 |
NA |
5% |
NA |
1 Mbps |
The way that the IQE PIC hardware interprets these parameters is shown in Table 20.
Queue |
Transmit Rate |
Shaping Rate |
Excess Weight |
Expected Output Rate |
---|---|---|---|---|
Q0 |
2.5 Mbps |
8.0 Mbps |
818 |
4.03 Mbps |
Q1 |
2.5 Mbps |
5.0 Mbps |
511 |
3.47 Mbps |
Q2 |
2.5 Mbps |
2.0 Mbps |
255 |
2 Mbps |
Q3 |
2.5 Mbps |
0.5 Mbps |
51 |
0.1 Mbps |
In the error example, note that the shaping rates calculated on Queue 2 and Queue 3 are less than the transmit rates on those queues (2.0 Mbps and 0.5 Mbps are each less than 2.5 Mbps). This is an error condition and results in a syslog error message.
The following set of five examples involve the IQE PIC operating in CIR mode. In CIR mode, the transmit rate and shaping rate calculations are based on the transmit rate of the logical interface. All calculations assume that the logical interface has a shaping rate (PIR) of 20 Mbps and a transmit rate (CIR) of 10 Mbps. The scheduler map has four queues.
The first example has only a shaping rate (PIR) with no excess rate configured on the queues, as shown in Table 21.
Queue |
Transmit Rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Traffic Sent To Queue |
---|---|---|---|---|
Q0 |
NA |
80% |
NA |
10 Mbps |
Q1 |
NA |
70% |
NA |
10 Mbps |
Q2 |
NA |
40% |
NA |
10 Mbps |
Q3 |
NA |
30% |
NA |
10 Mbps |
The transmit rate (CIR) of 10 Mbps is configured on the logical interface (unit) not the queues in the scheduler map. This is why the queue transmit rates are labeled NA.
The way that the IQE PIC hardware interprets these parameters is shown in Table 22.
Queue |
Transmit Rate |
Shaping Rate |
Excess Weight |
Expected Output Rate |
---|---|---|---|---|
Q0 |
2.5 Mbps |
8.0 Mbps |
50 |
6.76 Mbps |
Q1 |
2.5 Mbps |
7.0 Mbps |
31 |
6.23 Mbps |
Q2 |
2.5 Mbps |
4.0 Mbps |
25 |
4.0 Mbps |
Q3 |
2.5 Mbps |
3.0 Mbps |
19 |
3.0 Mbps |
In this first example, all four queues split the 10-Mbps transmit rate equally and each get a transmit rate of 2.5 Mbps. However, the shaping rate on the interface is 20 Mbps. The 10-Mbps excess bandwidth is divided among the queues in the ratio of their shaping rates. But Queue 2 and Queue 3 are shaped at 3.0 and 4.0 Mbps, respectively, so they cannot use more bandwidth and get those rates. This accounts for 2 Mbps (the 7 Mbps shaped bandwidth minus the 5 Mbps guaranteed bandwidth for Queue 2 and Queue 3) of the 10-Mbps excess, leaving 8 Mbps for Queue 0 and Queue 1. So Queue 0 and Queue 1 share the 8-Mbps excess bandwidth in the ratio of their shaping rates, which total 15 Mbps. In this case, Queue 0 = 8.0 Mbps * 8/15 = 4.26 Mbps, for a total of 2.5 Mbps + 4.26 Mbps = 6.76 Mbps. Queue 1 = 8.0 Mbps * 7/15 = 3.73 Mbps, for a total of 2.5 Mbps + 3.73 Mbps = 6.23 Mbps.
The second example has only a few shaping rates (PIR) with no excess rate configured on the queues, as shown in Table 23.
Queue |
Transmit Rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Traffic Sent To Queue |
---|---|---|---|---|
Q0 |
NA |
80% |
NA |
10 Mbps |
Q1 |
NA |
50% |
NA |
5 Mbps |
Q2 |
NA |
NA |
NA |
10 Mbps |
Q3 |
NA |
NA |
NA |
1 Mbps |
If a configuration results in the calculated transmit rate of the queue exceeding the shaping rate of the queue, an error message is generated. For example, setting the shaping rate on Queue 2 and Queue 3 in the above example to 20 percent and 5 percent, respectively, generates an error message because the calculated transmit rate for these queues (2.5 Mbps) is more than their calculated shaping rates (2.0 Mbps and 0.5 Mbps).
The way that the IQE PIC hardware interprets these parameters is shown in Table 24.
Queue |
Transmit Rate |
Shaping Rate |
Excess Weight |
Expected Output Rate |
---|---|---|---|---|
Q0 |
2.5 Mbps |
8.0 Mbps |
78 |
8.0 Mbps |
Q1 |
2.5 Mbps |
5.0 Mbps |
48 |
5.0 Mbps |
Q2 |
2.5 Mbps |
20 Mbps |
1 |
6.0 Mbps |
Q3 |
2.5 Mbps |
20 Mbps |
1 |
1.0 Mbps |
In this second example, all four queues split the 10-Mbps transmit rate equally and each get a transmit rate of 2.5 Mbps. Because of their configured queue shaping rates, Queue 0 and Queue 1 receive preference over Queue 2 and Queue 3 for the excess bandwidth. Queue 0 (8.0 Mbps) and Queue 1 (5.0 Mbps) account for 13 Mbps of the 20 Mbps shaping rate on the logical interface. The remaining 7 Mbps is divided equally between Queue 2 and Queue 3. However, because Queue 3 only has 1 Mbps to send, Queue 2 uses the remaining 6 Mbps.
The third example has shaping rates (PIR) and transmit rates with no excess rate configured on the queues, as shown in Table 25.
Queue |
Transmit Rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Traffic Sent To Queue |
---|---|---|---|---|
Q0 |
50% |
80% |
NA |
10 Mbps |
Q1 |
40% |
50% |
NA |
5 Mbps |
Q2 |
10% |
20% |
NA |
5 Mbps |
Q3 |
NA |
10% |
NA |
1 Mbps |
The way that the IQE PIC hardware interprets these parameters is shown in Table 26.
Queue |
Transmit Rate |
Shaping Rate |
Excess Weight |
Expected Output Rate |
---|---|---|---|---|
Q0 |
5.0 Mbps |
8.0 Mbps |
63 |
8.0 Mbps |
Q1 |
4.0 Mbps |
5.0 Mbps |
50 |
5.0 Mbps |
Q2 |
1.0 Mbps |
2.0 Mbps |
12 |
2.0 Mbps |
Q3 |
0.0 Mbps |
0.5 Mbps |
1 |
0.5 Mbps |
In this third example, the first three queues get their configured transmit rates and are serviced in round-robin fashion. This adds up to 10 Mbps, leaving a 10-Mpbs excess from the logical interface shaping rate of 20 Mbps. The excess is shared in the ratio of the transmit rates, or 5:4:1:0. Therefore, Queue 0 receives 5 Mbps + (5 * 10/10) = 10 Mbps. This value is greater than the 8 Mbps shaping rate on Queue 0, so Queue 0 is limited to 8 Mbps. Queue 1 receives 4 Mbps + (4 * 10/10) = 8 Mbps. This value is greater than the 5 Mbps shaping rate on Queue 1, so Queue 1 is limited to 5 Mbps. Queue 2 receives 1 Mbps + (1 * 10/10) = 2 Mbps. This value is equal to the 2 Mbps shaping rate on Queue 2, so Queue 2 receives 2 Mbps. This still leaves 5 Mbps excess bandwidth, which can be used by Queue 3. Note that in this example bandwidth usage never reaches the shaping rate configured on the logical interface (20 Mbps).
The fourth example has shaping rates (PIR) and transmit rates with no excess rate configured on the queues. However, in this case the sum of the shaping rate percentages configured on the queues multiplied by the transmit rate configured on the logical interface is greater than the shaping rate configured on the logical interface. The configuration is shown in Table 27.
Queue |
Transmit Rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Traffic Sent To Queue |
---|---|---|---|---|
Q0 |
50% |
80% |
NA |
10 Mbps |
Q1 |
40% |
70% |
NA |
10 Mbps |
Q2 |
10% |
50% |
NA |
10 Mbps |
Q3 |
NA |
50% |
NA |
10 Mbps |
The way that the IQE PIC hardware interprets these parameters is shown in Table 28.
Queue |
Transmit Rate |
Shaping Rate |
Excess Weight |
Expected Output Rate |
---|---|---|---|---|
Q0 |
5.0 Mbps |
8.0 Mbps |
63 |
8.0 Mbps |
Q1 |
4.0 Mbps |
7.0 Mbps |
50 |
7.0 Mbps |
Q2 |
1.0 Mbps |
5.0 Mbps |
12 |
5.0 Mbps |
Q3 |
0.0 Mbps |
5.0 Mbps |
1 |
0.0 Mbps |
In this fourth example, the first three queues get their configured transmit rates and are serviced in round-robin fashion. This adds up to 10 Mbps, leaving a 10-Mpbs excess from the logical interface shaping rate of 20 Mbps. The excess is shared in the ratio of the transmit rates, or 5:4:1:0. Therefore, Queue 0 receives 5 Mbps + (5 * 10/10) = 10 Mbps. This value is greater than the 8 Mbps shaping rate on Queue 0, so Queue 0 is limited to 8 Mbps. Queue 1 receives 4 Mbps + (4 * 10/10) = 8 Mbps. This value is greater than the 7 Mbps shaping rate on Queue 1, so Queue 1 is limited to 7 Mbps. Queue 2 receives 1 Mbps + (1 * 10/10) = 2 Mbps. This value is less than the 5 Mbps shaping rate on Queue 2, so Queue 2 receives 2 Mbps. This still leaves 3 Mbps excess bandwidth, which can be used by Queue 2 (below its shaping rate) and Queue 3 (also below its shaping rate) in the ratio 1:0 (because of the transmit rate configuration). But 1:0 means Queue 3 cannot use this bandwidth, and Queue 2 utilizes 2 Mbps + ( 3 Mbps * 1/1) = 5 Mbps. This is equal to the shaping rate of 5 Mbps, so Queue 2 receives 5 Mbps.
The fifth example has excess rates and transmit rates, but no shaping rates (PIR) configured on the queues. The configuration is shown in Table 29.
Queue |
Transmit Rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Traffic Sent To Queue |
---|---|---|---|---|
Q0 |
30% |
NA |
50% |
10 Mbps |
Q1 |
25% |
NA |
10% |
10 Mbps |
Q2 |
NA |
NA |
30% |
10 Mbps |
Q3 |
10% |
NA |
NA |
10 Mbps |
The way that the IQE PIC hardware interprets these parameters is shown in Table 30.
Queue |
Transmit Rate |
Shaping Rate |
Excess Weight |
Expected Output Rate |
---|---|---|---|---|
Q0 |
3.0 Mbps |
20 Mbps |
70 |
10.5 Mbps |
Q1 |
2.5 Mbps |
20 Mbps |
14 |
4.0 Mbps |
Q2 |
0.0 Mbps |
20 Mbps |
42 |
4.5 Mbps |
Q3 |
1.0 Mbps |
20 Mbps |
1 |
1.0 Mbps |
In this fifth example, Queue 2 does not have a transmit rate configured. If there were no excess rates configured, then Queue 2 would get a transmit rate equal to the remainder of the bandwidth (3.5 Mbps in this case). However, because there is an excess rate configured on some of the queues on this logical interface, the transmit rate for Queue 2 is set to 0 Mbps. The others queues get their transmit rates and there leaves 13.5 Mbps of excess bandwidth. This bandwidth is divided among Queue 0, Queue 1, and Queue 3 in the ratio of their excess rates. So Queue 0, for example, gets 3.0 Mbps + 13.5 Mbps * (50 / (50 + 10 + 30)) = 10.5 Mbps.
Four other examples calculating expected traffic distribution are of interest. The first case has three variations, so there are six more examples in all.
Oversubscribed PIR mode at the logical interface with transmit rates, shaping rates, and excess rates configured at the queues (this example has three variations).
CIR mode at the logical interface (a non-intuitive case is used).
Excess priority configured.
Default excess priority used.
The first three examples all concern oversubscribed PIR mode at the logical interface with transmit rates, shaping rates, and excess rates configured at the queues. They all use a configuration with a physical interface having a shaping rate of 40 Mbps. The physical interface has two logical units configured, logical unit 1 and logical unit 2, with a shaping rate of 30 Mbps and 20 Mbps, respectively. Because the sum of the logical interface shaping rates is more than the shaping rate on the physical interface, the physical interface is in oversubscribed PIR mode. The CIRs (transmit rates) are set to the scaled values of 24 Mbps and 16 Mbps, respectively.
Assume that logical unit 1 has 40 Mbps of traffic to be sent. The traffic is capped at 30 Mbps because of the shaping rate of 30 Mbps. Because the CIR is scaled down to 24 Mbps, the remaining 6 Mbps (30 Mbps – 24 Mbps) qualifies as excess bandwidth.
The following three examples consider different parameters configured in a scheduler map and the expected traffic distributions that result.
The first example uses oversubscribed PIR mode with only transmit rates configured on the queues. The configuration is shown in Table 31.
Queue |
Transmit Rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Traffic Sent To Queue |
---|---|---|---|---|
Q0 |
40% |
NA |
NA |
15 Mbps |
Q1 |
30% |
NA |
NA |
10 Mbps |
Q2 |
25% |
NA |
NA |
10 Mbps |
Q3 |
5% |
NA |
NA |
5 Mbps |
The way that the IQE PIC hardware interprets these parameters is shown in Table 32.
Queue |
Transmit Rate |
Shaping Rate |
Excess Weight |
Expected Output Rate |
---|---|---|---|---|
Q0 |
9.6 Mbps |
30 Mbps |
50 |
12 Mbps |
Q1 |
7.2 Mbps |
30 Mbps |
38 |
9 Mbps |
Q2 |
6.0 Mbps |
30 Mbps |
31 |
7.5 Mbps |
Q3 |
1.2 Mbps |
30 Mbps |
6 |
1.5 Mbps |
The first example has hardware queue transmit rates based on the parent (logical interface unit 1) transmit rate (CIR) value of 24 Mbps. Because there are no excess rates configured, the excess weights are determined by the transmit rates. Therefore, both the logical interface CIR and excess bandwidth are divided in the ratio of the transmit rates. This is essentially the same as the undersubscribed PIR mode and the traffic distribution should be the same. The only difference is that the result is achieved as a combination of guaranteed rate (CIR) and excess rate sharing.
The second example also uses oversubscribed PIR mode, but this time with only excess rate configured on the queues. In other words, the same ratios are established with excess rate percentages instead of transmit rate percentages. In this case, when excess rates are configured, queues without a specific transmit rate are set to 0 Mbps. So the entire bandwidth qualifies as excess at the queue level and the bandwidth distribution is based on the configured excess rates. The expected output rate results are exactly the same as in the first example, except the calculation is based on different parameters.
The third example also uses oversubscribed PIR mode, but with both transmit rates and excess rates configured on the queues. The configuration is shown in Table 33.
Queue |
Transmit Rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Traffic Sent To Queue |
---|---|---|---|---|
Q0 |
40% |
NA |
50% |
15 Mbps |
Q1 |
30% |
NA |
50% |
12 Mbps |
Q2 |
25% |
NA |
NA |
8 Mbps |
Q3 |
5% |
NA |
NA |
5 Mbps |
The way that the IQE PIC hardware interprets these parameters is shown in Table 34.
Queue |
Transmit Rate |
Shaping Rate |
Excess Weight |
Expected Output Rate |
---|---|---|---|---|
Q0 |
9.6 Mbps |
30 Mbps |
63 |
12.6 Mbps |
Q1 |
7.2 Mbps |
30 Mbps |
63 |
10.2 Mbps |
Q2 |
6.0 Mbps |
30 Mbps |
1 |
6.0 Mbps |
Q3 |
1.2 Mbps |
30 Mbps |
1 |
1.2 Mbps |
The third example has the configured queue transmit rate (CIR) divided according to the ratio of the transmit rates based on the logical interface unit 1 CIR of 25 Mbps. The rest of the excess bandwidth divided according the ratio of the excess rates. The excess 6-Mbps bandwidth is divided equally between Queue 0 and Queue 1 because the excess rates are both configured at 50%. This type of configuration is not recommended, however, because the CIR on the logical interface is a system-derived value based on the PIRs of the other logical units and the traffic distribution at the queue level is based on this value and, therefore, not under direct user control. We recommend that you either configure excess rates without transmit rates at the queue level when in PIR mode, or also define a CIR at the logical interface if you want to configure a combination of transmit rates and excess rates at the queue level. That is, you should use configurations of the CIR mode with excess rates types.
The fourth example uses CIR mode at the logical interface. For this example, assume that a physical interface is configured with a 40-Mbps shaping rate and logical interfaces unit 1 and unit 2. Logical interface unit 1 has a PIR of 30 Mbps and logical interface unit 2 has a PIR of 20 Mbps and a CIR of 10 Mbps. The configuration at the queue level of logical interface unit 1 is shown in Table 35.
Queue |
Transmit Rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Traffic Sent To Queue |
---|---|---|---|---|
Q0 |
40% |
NA |
50% |
15 Mbps |
Q1 |
30% |
NA |
50% |
12 Mbps |
Q2 |
25% |
NA |
NA |
8 Mbps |
Q3 |
5% |
NA |
NA |
5 Mbps |
The way that the IQE PIC hardware interprets these parameters is shown in Table 36.
Queue |
Transmit Rate |
Shaping Rate |
Excess Weight |
Expected Output Rate |
---|---|---|---|---|
Q0 |
0 Mbps |
30 Mbps |
63 |
15 Mbps |
Q1 |
0 Mbps |
30 Mbps |
63 |
12 Mbps |
Q2 |
0 Mbps |
30 Mbps |
1 |
1.5 Mbps |
Q3 |
0 Mbps |
30 Mbps |
1 |
1.5 Mbps |
The fourth example might be expected to divide the 40 Mbps of traffic between the two logical units in the ratio of the configured transmit rates. But note that because the logical interfaces are in CIR mode, and logical interface unit 1 does not have a CIR configured, the hardware CIR is set to 0 Mbps at the queue level. Bandwidth distribution happens based only on the excess weights. So Queue 0 and Queue 1 get to transmit up to 15 Mbps and 12 Mbps, respectively, while the remaining 3 Mbps is divided equally by Queue 2 and Queue 3.
We recommend configuring a CIR value explicitly for the logical interface if you are configuring transmit rates and excess rates for the queues.
The fifth example associates an excess priority with the queues. Priorities are associated with every queue and propagated to the parent node (logical or physical interface). That is, when the scheduler picks a logical interface, the scheduler considers the logical interface priority as the priority of the highest priority queue under that logical interface. On the IQE PIC, you can configure an excess priority for every queue. The excess priority can differ from the priority used for guaranteed traffic and applies only to traffic in the excess region. The IQE PIC has three “regular” priorities and two excess priorities (high and low, which is the default). The excess priorities are lower than the regular priorities. For more information about configuring excess bandwidth sharing and priorities, see Configuring Excess Bandwidth Sharing on IQE PICs.
Consider a logical interface configured with a shaping rate of 10 Mbps and a guaranteed rate of 10 Mbps. At the queue level, parameters are configured as shown in Table 37.
Queue |
Transmit Rate (CIR) |
Shaping Rate (PIR) |
Excess Rate |
Traffic Sent To Queue |
---|---|---|---|---|
Q0 |
40% |
NA |
50% |
10 Mbps |
Q1 |
30% |
NA |
50% |
10 Mbps |
Q2 |
25% |
NA |
NA |
0 Mbps |
Q3 |
5% |
NA |
NA |
1 Mbps |
In this fifth example, Queue 0 is configured with an excess
priority of high
and all other queues have the default
excess priority (low
). Because there is no traffic on Queue 2,
there is an excess bandwidth of 2.5 Mbps. Because Queue 0
has a higher excess priority, Queue 0 gets the entire excess
bandwidth. So the expected output rates on the queues are 4 Mbps+
2.5 Mbps= 6.5 Mbps for Queue 0, 3 Mbps for Queue 1,
0 Mbps for Queue 2, and 0.5 Mbps for Queue 3.
Note that this behavior is different than regular priorities. With
regular priorities, the transmission is still governed by transmit
rates and the priority controls only the order in which the packets
are picked up by the scheduler. So without excess configuration, if
Queue 0 had a regular priority of high
and there was
10 Mbps of traffic on all four queues, the traffic distribution
would be 4 Mbps for Queue 0, 3 Mbps for Queue 1,
2.5 Mbps for Queue 2, and 0.5 Mbps for Queue 3
instead of giving all 10 Mbps to Queue 0. Excess priority
traffic distributions are governed first by the excess priority and
then by the excess rates. Also note that in this example, although
the queues are in the excess region because they are transmitting
above their configured transmit rates, the logical interface is still
within its guaranteed rate. So at the logical interface level, the
priority of the queues get promoted to a regular priority and this
priority is used by the scheduler at the logical interface level.
The sixth and final example considers the effects of the default
excess priority. When the excess priority for a queue is not configured
explicitly, the excess priority is based on the regular priority.
A regular priority of high
maps to an excess priority of high
. All other regular priorities map to an excess priority
of low
. When there is no regular priority configured, the
regular and excess priorities are both set to low
.