A queue scheduling method, computer device and medium

By introducing a head-blocking mitigation module in scenarios such as data centers, and by statistically analyzing traffic ratios and marking hot queues, the problems of queue head congestion and low bandwidth utilization are solved, achieving traffic balancing and efficient bandwidth utilization.

CN121056411BActive Publication Date: 2026-02-17ZHUHAI XINGYUN ZHILIAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511590183.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-03
Publication Date
2026-02-17
Estimated Expiration
2045-11-03

AI Technical Summary

Technical Problem

In data centers, high-performance servers, cloud platforms, and artificial intelligence infrastructure, traffic imbalances between different Ethernet ports within the same binding group can lead to queue head congestion and low bandwidth utilization due to queue selection mechanisms.

Method used

By introducing a head-blocking mitigation module, the traffic ratio of each queue through each Ethernet port is statistically analyzed, hotspot queues are marked, and scheduling of these queues is stopped when backpressure occurs on the Ethernet port. This avoids modifying the kernel's native driver and the mapping relationship between queues and Ethernet ports, and adopts an optimized design that combines software and hardware.

Benefits of technology

It effectively alleviates the queue head blocking problem, improves bandwidth utilization, and maintains traffic balance among ports within the binding group when the number of streams is low, adapting to existing mapping relationships and binding modes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121056411B_ABST
    Figure CN121056411B_ABST
Patent Text Reader

Abstract

The application relates to the computer technical field and provides a queue scheduling method, computer equipment and a medium. Hot spot queues of each Ethernet port are identified by counting the traffic proportion of each queue sent through each Ethernet port, and a sending scheduling module determines whether to stop scheduling the queue based on the port hot spot queue and the port back pressure state, so that the port queue head blocking problem is solved, and the traffic balance between each port in the same binding port group is maintained when the flow number is small.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a queue scheduling method, computer equipment, and medium. Background Technology

[0002] In applications such as data centers, high-performance servers, cloud platforms, and artificial intelligence infrastructure, network interface card (NIC) functions are provided through data processing units (DPUs). Multiple Ethernet ports are virtualized into a single port using bonding technology to increase bandwidth utilization, improve system reliability, and achieve load balancing. However, due to the influence of software delivery and protocol stack queue selection mechanisms, traffic imbalances may exist between different Ethernet ports within the same bonding group. This can cause a port's traffic to reach its limit, triggering backpressure. If all queue scheduling is stopped to alleviate the backpressure on that port, it can lead to head-of-line blocking, where subsequent requests cannot be processed in a timely manner due to delays in previous requests or data processing, resulting in underutilization of bandwidth resources. Existing technologies propose two types of queue scheduling schemes to avoid head-of-line blocking. One type of queue scheduling scheme uses a proprietary driver to select queues during packet transmission. This involves establishing a mapping between queues and Ethernet ports, so that when backpressure occurs on a particular Ethernet port, the corresponding queue is backpressured while other queues are maintained. However, introducing a proprietary driver inevitably modifies the kernel's native network driver, limiting its usability. Another type of queue scheduling scheme groups queues according to certain rules, such as odd / even groups, and then maps different groups of queues to different Ethernet ports. When backpressure occurs on a particular Ethernet port, the backpressure operation is executed for the queues in the corresponding group. However, introducing queue grouping may conflict with the port selection method of software binding schemes. Software binding schemes typically use the protocol stack to calculate the destination port number based on the packet's five-tuple and a hash algorithm. Therefore, this may conflict with queue grouping rules, making it difficult to distribute traffic evenly across different queue groups through hashing algorithms, resulting in low bandwidth utilization and hindering the alleviation of queue head congestion.

[0003] To address this technical challenge, this application provides a queue scheduling method, computer device, and medium. Summary of the Invention

[0004] Firstly, this application provides a queue scheduling method. The queue scheduling method includes: receiving, through a header blocking module, source queue number, destination port, and message length information of multiple messages in a transmission pipeline from a message forwarding module, wherein the multiple messages are added to the transmission pipeline after scheduling multiple queues by a transmission scheduling module; the source queue number of a given message in the multiple messages indicates the queue corresponding to the given message in the multiple queues, and the destination port of the given message indicates the Ethernet port corresponding to the given message in a multiple Ethernet port; and through the header blocking module, counting the number of message bytes sent by a given queue through each of the multiple Ethernet ports within a preset time window, thereby calculating the number of messages sent by the given queue through each of the multiple Ethernet ports. The ratio of the number of message bytes to the total number of message bytes sent by the given queue through the multiple Ethernet ports is used as the traffic ratio of each of the multiple Ethernet ports corresponding to the given queue. Through the head-blocking mitigation module, when the traffic ratio of a given Ethernet port corresponding to the given queue exceeds a preset threshold ratio, the given queue is marked as a hotspot queue of the given Ethernet port, and the hotspot queue information of the given Ethernet port in the transmission scheduling module is updated. Specifically, when backpressure occurs on the given Ethernet port, the transmission scheduling module stops scheduling all hotspot queues of the given Ethernet port indicated in the hotspot queue information for the given Ethernet port for the given Ethernet port.

[0005] Through the first aspect of this application, and through optimized design combining hardware and software, a head-blocking mitigation module is introduced as an additional module without intervening in the packet forwarding operation of the packet forwarding module. Therefore, it does not involve modifying the kernel's native network driver or the existing mapping relationship between queues and Ethernet ports. Based on the hotspot queue marking and scheduling strategy, a fixed mapping relationship between Ethernet ports and queues is not required, thus avoiding modification of the existing mapping relationship between queues and Ethernet ports. It can also adapt to the existing mapping relationship between queues used for traffic transmission and Ethernet ports used for external transmission, and can also adapt to situations where there is no fixed mapping relationship between ports and queues in the bonded mode. By statistically analyzing the proportion of traffic sent by each queue through each Ethernet port, the hotspot queue of each Ethernet port is identified. The sending scheduling module decides whether to stop scheduling the queue based on the port hotspot queue and the port backpressure status, thereby solving the port queue head blocking problem and helping to maintain traffic balance among ports within the same bonded port group when the number of flows is small.

[0006] In one possible implementation of the first aspect of this application, the sending scheduling module and the message forwarding module are proprietary modules of the message sending system, and the plurality of messages are sent by the software side associated with the message sending system.

[0007] In one possible implementation of the first aspect of this application, the plurality of Ethernet ports are bound to one or more virtual ports, and the destination port of each of the plurality of packets is determined by the kernel network driver of the packet sending system or the protocol stack on the software side.

[0008] In one possible implementation of the first aspect of this application, the given queue represents each of the plurality of queues, and the headblock mitigation module is used to calculate the traffic ratio of each of the plurality of Ethernet ports to each of the plurality of queues.

[0009] In one possible implementation of the first aspect of this application, the given Ethernet port represents each of the plurality of Ethernet ports, and the headblock mitigation module is used to update the hotspot queue information of each of the plurality of Ethernet ports.

[0010] In one possible implementation of the first aspect of this application, the queue scheduling method further includes: using the headblock mitigation module, when the traffic ratio of the given Ethernet port corresponding to the given queue is not higher than the preset threshold ratio, marking the given queue as a non-hotspot queue of the given Ethernet port, and updating the hotspot queue information of the given Ethernet port in the transmission scheduling module, wherein the transmission scheduling module normally schedules the non-hotspot queue of the given Ethernet port when backpressure occurs on the given Ethernet port.

[0011] In one possible implementation of the first aspect of this application, the headblock mitigation module is configured to, at the end of the preset time window, clear the number of message bytes sent by each of the plurality of queues through each of the plurality of Ethernet ports respectively.

[0012] In one possible implementation of the first aspect of this application, the preset time window is any one of a plurality of periodically repeated detection time periods, wherein the headblock mitigation module is configured to, at the end of the detection time period corresponding to the preset time window, clear the number of packet bytes sent by each of the plurality of queues through each of the plurality of Ethernet ports, and, at the beginning of the next detection time period corresponding to the preset time window, re-execute the queue scheduling method.

[0013] In one possible implementation of the first aspect of this application, the preset threshold ratio is 70%.

[0014] In one possible implementation of the first aspect of this application, the preset threshold ratio is determined based on the total number of hotspot queues indicated by the hotspot queue information of each of the plurality of Ethernet ports.

[0015] In one possible implementation of the first aspect of this application, the hotspot queue information of the given Ethernet port is a hotspot queue bitmap, which uses binary values ​​to indicate whether each of the plurality of queues is a hotspot queue of the given Ethernet port.

[0016] In one possible implementation of the first aspect of this application, the length of the preset time window is 10 microseconds.

[0017] In one possible implementation of the first aspect of this application, the length of the preset time window is based on the stability of the traffic model, and the length of the preset time window when the stability of the traffic model is high is greater than the length of the preset time window when the stability of the traffic model is low.

[0018] Secondly, embodiments of this application also provide a computer device, the computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a method according to any of the above-mentioned implementations.

[0019] Thirdly, embodiments of this application also provide a computer-readable storage medium storing computer instructions that, when executed on a computer device, cause the computer device to perform a method according to any of the above-described implementations.

[0020] Fourthly, embodiments of this application also provide a computer program product, the computer program product including instructions stored on a computer-readable storage medium, which, when executed on a computer device, cause the computer device to perform a method according to any of the above-described aspects. Attached Figure Description

[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 A flowchart illustrating a queue scheduling method provided in an embodiment of this application;

[0023] Figure 2 A schematic diagram of a message sending system provided in an embodiment of this application;

[0024] Figure 3 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Detailed Implementation

[0025] The embodiments of this application will now be described in further detail with reference to the accompanying drawings.

[0026] It should be understood that in the description of this application, "at least one" means one or more, and "multiple" means two or more. In addition, the words "first," "second," etc., unless otherwise stated, are used only for the purpose of distinguishing descriptions and should not be construed as indicating or implying relative importance or order.

[0027] Figure 1 This is a flowchart illustrating a queue scheduling method provided in an embodiment of this application. Figure 1 As shown, the queue scheduling method includes the following steps.

[0028] Step S101: Through the header reduction module, receive the source queue number, destination port and message length information of each of the multiple messages in the transmission pipeline from the message forwarding module. The multiple messages are added to the transmission pipeline after the transmission scheduling module schedules multiple queues. The source queue number of a given message in the multiple messages indicates the queue corresponding to the given message in the multiple queues, and the destination port of the given message indicates the Ethernet port corresponding to the given message in the multiple Ethernet ports.

[0029] Step S103: Using the head-blocking relief module, the number of packet bytes sent by a given queue in the plurality of queues through each of the plurality of Ethernet ports within a preset time window is counted. The ratio of the number of packet bytes sent by the given queue through each of the plurality of Ethernet ports to the total number of packet bytes sent by the given queue through the plurality of Ethernet ports is calculated and used as the traffic ratio of each of the plurality of Ethernet ports corresponding to the given queue.

[0030] Step S105: Through the head-blocking relief module, when the traffic ratio of a given Ethernet port among the plurality of Ethernet ports corresponding to the given queue exceeds a preset threshold ratio, the given queue is marked as a hotspot queue of the given Ethernet port, and the hotspot queue information of the given Ethernet port in the sending scheduling module is updated. The sending scheduling module stops scheduling all hotspot queues of the given Ethernet port indicated in the hotspot queue information of the given Ethernet port for the given Ethernet port when back pressure occurs on the given Ethernet port.

[0031] See Figure 1 , Figure 1 The queue scheduling method shown can be used in application scenarios such as data centers, high-performance servers, cloud platforms, and artificial intelligence infrastructure. It can be used in conjunction with a data processing unit (DPU) to provide network interface card (NIC) functionality. It also supports increasing bandwidth utilization by binding multiple Ethernet ports into one or more virtual network ports through bonding technology. Figure 1The queue scheduling method shown can effectively solve the head-of-line blocking problem on the sending port without modifying the hash algorithm (or other hashing algorithm) of the binding offloading process. This addresses the situation where subsequent requests cannot be processed in a timely manner due to delays in previous requests or data processing in the queue, thus ensuring full utilization of the total bandwidth resources of the bounded ports. However, in the binding mode, due to the influence of software delivery and the protocol stack's queue selection mechanism, traffic distribution among different Ethernet ports within the same binding group may be uneven. Furthermore, under normal circumstances, the traffic sent through different Ethernet ports in the same queue is also uneven; for example, most of the traffic in the same queue may be sent through one Ethernet port, while only a small portion may be sent through other Ethernet ports. Therefore, when the traffic on a certain Ethernet port reaches its limit and triggers backpressure, it is necessary to consider how to alleviate the backpressure through scheduling configuration while minimizing the impact on the traffic of other Ethernet ports that are not experiencing backpressure. On the one hand, due to limitations imposed by the kernel's native network driver, it's difficult to modify the mapping between queues used for traffic transmission and Ethernet ports. Therefore, introducing a proprietary driver to intervene in the queue selection mechanism during packet transmission inevitably leads to modifications to the kernel's native network driver, which imposes limitations on network products such as data processing units. On the other hand, the packets to be sent are issued by the software side, which may employ a software binding scheme, such as calculating the destination port number based on the packet's five-tuple using the protocol stack. This means that, influenced by the software-issued packets and the protocol stack's queue selection mechanism, traffic is distributed to queues via hashing algorithms. This implies that if a queue scheduling mechanism is introduced, such as adding new grouping rules to group queues and executing backpressure operations on queues within those groups, it may conflict with the software-side queue selection mechanism. This could result in traffic not being evenly distributed across different queue groups via hashing algorithms, leading to low bandwidth utilization and hindering the alleviation of queue head congestion. Therefore, it is necessary not only to avoid modifying the existing scheduling mechanism, including the hash algorithm used to select queues, but also to avoid modifying the existing mapping relationship between queues and Ethernet ports. That is, it is necessary to adapt the existing mapping relationship between queues used for traffic transmission and Ethernet ports used for external transmission, and also to adapt to situations where there may be no fixed mapping relationship between ports and queues in the bonded mode. The following detailed description, in conjunction with specific embodiments and accompanying drawings, illustrates this application. Figure 1 The queue scheduling method shown effectively solves the port queue head blocking problem under the above considerations.

[0032] Continue reading Figure 1In step S101, the header blocking mitigation module receives the source queue number, destination port, and message length information of each of the multiple messages in the transmission pipeline from the message forwarding module. These multiple messages are added to the transmission pipeline after scheduling multiple queues by the transmission scheduling module. The source queue number of a given message indicates the queue corresponding to that given message among the multiple queues, and the destination port of the given message indicates the Ethernet port corresponding to that given message among the multiple Ethernet ports. Thus, through an optimized design combining hardware and software, an additional header blocking mitigation module is introduced to solve the queue head blocking problem. The header blocking mitigation module receives the source queue number, destination port, and message length information of each of the multiple messages in the transmission pipeline from the message forwarding module, providing a basis for subsequent processes. It should be understood that the message forwarding module is used to receive messages from the upper-level module and perform corresponding forwarding, that is, to send them to the corresponding Ethernet port. Therefore, the head-blocking mitigation module obtains relevant information through the packet forwarding module and does not intervene in the packet forwarding operation of the packet forwarding module. Thus, it does not involve modifying the kernel's native network driver or the existing mapping relationship between queues and Ethernet ports.

[0033] Continue reading Figure 1In step S103, the head-blocking module counts the number of bytes of packets sent by a given queue through each of the multiple Ethernet ports within a preset time window. This calculates the ratio of the number of bytes sent by the given queue through each of the multiple Ethernet ports to the total number of bytes sent by the given queue through the multiple Ethernet ports. This ratio is used as the traffic proportion of each of the multiple Ethernet ports corresponding to the given queue. For example, assuming the multiple Ethernet ports are two Ethernet ports, Ethernet port 0 and Ethernet port 1, the number of bytes of packets sent by each queue through Ethernet port 0 and Ethernet port 1 within a preset time window is counted. This can be achieved using the information obtained by the packet forwarding module in the previous step S101. Then, for a given queue, the count values ​​for Ethernet port 0 and Ethernet port 1 can be obtained. Adding these two values ​​gives the sum of the traffic sent by the given queue through the two Ethernet ports. By using the count value of Ethernet port 0 as the dividend and the sum of the count values ​​of Ethernet port 0 and Ethernet port 1 as the divisor, the proportion of traffic sent by a given queue through Ethernet port 0 to the sum of traffic sent by the given queue through the two Ethernet ports can be calculated. Similarly, by using the count value of Ethernet port 1 as the dividend and the sum of the count values ​​of Ethernet port 0 and Ethernet port 1 as the divisor, the proportion of traffic sent by a given queue through Ethernet port 1 to the sum of traffic sent by the given queue through the two Ethernet ports can be calculated. Thus, the traffic proportion corresponding to the given queue for each of the plurality of Ethernet ports can be calculated, where the traffic proportion indicates the distribution ratio of traffic sent by the given queue through the plurality of Ethernet ports. It should be understood that calculating the proportion of packet bytes sent by the given queue through each of the plurality of Ethernet ports relative to the total number of packet bytes sent by the given queue through the plurality of Ethernet ports as the traffic proportion corresponding to the given queue for each of the plurality of Ethernet ports means that the traffic proportion is bound to the given queue. In other words, each of the multiple queues has multiple traffic ratios, which correspond one-to-one with multiple Ethernet ports, indicating the proportion of traffic allocated to that queue through the multiple Ethernet ports. Therefore, if all the multiple traffic ratios bound to a certain queue are added together, the final result should be 100%.

[0034] Continue reading Figure 1In step S105, through the head-blocking mitigation module, when the traffic ratio corresponding to the given queue for a given Ethernet port among the plurality of Ethernet ports exceeds a preset threshold ratio, the given queue is marked as a hotspot queue for the given Ethernet port, and the hotspot queue information of the given Ethernet port in the sending scheduling module is updated. Specifically, when backpressure occurs on the given Ethernet port, the sending scheduling module stops scheduling all hotspot queues of the given Ethernet port indicated in the hotspot queue information for that given Ethernet port for that given Ethernet port. As mentioned above, each of the plurality of queues has multiple traffic ratios, which correspond one-to-one with the plurality of Ethernet ports, indicating the traffic distribution ratio of the queue sent through the plurality of Ethernet ports. Assuming that the traffic ratio of a certain queue sent across various Ethernet ports is not significantly different, this indicates that the traffic distribution of the queue is relatively uniform, and therefore generally will not cause head-blocking. Furthermore, the traffic ratio of this queue on each Ethernet port should not exceed the preset threshold ratio; therefore, this queue will not be marked as a hotspot queue on any Ethernet port, and will not be stopped from scheduling when backpressure occurs. Conversely, assuming a queue experiences significant differences in traffic distribution across various Ethernet ports—perhaps its traffic distribution on one port is significantly higher than others, reaching 80% or 90%—this queue is more likely to experience head-of-line congestion when backpressure occurs on that Ethernet port. Therefore, this queue is marked as a hotspot queue for that Ethernet port, and scheduling of this queue stops when backpressure occurs. In some embodiments, a reasonable preset threshold ratio can be set based on experience and historical data, for example, 70%. This means that when the traffic distribution of a queue through a particular Ethernet port exceeds 70%, the number of packet bytes sent by that queue through that Ethernet port during a preset time window exceeds 70% of the total number of packet bytes sent by that queue through the multiple Ethernet ports combined. For a given Ethernet port, there may be multiple hotspot queues, meaning that multiple queues may each have a traffic distribution exceeding the preset threshold ratio through that Ethernet port. For a given queue, it may not be marked as a hotspot queue on any Ethernet port, or it may be marked as a hotspot queue on one or more Ethernet ports. Considering the design constraint that the sum of the traffic proportions bound to a queue should result in 100%, if the preset threshold proportion is set reasonably, such as 70%, then a queue can be marked as a hotspot queue by at most one Ethernet port. Table 1 below illustrates how to organize the relationship between multiple queues and multiple Ethernet ports based on the marking of hotspot queues:

[0035] Table 1

[0036]

[0037] The elements in Table 1 above represent the traffic proportion of a given queue on a given Ethernet port, that is, the ratio of the number of bytes of packets sent by the given queue through the given Ethernet port to the total number of bytes of packets sent by the given queue through the multiple Ethernet ports. Taking a preset threshold ratio of 70% as an example, it can be seen that for Ethernet port A, there is no hotspot queue. This means that when backpressure occurs on Ethernet port A, the sending scheduling module will not stop scheduling any queues, but will normally schedule queues 1, 2, 3, and 4 for traffic transmission on Ethernet port A. For Ethernet port B, the hotspot queues include queues 2 and 3. This means that when backpressure occurs on Ethernet port B, the sending scheduling module stops scheduling queues 2 and 3 for Ethernet port B, and normally schedules queues 1 and 4 for traffic transmission on Ethernet port B. For Ethernet port C, the hotspot queue includes queue 4. This means that when backpressure occurs on Ethernet port C, the sending scheduling module stops scheduling queue 4 for Ethernet port C, and normally schedules queues 1, 2, and 3 for traffic transmission on Ethernet port C. Thus, through the head-blocking mitigation module, based on the source queue number, destination port, and message length information of multiple packets in the transmission pipeline, the traffic ratio of each Ethernet port to the given queue is statistically calculated. This allows the module to mark whether the given queue is a hotspot queue for the given Ethernet port, thereby establishing a handling strategy for backpressure on the given Ethernet port using the hotspot queue information. Through optimized hardware and software design, by introducing the head-blocking mitigation module as an additional module into the existing packet transmission system, the head-blocking mitigation module receives the source queue number, destination port, and message length information provided by the packet forwarding module in the transmission pipeline, calculates and identifies the hotspot queue for each Ethernet port based on this information, and then, combined with the backpressure status of each Ethernet port, decides whether to stop scheduling the corresponding hotspot queue for that Ethernet port. Specifically, when the packet forwarding module in the transmission pipeline sends a packet, it obtains the source queue number, destination port, and message length information and passes it to the head-blocking mitigation module. The head-blocking mitigation module can maintain a count of the length of packets sent by each queue through each Ethernet port within a certain time window. Then, it polls the count of each queue by a timer and uses the count of each Ethernet port of the queue for the next level of calculation, while clearing the count of each port of the queue to zero.By calculating the proportion of bytes sent by each queue through each Ethernet port to the total number of bytes sent by all Ethernet ports, this proportion reflects the bandwidth ratio of the traffic sent by that queue through each port. This proportion is then compared to a preset threshold proportion (e.g., the bandwidth threshold proportion for hotspot queues). If it exceeds the preset threshold proportion, the queue is marked as a hotspot queue for that Ethernet port, and the information is recorded in the hotspot queue information of that Ethernet port, such as a hotspot queue bitmap. Each time the sending scheduling module schedules, it queries the hotspot queue information of each Ethernet port based on the queue number, for example, by querying the hotspot queue bitmap. If it finds that the queue is a hotspot queue for a certain Ethernet port and that Ethernet port is experiencing backpressure, the sending scheduling module will stop scheduling that queue to alleviate the backpressure on that Ethernet port; otherwise, it will schedule the queue normally. It can be seen that the above-described hotspot queue-based marking and scheduling strategy does not require a fixed mapping relationship between Ethernet ports and queues. Therefore, it avoids modifying the existing mapping relationship between queues and Ethernet ports, and can adapt to the existing mapping relationship between queues used for traffic transmission and Ethernet ports used for external transmission. It can also adapt to situations where there is no fixed mapping relationship between ports and queues in the bonded mode. Furthermore, when backpressure occurs on a certain Ethernet port, all hot queues indicated in the hot queue information of that Ethernet port are stopped from being used for that Ethernet port, thus effectively alleviating the port backpressure. In bonding mode, the hot queues of each Ethernet port are identified by statistically analyzing the proportion of traffic sent through each queue through each Ethernet port. The sending scheduling module decides whether to stop scheduling the queue based on the port's hot queue and the port's backpressure status, thereby solving the port queue head blocking problem and helping to maintain traffic balance among ports within the same bonding port group when the number of flows is low.

[0038] In short, Figure 1The queue scheduling method shown, through optimized design combining hardware and software, introduces a head-blocking mitigation module as an additional module without intervening in the packet forwarding operation of the packet forwarding module. Therefore, it does not involve modifying the kernel's native network driver or the existing mapping relationship between queues and Ethernet ports. Based on the hotspot queue marking and scheduling strategy, it does not require a fixed mapping relationship between Ethernet ports and queues, thus avoiding modification of the existing mapping relationship between queues and Ethernet ports. It can also adapt to the existing mapping relationship between queues used for traffic transmission and Ethernet ports used for external transmission, and can also adapt to situations where there is no fixed mapping relationship between ports and queues in the bonded mode. By statistically analyzing the proportion of traffic sent by each queue through each Ethernet port, the hotspot queue of each Ethernet port is identified. The sending scheduling module decides whether to stop scheduling the queue based on the port hotspot queue and the port backpressure status, thereby solving the port queue head blocking problem and helping to maintain traffic balance among ports within the same bonded port group when the number of flows is small.

[0039] Figure 2 This is a schematic diagram of a message sending system provided in an embodiment of this application. Figure 2 As shown, the message sending system 200 includes a sending scheduling module 201, a sending data module 203, a message forwarding module 205, and a message editing module 207. The sending data module 203, the message forwarding module 205, and the message editing module 207 together constitute the sending pipeline 210. Furthermore, Figure 2 The example also shows three Ethernet ports: Ethernet port A220, Ethernet port B222, and Ethernet port C224. Figure 2 The diagram also shows the head resistance mitigation module 230 and the software side 240.

[0040] Figure 2 The message sending system shown is referenced. Figure 1 The queue scheduling method shown supports the binding mode. It identifies the hot queue of each Ethernet port by statistically analyzing the proportion of traffic sent by each queue through each Ethernet port. The sending scheduling module 201 decides whether to stop scheduling the queue based on the hot queue of the port and the backpressure status of the port, thereby solving the problem of port queue head blocking. It also helps to maintain the traffic balance among the ports in the same binding port group when the number of flows is small.

[0041] See Figure 1 and Figure 2In one possible implementation, the sending scheduling module and the message forwarding module are proprietary modules of the message sending system, and the multiple messages are sent by the software associated with the message sending system. This achieves compatibility with existing message sending systems and software-side protocol stacks, as well as queue selection mechanisms, which facilitates wider application.

[0042] In some embodiments, the plurality of Ethernet ports are bound to one or more virtual ports, and the destination port of each of the plurality of packets is determined by the kernel network driver of the packet sending system or the protocol stack on the software side. Thus, by introducing a header mitigation module as an additional module, it does not intervene in the packet forwarding operation of the packet forwarding module, and therefore does not involve modifying the kernel's native network driver or the existing mapping relationship between queues and Ethernet ports. Based on the hotspot queue marking and scheduling strategy, it avoids modifying the existing scheduling mechanism, including avoiding modifying the hash algorithm used to select queues, and does not require a fixed mapping relationship between Ethernet ports and queues. Therefore, it avoids modifying the existing mapping relationship between queues and Ethernet ports, and can also adapt to the existing mapping relationship between queues used for traffic sending and Ethernet ports used for external transmission, and can also adapt to situations where there is no fixed mapping relationship between ports and queues in the bound mode.

[0043] In one possible implementation, the given queue represents each of the plurality of queues, and the head-blocking mitigation module is used to calculate the traffic ratio between each of the plurality of Ethernet ports and each of the plurality of queues. Thus, by calculating the traffic ratio of each queue transmitted through each Ethernet port, the hotspot queue of each Ethernet port is identified. The transmission scheduling module determines whether to stop scheduling the queue based on the hotspot queue and the port backpressure status, thereby resolving the port queue head-blocking problem and helping to maintain traffic balance among ports within the same bonded port group when the number of flows is low.

[0044] In some embodiments, the given Ethernet port represents each of the plurality of Ethernet ports, and the head-blocking mitigation module is used to update the hotspot queue information of each of the plurality of Ethernet ports. This supports a bonding mode, effectively solves the port queue head-blocking problem, and improves bandwidth utilization.

[0045] In one possible implementation, the queue scheduling method further includes: using the head-blocking mitigation module, when the traffic ratio of a given Ethernet port corresponding to the given queue is not higher than the preset threshold ratio, marking the given queue as a non-hotspot queue of the given Ethernet port, and updating the hotspot queue information of the given Ethernet port in the sending scheduling module, wherein the sending scheduling module normally schedules the non-hotspot queues of the given Ethernet port when backpressure occurs on the given Ethernet port. Thus, through the head-blocking mitigation module, based on the source queue number, destination port, and message length information of multiple packets in the transmission pipeline, the traffic ratio of each of the multiple Ethernet ports corresponding to the given queue is statistically obtained. This allows marking whether the given queue is a hotspot queue of the given Ethernet port, thereby establishing a processing strategy for backpressure on the given Ethernet port using the hotspot queue information of the given Ethernet port. In bonded mode, the hot queues of each Ethernet port are identified by statistically analyzing the proportion of traffic sent by each queue through each Ethernet port. The sending scheduling module decides whether to stop scheduling the queue based on the hot queues and the backpressure status of the port, thereby solving the problem of port queue head blocking and helping to maintain traffic balance among ports within the same bonded port group when the number of flows is small.

[0046] In one possible implementation, the head-blocking mitigation module is used to, at the end of the preset time window, reset the number of packet bytes sent by each of the plurality of queues through each of the plurality of Ethernet ports. This achieves state reset, enabling statistics and monitoring for the next time window.

[0047] In one possible implementation, the preset time window is any one of a plurality of periodically repeating detection time periods. The head-blocking mitigation module is configured to, at the end of the detection time period corresponding to the preset time window, reset the number of packet bytes sent by each of the plurality of queues through each of the plurality of Ethernet ports, and, at the beginning of the next detection time period corresponding to the preset time window, re-execute the queue scheduling method. This achieves periodic monitoring of hotspot queues and backpressure processing, which helps improve overall data transmission efficiency.

[0048] In one possible implementation, the preset threshold ratio is 70%. If the traffic distribution ratio of each queue across all ports is relatively close, it indicates a more even traffic distribution, and queue head congestion is generally unlikely. Queue head congestion typically occurs when the traffic distribution ratio of queues across different ports deviates significantly. Furthermore, actual testing of the protocol stack's traffic model revealed substantial deviations in the traffic distribution ratio across different ports. In practical applications, the preset threshold ratio is typically set to around 70%. Thus, a reasonable preset threshold ratio can be set based on experience and historical data, for example, 70%. This means that when the traffic distribution ratio of a certain queue through a certain Ethernet port exceeds 70%, it indicates that, within a preset time window, the number of bytes sent by that queue through that Ethernet port exceeds 70% of the total number of bytes sent by that queue across all Ethernet ports.

[0049] In one possible implementation, the preset threshold ratio is determined based on the total number of hotspot queues indicated by the hotspot queue information of each of the plurality of Ethernet ports. This supports an automatic adjustment mechanism for the preset threshold ratio, adjusting the threshold ratio according to the number of hotspot queues to prevent too many or too few queues from being identified as hotspot queues, thus helping to improve overall efficiency.

[0050] In one possible implementation, the hotspot queue information for a given Ethernet port is a hotspot queue bitmap. This bitmap uses binary values ​​to indicate whether each of the plurality of queues is a hotspot queue for the given Ethernet port. Thus, the sending scheduling module queries the hotspot queue information for each Ethernet port based on the queue number, for example, by querying the hotspot queue bitmap. If it finds that a queue is a hotspot queue for a particular Ethernet port and that port is experiencing backpressure, the sending scheduling module stops scheduling that queue to alleviate the backpressure. Otherwise, it schedules the queue normally. In bonding mode, the hotspot queues for each Ethernet port are identified by statistically analyzing the proportion of traffic sent through each Ethernet port by each queue. The sending scheduling module decides whether to stop scheduling a queue based on the port's hotspot queue status and the port's backpressure condition, thereby resolving the port queue head blocking problem and helping to maintain traffic balance among ports within the same bonding port group when the number of flows is low.

[0051] In one possible implementation, the preset time window is 10 microseconds in length. Thus, by combining experience and historical data, setting a preset time window of 10 microseconds as the statistical period helps to resolve the port queue head blocking problem.

[0052] In one possible implementation, the length of the preset time window is based on the stability of the traffic model. The length of the preset time window is greater when the traffic model is more stable than when the traffic model is less stable. Thus, the length of the preset time window depends on whether the traffic model is stable. If the proportion of traffic sent by each queue through each port is relatively stable, then the length of the preset time window can be set to a larger value; if the traffic model is unstable, then the length of the preset time window needs to be set smaller.

[0053] Figure 3 This is a schematic diagram of a computing device 300 provided in an embodiment of this application. The computing device 300 includes one or more processors 310, a communication interface 320, and a memory 330. The processors 310, communication interface 320, and memory 330 are interconnected via a bus 340. Optionally, the computing device 300 may further include an input / output interface 350, which is connected to input / output devices for receiving user-set parameters, etc. The computing device 300 can be used to implement some or all of the functions of the device embodiment or system embodiment in the above-described embodiments of this application; the processor 310 can also be used to implement some or all of the operation steps of the method embodiment in the above-described embodiments of this application. For example, the specific implementation of various operations performed by the computing device 300 can be referred to the specific details in the above embodiments, such as the processor 310 being used to execute some or all of the steps or operations in the above-described method embodiments. For example, in the embodiments of this application, the computing device 300 can be used to implement some or all of the functions of one or more components in the above-described device embodiments. In addition, the communication interface 320 can be used specifically for communication functions necessary to implement the functions of these devices and components, and the processor 310 can be used specifically for processing functions necessary to implement the functions of these devices and components.

[0054] It should be understood that, Figure 3 The computing device 300 may include one or more processors 310, and the multiple processors 310 may collaboratively provide processing power in a parallel connection mode, a serial connection mode, a serial-parallel connection mode, or an arbitrary connection mode; or the multiple processors 310 may form a processor sequence or a processor array; or the multiple processors 310 may be divided into a main processor and an auxiliary processor; or the multiple processors 310 may have different architectures, such as adopting a heterogeneous computing architecture. Furthermore, Figure 3 The structural and functional descriptions of the computing device 300 shown are exemplary and non-limiting. In some exemplary embodiments, the computing device 300 may include... Figure 3The diagram shows more or fewer components, or combinations of some components, or splitting of some components, or different arrangements of components.

[0055] The processor 310 can have various specific implementations. For example, it may include one or more combinations of a central processing unit (CPU), a graphics processing unit (GPU), a neural network processing unit (NPU), a tensor processing unit (TPU), or a data processing unit (DPU). This application does not impose specific limitations on these embodiments. The processor 310 can also be a single-core or multi-core processor. The processor 310 can be a combination of a CPU and hardware chips. These hardware chips can be application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or combinations thereof. The PLDs can be complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), generic array logic (GALs), or any combination thereof. The processor 310 can also be implemented using logic devices with built-in processing logic, such as FPGAs or digital signal processors (DSPs). The communication interface 320 can be a wired interface or a wireless interface, used to communicate with other modules or devices. The wired interface can be an Ethernet interface, a local interconnect network (LIN), etc., and the wireless interface can be a cellular network interface or a wireless LAN interface, etc.

[0056] Memory 330 may be non-volatile memory, such as read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Memory 330 may also be volatile memory, which may be random access memory (RAM) used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM). The memory 330 can also be used to store program code and data, so that the processor 310 can call the program code stored in the memory 330 to execute some or all of the operation steps in the above method embodiments, or to execute the corresponding functions in the above device embodiments. Furthermore, the computing device 300 may include, compared to... Figure 3 The number of components displayed may be more or less, or there may be different component configurations.

[0057] Bus 340 can be a Peripheral Component Interconnect Express (PCIe) bus, or an Extended Industry Standard Architecture (EISA) bus, a Unified Bus (Ubus or UB), a Compute Express Link (CXL) bus, a Cache Coherent Interconnect for Accelerators (CCIX) bus, etc. Bus 340 can be divided into address bus, data bus, control bus, etc. In addition to the data bus, bus 340 can also include a power bus, control bus, and status signal bus. However, for clarity, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0058] The methods and devices provided in this application are based on the same inventive concept. Since the principles by which the methods and devices solve problems are similar, the embodiments, implementation methods, examples, or methods of implementation of the methods and devices can be referred to each other, and repeated details will not be repeated. This application also provides a system comprising multiple computing devices, the structure of each computing device of which can refer to the structure of the computing devices described above. The functions or operations achievable by this system can refer to the specific implementation steps in the above method embodiments and / or the specific functions described in the above device embodiments, and will not be repeated here.

[0059] This application also provides a computer-readable storage medium storing computer instructions. When these computer instructions are executed on a computer device (such as one or more processors), they can implement the method steps described in the above method embodiments. The specific implementation of the above method steps by the processor of the computer-readable storage medium can refer to the specific operations described in the above method embodiments and / or the specific functions described in the above device embodiments, and will not be repeated here.

[0060] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. This application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Embodiments of this application can be implemented wholly or partially by software, hardware, firmware, or any other combination. When implemented in software, the above embodiments can be implemented wholly or partially as a computer program product. This application can take the form of a computer program product embodied on one or more computer-usable storage media containing computer-usable program code. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless network communication, microwave, etc.) means. Computer-readable storage media can be any available medium that a computer can access, or a data storage device such as a server or data center that contains one or more sets of available media. Available media can be magnetic media (such as floppy disks, hard disks, and magnetic tapes), optical media, or semiconductor media. Semiconductor media can be solid-state drives, random access memory, flash memory, read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, registers, or any other suitable form of storage medium.

[0061] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. Each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0062] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not described in detail in a certain embodiment can be referred to in the relevant descriptions of other embodiments. Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of the embodiments of this application. The steps in the methods of the embodiments of this application can be adjusted in order, combined, or deleted according to actual needs; the modules in the systems of the embodiments of this application can be divided, combined, or deleted according to actual needs. If these modifications and variations of the embodiments of this application fall within the scope of the claims of this application and their equivalents, then this application also intends to include these modifications and variations.

Claims

1. A method of queue scheduling, the method comprising: The queue scheduling method comprises: The head congestion relief module receives the source queue number, destination port and packet length information of each of the plurality of packets in the sending flow pipeline from the packet forwarding module, wherein the plurality of packets are added to the sending flow pipeline by the sending scheduling module after scheduling the plurality of queues, the source queue number of a given packet in the plurality of packets indicates a queue corresponding to the given packet in the plurality of queues, and the destination port of the given packet indicates an Ethernet port corresponding to the given packet in the plurality of Ethernet ports; The head congestion relief module calculates the proportion of the number of bytes of the given queue sent through each of the plurality of Ethernet ports to the number of bytes of the given queue sent through the plurality of Ethernet ports in a preset time window, as the traffic proportion of each of the plurality of Ethernet ports corresponding to the given queue. When the traffic proportion of a given Ethernet port in the plurality of Ethernet ports corresponding to the given queue exceeds a preset threshold proportion, the head congestion relief module marks the given queue as a hot queue of the given Ethernet port, and updates the hot queue information of the given Ethernet port in the sending scheduling module, wherein the sending scheduling module stops scheduling all hot queues of the given Ethernet port indicated in the hot queue information of the given Ethernet port for the given Ethernet port when back pressure occurs in the given Ethernet port.

2. The method of claim 1, wherein, The sending scheduling module and the packet forwarding module are self-owned modules of a packet sending system, and the plurality of packets are issued by a software side associated with the packet sending system.

3. The method of claim 2, wherein, The plurality of Ethernet ports are bound into one or more virtual ports, and the destination port of each of the plurality of packets is determined by a kernel network driver or a protocol stack of the software side of the packet sending system.

4. The method of claim 1, wherein, The given queue represents each of the plurality of queues, and the head congestion relief module is configured to calculate the traffic proportion of each of the plurality of Ethernet ports corresponding to each of the plurality of queues.

5. The method of claim 4, wherein, The given Ethernet port represents each of the plurality of Ethernet ports, and the head congestion relief module is configured to update the hot queue information of each of the plurality of Ethernet ports.

6. The method of claim 1, wherein, The queue scheduling method further comprises: When the traffic proportion of the given Ethernet port corresponding to the given queue is not higher than the preset threshold proportion, the head congestion relief module marks the given queue as a non-hot queue of the given Ethernet port, and updates the hot queue information of the given Ethernet port in the sending scheduling module, wherein the sending scheduling module normally schedules the non-hot queue of the given Ethernet port when back pressure occurs in the given Ethernet port.

7. The method of claim 1, wherein, The head-of-line blocking mitigation module is configured to clear the number of bytes of packets sent by each of the plurality of queues through each of the plurality of Ethernet ports at the end of the preset time window.

8. The method of claim 1, wherein, The preset time window is any of a plurality of detection time periods that are periodically repeated, and the head-of-line blocking mitigation module is configured to clear the number of bytes of packets sent by each of the plurality of queues through each of the plurality of Ethernet ports at the end of the detection time period corresponding to the preset time window, and re-perform the queue scheduling method at the beginning of the next detection time period of the detection time period corresponding to the preset time window.

9. The method of claim 1, wherein, The preset threshold ratio is 70%.

10. The method of claim 1, wherein, The preset threshold ratio is determined based on a total number of hot queues indicated by hot queue information of each of the plurality of Ethernet ports.

11. The method of claim 1, wherein, The hot queue information of the given Ethernet port is a hot queue bitmap that indicates whether each of the plurality of queues is a hot queue of the given Ethernet port by binary values.

12. The method of claim 1, wherein, The length of the preset time window is 10 microseconds.

13. The method of claim 1, wherein, The length of the preset time window is determined based on stability of a traffic model, and the length of the preset time window is longer when the traffic model is more stable.

14. A computer device, comprising: The computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the method according to any one of claims 1 to 13 when executing the computer program.

15. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and when the computer instructions are executed on a computer device, the computer device executes the method according to any one of claims 1 to 13. The computer readable storage medium stores computer instructions, and when the computer instructions are executed on a computer device, the computer device executes the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Method for sending remote direct memory access message and computer equipment

    CN117573602A

  • Flow table unloading method for multi-source access, computer equipment and medium

    CN118573637A