Traffic scheduling method and apparatus for DPU, and device and storage medium
By detecting the transmission performance status of the DPU system-on-a-chip and dynamically adjusting the target scheduling queue and traffic coefficient, the problem of traffic impact between tenants was solved, thereby improving network performance and achieving fair allocation of resources.
Patent Information
- Application Number
- PCT/CN2025/075304
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-12
- Filing Date
- 2025-01-26
- Publication Date
- 2025-12-18
AI Technical Summary
Traffic from some tenants using the slow SOC path can affect the traffic of other tenants using the fast path, leading to network performance degradation and unfair resource allocation.
By detecting the transmission performance status of the DPU system-on-a-chip, the target scheduling queue and traffic coefficient are dynamically adjusted to achieve flexible traffic scheduling and multi-tenant isolation.
It improves overall network performance, ensures that each tenant receives fair network resources, avoids congestion and performance bottlenecks caused by excessive traffic, and achieves network isolation and optimization in a multi-tenant environment.
Smart Images

Figure CN2025075304_18122025_PF_FP_ABST
Abstract
Description
Traffic scheduling method, device and equipment for DPU and storage medium
[0001] Cross-reference to related applications
[0002] The present application claims priority to the Chinese patent application No. 202410757125.2, filed on June 12, 2024, and entitled "Traffic scheduling method, device and equipment for DPU and storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] The present disclosure relates to the technical field of communication, and particularly relates to a traffic scheduling method, device and equipment for DPU and storage medium. BACKGROUND
[0004] With the development of business, DPU becomes the basis of hardware virtualization, and network high-performance processing is an important capability of DPU chip. DPU processes network packets by querying table entries, wherein the packet processing is divided into slow channel and fast channel, which have different processing performance. The slow path and the fast path of DPU process corresponding packets respectively. The fast path refers to that the hardware DPU chip processes packets according to table entry configuration, and the slow path refers to that the SOC processes packets. SUMMARY
[0005] Therefore, the embodiments of the present disclosure provide a traffic scheduling method, device and equipment for DPU and storage medium to solve the problem that the traffic of some tenants using the slow SOC path affects the flow of other tenants using the fast path.
[0006] In a first aspect, the embodiments of the present disclosure provide a traffic scheduling method for DPU, comprising:
[0007] detecting the transmission performance state of the system-level chip deployed by the DPU in a current period;
[0008] determining the target scheduling queue of the DPU in the current period by using the transmission performance state;
[0009] setting the traffic coefficient of the target scheduling queue in the current period based on the traffic scheduling strategy corresponding to the transmission performance state;
[0010] scheduling the traffic data in the scheduling queue to the system-level chip through the preset channel of the DPU according to the traffic coefficient.
[0011] In a second aspect, the embodiments of the present disclosure provide a traffic scheduling device for DPU, comprising:
[0012] detecting a transmission performance state of a system-level chip deployed by the DPU in a current period;
[0013] determining a target scheduling queue of the DPU in the current period according to the transmission performance state;
[0014] setting a traffic coefficient of the target scheduling queue in the current period according to a traffic scheduling strategy corresponding to the transmission performance state;
[0015] scheduling traffic data in the scheduling queue to the system-level chip through a preset channel of the DPU according to the traffic coefficient.
[0016] In a third aspect, an embodiment of the present disclosure provides a computer device, including a memory and a processor, which are communicatively connected with each other, and the memory stores computer instructions, and the processor executes the computer instructions to perform the traffic scheduling method for the DPU in the first aspect or any of the corresponding embodiments.
[0017] In a fourth aspect, an embodiment of the present disclosure provides a computer readable storage medium, which stores computer instructions, and the computer instructions are used to make a computer execute the traffic scheduling method for the DPU in the first aspect or any of the corresponding embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0018] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed in the specific embodiments or the prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are some embodiments of the present disclosure, and other drawings can also be obtained by those skilled in the art without creative labor.
[0019] FIG. 1 is a flow diagram of a traffic scheduling method for a DPU according to some embodiments of the present disclosure;
[0020] FIG. 2 is a schematic diagram of a traffic model of a scheduling queue according to some embodiments of the present disclosure;
[0021] FIG. 3 is a schematic diagram of a SOC back pressure model according to some embodiments of the present disclosure;
[0022] FIG. 4 is a DPU network processing architecture diagram according to some embodiments of the present disclosure;
[0023] FIG. 5 is a schematic diagram of a SOC back pressure rate monitoring and traffic scheduling process according to some embodiments of the present disclosure;
[0024] Fig. 6 is a structural block diagram of a traffic scheduling device for a DPU according to an embodiment of the present disclosure;
[0025] Fig. 7 is a hardware structure schematic diagram of a computer device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are some but not all of the embodiments of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present disclosure.
[0027] In a common hardware architecture, the link bandwidth of a SOC is less than the interface bandwidth of a downlink virtio, and the interface bandwidth of the SOC is easy to become a performance bottleneck. The downlink network performance of virtio dma of a virtual machine tenant is limited by the processing capability of the SOC, so the traffic of some tenants using a slow SOC path will affect the traffic of other tenants using a fast path.
[0028] According to the embodiments of the present disclosure, a traffic scheduling method for a DPU is provided. It should be noted that the steps shown in the flowchart can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0029] In the present embodiment, a traffic scheduling method for a DPU is provided. Fig. 1 is a flowchart of a traffic scheduling method for a DPU according to an embodiment of the present disclosure. As shown in Fig. 1, the flow includes the following steps:
[0030] Step S11, detecting the transmission performance state of a system-level chip deployed by the DPU in a current period.
[0031] It should be noted that a DPU is a data processing unit (DPU) that plays an important role in a cloud computing environment. It is a new type of chip designed to offload "data center" workloads on the CPU and enable new security and management program functions. The DPU can perform efficient hardware virtualization and provide hardware acceleration for cloud computing. In particular, in terms of network virtualization, the DPU can provide high-performance network packet processing, which is one of its core capabilities.
[0032] In the embodiments of the present disclosure, when processing network packets, the DPU determines how to process the packets by querying internal entries. This processing process is divided into two paths: a fast path and a slow path. The fast path can directly process packets according to pre-configured entries using DPU hardware chips, which is very efficient. The slow path can be used when the packet processing requires more complex logic or there is no direct match in the entries. The packets will be sent to the system on a chip (SOC) for processing, which is relatively slow. When the traffic of the slow path is detected to be too large, the system will limit the rate of the virtio dma queue related to the path accordingly. This ensures that even if the slow path traffic of a tenant increases, it will not significantly reduce the overall network forwarding bandwidth. In this way, the system can more efficiently manage network traffic, improve overall performance, and achieve traffic isolation between multiple tenants.
[0033] In the embodiments of the present disclosure, the transmission performance state of the system on a chip deployed by the DPU in the current period is detected, including the following steps A1-A2:
[0034] Step A1, detecting the back pressure rate of the system on a chip in the current period, and obtaining the back pressure rate threshold in the current period.
[0035] In the embodiments of the present disclosure, the SOC back pressure rate refers to one of the parameters used to measure the data transmission efficiency in the system on a chip. It reflects the efficiency and delay of data transmission between various functional modules within the chip. The lower the SOC back pressure rate, the higher the efficiency of data transmission between various functional modules within the chip, and the better the system performance. Generally, when designing a SOC, efforts are made to reduce the back pressure rate to improve the performance and efficiency of the entire system. The purpose of detecting the back pressure rate of the system on a chip in the current period and obtaining the back pressure rate threshold in the current period is to dynamically determine the back pressure rate threshold by collecting and analyzing the performance and load data of the system on a chip, so as to provide a basis for subsequent traffic control and scheduling decisions.
[0036] In the embodiments of the present disclosure, obtaining the back pressure rate threshold in the current period includes the following steps A11-A13:
[0037] Step A11, detecting the performance parameters and load conditions of the system on a chip in the current period.
[0038] In the embodiments of the present disclosure, the performance parameters are a series of indicators that measure the working capacity of the SOC, including but not limited to CPU usage, memory occupancy, IO performance, etc. These parameters can reflect the current working efficiency and processing capacity of the SOC. The system can collect these data through various sensors, performance counters or system monitoring tools. For example, read the usage of the CPU to know whether the current CPU resource is tight; check the memory occupancy to determine whether there is enough memory resource available for use; evaluate the IO performance, including the disk read / write speed and network transmission speed, etc. The load condition refers to the current workload of the SOC, which can be measured by detecting the number of tasks being processed, the length of the process queue, network traffic, etc. The system can monitor these indicators to determine whether the SOC is in a high load state. For example, if the task queue is long or the network traffic is large, it can be considered that the current load of the SOC is heavy.
[0039] Step A12, analyze the performance parameters and the load condition to determine the current state of the system on chip.
[0040] It should be noted that the analysis of the performance parameters can include: CPU usage: if the CPU usage is close to or reaches 100%, it indicates that the SOC is busy processing computing tasks and has no remaining capacity to process additional network traffic. Memory usage: high memory usage indicates that the system resource is tight, which may affect the SOC's ability to process network traffic. IO latency: if the IO latency is long, it indicates that the storage system or external device is a bottleneck, which may also affect the efficiency of the SOC in processing network traffic. The analysis of the load condition can include: task number: if the number of tasks currently being processed is close to or reaches the processing limit of the SOC, the SOC may be in a high load state. Network traffic: high network traffic can indicate that the SOC is processing a large amount of network communication, which may affect its ability to process other tasks. Process or thread queue length: if the queue length increases, it indicates that more tasks are waiting for the SOC to process, indicating that the load is heavy.
[0041] In the embodiments of the present disclosure, by comprehensively analyzing these performance parameters and load conditions, the system can determine the current state of the SOC. For example, if multiple indicators show that the SOC is in a high load state, the system can determine that the current state of the SOC is "heavy load" or "high load". On the contrary, if all indicators show that the SOC has enough resources to process additional tasks, the system can determine that the current state of the SOC is "light load" or "balanced". This state determination is the basis for subsequent steps to determine the back pressure rate threshold, adjust the flow scheduling strategy, etc. By accurately evaluating the current state of the SOC, the system can more effectively manage network traffic and resource allocation, thereby improving overall performance and efficiency.
[0042] Step A13, determining the back pressure rate threshold in the current period by using the current state.
[0043] In the embodiments of the present disclosure, the back pressure rate threshold in the current period is determined by using the current state, comprising: obtaining an adjustment strategy corresponding to the current state and an original back pressure rate threshold; adjusting the original back pressure rate threshold by using the adjustment strategy to obtain the back pressure rate threshold in the current period.
[0044] In the embodiments of the present disclosure, first, a series of state and adjustment strategy corresponding relationship is predefined. For example, if the SOC is in the "heavy load" state, a lower back pressure rate threshold can be set to trigger flow control more sensitively; if the SOC is in the "light load" state, a higher back pressure rate threshold can be set to avoid unnecessary flow restriction. Second, according to the current SOC state and the corresponding adjustment strategy, the original back pressure rate threshold is increased or decreased, wherein the original back pressure rate threshold refers to the back pressure rate threshold used by default without considering the current system state, which is set based on system historical data, experience value or design specification. For example, if the current state is "heavy load", the original threshold can be reduced by 20%; if the current state is "light load", the original threshold can be increased by 10%. Finally, after the above adjustment, a back pressure rate threshold based on the current system state is obtained. This threshold will be used in the next flow control decision to ensure that the system can maintain stable performance under different load conditions. Through this step, the back pressure rate threshold can be dynamically adjusted to adapt to the changing workload and environmental conditions, so as to realize more effective flow control and resource allocation.
[0045] Step A2, comparing the back pressure rate with the back pressure rate threshold to obtain the transmission performance state of the system on chip in the current period, wherein, in the case that the back pressure rate is greater than or equal to the back pressure rate threshold, the transmission performance state is the load state; or, in the case that the back pressure rate is less than the back pressure rate threshold, the transmission performance is the balanced state.
[0046] In the embodiments of the present disclosure, the detected backpressure rate is compared with the obtained backpressure rate threshold. The backpressure rate reflects the pressure condition of the SOC processing data, and the backpressure rate threshold is a preset standard for determining whether the SOC is in an overload state. According to the comparison result, the transmission performance state of the SOC in the current period can be determined. Specifically, the load state: if the backpressure rate is greater than or equal to the backpressure rate threshold, it indicates that the SOC currently bears a relatively large processing pressure, and may have approached or reached the limit of its processing capacity. In this case, the transmission performance state can be determined as the load state. It indicates that the SOC may not be able to process all the incoming data in time, and there is a risk of performance bottleneck. The balanced state: if the backpressure rate is less than the backpressure rate threshold, it indicates that the current processing pressure of the SOC is relatively small, and there is enough processing capacity to cope with the incoming data. In this case, the transmission performance state can be determined as the balanced state. It indicates that the SOC can process data more smoothly, and there is no obvious performance bottleneck.
[0047] Step S12, determining the target scheduling queue of the DPU in the current period by using the transmission performance state.
[0048] In the embodiments of the present disclosure, the target scheduling queue of the DPU in the current period is determined by using the transmission performance state, including the following steps B1-B2:
[0049] Step B1, in the case that the transmission performance state is the load state, obtaining the traffic value of each scheduling queue, and taking the scheduling queue with the largest traffic value as the target scheduling queue.
[0050] In the embodiments of the present disclosure, after it is determined that the system is in the load state, the next step is to obtain the traffic value of each scheduling queue (Queue). These traffic values reflect the amount of data processed by each queue in the current period. After obtaining the traffic values of each scheduling queue, these values need to be compared to determine which queue has the largest traffic. This usually means that the queue is processing the most data, and therefore may be the main cause of system load. Finally, the scheduling queue with the largest traffic value is determined as the target scheduling queue. This queue will be the main object of subsequent traffic control strategy adjustment, because by adjusting its traffic coefficient, the overall performance of the system can be most directly affected. Through this step, the scheduling queue with the largest traffic in the load state can be identified, so that targeted traffic control can be performed on it to improve the overall forwarding bandwidth and achieve multi-tenant traffic isolation.
[0051] Step B2, or, in the case that the transmission performance state is the balanced state, taking each scheduling queue as the target scheduling queue.
[0052] In the embodiments of the present disclosure, after confirming that the system is in the balanced state, since the resources are sufficient to process the traffic of all queues, there is no need to limit a specific queue. Therefore, all scheduling queues are regarded as target scheduling queues in this step. After marking all scheduling queues as target scheduling queues, the traffic in these queues is processed according to the original traffic coefficient or a preset scheduling strategy, so as to prepare for the next step of traffic scheduling. Through this step, the fair processing of each scheduling queue can be maintained in the balanced state, and the situation that a certain queue affects other queues due to excessive traffic can be avoided, thereby achieving the balanced processing of multi-tenant network traffic.
[0053] The method provided by the embodiments of the present disclosure can select a target scheduling queue according to the transmission performance state, so as to ensure that the resources can be preferentially allocated to the most needed queue when the load is heavy, thereby improving the resource use efficiency. In the load state, the scheduling queue with the largest traffic value is selected as the target scheduling queue, which helps to relieve the system bottleneck and improve the overall throughput. In the balanced state, all scheduling queues are regarded as target scheduling queues, which helps to achieve uniform distribution of the load and avoid the situation that some queues are overloaded while other queues are idle. By dynamically adjusting the scheduling queue according to the current system state, the response speed of the system to burst traffic can be improved, and the delay of data processing can be reduced. This method of dynamically determining the target scheduling queue enables the system to be flexibly adjusted according to the actual situation and better adapt to different workloads. By reasonably allocating the scheduling queue, the congestion problem caused by excessive data traffic can be prevented and handled, and the smooth data transmission can be ensured.
[0054] In step S13, the traffic coefficient of the target scheduling queue in the current period is set based on the traffic scheduling strategy corresponding to the transmission performance state.
[0055] In the embodiments of the present disclosure, the traffic coefficient of the target scheduling queue in the current period is dynamically set according to the real-time transmission performance state, in particular, the back pressure rate and the traffic rate in the slow path. As shown in FIG. 2, a traffic model of a queue is shown, wherein the traffic model of the queue mainly refers to how data traffic is managed and controlled through a queue in a computer network or system. This model involves the process of how data enters the queue, waits for processing in the queue, and is taken out from the queue for processing. That is, when it is detected that the back pressure rate in the slow path rises, that is, the data packets encounter greater transmission resistance or processing delay in the path, the scheduling coefficient of the scheduling queue associated with the path should be correspondingly reduced. At the same time, attention should also be paid to the traffic rate. If the traffic rate of a path is too high, the scheduling coefficient of the scheduling queue corresponding to the path should be correspondingly reduced. In addition, as shown in FIG. 3, through real-time monitoring of the back pressure state and the back pressure monitoring time, the system can dynamically adjust the traffic scheduling strategy, thereby avoiding network congestion and improving the overall performance and stability of the network.
[0056] In the embodiments of the present disclosure, the traffic coefficient of the target scheduling queue in the current period is dynamically set according to the real-time transmission performance state, in particular, the back pressure rate and the traffic rate in the slow path. As shown in FIG. 2, a traffic model of a queue is shown, wherein the traffic model of the queue mainly refers to how data traffic is managed and controlled through a queue in a computer network or system. This model involves the process of how data enters the queue, waits for processing in the queue, and is taken out from the queue for processing. That is, when it is detected that the back pressure rate in the slow path rises, that is, the data packets encounter greater transmission resistance or processing delay in the path, the scheduling coefficient of the scheduling queue associated with the path should be correspondingly reduced. At the same time, attention should also be paid to the traffic rate. If the traffic rate of a path is too high, the scheduling coefficient of the scheduling queue corresponding to the path should be correspondingly reduced. In addition, as shown in FIG. 3, through real-time monitoring of the back pressure state and the back pressure monitoring time, the system can dynamically adjust the traffic scheduling strategy, thereby avoiding network congestion and improving the overall performance and stability of the network.
[0057] In the embodiments of the present disclosure, the traffic coefficient of the target scheduling queue in the current period is dynamically set according to the real-time transmission performance state, in particular, the back pressure rate and the traffic rate in the slow path. As shown in FIG. 2, a traffic model of a queue is shown, wherein the traffic model of the queue mainly refers to how data traffic is managed and controlled through a queue in a computer network or system. This model involves the process of how data enters the queue, waits for processing in the queue, and is taken out from the queue for processing. That is, when it is detected that the back pressure rate in the slow path rises, that is, the data packets encounter greater transmission resistance or processing delay in the path, the scheduling coefficient of the scheduling queue associated with the path should be correspondingly reduced. At the same time, attention should also be paid to the traffic rate. If the traffic rate of a path is too high, the scheduling coefficient of the scheduling queue corresponding to the path should be correspondingly reduced. In addition, as shown in FIG. 3, through real-time monitoring of the back pressure state and the back pressure monitoring time, the system can dynamically adjust the traffic scheduling strategy, thereby avoiding network congestion and improving the overall performance and stability of the network.
[0058] In the embodiments of the present disclosure, the traffic coefficient of the target scheduling queue in the current period is dynamically set according to the real-time transmission performance state, in particular, the back pressure rate and the traffic rate in the slow path. As shown in FIG. 2, a traffic model of a queue is shown, wherein the traffic model of the queue mainly refers to how data traffic is managed and controlled through a queue in a computer network or system. This model involves the process of how data enters the queue, waits for processing in the queue, and is taken out from the queue for processing. That is, when it is detected that the back pressure rate in the slow path rises, that is, the data packets encounter greater transmission resistance or processing delay in the path, the scheduling coefficient of the scheduling queue associated with the path should be correspondingly reduced. At the same time, attention should also be paid to the traffic rate. If the traffic rate of a path is too high, the scheduling coefficient of the scheduling queue corresponding to the path should be correspondingly reduced. In addition, as shown in FIG. 3, through real-time monitoring of the back pressure state and the back pressure monitoring time, the system can dynamically adjust the traffic scheduling strategy, thereby avoiding network congestion and improving the overall performance and stability of the network.
[0059] In the embodiments of the present disclosure, the traffic coefficient of the target scheduling queue in the current period is dynamically set according to the real-time transmission performance state, in particular, the back pressure rate and the traffic rate in the slow path. As shown in FIG. 2, a traffic model of a queue is shown, wherein the traffic model of the queue mainly refers to how data traffic is managed and controlled through a queue in a computer network or system. This model involves the process of how data enters the queue, waits for processing in the queue, and is taken out from the queue for processing. That is, when it is detected that the back pressure rate in the slow path rises, that is, the data packets encounter greater transmission resistance or processing delay in the path, the scheduling coefficient of the scheduling queue associated with the path should be correspondingly reduced. At the same time, attention should also be paid to the traffic rate. If the traffic rate of a path is too high, the scheduling coefficient of the scheduling queue corresponding to the path should be correspondingly reduced. In addition, as shown in FIG. 3, through real-time monitoring of the back pressure state and the back pressure monitoring time, the system can dynamically adjust the traffic scheduling strategy, thereby avoiding network congestion and improving the overall performance and stability of the network.
[0060] In the embodiments of the present disclosure, the scheduling queue with the largest traffic value has been identified and the first original traffic coefficient of this queue has been obtained. Next, the traffic coefficient of this largest traffic queue needs to be adjusted according to a preset ratio. The "preset ratio" is a system parameter that determines the degree to which the scheduling queue with the largest traffic should be limited in the load state. This ratio can be configured according to actual conditions to ensure the stability and performance of the system. The preset ratio and the first original traffic coefficient are used for calculation. Specifically, the original traffic coefficient is multiplied by a preset ratio less than 1 to obtain a reduced traffic coefficient. The reduced traffic coefficient is the traffic coefficient of the scheduling queue in the current period.
[0061] As an example, if the preset ratio is 0.5 and the first original traffic coefficient is 1.0, the traffic coefficient of the scheduling queue in the current period will become 0.5 after calculation. This means that the processing capacity of the scheduling queue in the next period will be limited to half of its original capacity to reduce the load pressure of the system. In this way, the processing capacity of the largest traffic queue can be dynamically adjusted in the load state, thereby avoiding performance bottlenecks caused by excessive traffic of a certain queue. This helps to achieve isolation and optimization of multi-tenant network traffic.
[0062] Step C3, in the case where the target traffic coefficient is greater than or equal to the preset value, setting the preset value as the traffic coefficient of each scheduling queue in the current period; or, in the case where the target traffic coefficient is less than the preset value, setting the target traffic coefficient as the traffic coefficient of each scheduling queue in the current period.
[0063] In the embodiments of the present disclosure, the scheduling queue with the largest traffic value has been identified and the first original traffic coefficient of this queue has been obtained. Next, the traffic coefficient of this largest traffic queue needs to be adjusted according to a preset ratio. The "preset ratio" is a system parameter that determines the degree to which the scheduling queue with the largest traffic should be limited in the load state. This ratio can be configured according to actual conditions to ensure the stability and performance of the system. The preset ratio and the first original traffic coefficient are used for calculation. Specifically, the original traffic coefficient is multiplied by a preset ratio less than 1 to obtain a reduced traffic coefficient. The reduced traffic coefficient is the traffic coefficient of the scheduling queue in the current period.
[0064] Specifically, first, it is checked whether the target traffic coefficient is greater than or equal to a preset value. This preset value can be an upper limit value set by the system to ensure stability and performance. If the target traffic coefficient is greater than or equal to the preset value, it means that even if the scheduling queue with the largest traffic is limited, it may still occupy too much resource, so the traffic coefficients of all scheduling queues need to be set to the preset value to ensure the stability and fairness of the system. On the other hand, if the target traffic coefficient is less than the preset value, the traffic coefficients of all scheduling queues need to be set to the target traffic coefficient. This means that all scheduling queues will process traffic according to this target traffic coefficient, thereby achieving balanced allocation of traffic. According to the current transmission performance state and traffic situation, the traffic coefficients of each scheduling queue are dynamically adjusted to achieve isolation and optimization of multi-tenant network traffic. This not only improves the overall performance of the system, but also ensures that each tenant can obtain fair network resources.
[0065] The method provided by the embodiments of the present disclosure dynamically adjusts the traffic coefficients of each scheduling queue according to the current transmission performance state and traffic situation to achieve isolation and optimization of multi-tenant network traffic. This not only improves the overall performance of the system, but also ensures that each tenant can obtain fair network resources. It helps to avoid congestion and delay in the data transmission process and ensures smooth flow of data. By reasonably adjusting the traffic coefficient, the utilization of resources can be optimized to ensure that system resources can be fully utilized when the load is heavy and improve data processing capacity. When the traffic is too large, limiting the traffic coefficient can prevent the system from being overloaded, thereby protecting the stability and reliability of the system. The dynamic setting of the traffic coefficient provides higher flexibility and configurability, enabling the system to adapt to different workloads and performance requirements. By reasonably controlling the traffic, data loss or damage caused by too fast data transmission can be prevented to ensure the integrity and accuracy of the data. By reasonably adjusting the traffic coefficient, the data transmission efficiency can be optimized to improve the overall performance of the system.
[0066] Step S14, the traffic data in the scheduling queue is scheduled to the system-on-a-chip through the preset channel of the DPU according to the traffic coefficient.
[0067] In the embodiments of the present disclosure, the traffic coefficients of each scheduling queue in the current period have been determined according to the previous steps. Now, the traffic data needs to be actually scheduled according to these traffic coefficients.
[0068] The method provided by the embodiment of the present disclosure schedules the traffic data in the scheduling queue to the system-level chip through the preset channel of the DPU according to the previously calculated traffic scheduling coefficient. It ensures that the traffic can be distributed and transmitted according to the predetermined strategy and coefficient, thereby realizing network isolation and performance optimization in a multi-tenant environment. The priority and bandwidth allocation of each scheduling queue are determined according to the traffic coefficient of the scheduling queue. The queue with a high traffic coefficient will obtain more transmission resources, and the queue with a low traffic coefficient will correspondingly reduce resource allocation. This dynamic traffic scheduling method not only improves the utilization rate of network resources, but also ensures that the network performance of each tenant is fairly and effectively guaranteed.
[0069] Specifically, first, the traffic coefficient of each scheduling queue is checked. These traffic coefficients are set based on the transmission performance state and traffic scheduling strategy in step S13, and reflect the proportion or weight of traffic that each scheduling queue should handle in the current period. Next, the traffic data is distributed and scheduled according to these traffic coefficients. Specifically, more traffic data is allocated to the scheduling queue with a higher traffic coefficient, and less traffic data is allocated to the scheduling queue with a lower traffic coefficient. In this way, the traffic allocation of each scheduling queue can be dynamically adjusted according to the current transmission performance state and traffic condition, to achieve balanced and optimized traffic. Finally, the traffic data is scheduled to the system-level chip through the preset channel of the DPU. This preset channel can be one or more data transmission paths inside the DPU, which are specially used to transmit traffic data from the scheduling queue to the system-level chip.
[0070] The method provided by the embodiment of the present disclosure can understand the transmission performance state of the system-level chip in time by detecting the back pressure rate of the system-level chip in real time and comparing it with the back pressure rate threshold, and provide data support for subsequent performance optimization or load balancing. According to the real-time detected transmission performance state, the system is adjusted and optimized to improve data processing capacity and efficiency. By setting the back pressure rate threshold and real-time monitoring, the system-level chip is warned and adjusted before reaching the performance bottleneck, thereby avoiding data transmission congestion and performance degradation. By real-time monitoring and adjusting the performance of the system-level chip, the system is ensured to run efficiently while maintaining stability, avoiding system crash or data loss due to overload. According to the real-time performance state of the system-level chip, system resources can be more reasonably allocated, thereby realizing efficient use of resources. It is easier to locate and solve problems that occur during the operation of the system-level chip, and improve the maintainability of the system.
[0071] The method provided by the embodiments of the present disclosure not only focuses on the network performance of a single tenant, but also focuses on the overall performance in a multi-tenant environment. First, by monitoring the traffic of each tenant in real time, the use of network resources can be more accurately mastered, providing data support for subsequent resource allocation and scheduling. In addition, based on the monitored traffic data and back pressure rate, the present disclosure adopts a dynamic traffic scheduling strategy. This strategy can adjust the traffic scheduling coefficient in real time according to the network load, ensuring that resources can be reasonably allocated when the network is congested, avoiding the excessive occupation of network resources by the traffic of some tenants, thereby affecting the network performance of other tenants.
[0072] Secondly, in a multi-tenant environment, network isolation is crucial. The present disclosure achieves network isolation between tenants by precisely controlling the traffic scheduling coefficient of each tenant. This isolation not only guarantees the network performance of each tenant, but also improves the security and stability of the overall network.
[0073] Thirdly, the traffic control mechanism of the present disclosure is very flexible and can be customized according to different needs. For example, for tenants who require high bandwidth, the traffic scheduling coefficient can be dynamically increased to meet their high requirements for network performance. For some tenants who do not have high requirements for network performance, the system can appropriately reduce their traffic scheduling coefficient to balance the use of overall network resources.
[0074] Finally, the present disclosure also has the ability of self-adaptation and self-optimization. It can automatically adjust the traffic scheduling strategy according to historical data and real-time data to adapt to the changing network environment and tenant needs. This self-adaptation and self-optimization feature enables the present disclosure to better cope with complex network environments and changing tenant needs.
[0075] FIG. 4 is a DPU network processing architecture diagram according to an embodiment of the present disclosure, as shown in FIG. 4, the processing flow includes:
[0076] First, the host sends data packets to the DPU through the VirtioDMA interface, where the VirtioDMA interface is a data transmission channel between the host and the DPU; after the data packets enter the DPU, they are placed in the scheduling Queue for processing, where the scheduling Queue is responsible for managing and scheduling network data packets to be processed, ensuring that they are processed in a certain order and priority; the DPU starts processing the data packets in the scheduling Queue, including parsing the packet header, identifying the protocol type, etc.; according to the characteristics of the data packets (such as destination address, protocol type, port number, etc.), the DPU will shunt the data packets to different processing paths.
[0077] Secondly, for data packets that require complex processing or specific logical judgment, they will be shunted to the slow path; in the slow path, the data packets will be processed by the SOC (System on a Chip) for more in-depth processing. Since the processing capacity of the SOC is limited, and the link bandwidth is less than the interface bandwidth of the downlink VirtioDMA, it is easy to become a performance bottleneck in this process. In this process, it is necessary to constantly monitor the traffic of the Queue in the slow path; when the traffic of the slow path is monitored to be too large, the system will dynamically adjust the processing priority or rate of the scheduling Queue to ensure that the traffic of the slow path does not excessively occupy resources. For data packets that meet specific conditions, the DPU will directly process them quickly through hardware table item configuration; after processing, the data packets can be directly sent out through the network interface (network port).
[0078] Fig. 5 is a schematic diagram of the SOC back pressure rate monitoring and traffic scheduling process according to an embodiment of the present disclosure. As shown in Fig. 5, the back pressure rate monitoring and traffic scheduling process of the SOC every 1 millisecond includes:
[0079] First, the back pressure rate of the system on a chip (SOC) every 1 millisecond is monitored, wherein the back pressure rate is an index indicating the transmission pressure or congestion degree of the system; it is judged whether the monitored back pressure rate is greater than or equal to a preset back pressure rate threshold, which is dynamically set by the system according to the current state to distinguish whether the system is in a load state; if the back pressure rate is greater than or equal to the back pressure rate threshold, it is determined that the transmission performance state is a load state, and if the back pressure rate is less than the back pressure rate threshold, it is determined that the transmission performance state is a balanced state.
[0080] Secondly, in the load state, the traffic value of each scheduling queue is evaluated, and the scheduling queue with the largest traffic is selected as the target scheduling queue; the original traffic coefficient of this queue is obtained, and this traffic coefficient is reduced based on a preset proportion (such as halving). In the balanced state, all scheduling queues are selected as target scheduling queues; the traffic coefficients of all target scheduling queues are increased based on a preset proportion (such as doubling), but the coefficient will not exceed the preset maximum traffic coefficient value.
[0081] Finally, according to the adjusted traffic coefficient, the traffic data in the scheduling queue is dynamically scheduled to the system on a chip (SOC) through the preset channel of the data processing unit (DPU). This process ensures that the traffic can be distributed according to the updated traffic coefficient, thereby realizing traffic isolation and performance optimization in a multi-tenant environment.
[0082] There is also provided in the embodiments a traffic scheduling apparatus for a DPU, which is configured to implement the embodiments and preferred embodiments described above, and will not be described again. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
[0083] The embodiments provide a traffic scheduling apparatus for a DPU, as shown in FIG. 6, comprising:
[0084] A detection module 61 is configured to detect a transmission performance state of a system-level chip to which the DPU is deployed in a current period;
[0085] A determination module 62 is configured to determine a target scheduling queue of the DPU in the current period based on the transmission performance state;
[0086] A setting module 63 is configured to set a traffic coefficient of the target scheduling queue in the current period based on a traffic scheduling strategy corresponding to the transmission performance state;
[0087] A scheduling module 64 is configured to schedule traffic data in the scheduling queue to the system-level chip through a preset channel of the DPU according to the traffic coefficient.
[0088] In an optional embodiment of the present disclosure, the detection module 61 is configured to detect a back pressure rate of the system-level chip in the current period, and obtain a back pressure rate threshold in the current period; compare the back pressure rate with the back pressure rate threshold to obtain the transmission performance state of the system-level chip in the current period, wherein, in a case where the back pressure rate is greater than or equal to the back pressure rate threshold, the transmission performance state is a load state; or, in a case where the back pressure rate is less than the back pressure rate threshold, the transmission performance state is an equilibrium state.
[0089] In an optional embodiment of the present disclosure, the determination module 62 is configured to, in a case where the transmission performance state is the load state, obtain a traffic value of each scheduling queue, and take the scheduling queue with the largest traffic value as the target scheduling queue; or, in a case where the transmission performance state is the equilibrium state, take each scheduling queue as the target scheduling queue.
[0090] In an optional embodiment of the present disclosure, the setting module 63 is configured to, in a case where the transmission performance state is the load state, obtain a first original traffic coefficient of the scheduling queue with the largest traffic value; and calculate the traffic coefficient of the scheduling queue with the largest traffic value in the current period based on a preset ratio and the first original traffic coefficient.
[0091] In an optional embodiment of the present disclosure, the setting module 63 is configured to: in a case where the transmission state is the balanced state, acquire a second original traffic coefficient of each scheduling queue; calculate a target traffic coefficient based on a preset coefficient and the second original traffic coefficient; in a case where the target traffic coefficient is greater than or equal to a preset value, set the preset value as the traffic coefficient of each scheduling queue in the current period; or in a case where the target traffic coefficient is less than the preset value, set the target traffic coefficient as the traffic coefficient of each scheduling queue in the current period.
[0092] In an optional embodiment of the present disclosure, the detection module 61 is configured to: detect a performance parameter and a load condition of the system-on-chip in a current period; analyze the performance parameter and the load condition to determine a current state of the system-on-chip; and determine a back pressure rate threshold in the current period by using the current state.
[0093] In an optional embodiment of the present disclosure, the detection module 61 is configured to: acquire an adjustment strategy corresponding to the current state and an original back pressure rate threshold; and adjust the original back pressure rate threshold by using the adjustment strategy to obtain the back pressure rate threshold in the current period.
[0094] Referring to FIG. 7, FIG. 7 is a structural schematic diagram of a computer device according to an optional embodiment of the present disclosure. As shown in FIG. 7, the computer device includes one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components communicate and cooperate with each other using different buses, and can be installed on a common mainboard or in other manners as needed. The processor can process instructions executed in the computer device, including instructions stored in the memory or graphics information of the memory to display a GUI on an external input / output device, such as a display device coupled to the interface. In some optional embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple storage devices, if necessary. Similarly, multiple computer devices can be connected, each providing part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).
[0095] The processor 10 can be a central processor, a network processor, or a combination thereof. The processor 10 can further include a hardware chip. The hardware chip can be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device can be a complex programmable logic device, a field programmable logic gate array, a generic array logic, or any combination thereof.
[0096] The memory 20 stores instructions executable by the at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.
[0097] The memory 20 can include a program storage area and a data storage area. The program storage area can store an operating system and applications required by at least one function. The data storage area can store data created by the computer device according to the presentation of a small program landing page, and the like. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some optional embodiments, the memory 20 can optionally include a memory disposed remotely relative to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0098] The memory 20 can include a volatile memory, such as a random access memory, and can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state disk. The memory 20 can also include a combination of the above-mentioned kinds of memories.
[0099] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0100] The embodiments of the present disclosure further provide a computer readable storage medium. The method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or recorded in a storage medium, or implemented as computer code originally stored in a remote storage medium or a non-transitory machine readable storage medium and downloaded to a local storage medium, so that the method described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state disk, and the like. Further, the storage medium can also include a combination of the above-mentioned kinds of memories. It can be understood that the computer, the processor, the microprocessor controller, or the programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiments is implemented.
[0101] Although the embodiments of the present disclosure are described in conjunction with the accompanying drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present disclosure, and such modifications and changes fall within the scope defined by the appended claims.
Claims
1. A method for traffic scheduling of a DPU, comprising: detecting a transmission performance state of a system on chip (SoC) to which the DPU is deployed in a current period; determining a target scheduling queue of the DPU in the current period according to the transmission performance state; setting a traffic coefficient of the target scheduling queue in the current period according to a traffic scheduling strategy corresponding to the transmission performance state; and scheduling traffic data in the scheduling queue to the SoC through a preset channel of the DPU according to the traffic coefficient. 2.The method of claim 1, wherein the detecting the transmission performance state of the SoC to which the DPU is deployed in the current period comprises: detecting a back pressure rate of the SoC in the current period and obtaining a back pressure rate threshold in the current period; comparing the back pressure rate with the back pressure rate threshold to obtain the transmission performance state of the SoC in the current period, wherein the transmission performance state is a load state when the back pressure rate is greater than or equal to the back pressure rate threshold, or the transmission performance state is a balanced state when the back pressure rate is less than the back pressure rate threshold. 3.The method of claim 2, wherein the determining the target scheduling queue of the DPU in the current period according to the transmission performance state comprises: in a case where the transmission performance state is the load state, obtaining a traffic value of each scheduling queue and taking a scheduling queue with a maximum traffic value as the target scheduling queue; or in a case where the transmission performance state is the balanced state, taking each scheduling queue as the target scheduling queue. 4.The method of claim 3, wherein the setting the traffic coefficient of the target scheduling queue in the current period according to the traffic scheduling strategy corresponding to the transmission performance state comprises: in a case where the transmission state is the load state, obtaining a first original traffic coefficient of the scheduling queue with the maximum traffic value; and calculating the traffic coefficient of the scheduling queue with the maximum traffic value in the current period based on a preset ratio and the first original traffic coefficient. 5.The method of claim 4, wherein the setting the traffic coefficient of the target scheduling queue in the current period according to the traffic scheduling strategy corresponding to the transmission performance state comprises: in a case where the transmission state is the balanced state, obtaining a second original traffic coefficient of each scheduling queue; calculating a target traffic coefficient based on a preset coefficient and the second original traffic coefficient; in a case where the target traffic coefficient is greater than or equal to a preset value, setting the preset value as the traffic coefficient of each scheduling queue in the current period; or in a case where the target traffic coefficient is less than the preset value, setting the target traffic coefficient as the traffic coefficient of each scheduling queue in the current period. 6.The method of claim 2, wherein the obtaining the back pressure rate threshold in the current period comprises: detecting a performance parameter and a load condition of the SoC in the current period; analyzing the performance parameter and the load condition to determine a current state of the SoC. The current state is used to determine the back pressure rate threshold in the current period.
7. The method of claim 6, wherein the using the current state to determine the back pressure rate threshold in the current period comprises: obtaining an adjustment strategy corresponding to the current state and an original back pressure rate threshold; adjusting the original back pressure rate threshold using the adjustment strategy to obtain the back pressure rate threshold in the current period.
8. A flow scheduling apparatus for a DPU, comprising: a detection module configured to detect a transmission performance state of a system-level chip to which the DPU is deployed in a current period; a determination module configured to determine a target scheduling queue of the DPU in the current period using the transmission performance state; a setting module configured to set a flow coefficient of the target scheduling queue in the current period based on a flow scheduling strategy corresponding to the transmission performance state; a scheduling module configured to schedule flow data in the scheduling queue to the system-level chip through a preset channel of the DPU according to the flow coefficient.
9. A computer device, comprising: a memory and a processor, which are in communication connection with each other, and the memory stores computer instructions, and the processor executes the computer instructions to perform the method in any one of claims 1 to 7.
10. A computer readable storage medium, wherein the computer readable storage medium stores computer instructions for causing a computer to perform the method in any one of claims 1 to 7.
Citation Information
Patent Citations
A system-on-chip architecture performance simulation platform
CN109446740A
Network I / O processing method and device based on SPDK
CN117834561A
Traffic scheduling method and device for DPU, equipment and storage medium
CN118660011A
Remote storage for hardware microservices hosted on XPUS and SOC-XPU platforms
US20220113911A1
Packet processing method and apparatus, and electronic device
WO2023115978A1