HQoS queue scheduling method, apparatus, and system
A queue scheduling method, apparatus, and system are provided, to flexibly manage a queue, meet an actual transmission requirement, and reduce resources. The queue scheduling method implemented by a processing apparatus includes: generating an HQoS scheduling tree including a plurality of leaf nodes, each of which identifies a queue on a traffic management (TM) hardware entity including a plurality of queues; obtaining traffic characteristics of the plurality of queues based on the plurality of leaf nodes; determining a scheduling parameter of at least one queue in the plurality of queues based on the traffic characteristics which are of data flows transmitted by the plurality of queues; sending to a scheduling apparatus a scheduling message corresponding to the at least one queue in the TM hardware entity, including the scheduling parameter of the at least one queue used to schedule the at least one queue.
1. A queue scheduling method comprising:
generating, by a processing apparatus, a hierarchical quality of service (HQoS) scheduling tree, wherein the HQOS scheduling tree is used to describe a tree structure of a node participating in scheduling in a communication network, the HQOS scheduling tree comprises a plurality of leaf nodes, a root node and at least one branch node corresponding to the root node,
wherein each of the plurality of leaf nodes is used to identify a queue on a traffic management (TM) hardware entity,
wherein each of the at least one branch node corresponds to one or more leaf nodes, and different branch nodes correspond to different leaf nodes,
wherein the TM hardware entity comprises a plurality of queues, and the plurality of leaf nodes and the plurality of queues are in a one-to-one correspondence;
obtaining, by the processing apparatus, traffic characteristics of the plurality of queues based on the plurality of leaf nodes;
determining, by the processing apparatus, a scheduling parameter of at least one queue in the plurality of queues based on the traffic characteristics of the plurality of queues, including:
determining, a traffic characteristic of the at least one branch node based on the traffic characteristics of the plurality of queues;
determining, a scheduling parameter of the at least one branch node based on the traffic characteristic of the at least one branch node and a scheduling parameter of the root node; and
determining, the scheduling parameter of the at least one queue in the plurality of queues based on the traffic characteristics of the plurality of queues and the scheduling parameter of the at least one branch node;
wherein the traffic characteristics of the plurality of queues are traffic characteristics of data flows transmitted by the plurality of queues; and
sending, by the processing apparatus, a scheduling message to a scheduling apparatus corresponding to the at least one queue in the TM hardware entity, wherein the scheduling message comprises the scheduling parameter of the at least one queue, and the scheduling parameter is used to schedule the at least one queue.
2. The method according to claim 1 , wherein the HQoS scheduling tree further comprises a root node of the plurality of leaf nodes; and
wherein the determining, by the processing apparatus, the scheduling parameter of the at least one queue in the plurality of queues based on the traffic characteristics of the plurality of queues comprises:
determining, by the processing apparatus, the scheduling parameter of the at least one queue in the plurality of queues based on the traffic characteristics of the plurality of queues and a scheduling parameter of the root node.
3. The method according to claim 1 , wherein the traffic characteristic comprises an input rate and a queue identifier; and
wherein the determining, by the processing apparatus, the scheduling parameter of the at least one queue in the plurality of queues based on the traffic characteristics of the plurality of queues comprises:
determining, by the processing apparatus, characteristic parameters of the plurality of queues based on the queue identifiers of the plurality of queues, wherein the characteristic parameter comprises at least one of a priority and a weight; and
determining, by the processing apparatus, the scheduling parameter of the at least one queue in the plurality of queues based on input rates and the characteristic parameters of the plurality of queues.
4. The method according to claim 1 , wherein the scheduling apparatus is a token bucket, and the scheduling parameter is a rate at which the token bucket outputs a token.
5. The method according to claim 1 , wherein the TM hardware entity is an application-specific integrated circuit (ASIC) chip or a programmable logical controller (PLC).
6. The method according to claim 1 , wherein the processing apparatus and the TM hardware entity belong to a same network device.
7. A non-transitory computer-readable storage medium, comprising instructions, wherein when the instructions are run on a computer, the computer is enabled to perform the queue scheduling method according to claim 1 .
8. The non-transitory computer-readable storage medium according to claim 7 , wherein the processing apparatus and the TM hardware entity belong to a same network device.
9. A queue scheduling method, wherein the method is applied to a scheduling apparatus of a traffic management (TM) hardware entity, the TM hardware entity further comprises a plurality of queues, and the method comprises:
receiving, by the scheduling apparatus, a scheduling message from a processing apparatus, wherein the scheduling message comprises a scheduling parameter of at least one queue in the plurality of queues, and the TM hardware entity does not comprise the processing apparatus;
scheduling, by the scheduling apparatus, the at least one queue based on the scheduling parameter of the at least one queue;
wherein the scheduling parameter is determined based on traffic characteristics of the plurality of queues and a scheduling parameter of at least one branch node; wherein the scheduling parameter of the at least one branch node is determined based on traffic characteristic of the at least one branch node and a scheduling parameter of a root node; wherein the traffic characteristic of the at least one branch node is determined based on the traffic characteristics of the plurality of queues: wherein the root node and the at least one branch node corresponding to the root node are comprised in a hierarchical quality of service (HQoS) scheduling tree generated by the processing apparatus; and wherein each of the at least one branch node corresponds to one or more leaf nodes of the HQOS scheduling tree, and different branch nodes correspond to different leaf nodes.
10. The method according to claim 9 , wherein the processing apparatus and the TM hardware entity belong to a same network device.
11. The method according to claim 9 , wherein the scheduling apparatus is a token bucket, and the scheduling parameter is a rate at which the token bucket outputs a token.
12. The method according to claim 9 , wherein the TM hardware entity is an application-specific integrated circuit (ASIC) chip or a programmable logical controller (PLC).
13. A processing apparatus comprising:
a memory comprising processor-executable instructions; and
a processor in communication with the memory, wherein the processor is configured to execute the processor-executable instructions to facilitate the processing apparatus to:
generate a hierarchical quality of service (HQOS) scheduling tree, wherein the HQOS scheduling tree is used to describe a tree structure of a node participating in scheduling in a communication network, the HQOS scheduling tree comprises a plurality of leaf nodes, a root node and at least one branch node corresponding to the root node,
wherein each of the plurality of leaf nodes is used to identify a queue on a traffic management (TM) hardware entity,
wherein each of the at least one branch node corresponds to one or more leaf nodes, and different branch nodes correspond to different leaf nodes,
wherein the TM hardware entity comprises a plurality of queues, and the plurality of leaf nodes and the plurality of queues are in a one-to-one correspondence;
obtain traffic characteristics of the plurality of queues based on the plurality of leaf nodes;
determine a scheduling parameter of at least one queue in the plurality of queues based on the traffic characteristics of the plurality of queues, including:
determining, a traffic characteristic of the at least one branch node based on the traffic characteristics of the plurality of queues;
determining, a scheduling parameter of the at least one branch node based on the traffic characteristic of the at least one branch node and a scheduling parameter of the root node; and
determining, the scheduling parameter of the at least one queue in the plurality of queues based on the traffic characteristics of the plurality of queues and the scheduling parameter of the at least one branch node;
wherein the traffic characteristics of the plurality of queues are traffic characteristics of data flows transmitted by the plurality of queues; and
send a scheduling message to a scheduling apparatus corresponding to the at least one queue in the TM hardware entity, wherein the scheduling message comprises the scheduling parameter of the at least one queue, and the scheduling parameter is used to schedule the at least one queue.
14. The apparatus according to claim 13 , wherein the HQOS scheduling tree further comprises a root node of the plurality of leaf nodes; and
wherein in determining the scheduling parameter of the at least one queue in the plurality of queues based on the traffic characteristics of the plurality of queues, the processor is further configured to execute the processor-executable instructions to facilitate the processing apparatus to:
determine the scheduling parameter of the at least one queue in the plurality of queues based on the traffic characteristics of the plurality of queues and a scheduling parameter of the root node.
15. The apparatus according to claim 13 , wherein the traffic characteristic comprises an input rate and a queue identifier; and
wherein in determining the scheduling parameter of the at least one queue in the plurality of queues based on the traffic characteristics of the plurality of queues, the processor is further configured to execute the processor-executable instructions to facilitate the processing apparatus to:
determine characteristic parameters of the plurality of queues based on the queue identifiers of the plurality of queues; and determine the scheduling parameter of the at least one queue in the plurality of queues based on input rates and the characteristic parameters of the plurality of queues, wherein the characteristic parameter comprises at least one of a priority and a weight.
16. The apparatus according to claim 13 , wherein the scheduling apparatus is a token bucket, and the scheduling parameter is a rate at which the token bucket outputs a token.
17. The apparatus according to claim 13 , wherein the TM hardware entity is an application-specific integrated circuit (ASIC) chip or a programmable logical controller (PLC).
18. The apparatus according to claim 13 , wherein the processing apparatus and the TM hardware entity belong to a same network device.
19. A queue scheduling system, comprising the processing apparatus according to claim 13 and the scheduling apparatus,
wherein the scheduling apparatus comprises:
a memory comprising processor-executable instructions; and
a processor in communication with the memory, wherein the processor is configured to execute the processor-executable instructions to facilitate the scheduling apparatus to:
receive the scheduling message from the processing apparatus, wherein the TM hardware entity does not comprise the processing apparatus; and
schedule the at least one queue based on the scheduling parameter of the at least one queue.
20. The queue scheduling system according to claim 19 , wherein the processing apparatus and the TM hardware entity belong to a same network device.