This article explains the behavior of guaranteed rate (GR) when per-unit scheduler and hierarchical class of service (HCoS) are configured in MX Series routers.
In HCoS scenario, if transmit rate is configured in percentage and no guaranteed rate (GR) is configured, then the guaranteed rate value will be zero under the CoS halp output for the particular IFL. This is called a PIR-only scenario when no GR is configured.
user@MX# show interfaces xe-0/1/4 per-unit-scheduler; user@MX# run show interfaces queue xe-0/1/2.101 forwarding-class Premium Logical interface xe-0/1/2.101 (Index 18431) (SNMP ifIndex 19767) Forwarding classes: 16 supported, 8 in use SMPC0(mx vty)# sh cos halp ifl 18431 IFL type: Basic -------------------------------------------------------------------------------- IFL name: (xe-0/1/2.101, xe-0/1/2) (Index 18431, IFD Index 192) egress information XQSS chip id: 0 XQSS chip Scheduler: 0 XQSS chip L2 index: -1 XQSS chip L3 index: -1 XQSS chip L4 index: 1134 XQSS chip base Q index: 9072 Number of queues: 8 Queue State Max Guaranteed Burst Weight Priorities Drop-Rules Scaling-profile Index rate rate size G E Wred Tail ID ------ ----------- ----------- ------------ ------- ------ ---------- ---------- ---------------- 9072 Configured 200000000 0 4194304 1 GL EL 0 278 3 9073 Configured 200000000 0 4194304 25 GL EL 4 835 3 9074 Configured 200000000 0 4194304 30 GL EL 5 848 3 9075 Configured 200000000 0 4194304 20 GL EL 6 797 3 9076 Configured 200000000 0 4194304 1 GL EL 0 278 3 9077 Configured 200000000 0 4194304 5 GL EL 3 638 3 9078 Configured 200000000 0 4194304 1 GL EL 0 278 3 9079 Configured 200000000 0 4194304 10 GH EH 3 0 1 Rate limit info: Q 7: Bandwidth = 20000000, Burst size = 147456. Policer NH: 0x3033f9648a7a0800 Index NH: 0xda4bb2ff84400806
In the per-unit-scheduler, GR will be allocated for all IFLs based on the shaping rate when GR is not configured, or based on the remaining bandwidth if shaping rate is not configured, as long as the requirement does not exceed the port (IFD) bandwidth (undersubscribed). If the requirement exceeds the port bandwidth (oversubscribed), then GR will become 0.
For example, we have a 10 Gig interface with 50 IFLs configured and the shaping rate is 200m. This gives 50x200m-10G and GR will be applied for all IFLs appropriately.
With the same number of IFLs and shaping rate of 500m, the total will come to 25 GB and GR is not applied as we saw with 200m shaping rate. Therefore, based on this test, it can be said that if we want GR to be applied to all IFLs, then we need to configure the same explicitly with the guaranteed-rate knob.
guaranteed-rate
The following example demonstrates this behavior:
We have a 10 Gig interface that is configured with per-unit-scheduler and 50 IFLs.
user@MX# show interfaces xe-0/1/5 per-unit-scheduler; user@MX# show interfaces xe-0/1/5 | match unit | count Count: 50 lines user@MX# show class-of-service interfaces xe-0/1/5 unit xxx { output-traffic-control-profile Queuing-test-200M-tcp-Testing;
With a shaping rate of 200, we can see the guaranteed rate, as shown below:
user@MX# show class-of-service traffic-control-profiles Queuing-test-200M-tcp-Testing { scheduler-map Queuing-test-200M-tcp-Testing; shaping-rate 200m; } SMPC0(mx vty)# sh cos halp ifl 18642 IFL type: Basic ifl 18642 ifd 169 stripped-ifd 169 -------------------------------------------------------------------------------- IFL name: (xe-0/1/5.101, xe-0/1/5) (Index 18642, IFD Index 169) egress information XQSS chip id: 0 XQSS chip Scheduler: 0 XQSS chip L2 index: -1 XQSS chip L3 index: -1 XQSS chip L4 index: 1896 XQSS chip base Q index: 15168 Number of queues: 8 Queue State Max Guaranteed Burst Weight Priorities Drop-Rules Scaling-profile Index rate rate size G E Wred Tail ID ------ ----------- ----------- ------------ ------- ------ ---------- ---------- ---------------- 15168 Configured 200000000 0 4194304 1 GL EL 0 278 3 15169 Configured 200000000 30000000 4194304 15 GL EL 4 835 3 15170 Configured 200000000 20000000 4194304 10 GL EL 5 848 3 15171 Configured 200000000 40000000 4194304 20 GL EL 6 797 3 15172 Configured 200000000 0 4194304 1 GL EL 0 278 3 15173 Configured 200000000 10000000 4194304 5 GL EL 3 638 3 15174 Configured 200000000 0 4194304 1 GL EL 0 278 3
With a shaping rate of 500, we do not see a guaranteed rate because it is oversubscribed now, as shown below.
user@MX# show class-of-service traffic-control-profiles Queuing-test-200M-tcp-Testing { scheduler-map Queuing-test-200M-tcp-Testing; shaping-rate 500m; } user@MX# sh cos halp ifl 18642 IFL type: Basic ifl 18642 ifd 169 stripped-ifd 169 -------------------------------------------------------------------------------- IFL name: (xe-0/1/5.101, xe-0/1/5) (Index 18642, IFD Index 169) egress information XQSS chip id: 0 XQSS chip Scheduler: 0 XQSS chip L2 index: -1 XQSS chip L3 index: -1 XQSS chip L4 index: 1068 XQSS chip base Q index: 8544 Number of queues: 8 Queue State Max Guaranteed Burst Weight Priorities Drop-Rules Scaling-profile Index rate rate size G E Wred Tail ID ------ ----------- ----------- ------------ ------- ------ ---------- ---------- ---------------- 8544 Configured 500000000 0 8388608 1 GL EL 0 278 3 8545 Configured 500000000 0 8388608 15 GL EL 4 835 3 8546 Configured 500000000 0 8388608 10 GL EL 5 848 3 8547 Configured 500000000 0 8388608 20 GL EL 6 797 3 8548 Configured 500000000 0 8388608 1 GL EL 0 278 3 8549 Configured 500000000 0 8388608 5 GL EL 3 638 3 8550 Configured 500000000 0 8388608 1 GL EL 0 278 3
In PIR mode as well, as long as traffic is in profile (that is it does not exceed the transmit rate), traffic will be in the guaranteed region; when it goes out of profile, traffic is demoted to the excess region.
It is recommended to configure the guaranteed-rate knob under traffic-control-profiles to ensure GR is applied to all IFLs consistently.
traffic-control-profiles
set class-of-service traffic-control-profiles profile-name guaranteed-rate <value >