Skip to content
Ask AI

Queue Scheduling

[Command] show interface uc-tx-queue

[Purpose] Display the queue scheduling method of the interface

[View] System view

[Use Cases]

sonic# show interface uc-tx-queue
{
"Ethernet1|0":{
"SCHEDULER|scheduler.Ethernet1_0":{
"type":"STRICT"
}
},
"Ethernet1|2":{
"SCHEDULER|scheduler.Ethernet1_2":{
"type":"STRICT"
}
}
}

[Command] uc-tx-queue scheduler queue_id mode STRICT uc-tx-queue scheduler queue_id mode DWRR weight uc-tx-queue scheduler

[Purpose] Configure a scheduling mode for queues on an interface

[Parameter]

ParameterDescription
queue_idQueue ID, value range: 0~7
STRICTEnable strict priority queuing
DWRREnable DWRR priority queuing
weightWeight of a queue, Value range: 0~100

[View] Interface view

[Usage Scenario] In a network, the queue scheduling algorithm is a core mechanism for implementing Quality of Service (QoS) control. It manages the usage of link bandwidth for different types of packets, ensuring that various data streams receive services at different levels. Different queues under the same interface can adopt a mixed scheduling mode of STRICT and DWRR. In this mode, queues configured with STRICT mode based on priority are scheduled first. When there are no packets in the STRICT mode queues, the system schedules DWRR queues based on their weights. By default, the scheduling method for queues is DWRR (Deficit Weighted Round Robin), with equal weights of 1. This configuration allows network administrators to manage different types of traffic more flexibly, ensuring that high-priority traffic receives faster processing, while low-priority traffic can still effectively utilize link bandwidth.

[Use Cases]

sonic(config)# interface ethernet 1
sonic(config-if-1)# uc-tx-queue scheduler 0 mode strict
sonic(config-if-1)# uc-tx-queue scheduler 1 mode strict
sonic(config-if-1)# uc-tx-queue scheduler 2 mode DWRR weight 80
sonic(config-if-1)# uc-tx-queue scheduler 3 mode DWRR weight 80

[Command] uc-tx-queue scheduler queue_id [pir PIR_value ][pbs PBS_value ]

[Purpose] Configure queue rate limiting

[Parameter]

ParameterDescription
pirSpecifies the peak information rate of the queue, the unit is byte/s
pbsSpecifies the peak burst size of the queue, the unit is byte

[View] Interface view

[Use Cases]

sonic(config)# interface ethernet 1
sonic(config-if-1)# uc-tx-queue scheduler 0 pir 1000