Search our Knowledge Base sites to find answers to your questions.
Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles[MX] Example: Queue-depth calculation on Next-Generation-XQ-based cards
This article illustrates how queue-depth is calculated on Next Generation XQ (Enhanced Queuing] based cards, and how shaping-rate (PIR), guaranteed-rate (CIR) and delay-buffer-rate in TCP (traffic-control-profile) influence the calculation of queue-depth on these cards.
For queue-depth calculation on QX-based cards, refer to KB34882 - [MX] Example: Queue-depth calculation on QX-based cards.
In order to implement the buffer-size (queue-length) feature, every queue points to a tail-drop rule in both the XQ and QX cards. A tail-drop rule provides information about the maximum allowed queue size (per region/per color). And color corresponds to a drop loss priority (configured under forwarding classes).
NGMPC3(jtac-mx480-r2046 vty)# show xqchip 0 drop tail-drop-rule rule 9 Tail drop rule configuration : 9 ref_count : 0 region color threshold_bytes tail-ram-addr mantissa shift ------ ----- --------------- ------------- -------- ----- 0 0 4736 1152 148 5 0 1 4736 1184 148 5 0 2 4736 1216 148 5 0 3 4736 1248 148 5 1 0 4736 1156 148 5 1 1 4736 1188 148 5 1 2 4736 1220 148 5 1 3 4736 1252 148 5 2 0 4736 1160 148 5
A fixed number of tail rules exist in these cards, as shown below, and as per design, if the calculated scheduler (queue) buffer size value is between two tail-drop rules, then the queue will point to a tail-drop rule with a higher value.
NGMPC3(jtac-mx480-r2046 vty)# show xqchip 0 drop info Tail drop rule configuration: ---------------------------- Rule Map: 1 rules 1024 regions 8 colors 4 Number of rules: allocated 799 free 225
Example: TCP configured with only shaping-rate
set class-of-service traffic-control-profiles TCP-TEST-WOGR scheduler-map SCHEDULER-8115K
set class-of-service traffic-control-profiles TCP-TEST-WOGR shaping-rate 8115000
set class-of-service interfaces xe-3/2/0 unit 100 output-traffic-control-profile TCP-TEST-WOGR
In this example, FPC 3 is MPC3E NG HQoS, which is an XQ-based card.
labroot@jtac-mx480-r2046# run show interfaces queue xe-3/2/0.100
Logical interface xe-3/2/0.100 (Index 350) (SNMP ifIndex 641)
Forwarding classes: 16 supported, 5 in use
Egress queues: 8 supported, 5 in use
Burst size: 0
Queue: 0, Forwarding classes: best-effort
Queue-depth bytes :
Average : 0
Current : 0
Peak : 0
Maximum : 128000
Queue: 1, Forwarding classes: VoIP
Queue-depth bytes :
Average : 0
Current : 0
Peak : 0
Maximum : 33280
Queue: 2, Forwarding classes: MC
Queue-depth bytes :
Average : 0
Current : 0
Peak : 0
Maximum : 358400
Queue: 3, Forwarding classes: network-control
Queue-depth bytes :
Average : 0
Current : 0
Peak : 0
Maximum : 26112
Queue: 4, Forwarding classes: AF
Queue-depth bytes :
Average : 0
Current : 0
Peak : 0
Maximum : 33280
labroot@jtac-mx480-r2046# run show class-of-service interface xe-3/2/0.100 comprehensive
Logical interface: xe-3/2/0.100, Index: 350
Object Name Type Index
Traffic-control-profile TCP-TEST-WOGR Output 18612
Traffic control profile: TCP-TEST-WOGR, Index: 18612
Shaping rate: 8115000
Scheduler map: SCHEDULER-8115K
Scheduler: MC-8115K, Forwarding class: MC, Index: 55563
Transmit rate: 70 percent, Rate Limit: none, Buffer size: 70 percent, Buffer Limit: none, Priority: low
Scheduler: NC-8115K, Forwarding class: network-control, Index: 55571
Transmit rate: 2 percent, Rate Limit: none, Buffer size: 5 percent, Buffer Limit: none, Priority: low
Note: By default, all Trio MPCs allocate 100 milliseconds of buffer per port for 1Gbps and higher rates. For rates less than 1 Gbps, all Trio MPCs allocate 500 milliseconds of delay buffer. Delay-buffer-rate (DBR) is applied through a traffic-control-profile (TCP) and buffer allocation through DBR depends on the mode (CIR or PIR) in which the IFD is configured. If DBR is not explicitly configured, then DBR uses the committed information rate (CIR) for calculation and if CIR is not configured, it takes the peak information rate (PIR) into consideration. DBR can also be oversubscribed for an interface.
In this example, no CIR and DBR have been configured under TCP, so PIR will be used to calculate the buffer-size (queue-depth).
Buffer-Size in bytes = Shaping-rate in bps * minimum burst size in ms * buffer size in percent/8000
NGMPC3(jtac-mx480-r2046 vty)# show cos halp ifl 350 IFL type: Basic ifl 350 ifd 239 stripped-ifd 239 -------------------------------------------------------------------------------- IFL name: (xe-3/2/0.100, xe-3/2/0) (Index 350, IFD Index 239) egress information XQ chip id: 0 XQ chip Scheduler: 0 XQ chip L2 index: -1 XQ chip L3 index: 28 XQ chip L4 index: 28 XQ chip base Q index: 224 Number of queues: 8 Queue State Max Guaranteed Burst Weight Priorities Drop-Rules Scaling-profile Index rate rate size G E Wred Tail ID ------ ----------- ----------- ------------ ------- ------ ---------- ---------- ---------------- 224 Configured 8115000 0 131072 28 GL EL 4 116 3 225 Configured 8115000 0 131072 1 GL EL 0 72 3 226 Configured 8115000 0 131072 70 GL EL 4 169 3 227 Configured 8115000 0 131072 2 GL EL 4 65 3 228 Configured 8115000 0 131072 1 GL EL 0 72 3 229 Configured 8115000 0 131072 1 GL EL 0 72 3 230 Configured 8115000 0 131072 1 GL EL 0 72 3 231 Configured 8115000 0 131072 1 GL EL 0 72 3
For Queue 0 Best-Effort
set class-of-service schedulers BE-8115K transmit-rate percent 28 set class-of-service schedulers BE-8115K buffer-size percent 25 set class-of-service schedulers BE-8115K priority low 8115000*500ms*25%/8000=126796.8 bytes
In this case, the calculated buffer-size is in between tail-drop-rule 115 and 116, as shown below, and therefore, the queue will point to a tail-drop rule with a higher value, which 128000 bytes here.
NGMPC3(jtac-mx480-r2046 vty)# show xqchip 0 drop tail-drop-rule rule 115 Tail drop rule configuration : 115 ref_count : 0 region color threshold_bytes tail-ram-addr mantissa shift ------ ----- --------------- ------------- -------- ----- 0 0 124416 14720 243 9 NGMPC3(jtac-mx480-r2046 vty)# show xqchip 0 drop tail-drop-rule rule 116 Tail drop rule configuration : 116 ref_count : 1 region color threshold_bytes tail-ram-addr mantissa shift ------ ----- --------------- ------------- -------- ----- 0 0 128000 14848 250 9
For Queue 1 VOIP
If queue is not configured under the scheduler, then the queue will use 33280 bytes (hard-coded) as the buffer-size value.
For Queue 2 MC
set class-of-service schedulers MC-8115K transmit-rate percent 70 set class-of-service schedulers MC-8115K buffer-size percent 70 set class-of-service schedulers MC-8115K priority low 8115000*500ms*70%/8000=355031 bytes
In this case, the calculated buffer-size is in between tail-drop-rule 168 and 169, as shown below, and therefore, the queue will point to a tail-drop rule with a higher value, which is 358400 bytes here.
NGMPC3(jtac-mx480-r2046 vty)# show xqchip 0 drop tail-drop-rule rule 168 Tail drop rule configuration : 168 ref_count : 0 region color threshold_bytes tail-ram-addr mantissa shift ------ ----- --------------- ------------- -------- ----- 0 0 350208 21504 171 11 NGMPC3(jtac-mx480-r2046 vty)# show xqchip 0 drop tail-drop-rule rule 169 Tail drop rule configuration : 169 ref_count : 1 region color threshold_bytes tail-ram-addr mantissa shift ------ ----- --------------- ------------- -------- ----- 0 0 358400 21632 175 11
For Queue 2 Network Control
set class-of-service schedulers NC-8115K transmit-rate percent 2 set class-of-service schedulers NC-8115K buffer-size percent 5 set class-of-service schedulers NC-8115K priority low 8115000*500ms*5%/8000=25359 bytes
In this case, the calculated buffer-size is in between tail-drop-rule 64 and 64, and therefore, the queue will point to a tail-drop rule with a higher value, which is 26112 bytes here.
NGMPC3(jtac-mx480-r2046 vty)# show xqchip 0 drop tail-drop-rule rule 64 Tail drop rule configuration : 64 ref_count : 0 region color threshold_bytes tail-ram-addr mantissa shift ------ ----- --------------- ------------- -------- ----- 0 0 25088 8192 196 7 NGMPC3(jtac-mx480-r2046 vty)# show xqchip 0 drop tail-drop-rule rule 65 Tail drop rule configuration : 65 ref_count : 1 region color threshold_bytes tail-ram-addr mantissa shift ------ ----- --------------- ------------- -------- ----- 0 0 26112 8320 204 7
For Queue 3 AF
If queue is not configured under the scheduler, then the queue will use 33280 bytes (hard-coded) as the buffer-size value.
Example: TCP configured with shaping-rate and guaranteed-rate
set class-of-service traffic-control-profiles TCP-TEST-GR scheduler-map SCHEDULER-8115K set class-of-service traffic-control-profiles TCP-TEST-GR shaping-rate 8115000 set class-of-service traffic-control-profiles TCP-TEST-GR guaranteed-rate 100k set class-of-service interfaces xe-3/2/0 unit 100 output-traffic-control-profile TCP-TEST-GR
In this example, CIR and PIR are configured under the TCP so CIR will be used to calculate buffer-size (queue-depth).
Note: When using XQ, buffer-size 1568 bytes is not enough to handle traffic when sending packets larger than 784 bytes (1568/2). On XQ, buffer-size should be configured to a value at least 2x MTU.
Buffer-size in bytes = guaranteed-rate in bps * minimum burst size in ms * buffer size in percent/8000
labroot@jtac-mx480-r2046# run show interfaces queue xe-3/2/0.100 Logical interface xe-3/2/0.100 (Index 350) (SNMP ifIndex 641) Forwarding classes: 16 supported, 5 in use Egress queues: 8 supported, 5 in use Burst size: 0 Queue: 0, Forwarding classes: best-effort Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 1568 Queue: 1, Forwarding classes: VoIP Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 33280 Queue: 2, Forwarding classes: MC Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 4480 Queue: 3, Forwarding classes: network-control Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 1568 Queue: 4, Forwarding classes: AF Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 33280 NGMPC3(jtac-mx480-r2046 vty)# show cos halp ifl 350 IFL type: Basic ifl 350 ifd 239 stripped-ifd 239 -------------------------------------------------------------------------------- IFL name: (xe-3/2/0.100, xe-3/2/0) (Index 350, IFD Index 239) egress information XQ chip id: 0 XQ chip Scheduler: 0 XQ chip L2 index: -1 XQ chip L3 index: 28 XQ chip L4 index: 27 XQ chip base Q index: 216 Number of queues: 8 Queue State Max Guaranteed Burst Weight Priorities Drop-Rules Scaling-profile Index rate rate size G E Wred Tail ID ------ ----------- ----------- ------------ ------- ------ ---------- ---------- ---------------- 216 Configured 8115000 28000 131072 28 GL EL 4 0 3 217 Configured 8115000 0 131072 1 GL EL 0 72 3 218 Configured 8115000 70000 131072 70 GL EL 4 6 3 219 Configured 8115000 2000 131072 2 GL EL 4 0 3 220 Configured 8115000 0 131072 1 GL EL 0 72 3 221 Configured 8115000 0 131072 1 GL EL 0 72 3 222 Configured 8115000 0 131072 1 GL EL 0 72 3 223 Configured 8115000 0 131072 1 GL EL 0 72 3
For Queue 0 Best-Effort
100000*500ms*25%/8000=1562 bytes
The minimum tail-drop-threshold in the XQ chip is 1568 bytes, whereas the minimum tail-drop-threshold in the QX chip is 4096 bytes. In the above example, the calculated buffer size is below minimum threshold so queue-depth will be calculated as 1568 bytes.
NGMPC3(jtac-mx480-r2046 vty)# show xqchip 0 drop tail-drop-rule rule 0 Tail drop rule configuration : 0 ref_count : 2 region color threshold_bytes tail-ram-addr mantissa shift ------ ----- --------------- ------------- -------- ----- 0 0 1568 0 196 3 NPC5(jtac-mx480-r2046 vty)# show qxchip 0 tail-rule 0 0 0 Tail drop rule configuration : 0 ref_count : 0 Drop Engine 0 : Tail drop rule ram address : 00000000 threshold : 4096 bytes shift : 5 mantissa : 128 Drop Engine 1 : Tail drop rule ram address : 00000000 threshold : 4096 bytes shift : 5 mantissa : 128
Example: TCP applied on one IFL using shaping-rate and TCP applied on second IFL using shaping-rate and guaranteed-rate
Note: Delay-buffer-rate (DBR) is applied through a traffic-control-profile (TCP). Buffer allocation through DBR depends on the mode (CIR or PIR) in which the IFD is configured. If DBR is not explicitly configured, then DBR uses CIR for calculation and if CIR is not configured, it takes PIR into consideration. DBR can also be oversubscribed for an interface.
The current IFD, xe-3/2/0, has only one IFL. The TCP that is applied on this IFL is configured with only shaping-rate.
set class-of-service traffic-control-profiles TCP-TEST-WOGR scheduler-map SCHEDULER-8115K set class-of-service traffic-control-profiles TCP-TEST-WOGR shaping-rate 8115000 set class-of-service interfaces xe-3/2/0 unit 100 output-traffic-control-profile TCP-TEST-WOGR
So the entire IFD will operate in PIR mode.
NGMPC3(jtac-mx480-r2046 vty)# show cos ifd-entry 239 CoS IFD IDX: 239 Port Speed: 10000000000 Scheduler Mode: COS_IFD_SCHED_HIER_SCHED_MODE Relative_Level: 1 IF toolkit scheduler mode: ifd_has_hier_sched:TRUE ifd_has_2level_hier_sched:FALSE ifd_has_implicit_hier_sched:FALSE Direction: egress scheduler_map_id[ egress] : 2 EGRESS Traffic Params ---------------------------------------------- Speed : 10000000000 Total bw : 8115000 bw_remain : 9991885000 g_bw_remain : 9998000000 delay_bw_remain : 10000000000 oversubscribed : FALSE num_ifl_default_bw : 0 num_ifl_gbw : 0 (PIR) num_ifl_ebw : 0 max_shaping_rate : 16230000 max_g_rate : 4000000 stacked IFD ep_scale_factor: 1 Shaping Guaranteed Delay-Buffer Excess rate rate rate rate ----------- ----------- ------------ ------- 0 10000000000 10000000000 0 EGRESS Remaining Traffic Params ---------------------------------------------- Shaping Guaranteed Delay-Buffer Excess rate rate rate rate ----------- ----------- ------------ ------- 10000000000 0 10000000000 0 labroot@jtac-mx480-r2046# run show interfaces queue xe-3/2/0.100 Logical interface xe-3/2/0.100 (Index 350) (SNMP ifIndex 641) Forwarding classes: 16 supported, 5 in use Egress queues: 8 supported, 5 in use Burst size: 0 Queue: 0, Forwarding classes: best-effort Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 128000 Queue: 1, Forwarding classes: VoIP Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 33280 Queue: 2, Forwarding classes: MC Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 358400 Queue: 3, Forwarding classes: network-control Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 26112 Queue: 4, Forwarding classes: AF Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 33280
Now we configure a second IFL and apply the TCP with shaping-rate and guaranteed-rate.
set class-of-service traffic-control-profiles TCP-TEST-GR scheduler-map SCHEDULER-8115K set class-of-service traffic-control-profiles TCP-TEST-GR shaping-rate 8115000 set class-of-service traffic-control-profiles TCP-TEST-GR guaranteed-rate 100k set class-of-service interfaces xe-3/2/0 unit 100 output-traffic-control-profile TCP-TEST-WOGR set class-of-service interfaces xe-3/2/0 unit 200 output-traffic-control-profile TCP-TEST-GR
Note: When an IFL is configured with a CIR value, all IFLs start using their explicitly configured CIRs for DBR calculation unless DBR is explicitly defined.
If both CIR and PIR are defined, then the CIR value is used. Now the entire IFD operates in CIR mode, and queue-depth for xe-3/2/0.100 will be calculated based on guaranteed-rate.
NGMPC3(jtac-mx480-r2046 vty)# show cos ifd-entry 239 CoS IFD IDX: 239 Port Speed: 10000000000 Scheduler Mode: COS_IFD_SCHED_HIER_SCHED_MODE Relative_Level: 1 IF toolkit scheduler mode: ifd_has_hier_sched:TRUE ifd_has_2level_hier_sched:FALSE ifd_has_implicit_hier_sched:FALSE Direction: egress scheduler_map_id[ egress] : 2 EGRESS Traffic Params ---------------------------------------------- Speed : 10000000000 Total bw : 16230000 bw_remain : 9983770000 g_bw_remain : 9997900000 delay_bw_remain : 10000000000 oversubscribed : FALSE num_ifl_default_bw : 0 num_ifl_gbw : 1 (PIR/CIR) num_ifl_ebw : 0 max_shaping_rate : 16230000 max_g_rate : 4000000 stacked IFD ep_scale_factor: 1 Shaping Guaranteed Delay-Buffer Excess rate rate rate rate ----------- ----------- ------------ ------- 0 10000000000 10000000000 0 EGRESS Remaining Traffic Params ---------------------------------------------- Shaping Guaranteed Delay-Buffer Excess rate rate rate rate ----------- ----------- ------------ ------- 10000000000 0 0 0 NGMPC3(jtac-mx480-r2046 vty)# show cos ifl-tc-profile EGRESS Traffic Params ----------- ----------- ----------- ------------ ------- ------- ----- ----- ------- Ifl Shaping Guaranteed Delay-Buffer Excess Excess Ovrhd Ovrhd Adjust index rate rate rate rate-hi rate-lo mode bytes min ----------- ----------- ----------- ------------ ------- ------------ -------------- 350 8115000 0 0 0 0 Frame 0 0 351 8115000 100000 100000 25 25 Frame 0 0 352 10000000000 2000000 2000000 500 500 Frame 0 0 labroot@jtac-mx480-r2046> show interfaces queue xe-3/2/0.100 Logical interface xe-3/2/0.100 (Index 350) (SNMP ifIndex 641) Forwarding classes: 16 supported, 5 in use Egress queues: 8 supported, 5 in use Burst size: 0 Queue: 0, Forwarding classes: best-effort Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 1568 Queue: 1, Forwarding classes: VoIP Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 33280 Queue: 2, Forwarding classes: MC Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 1568 Queue: 3, Forwarding classes: network-control Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 1568 Queue: 4, Forwarding classes: AF Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 33280 labroot@jtac-mx480-r2046> show interfaces queue xe-3/2/0.200 Logical interface xe-3/2/0.200 (Index 351) (SNMP ifIndex 640) Forwarding classes: 16 supported, 5 in use Egress queues: 8 supported, 5 in use Burst size: 0 Queue: 0, Forwarding classes: best-effort Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 1568 Queue: 1, Forwarding classes: VoIP Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 33280 Queue: 2, Forwarding classes: MC Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 4480 Queue: 3, Forwarding classes: network-control Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 1568 Queue: 4, Forwarding classes: AF Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 33280
To prevent CIR from changing the buffer-size calculation for the existing IFL, ensure that you configure DBR (delay-buffer-rate). DBR can also be oversubscribed for an interface. During configuration, DBR memory is not committed to any queue. DBR memory is used only when a packet is queued.
NGMPC3(jtac-mx480-r2046 vty)# show xqchip 0 drop scaling_profile <number> Scaling profile id [G_PRIORITY_LOW - 3, G_PRIORITY_MEDIUM - 2, G_PRIORITY_HIGH - 1] NGMPC3(jtac-mx480-r2046 vty)# show xqchip 0 drop scaling_profile 2 Tail Drop scaling profile configuration for profile id : 2 Region color scaling_addr scaling value scaling_type ----------- ---------- ------------ ------------- ------------- 0 0 256 100.0 % Scaled 0 1 257 100.0 % Scaled 0 2 258 100.0 % Scaled 0 3 259 100.0 % Scaled 1 0 272 100.0 % Scaled 1 1 273 100.0 % Scaled 1 2 274 100.0 % Scaled 1 3 275 100.0 % Scaled 2 0 288 80.0 % Scaled 2 1 289 80.0 % Scaled 2 2 290 80.0 % Scaled 2 3 291 80.0 % Scaled 3 0 304 60.0 % Scaled 3 1 305 60.0 % Scaled 3 2 306 60.0 % Scaled 3 3 307 60.0 % Scaled 4 0 320 40.0 % Scaled 4 1 321 40.0 % Scaled 4 2 322 40.0 % Scaled 4 3 323 40.0 % Scaled 5 0 336 20.0 % Scaled 5 1 337 20.0 % Scaled 5 2 338 20.0 % Scaled 5 3 339 20.0 % Scaled 6 0 352 5.0 % Scaled 6 1 353 5.0 % Scaled 6 2 354 5.0 % Scaled 6 3 355 5.0 % Scaled 7 0 368 0.0 % Scaled 7 1 369 0.0 % Scaled 7 2 370 0.0 % Scaled 7 3 371 0.0 % Scaled
Note: Different priorities have different scaling profiles. The higher the DBR utilization, the more aggressive the scale down function.
The goal, however, is to allow higher priority traffic to have a higher chance of being sent.
set class-of-service traffic-control-profiles TCP-TEST-WOGR scheduler-map SCHEDULER-8115K set class-of-service traffic-control-profiles TCP-TEST-WOGR shaping-rate 8115000 set class-of-service traffic-control-profiles TCP-TEST-WOGR delay-buffer-rate 1m set class-of-service interfaces xe-3/2/0 unit 100 output-traffic-control-profile TCP-TEST-WOGR NGMPC3(jtac-mx480-r2046 vty)# show cos halp ifl 350 IFL type: Basic ifl 350 ifd 239 stripped-ifd 239 -------------------------------------------------------------------------------- IFL name: (xe-3/2/0.100, xe-3/2/0) (Index 350, IFD Index 239) egress information XQ chip id: 0 XQ chip Scheduler: 0 XQ chip L2 index: -1 XQ chip L3 index: 28 XQ chip L4 index: 27 XQ chip base Q index: 216 Number of queues: 8 Queue State Max Guaranteed Burst Weight Priorities Drop-Rules Scaling-profile Index rate rate size G E Wred Tail ID ------ ----------- ----------- ------------ ------- ------ ---------- ---------- ---------------- 216 Configured 8115000 0 131072 28 GL EL 4 47 3 217 Configured 8115000 Disabled 131072 50 GH EH 4 0 1 218 Configured 8115000 0 131072 70 GL EL 4 83 3 219 Configured 8115000 0 131072 2 GL EL 4 2 3 220 Configured 8115000 0 131072 1 GL EL 0 72 3 221 Configured 8115000 0 131072 1 GL EL 0 72 3 222 Configured 8115000 0 131072 1 GL EL 0 72 3 labroot@jtac-mx480-r2046# run show interfaces queue xe-3/2/0.100 Logical interface xe-3/2/0.100 (Index 350) (SNMP ifIndex 641) Forwarding classes: 16 supported, 5 in use Egress queues: 8 supported, 5 in use Burst size: 0 Queue: 0, Forwarding classes: best-effort Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 15872 Queue: 1, Forwarding classes: VoIP Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 1568 Queue: 2, Forwarding classes: MC Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 44544 Queue: 3, Forwarding classes: network-control Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 4096 Queue: 4, Forwarding classes: AF Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 33280
Buffer-size in byte = Delay-buffer-rate in bps*minimum burst size in ms*buffer size in percent/8000
For Queue 0 Best-Effort
1000000*500ms*25%/8000=15625 bytes
In this case, the calculated buffer-size is in between tail-drop-rule 46 and 47 as shown below, and therefore, the queue will point to a tail-drop rule with a higher value, which is 15872 bytes here.
NGMPC3(jtac-mx480-r2046 vty)# show xqchip 0 drop tail-drop-rule rule 46 Tail drop rule configuration : 46 ref_count : 0 region color threshold_bytes tail-ram-addr mantissa shift ------ ----- --------------- ------------- -------- ----- 0 0 15360 5888 240 6 NGMPC3(jtac-mx480-r2046 vty)# show xqchip 0 drop tail-drop-rule rule 47 Tail drop rule configuration : 47 ref_count : 1 region color threshold_bytes tail-ram-addr mantissa shift ------ ----- --------------- ------------- -------- ----- 0 0 15872 6016 248 6
How the delay-buffer-size is calculated for strict-high queues with rate-limit enabled
While configuring delay buffers, keep in mind that for guaranteed-high priority, the minimum buffer-size will be 30 milliseconds and for guaranteed-medium priority, the minimum buffer-size will be 60 milliseconds. For strict-high priority, the shaping rate of the queue will be used to calculate the minimum buffer size and for high/medium priorities, the transmit rate of the queue will be used to calculate the minimum buffer size. If the configured values are less than the minimum values, then the configured values are ignored and the minimum value is used.
Note: Minimum buffer adjustments are done only on QX-based platforms. This change was implemented via PR1240756.
set class-of-service schedulers VOIP-NC-8115K transmit-rate percent 50 set class-of-service schedulers VOIP-NC-8115K transmit-rate rate-limit set class-of-service schedulers VOIP-NC-8115K buffer-size temporal 3k set class-of-service schedulers VOIP-NC-8115K priority strict-high
XQ-Based Card
labroot@jtac-mx480-r2046# run show class-of-service interface xe-3/2/0.200 comprehensive Logical interface: xe-3/2/0.200, Index: 351 Object Name Type Index Traffic-control-profile TCP-TEST-GR Output 909 Traffic control profile: TCP-TEST-GR, Index: 909 Shaping rate: 8115000 Scheduler map: SCHEDULER-8115K Guaranteed rate: 100000 Scheduler: VOIP-NC-8115K, Forwarding class: VoIP, Index: 45752 Transmit rate: 50 percent, Rate Limit: rate-limit, Buffer size: 3000 us, Buffer Limit: none, Priority: strict-high Excess Priority: unspecified Queue: 1, Forwarding classes: VoIP Queue-depth bytes : Average : 0 Current : 0 Peak : 0 Maximum : 1568
When specified as a percentage, this is a percent of the parent's buffer-size. The temporal setting defines the buffer size with reference to the queue's transmit-rate, and specifies the buffer size in microseconds. Unlike buffer %, with the temporal setting, buffer size becomes a function of the transmit-rate.
Minimum Queue Buffer-Size = Guaranteed-rate * transmit-rate percent * buffer size temporal/8k 100000*50%*3/8k=18.75 bytes
Minimum tail-drop-threshold in the XQ chip is 1568 bytes and minimum tail-drop-threshold in the QX chip is 4096 bytes. In the above example, the calculated buffer size is below minimum threshold so queue-depth will be calculated as 1568 bytes.
Related Links
Getting Up and Running with Junos
Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search