CN108632162B - Queue scheduling method and forwarding equipment - Google Patents
Queue scheduling method and forwarding equipment Download PDFInfo
- Publication number
- CN108632162B CN108632162B CN201710176237.9A CN201710176237A CN108632162B CN 108632162 B CN108632162 B CN 108632162B CN 201710176237 A CN201710176237 A CN 201710176237A CN 108632162 B CN108632162 B CN 108632162B
- Authority
- CN
- China
- Prior art keywords
- queue
- dln
- delay value
- time delay
- forwarding device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/62—Queue scheduling characterised by scheduling criteria
- H04L47/6215—Individual queue per QOS, rate or priority
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/32—Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/62—Queue scheduling characterised by scheduling criteria
- H04L47/625—Queue scheduling characterised by scheduling criteria for service slots or service orders
- H04L47/6275—Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the application discloses a queue scheduling method which is beneficial to meeting the time delay requirement of a high-priority queue and improving the service quality. The method in the embodiment of the application comprises the following steps: the method comprises the steps that forwarding equipment obtains the length of a DLN queue, the input bandwidth of the DLN queue and the maximum time delay value of the DLN queue; the forwarding equipment acquires a first time delay, wherein the first time delay is the ratio of the length of the DLN queue to the input bandwidth of the DLN queue; and when the forwarding equipment determines that the first time delay is greater than or equal to the maximum time delay value of the DLN queue, adopting a priority queue scheduling mode. The embodiment of the application also provides forwarding equipment.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a queue scheduling method and a forwarding device.
Background
As one of the important indexes of the network, the delay is more and more emphasized by operators and equipment vendors. The traditional communication network mainly guarantees voice transmission and has certain requirements on time delay, and now with new requirements of 4.5G and 5G services, various new services with extremely sensitive time delay are to be deployed, and the requirements of application on time delay are more and more strict.
Currently, in order to guarantee Quality of Service (QoS), a policy queue scheduling technique, such as priority-based queue scheduling, is adopted on a device with congestion. As shown in FIG. 1, the priority of the first priority queue is higher than the priority of the second priority queue. The priority of the second priority queue is higher than the priority of the third priority queue. A device that is about to congest or has congealed may preferentially process the messages of the first priority queue, i.e., messages 2 and 6. The device then processes the messages of the second priority queue, namely message 3, message 4 and message 5. The device processes the message of the third priority queue under the condition that no message exists in the first priority queue and the second priority queue, so as to preferentially serve the high-priority service. When congestion occurs, if there are messages in the first priority queue and the second priority queue for a long time, the messages in the third priority queue will be starved because they are not served. Starvation may be manifested as the third priority queue length exceeding the node buffering capacity, resulting in sustained packet drops in the lower third priority queue, resulting in a degradation of quality of service.
Disclosure of Invention
The embodiment of the application provides a queue scheduling method and forwarding equipment, which are beneficial to meeting the time delay requirement of a high-priority queue and improving the service quality.
In a first aspect, a method for scheduling a queue is provided, including: the method comprises the steps that forwarding equipment obtains the length of a deterministic delay network (DLN) queue, the maximum delay value of the DLN queue and the input bandwidth of the DLN queue, the maximum delay value and the input bandwidth can be input externally, and the input time is before judgment; the forwarding equipment obtains a first time delay according to the length of the DLN queue and the input bandwidth of the DLN queue, wherein the first time delay is the ratio of the length of the DLN queue to the input bandwidth of the DLN queue; and the forwarding equipment compares the first time delay with the maximum time delay value of the DLN queue, and judges whether the first time delay is greater than or equal to the maximum time delay value of the DLN queue, when the forwarding equipment determines that the first time delay is greater than or equal to the maximum time delay value of the DLN queue, the forwarding equipment adopts a priority queue scheduling mode, and the priority queue scheduling mode is a queue with priority processing set as high priority. In the method, the forwarding device determines to adopt a priority queue scheduling mode according to the comparison result of the first time delay and the maximum time delay value of the DLN queue, which is beneficial to meeting the time delay requirement of a high-priority queue and improving the service quality.
In a possible design, in a first implementation manner of the first aspect of the embodiment of the present application, when the forwarding device determines that the first delay is greater than or equal to the maximum delay value of the DLN queue, the using a priority queue scheduling manner includes: the forwarding device adds a first identifier for indicating that the priority queue scheduling mode is adopted on N messages at the head of the DLN queue, wherein N is an integer greater than or equal to 1; and after recognizing the first identifier, the forwarding equipment processes the messages of the DLN queue set as the high priority queue in a priority queue scheduling mode. In the method, the forwarding device can quickly identify and adjust the scheduling mode on the basis of considering the functions of the forwarding device by adding the first identifier to the N messages of the DLN queue, so that the realizability and the operability are improved.
In one possible design, in a second implementation manner of the first aspect of the embodiment of the present application, the method further includes: the forwarding equipment acquires a minimum delay value of a DLN queue, wherein the minimum delay value of the DLN queue is smaller than a maximum delay value of the DLN queue; and when the forwarding device determines that the first time delay is smaller than the minimum time delay value of the DLN queue, the forwarding device adopts a fair queue scheduling mode, wherein the fair queue scheduling mode is to fairly process queues with different priorities. The fair queue scheduling mode can schedule the flow in each queue in turn, so that each flow can obtain a fair proportion of resources, the transmission requirements of the high-priority queues are considered, meanwhile, the transmission requirements of other queues are met, and the improvement of the service quality is facilitated.
In a possible design, in a third implementation manner of the first aspect of the embodiment of the present application, when the forwarding device determines that the first delay is smaller than the minimum delay value of the DLN queue, the employing a fair queue scheduling manner includes: the forwarding device adds a second identifier to the L messages at the head of the DLN queue, wherein the second identifier is used for indicating that the fair queue scheduling mode is adopted, and L is an integer greater than or equal to 1; and after recognizing the second identifier, the forwarding device processes the message of the DLN queue by adopting the fair queue scheduling mode. In the method, the forwarding device can quickly identify and adjust the scheduling mode on the basis of considering the functions of the forwarding device by adding the second identifier to the L messages of the DLN queue, so that the realizability and the operability are improved.
In a possible design, in a fourth implementation manner of the first aspect of the embodiment of the present application, the method further includes: the forwarding equipment acquires a minimum delay value of a DLN queue, and the acquired minimum delay value of the DLN queue is smaller than a maximum delay value of the DLN queue; when the forwarding device determines that the first time delay is greater than or equal to the minimum time delay value of the DLN queue and the first time delay is less than the maximum time delay value of the DLN queue, the forwarding device acquires the length of a Best Effort (BE) queue, the input bandwidth of the BE queue and the time delay value of the BE queue; the forwarding equipment acquires a second time delay according to the ratio of the length of the BE queue to the input bandwidth of the BE queue; and when the forwarding equipment determines that the second time delay is greater than or equal to the time delay value of the BE queue, adopting a fair queue scheduling mode. The fair queue scheduling mode is to fairly process queues with different priorities, and the fair queue scheduling mode can schedule the flows in each queue in turn, so that each flow can obtain a resource with a fair proportion. In the method, the forwarding device can further forward the message of the BE queue by using network resources on the premise of ensuring the prior forwarding of the DLN queue message, which is beneficial to improving the service quality.
In a possible design, in a fifth implementation manner of the first aspect of the embodiment of the present application, when the forwarding device determines that the second delay is greater than or equal to the delay value of the BE queue, using a fair queue scheduling manner includes: the forwarding equipment adds a second identifier for indicating that the fair queue scheduling mode is adopted to M messages of the head of the BE queue, wherein M is an integer greater than or equal to 1; and after recognizing the second identifier, the forwarding device processes the message of the BE queue and the message of the DLN queue by adopting the fair queue scheduling mode. In the method, the forwarding device can quickly identify and adjust the scheduling mode on the basis of considering the functions of the forwarding device by adding the second identifier to the M messages of the BE queue, so that the realizability and the operability are improved.
In one possible design, in a sixth implementation manner of the first aspect of the embodiment of the present application, the fair queue scheduling includes packet-based processor sharing scheduling, weight-based fair scheduling, weight-based round robin scheduling, or weight-based per-byte round robin scheduling.
In a second aspect, a forwarding device is provided, which includes: the device comprises a first acquisition unit, a second acquisition unit and a delay unit, wherein the first acquisition unit is used for acquiring the length of a DLN queue of a deterministic delay network, the input bandwidth of the DLN queue and the maximum delay value of the DLN queue; a second obtaining unit, configured to obtain a first time delay, where the first time delay is a ratio of a length of the DLN queue to an input bandwidth of the DLN queue; and the first adjusting unit is used for adopting a priority queue scheduling mode when the first time delay is determined to be greater than or equal to the maximum time delay value of the DLN queue.
In a possible design, in a first implementation manner of the second aspect of the embodiment of the present application, the first adjusting unit is specifically configured to: adding a first identifier to N messages at the head of the DLN queue, wherein the first identifier is used for indicating that the priority queue scheduling mode is adopted, and N is an integer greater than or equal to 1; and after the first identifier is identified, processing the message of the DLN queue in a priority queue scheduling mode, wherein the DLN queue is a queue set as a high priority.
In a possible design, in a second implementation manner of the second aspect of the embodiment of the present application, the forwarding device further includes: a third obtaining unit, configured to obtain a minimum delay value of a DLN queue, where the minimum delay value of the DLN queue is smaller than a maximum delay value of the DLN queue; and the second adjusting unit is used for adopting a fair queue scheduling mode when the first time delay is determined to be smaller than the minimum time delay value of the DLN queue.
In a possible design, in a third implementation manner of the second aspect of the embodiment of the present application, the forwarding device further includes: adding a second identifier to L messages at the head of the DLN queue, wherein the second identifier is used for indicating that the fair queue scheduling mode is adopted, and L is an integer greater than or equal to 1; and after the second identifier is identified, processing the messages of the DLN queue by adopting the fair queue scheduling mode.
In a possible design, in a fourth implementation manner of the second aspect of the embodiment of the present application, the forwarding device further includes: a third obtaining unit, configured to obtain a minimum delay value of a DLN queue, where the minimum delay value of the DLN queue is smaller than a maximum delay value of the DLN queue; a fourth obtaining unit, configured to obtain a length of a best effort BE queue, an input bandwidth of the BE queue, and a delay value of the BE queue when it is determined that the first delay is greater than or equal to the minimum delay value of the DLN queue and the first delay is less than the maximum delay value of the DLN queue; a fifth obtaining unit, configured to obtain a second time delay, where the second time delay is a ratio of a length of the BE queue to an input bandwidth of the BE queue; and the third adjusting unit is used for adopting a fair queue scheduling mode when the second time delay is determined to BE greater than or equal to the time delay value of the BE queue.
In a possible design, in a fifth implementation manner of the second aspect of the embodiment of the present application, the third adjusting unit is specifically configured to: adding a second identifier to M messages at the head of the BE queue, wherein the second identifier is used for indicating that the fair queue scheduling mode is adopted, and M is an integer greater than or equal to 1; and after the second identifier is identified, processing the message of the BE queue and the message of the DLN queue by adopting the fair queue scheduling mode.
In a possible design, in a sixth implementation manner of the second aspect of the embodiment of the present application, the fair queue scheduling includes packet-based processor sharing scheduling, weight-based fair scheduling, weight-based round-robin scheduling, and weight-based per-byte round-robin scheduling.
In a third aspect, a computer-readable storage medium is provided, having stored therein instructions, which when executed on a computer, cause the computer to perform the method of the above aspects.
In a fourth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the above aspects.
Drawings
FIG. 1 is a diagram illustrating a conventional scheduling method;
FIG. 2 is a diagram of a system architecture according to an embodiment of the present application;
fig. 3 is a schematic diagram of an embodiment of a queue scheduling method provided in an embodiment of the present application;
fig. 4 is a schematic diagram of another embodiment of a queue scheduling method according to an embodiment of the present application;
fig. 5a is a schematic diagram of another embodiment of a queue scheduling method according to an embodiment of the present application;
fig. 5b is a schematic view of an application scenario of a queue scheduling method according to an embodiment of the present application;
FIG. 6 is a diagram of an embodiment of a forwarding device in an embodiment of the present application;
fig. 7 is a schematic diagram of another embodiment of a forwarding device in an embodiment of the present application;
fig. 8 is a schematic diagram of another embodiment of a forwarding device in an embodiment of the present application;
fig. 9a is a schematic diagram of another embodiment of a forwarding device in the embodiment of the present application;
fig. 9b is a schematic diagram of another embodiment of a forwarding device in the embodiment of the present application;
fig. 10 is a schematic diagram of another embodiment of a forwarding device in the embodiment of the present application.
Detailed Description
In order to make the technical field better understand the scheme of the present application, the following description will be made on the embodiments of the present application with reference to the attached drawings.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method provided by the embodiment of the application can be applied to a network architecture as shown in fig. 2. In the network architecture, a scheduler in any forwarding device performs Dynamic Priority Queue (DPQ) scheduling, that is, the forwarding device selects between priority queue scheduling and Fair Queue (FQ) scheduling according to real-time monitored delay of a high-priority queue, for example, delay of a deterministic delay network (DLN) queue. And any forwarding device forwards the messages in the DLN queue and the Best Effort (BE) queue according to different scheduling modes. The priority queue scheduling mode is a queue with priority processing set as high priority, that is, the priority queue scheduling mode can give absolute priority processing to the high priority queue. The fair queue scheduling mode is to fairly process queues with different priorities, that is, the fair queue scheduling mode can schedule flows in each queue in turn, so that each flow can obtain a resource with a fair proportion. The scheduler in the embodiments of the present application may be implemented by a processor or other chip capable of implementing scheduling.
The following describes a queue scheduling method provided in the embodiment of the present application with reference to fig. 2 and fig. 3.
301. The forwarding device obtains the length of the DLN queue, the input bandwidth of the DLN queue and the maximum time delay value of the DLN queue.
For example, the forwarding device may obtain the length of the DLN queue through a Random Early Detection (RED) technique, where the length of the DLN queue may be denoted as Dq 1. The maximum delay value of the DLN queue may be a preset first threshold value. The first threshold value is a threshold value for determining whether to adopt a priority queue scheduling manner. The input bandwidth of the DLN queue refers to the bandwidth allocated to the DLN queue, and the input bandwidth of the DLN queue is used for representing the outlet speed of the queue. The forwarding device may obtain the length of the DLN queue in real time, or periodically obtain the length of the DLN queue.
For example, the forwarding device may obtain a preset input bandwidth of the DLN queue and a preset maximum delay value of the DLN queue. The input bandwidth of the DLN queue may be represented as R1. The maximum delay value of the DLN queue may be denoted as T1. The forwarding device may also obtain externally inputted R1 and T1. If the input is external input, when the judgment process needs to use R1 and T1, corresponding data is input from the outside of the device. The forwarding device monitors the DLN queue in real time and obtains the length Dq1 of the DLN queue according to a preset time interval.
It is understood that the unit of the input bandwidth of the DLN queue is bit/second (bit/s), and may also be other units, for example, Byte/second (Byte/s), and the like, and is not limited herein. The length of the DLN queue is in bits (bits) or bytes (bytes). The length of the DLN queue divided by the input bandwidth of the DLN queue is in seconds. The unit of the maximum delay value of the DLN queue may also be converted into a microsecond (um) or a millisecond (ms), or may be another time unit, and is not limited herein.
302. And the forwarding equipment acquires a first time delay according to the length of the DLN queue and the input bandwidth of the DLN queue.
For example, the forwarding device divides Dq1 by R1 to obtain the first delay. The first time delay may be denoted as Dq 1/R1. After obtaining the first time delay, the forwarding device may further store the first time delay in the forwarding device. In other steps, the first time delay needs to be used, and the forwarding device may directly invoke the first time delay. The first time delay is the time delay generated when the forwarding equipment sends all messages in the DLN queue.
303. And the forwarding equipment judges whether the first time delay is greater than or equal to the maximum time delay value of the DLN queue.
For example, the forwarding device may determine whether the first delay is greater than or equal to T1 in various ways, for example, the forwarding device may subtract T1 from Dq1/R1, and if the obtained calculation result is greater than or equal to zero, the forwarding device determines that the first delay is greater than or equal to the maximum delay value of the DLN queue. Or, the forwarding device divides Dq1/R1 by T1, and if the obtained calculation result is greater than or equal to 1, the forwarding device determines that the first delay is greater than or equal to the maximum delay value of the DLN queue. There are other comparison methods, and the specific examples are not limited herein.
304. And if the first time delay is greater than or equal to the maximum time delay value of the DLN queue, the forwarding equipment adopts a priority queue scheduling mode.
For example, if Dq1/R1 is greater than or equal to T1, the forwarding device adds a first identifier to N packets at the head of the DLN queue, where the first identifier is used to indicate that the priority queue is used for scheduling. N is an integer greater than or equal to 1. And the forwarding equipment identifies the messages included in the DLN queue before forwarding the DLN queue. After the forwarding device identifies the message added with the first identifier, the forwarding device adopts a priority queue scheduling mode. And based on the priority queue scheduling mode and the DLN queue being a high priority queue, the forwarding equipment preferentially schedules and forwards the messages of the DLN queue.
Optionally, after recognizing the packet added with the first identifier, the forwarding device may stop the operation of continuing to add the first identifier to the packet of the DLN queue, for example, after adding the first identifier to the first packet of the DLN queue, the forwarding device may continue to add the first identifier to the second packet and the third packet of the DLN queue. If the forwarding device recognizes the first identifier in the first message of the DLN queue, the adding of the first identifier to the fourth message of the DLN queue may be stopped. And if the forwarding device recognizes the first identifier in the third message of the DLN queue, and the first identifier is already added to the seventh message of the DLN queue at the moment, the forwarding device stops adding the first identifier in the eighth message of the DLN queue.
For example, the operation of adding the first identifier to the packet of the DLN queue may be understood as marking the packet. The meaning of marking the message needs to be preset, for example, a specific byte is added to a packet header of the message. For example, a Differentiated Services Code Point (DSCP) technique is used to mark a packet, and a special byte composed of 6 bits is used, and different values of the special byte can be used to indicate different scheduling modes, such as a priority queue scheduling mode and a fair queue scheduling mode. When the special byte combination is "000000", it may be set that the traffic of other queues needs to be considered, that is, a fair queue scheduling manner needs to be adopted. If the scheduling mode adopted by the forwarding equipment is a fair queue scheduling mode, no change is needed; if the scheduling mode adopted by the forwarding device is the priority queue scheduling mode, the scheduling mode of the forwarding device needs to be adjusted to be the fair queue scheduling mode. Other byte combination modes are used, and are not limited herein.
The scheduling mode of the forwarding device has multiple possibilities, and when the forwarding device is currently in the fair queue scheduling mode, the forwarding device switches from the fair queue scheduling mode to the priority queue scheduling mode; and when the forwarding equipment is currently in the priority queue scheduling mode, the forwarding equipment keeps the priority queue scheduling mode unchanged.
For example, the fair queue scheduling may be packet-based processor shared (PGPS) scheduling, Weighted Fair Queuing (WFQ) scheduling, Weighted Round Robin (WRR) scheduling, or weighted round robin (WDRR) scheduling.
In the method provided in the foregoing embodiment, through real-time monitoring of the length of the DLN queue, when the first time delay is greater than or equal to the maximum time delay value of the DLN queue, that is, the time required for the forwarding device to forward all the messages of the DLN queue is greater than or equal to the maximum time delay value of the DLN queue, the forwarding device uses a priority queue scheduling manner, that is, preferentially schedules and forwards the messages in the DLN queue, meets the time delay requirement of the high-priority queue and improves the service quality, and further ensures the preferential forwarding of the messages of the DLN queue in a congestion scene.
Next, with reference to fig. 2 and fig. 4, another embodiment of the queue scheduling method provided in the embodiment of the present application is described.
401. And the forwarding equipment acquires the length of the DLN queue, the input bandwidth of the DLN queue and the minimum time delay value of the DLN queue.
For example, the method for the forwarding device to obtain the length of the DLN queue and the input bandwidth of the DLN queue is the same as the obtaining method in the embodiment corresponding to fig. 3. The transfer device may be preset with a minimum delay value for the DLN queue. The minimum value of the DLN queue may be denoted as T1'. The length of the DLN queue may be denoted Dq 1. The input bandwidth of the DLN queue may be represented as R1.
For example, the minimum delay value of the DLN queue may be a preset second threshold value. The second threshold is a threshold for determining whether to use a fair queue scheduling method.
402. And the forwarding equipment acquires a first time delay according to the length of the DLN queue and the input bandwidth of the DLN queue.
The method for the forwarding device to obtain the first time delay may be referred to as the method in 302. The first time delay may be denoted as Dq 1/R1.
403. And the forwarding equipment judges whether the first time delay is smaller than the minimum time delay value of the DLN queue.
The method for determining the first delay and the maximum delay value of the DLN queue and the processing mode of the forwarding device may be referred to as 303 and 304. 403 may be a step performed after the forwarding device determines that the first delay is smaller than the maximum delay value of the DLN queue, that is, the forwarding device may determine whether the first delay is smaller than the minimum delay value of the DLN queue when the first delay is smaller than the maximum delay value of the DLN queue. Of course, 403 may also be a determination step directly executed after the forwarding device obtains the first delay in real time, and does not depend on a comparison result between the first delay and the maximum delay value of the DLN queue.
For example, the forwarding device may determine whether the first delay is smaller than T1', for example, the forwarding device may subtract T1' from Dq1/R1, and if the obtained calculation result is smaller than zero, the forwarding device determines that the first delay is smaller than the minimum delay value of the DLN queue, and there are other comparison manners, which are not limited herein.
404. And if the first time delay is smaller than the minimum time delay value of the DLN queue, the forwarding equipment adopts a fair queue scheduling mode.
For example, if Dq1/R1 is smaller than T1', the forwarding device adds a second identifier to L packets at the head of the DLN queue, where the second identifier is used to indicate that the fair queue scheduling manner is adopted. The operation of adding the second identifier to the L packets may be understood as an operation of marking the L packets. L is an integer greater than or equal to 1. And when the forwarding equipment identifies the second identifier in the message, the forwarding equipment adopts a fair queue scheduling mode. The forwarding device adopts the fair queue scheduling mode, namely fairly scheduling and processing a plurality of queues on the forwarding device, wherein the queues comprise the DLN queues.
And if the forwarding equipment is currently in a priority queue scheduling mode, switching the priority queue scheduling mode to the fair queue scheduling mode by the forwarding equipment. And if the forwarding equipment is currently in the fair queue scheduling mode, the forwarding equipment keeps the fair queue scheduling mode unchanged.
In the embodiment of the application, the forwarding device monitors the length of the DLN queue in real time, and when the first time delay is smaller than the minimum time delay value of the DLN queue, the forwarding device adopts a fair queue scheduling mode, namely fairly schedules and processes messages of the DLN queue and other queues, so that the occurrence of continuous packet loss of the low-priority queue is reduced, the time delay requirement of the high-priority queue is met, and the service quality is improved.
In practical application, on the premise of ensuring the priority forwarding of the deterministic delay queue message, the forwarding device can also consider reducing the continuous packet loss phenomenon of other queues. Next, with reference to fig. 5a, fig. 5b and fig. 2, another embodiment of the queue scheduling method provided in the embodiment of the present application is described.
501. The forwarding device obtains the length of the DLN queue, the input bandwidth of the DLN queue, the maximum delay value of the DLN queue and the minimum delay value of the DLN queue.
502. And the forwarding equipment acquires a first time delay according to the length of the DLN queue and the input bandwidth of the DLN queue.
In the embodiment of the present application, the methods 501 to 502 may be referred to as 301 to 302, and may also be referred to as 401 to 402, which are not described herein again.
503. The forwarding device determines whether the first delay is greater than or equal to the minimum delay value of the DLN queue and less than the maximum delay value of the DLN queue, and if so, executes 504.
The method by which the forwarding device compares the first delay with the minimum delay value of the DLN queue can be seen in 403. The method for the forwarding device to compare the first delay with the maximum delay value of the DLN queue can be seen in 303.
For example, if the first delay is greater than or equal to the minimum delay value of the DLN queue and less than the maximum delay value of the DLN queue, the forwarding device executes 504. When the first time delay is greater than or equal to the minimum time delay value of the DLN queue and less than the maximum time delay value of the DLN queue, the forwarding device may adopt the fair scheduling manner or the priority scheduling manner.
504. The forwarding equipment acquires the length of the BE queue, the input bandwidth of the BE queue and the time delay value of the BE queue.
For example, the input bandwidth of the BE queue may BE represented as R2. The latency value of the BE queue may BE identified as T2. R2 and T2 may be preset or may be external inputs. If the input is external input, when the judgment process needs to use R2 and T2, corresponding data is input from the outside of the device. The process of obtaining the length of the BE queue, the input bandwidth of the BE queue, and the delay value of the BE queue in step 504 may also BE performed separately, and only needs to BE obtained before use, without considering the situation of the DLN queue.
505. And the forwarding equipment acquires a second time delay, wherein the second time delay is the ratio of the length of the BE queue to the input bandwidth of the BE queue.
For example, the second delay may be represented as Dq 2/R2.
It can be understood that, after obtaining the second delay, the forwarding device may further store the second delay, and in other steps, the forwarding device may directly make a call when the second delay needs to be used.
506. And the forwarding equipment judges whether the second time delay is greater than or equal to the time delay value of the BE queue or not, and if so, the step 507 is executed.
For example, the forwarding device may determine whether the second delay is greater than or equal to T2 in various ways, for example, the forwarding device may subtract T2 from Dq2/R2, and if the obtained calculation result is greater than or equal to zero, the forwarding device determines that the second delay is greater than or equal to the delay value of the BE queue. Or, the forwarding device divides Dq2/R2 by T2, and if the obtained calculation result is greater than or equal to 1, the forwarding device determines that the second delay is greater than or equal to the delay value of the BE queue, and other comparison manners are also included, which is not limited herein.
507. And the forwarding equipment adopts a fair queue scheduling mode.
For example, if the second delay is greater than or equal to T2, the forwarding device adds second identifiers to M of the head of the BE queue, where the second identifiers are used to indicate that the fair queue scheduling manner is adopted. And when the forwarding equipment identifies the second identifier in the message, the forwarding equipment adopts a fair queue scheduling mode. The forwarding device can fairly schedule and process the messages of the DLN queue and the messages of the BE queue.
In the embodiment of the application, the forwarding device further judges a second delay and a delay value of the BE queue when the first delay is between the minimum delay value of the DLN queue and the maximum delay value of the DLN queue by monitoring the length of the DLN queue and the length of the BE queue in real time, so that the forwarding in the BE queue is further considered under the condition of ensuring the forwarding of the DLN queue, the continuous packet loss of the BE queue can BE reduced, the delay requirement of a high-priority queue is met, and the service quality is improved.
The above describes the queue scheduling method in the embodiment of the present application, and the following describes the forwarding device in the embodiment of the present application, with reference to fig. 6, an embodiment of the forwarding device in the embodiment of the present application includes:
a first obtaining unit 601, configured to obtain a length of a DLN queue, an input bandwidth of the DLN queue, and a maximum delay value of the DLN queue;
a second obtaining unit 602, configured to obtain a first time delay, where the first time delay is a ratio of a length of the DLN queue to an input bandwidth of the DLN queue;
a first adjusting unit 603, configured to adopt a priority queue scheduling manner when it is determined that the first delay is greater than or equal to the maximum delay value of the DLN queue.
In the embodiment of the application, the forwarding device monitors the DLN queue in real time, and when the length of the message in the DLN queue reaches the maximum threshold value, that is, the time required for forwarding all messages in the DLN queue is greater than or equal to the maximum delay value, the message in the DLN queue is preferentially forwarded by adopting a priority queue scheduling mode, so that the delay requirement of a high-priority queue is met, and the service quality is improved.
Referring to fig. 7, another embodiment of a forwarding device in the embodiment of the present application includes: the first acquiring unit 601, the second acquiring unit 602, and the first adjusting unit 603 in the embodiment corresponding to fig. 6.
The first adjusting unit 603 is specifically configured to: adding a first identifier to N messages at the head of the DLN queue, wherein the first identifier is used for indicating that the priority queue scheduling mode is adopted, and N is an integer greater than or equal to 1; and after the first identifier is identified, processing the message of the DLN queue in a priority queue scheduling mode, wherein the DLN queue is a queue set as a high priority.
Optionally, the forwarding device may further include: a third obtaining unit 604 and a second adjusting unit 605. The third obtaining unit 604 is configured to obtain a minimum delay value of the DLN queue, where the minimum delay value of the DLN queue is smaller than the maximum delay value of the DLN queue. The second adjusting unit 605 is configured to adopt a fair queue scheduling manner when determining that the first delay is smaller than the minimum delay value of the DLN queue.
The second adjusting unit 605 is specifically configured to: adding a second identifier to L messages at the head of the DLN queue, wherein the second identifier is used for indicating that the fair queue scheduling mode is adopted, and L is an integer greater than or equal to 1; and after the second identifier is identified, processing the messages of the DLN queue by adopting the fair queue scheduling mode.
Referring to fig. 8, another embodiment of a forwarding device in the embodiment of the present application includes: the first acquiring unit 601, the second acquiring unit 602, and the first adjusting unit 603 in the embodiment corresponding to fig. 7. This embodiment further includes a third obtaining unit 604 and a second adjusting unit 605 in the embodiment corresponding to fig. 7.
Optionally, the forwarding device may further include: a fourth acquisition unit 606, a fifth acquisition unit 607, and a third adjustment unit 608. The fourth obtaining unit 606 is configured to obtain the length of the BE queue, the input bandwidth of the BE queue, and the delay value of the BE queue when it is determined that the first delay is greater than or equal to the minimum delay value of the DLN queue and the first delay is less than the maximum delay value of the DLN queue. The fifth obtaining unit 607 is configured to obtain a second delay, where the second delay is a ratio of a length of the BE queue to an input bandwidth of the BE queue. The third adjusting unit 608 is configured to determine that the second delay is greater than or equal to the delay value of the BE queue, and use a fair queue scheduling manner.
Fig. 6 to fig. 8 respectively describe the forwarding devices in the embodiment of the present application in detail from the perspective of the modular functional entity, and the forwarding devices in the embodiment of the present application are described in detail from the perspective of hardware processing.
Fig. 9a is a schematic structural diagram of a forwarding device according to an embodiment of the present application, and refer to fig. 9 a. In case of an integrated unit, fig. 9a shows a possible schematic structural diagram of the forwarding device involved in the above-described embodiment. The forwarding device 900 includes: a processing unit 902 and a communication unit 903. Processing unit 902 is configured to control and manage actions of the forwarding device, e.g., processing unit 902 is configured to support the forwarding device to perform steps 301 to 305 in fig. 3, and/or other processes for the techniques described herein. The communication unit 903 is used to support communication of the forwarding device with other network entities. The flow forwarding device may further comprise a storage unit 901 for storing program codes and data of the forwarding device.
The Processing Unit 902 may be a Processor or a controller, such as a Central Processing Unit (CPU), a general-purpose Processor, a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. A processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, a DSP and a microprocessor, or the like. The communication unit 903 may be a communication interface, a transceiver circuit, etc., wherein the communication interface is a generic term and may include one or more interfaces, such as a transceiver interface. The storage unit 901 may be a memory.
When the processing unit 902 is a processor, the communication unit 903 is a communication interface, and the storage unit 901 is a memory, the forwarding device according to the embodiment of the present application may be the forwarding device shown in fig. 9 b.
Referring to fig. 9b, the forwarding device 910 includes: a processor 912, a communication interface 913, and a memory 911. Optionally, forwarding device 910 may also include a bus 914. Wherein, the communication interface 913, the processor 912, and the memory 911 may be connected to each other through a bus 914; the bus 914 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 914 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 9b, but this does not indicate only one bus or one type of bus.
The forwarding device structure shown in fig. 9a or fig. 9b may also be a structure of a partial module of the forwarding device, as shown in fig. 10, the forwarding device includes a main control board, a switch network board, an uplink single board or a downlink single board, and the uplink single board or the downlink single board includes the processor, the memory, and the communication interface, and specific functions are not described herein again. The uplink board is used for transmitting an uplink message, and the downlink board is used for transmitting a downlink message.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Claims (10)
1. A method for queue scheduling, the method comprising:
the method comprises the steps that forwarding equipment obtains the length of a DLN queue of a deterministic delay network, the input bandwidth of the DLN queue and the maximum delay value of the DLN queue, wherein the maximum delay value is a threshold value used for determining whether the DLN queue adopts a priority queue scheduling mode;
the forwarding equipment acquires a first time delay, wherein the first time delay is the ratio of the length of the DLN queue to the input bandwidth of the DLN queue;
when the forwarding equipment determines that the first time delay is greater than or equal to the maximum time delay value of the DLN queue, a priority queue scheduling mode is adopted to preferentially schedule and forward the messages of the DLN queue;
the forwarding equipment acquires a minimum delay value of a DLN queue, wherein the minimum delay value of the DLN queue is smaller than a maximum delay value of the DLN queue;
the forwarding equipment determines that the first time delay is greater than or equal to the minimum time delay value of the DLN queue, and when the first time delay is smaller than the maximum time delay value of the DLN queue, the length of a best effort BE queue, the input bandwidth of the BE queue and the time delay value of the BE queue are obtained;
the forwarding equipment acquires a second time delay, wherein the second time delay is the ratio of the length of the BE queue to the input bandwidth of the BE queue;
and when the forwarding equipment determines that the second time delay is greater than or equal to the time delay value of the BE queue, adopting a fair queue scheduling mode.
2. The method of claim 1, wherein when the forwarding device determines that the first delay is greater than or equal to the maximum delay value of the DLN queue, employing a priority queue scheduling manner comprises:
the forwarding device adds a first identifier to N messages at the head of the DLN queue, wherein the first identifier is used for indicating that the priority queue scheduling mode is adopted, and N is an integer greater than or equal to 1;
and after recognizing the first identifier, the forwarding device processes the message of the DLN queue in a priority queue scheduling mode, wherein the DLN queue is a queue set to be at a high priority.
3. The method of claim 1, further comprising:
the forwarding equipment acquires a minimum delay value of a DLN queue, wherein the minimum delay value of the DLN queue is smaller than a maximum delay value of the DLN queue;
and when the forwarding equipment determines that the first time delay is smaller than the minimum time delay value of the DLN queue, adopting a fair queue scheduling mode.
4. The method of claim 3, wherein when the forwarding device determines that the first delay is smaller than the minimum delay value of the DLN queue, employing a fair queue scheduling manner comprises:
the forwarding device adds a second identifier to the L messages at the head of the DLN queue, wherein the second identifier is used for indicating that the fair queue scheduling mode is adopted, and L is an integer greater than or equal to 1;
and after recognizing the second identifier, the forwarding device processes the message of the DLN queue by adopting the fair queue scheduling mode.
5. The method of claim 1, wherein when the forwarding device determines that the second delay is greater than or equal to the delay value of the BE queue, employing a fair queue scheduling manner comprises:
the forwarding device adds a second identifier to the M messages at the head of the BE queue, wherein the second identifier is used for indicating that the fair queue scheduling mode is adopted, and M is an integer greater than or equal to 1;
and after recognizing the second identifier, the forwarding device processes the message of the BE queue and the message of the DLN queue by adopting the fair queue scheduling mode.
6. A forwarding device, characterized in that the forwarding device comprises:
the device comprises a first obtaining unit, a second obtaining unit and a third obtaining unit, wherein the first obtaining unit is used for obtaining the length of a DLN queue of a deterministic delay network, the input bandwidth of the DLN queue and the maximum delay value of the DLN queue, and the maximum delay value is a threshold value used for determining whether the DLN queue adopts a priority queue scheduling mode;
a second obtaining unit, configured to obtain a first time delay, where the first time delay is a ratio of a length of the DLN queue to an input bandwidth of the DLN queue;
a first adjusting unit, configured to preferentially schedule and forward the packet of the DLN queue in a priority queue scheduling manner when it is determined that the first time delay is greater than or equal to the maximum time delay value of the DLN queue;
a third obtaining unit, configured to obtain a minimum delay value of a DLN queue, where the minimum delay value of the DLN queue is smaller than a maximum delay value of the DLN queue;
a fourth obtaining unit, configured to obtain a length of a best effort BE queue, an input bandwidth of the BE queue, and a delay value of the BE queue when it is determined that the first delay is greater than or equal to the minimum delay value of the DLN queue and the first delay is less than the maximum delay value of the DLN queue;
a fifth obtaining unit, configured to obtain a second time delay, where the second time delay is a ratio of a length of the BE queue to an input bandwidth of the BE queue;
and the third adjusting unit is used for adopting a fair queue scheduling mode when the second time delay is determined to BE greater than or equal to the time delay value of the BE queue.
7. The forwarding device of claim 6, wherein the first adjusting unit is specifically configured to:
adding a first identifier to N messages at the head of the DLN queue, wherein the first identifier is used for indicating that the priority queue scheduling mode is adopted, and N is an integer greater than or equal to 1;
and after the first identifier is identified, processing the message of the DLN queue in a priority queue scheduling mode, wherein the DLN queue is a queue set as a high priority.
8. The forwarding device of claim 6, wherein the forwarding device further comprises:
a third obtaining unit, configured to obtain a minimum delay value of a DLN queue, where the minimum delay value of the DLN queue is smaller than a maximum delay value of the DLN queue;
and the second adjusting unit is used for adopting a fair queue scheduling mode when the first time delay is determined to be smaller than the minimum time delay value of the DLN queue.
9. The forwarding device of claim 8, wherein the second adjusting unit is specifically configured to:
adding a second identifier to L messages at the head of the DLN queue, wherein the second identifier is used for indicating that the fair queue scheduling mode is adopted, and L is an integer greater than or equal to 1;
and after the second identifier is identified, processing the messages of the DLN queue by adopting the fair queue scheduling mode.
10. The forwarding device of claim 6, wherein the third adjusting unit is specifically configured to:
adding a second identifier to M messages at the head of the BE queue, wherein the second identifier is used for indicating that the fair queue scheduling mode is adopted, and M is an integer greater than or equal to 1;
and after the second identifier is identified, processing the message of the BE queue and the message of the DLN queue by adopting the fair queue scheduling mode.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710176237.9A CN108632162B (en) | 2017-03-22 | 2017-03-22 | Queue scheduling method and forwarding equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710176237.9A CN108632162B (en) | 2017-03-22 | 2017-03-22 | Queue scheduling method and forwarding equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108632162A CN108632162A (en) | 2018-10-09 |
CN108632162B true CN108632162B (en) | 2021-03-23 |
Family
ID=63707172
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710176237.9A Active CN108632162B (en) | 2017-03-22 | 2017-03-22 | Queue scheduling method and forwarding equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108632162B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117279034A (en) * | 2022-06-15 | 2023-12-22 | 中兴通讯股份有限公司 | Information processing method, apparatus, and storage medium |
CN117768409A (en) * | 2022-09-16 | 2024-03-26 | 中兴通讯股份有限公司 | Message scheduling method, network device, storage medium and computer program product |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100568850C (en) * | 2005-12-05 | 2009-12-09 | 中兴通讯股份有限公司 | A kind of device and method that is suitable for flow business scheduling |
US8046559B2 (en) * | 2008-03-27 | 2011-10-25 | Intel Corporation | Memory rank burst scheduling |
CN101557340B (en) * | 2009-05-07 | 2011-09-21 | 中兴通讯股份有限公司 | Method for realizing multilevel queue scheduling in data network and device |
CN101834787A (en) * | 2010-04-12 | 2010-09-15 | 中兴通讯股份有限公司 | Method and system for dispatching data |
CN102014052B (en) * | 2010-11-05 | 2013-12-11 | 中国科学院声学研究所 | Virtual dynamic priority packet dispatching method |
CN103596285A (en) * | 2012-08-16 | 2014-02-19 | 华为技术有限公司 | Wireless resource scheduling method, wireless resource scheduler and system thereof |
WO2014084767A1 (en) * | 2012-11-30 | 2014-06-05 | Telefonaktiebolaget Lm Ericsson (Publ) | Transmitting radio node and method therein for scheduling service data flows |
CN105915468B (en) * | 2016-06-17 | 2019-03-29 | 北京邮电大学 | A kind of dispatching method and device of business |
-
2017
- 2017-03-22 CN CN201710176237.9A patent/CN108632162B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN108632162A (en) | 2018-10-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11316795B2 (en) | Network flow control method and network device | |
US9185047B2 (en) | Hierarchical profiled scheduling and shaping | |
US20110310738A1 (en) | Congestion buffer control in wireless networks | |
US11968111B2 (en) | Packet scheduling method, scheduler, network device, and network system | |
US9007901B2 (en) | Method and apparatus providing flow control using on-off signals in high delay networks | |
EP2093945B1 (en) | A method for realizing back pressure of masses of ports and the device thereof | |
Romanchuk et al. | Method for processing multiservice traffic in network node based on adaptive management of buffer resource | |
US8379518B2 (en) | Multi-stage scheduler with processor resource and bandwidth resource allocation | |
EP2850907B1 (en) | Method and arrangement for admission control in a shared channel environment | |
US7843825B2 (en) | Method and system for packet rate shaping | |
US11695702B2 (en) | Packet forwarding apparatus, method and program | |
EP1817878B1 (en) | Fair air-time transmission regulation without explicit traffic specifications for wireless networks | |
EP3025544A1 (en) | Method and network node for congestion management in a wireless communications network | |
CN108632162B (en) | Queue scheduling method and forwarding equipment | |
CN115037694A (en) | Data transmission method and device, electronic equipment and storage medium | |
CN115622952A (en) | Resource scheduling method, device, equipment and computer readable storage medium | |
CN102594669A (en) | Data message processing method, device and equipment | |
US11785635B2 (en) | Communication system enabled to minimize negative communication effects | |
US20150163148A1 (en) | Packet Scheduling in a Communication Network | |
CN107404454B (en) | Call quality adjusting method and device | |
CN116889024A (en) | Data stream transmission method, device and network equipment | |
CN109391558B (en) | Queue control method and device | |
WO2022135202A1 (en) | Method, apparatus and system for scheduling service flow | |
CN113765796A (en) | Flow forwarding control method and device | |
KR101681613B1 (en) | Apparatus and method for scheduling resources in distributed parallel data transmission system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |