Micro burst traffic processing method and switching device

By dynamically adjusting the queue waterline, the problems of underutilization of cache resources and packet loss caused by static queue waterline configuration are solved, achieving efficient data processing under micro-burst traffic and improving network quality and training efficiency.

CN121771118APending Publication Date: 2026-03-31HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies, when handling micro-burst traffic, suffer from underutilized cache resources due to static queue waterline configuration, leading to packet loss during micro-burst traffic events, and are unable to effectively identify and reduce packet loss.

Method used

By dynamically adjusting the queue waterline, the queue buffering requirements for the next configuration period are predicted based on the maximum queue length of each configuration period. Combined with the micro-burst detection period and the queue collision probability, the queue waterline is dynamically adjusted to accommodate micro-burst traffic and reduce packet loss.

Benefits of technology

It effectively reduces packet loss caused by micro-burst traffic, improves the data processing performance of switching equipment and network quality, especially when training models across regions, it reduces the packet loss rate of RDMA data streams and improves training efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121771118A_ABST
    Figure CN121771118A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a micro-burst traffic processing method and a switching device, which can predict a queue cache demand in a next configuration period according to the maximum queue length of each configuration period, and the queue cache demand can reflect a micro-burst peak value. In this way, the queue waterline dynamically adjusted based on the queue cache demand can reduce packet loss caused by micro burst. The method comprises the following steps: detecting the length of a target queue according to a micro-burst detection period, and determining the maximum queue length of the target queue in a current configuration period after detecting that the length of the target queue exceeds a micro-burst threshold, predicting a queue cache demand of the target queue in the next configuration period according to the maximum queue length of the target queue in the current configuration period, and then setting a queue waterline of the target queue in the next configuration period according to the queue cache demand of the target queue in the next configuration period.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communications, and more particularly to a method for processing micro-burst traffic and a switching device. Background Technology

[0002] Microburst refers to the phenomenon where a switching device's interface receives a large burst of traffic within an extremely short time (e.g., milliseconds), such that the instantaneous rate exceeds the average rate by tens of times.

[0003] One current method for handling micro-burst traffic is roughly as follows: When the traffic received by a switching device exceeds its forwarding capacity, the switching device adds the data packets of that data stream to the queue corresponding to the data stream and delays the transmission of those data packets. The queue is a buffer resource allocated by the switching device for data stream data packets, and the switching device configures a static queue waterline for each queue.

[0004] When some queue levels are too low, the amount of data packets entering the queue can easily exceed the queue level, causing the switching device to lose packets. Meanwhile, other queues on the switching device may still be able to hold packets, thus underutilizing buffer resources. Summary of the Invention

[0005] This application provides a method for handling micro-burst traffic, which can predict the queue level in the next configuration cycle based on the maximum queue length of each configuration cycle. This dynamically adjusted queue level can reduce packet loss caused by micro-bursts. This application also provides a switching device, a computer-readable storage medium, and a computer program product for implementing the above method.

[0006] The first aspect provides a method for handling micro-burst traffic, comprising: detecting the length of a target queue according to a micro-burst detection period; after detecting that the length of the target queue exceeds a micro-burst threshold, determining the maximum queue length of the target queue in the current configuration period; predicting the queue buffering requirement of the target queue in the next configuration period based on the maximum queue length of the target queue in the current configuration period; and then setting the queue waterline of the target queue in the next configuration period based on the queue buffering requirement of the target queue in the next configuration period. Optionally, the micro-burst detection period is less than 1 millisecond.

[0007] By implementing this method, the queue buffering requirement of the target queue in the next configuration period can be predicted based on the maximum queue length of each configuration period. The queue buffering requirement can reflect the micro-burst peaks in the configuration period. Based on this queue buffering requirement, the queue waterline in the next configuration period is set. In this way, the dynamically adjusted queue waterline can effectively accommodate micro-burst traffic, thereby reducing packet loss caused by micro-bursts.

[0008] In conjunction with the first aspect, in the first possible implementation, before detecting the length of the target queue according to the micro-burst detection cycle, a static queue waterline is set for all queues of the switching device. When packet loss is detected in the target queue of the switching device or in any queue of the switching device, the length of the target queue is detected according to the micro-burst detection cycle. If the length of the target queue exceeds the micro-burst threshold, a micro-burst warning message is output. This can indicate packet loss caused by micro-bursts and help locate network packet loss faults.

[0009] In conjunction with the first aspect or the first possible implementation, in the second possible implementation, predicting the queue buffer requirement of the target queue in the next configuration period based on the maximum queue length of the target queue in the current configuration period includes: determining that the target micro-burst detection period is the micro-burst detection period in which the maximum queue length of the target queue is obtained in the current configuration period; when there is no packet loss in the target micro-burst detection period and the maximum queue length of the target queue is greater than or equal to the initial queue waterline, determining the queue buffer requirement of the target queue in the next configuration period to be the maximum queue length of the target queue; when there is no packet loss in the target micro-burst detection period and the maximum queue length of the target queue is less than the initial queue waterline, determining the queue buffer requirement of the target queue in the next configuration period to be the initial queue waterline; when the number of packet losses in the target micro-burst detection period is greater than 0, determining the queue buffer requirement of the target queue in the next configuration period to be the sum of the maximum queue length of the target queue and the number of packet losses. This can predict the queue buffer requirement of micro-burst traffic or normal traffic in the next configuration period, ensuring that their queue buffer requirements are greater than or equal to the initial queue waterline, thus guaranteeing that each queue has available buffer resources.

[0010] In conjunction with the first aspect or the first possible implementation, in the third possible implementation, predicting the queue buffer requirement of the target queue in the next configuration period based on the maximum queue length of the target queue in the current configuration period includes: when there is no packet loss in the target micro-burst detection period, determining the queue buffer requirement of the target queue in the next configuration period as the maximum queue length of the target queue; when the number of packet losses in the target micro-burst detection period is greater than 0, determining the queue buffer requirement of the target queue in the next configuration period as the sum of the maximum queue length of the target queue and the number of packet losses. This allows for the prediction of the queue buffer requirement for micro-burst traffic or normal traffic in the next configuration period.

[0011] Combining the possible implementations of the first aspect, in the fourth possible implementation, setting the queue waterline of the target queue in the next configuration cycle based on the queue cache requirements of the target queue in the next configuration cycle includes: when the sum of the queue cache requirements of all queues in the next configuration cycle is less than or equal to the shared memory size, the remaining cache resources in the shared memory are divided into n equal parts, and the queue waterline of the target queue in the next configuration cycle is determined as the sum of the queue cache requirements of the target queue in the next configuration cycle and one part of the remaining cache resources. Here, n is the total number of queues on the switching device, and the remaining cache resources in the shared memory are the cache resources outside of all queues in the shared memory. In addition to the queue cache requirements of the target queue, a portion of the shared memory cache can also be allocated to the target queue, enabling the target queue to accommodate micro-burst traffic larger than the maximum queue length of the current configuration cycle, effectively reducing packet loss caused by micro-bursts.

[0012] Combining the possible implementations of the first aspect, in the fifth possible implementation, the micro-burst collision probability of the target queue with other queues in the current configuration period is obtained. Based on this probability, the deduction amount for the target queue is determined according to the queue cache requirements of all queues in the next configuration period and the shared memory size. The queue waterline for the target queue in the next configuration period is determined as the queue cache requirements of the target queue minus the deduction amount. The micro-burst collision probability between two queues is the ratio of the number of micro-burst collision periods to the total number of micro-burst collision periods for both queues in the statistical period. The deduction amount for the target queue is positively correlated with the sum of the micro-burst collision probabilities of the target queue with other queues. For queues with a low probability of micro-burst collision with other queues, no or minimal cache resources can be deducted based on the deduction amount to reduce their packet loss probability. For queues with a high probability of micro-burst collision with other queues, a larger amount of cache resources can be deducted based on the deduction amount to prevent them from consuming excessive cache resources and causing other queues to starve.

[0013] In conjunction with the possible implementations of the first aspect, in another possible implementation, when the maximum queue length of the target queue is lower than the micro-burst threshold for M consecutive configuration cycles, the cache resources occupied by the target queue are released. M is the aging cycle length.

[0014] In conjunction with the above possible implementations of the first aspect, in another possible implementation, the target queue is the queue where the remote direct memory access (RDMA) data stream resides in the switching device.

[0015] The second aspect provides a switching device, which includes a feature acquisition module and an adjustment module. The feature acquisition module is used to detect the length of a target queue according to a micro-burst detection cycle. The adjustment module is used to determine the maximum queue length of the target queue in the current configuration cycle after detecting that the length of the target queue exceeds the micro-burst threshold; predict the queue buffer requirement of the target queue in the next configuration cycle based on the maximum queue length of the target queue in the current configuration cycle; and set the queue waterline of the target queue in the next configuration cycle based on the queue buffer requirement of the target queue in the next configuration cycle.

[0016] In conjunction with the second aspect, in the first possible implementation of the second aspect, the adjustment module is also used to set a static queue waterline for all queues of the switching device before detecting the length of the target queue according to the micro-burst detection cycle; when packet loss is detected in any queue of the switching device, the feature acquisition module is triggered to detect the length of the target queue according to the micro-burst detection cycle; after detecting that the length of the target queue exceeds the micro-burst threshold, a micro-burst prompt message is output.

[0017] In conjunction with the second aspect or the first possible implementation of the second aspect, in the second possible implementation of the second aspect, when there is no packet loss in the target micro-burst detection period and the maximum queue length of the target queue is greater than or equal to the initial queue waterline, the adjustment module is specifically used to determine the queue buffer requirement of the target queue in the next configuration period as the maximum queue length of the target queue; when there is no packet loss in the target micro-burst detection period and the maximum queue length of the target queue is less than the initial queue waterline, the adjustment module is specifically used to determine the queue buffer requirement of the target queue in the next configuration period as the initial queue waterline; when the number of packet losses in the target micro-burst detection period is greater than 0, the adjustment module is specifically used to determine the queue buffer requirement of the target queue in the next configuration period as the sum of the maximum queue length of the target queue and the number of packet losses.

[0018] In a third possible implementation of the second aspect, combining the second aspect or the first possible implementation of the second aspect, when there is no packet loss during the target micro-burst detection period, the adjustment module determines the queue buffer requirement of the target queue in the next configuration period as the maximum queue length of the target queue; when the number of packet losses during the target micro-burst detection period is greater than 0, the adjustment module determines the queue buffer requirement of the target queue in the next configuration period as the sum of the maximum queue length of the target queue and the number of packet losses. This allows for the prediction of the queue buffer requirement for micro-burst traffic or normal traffic in the next configuration period.

[0019] Combining the above possible implementations of the second aspect, in the fourth possible implementation of the second aspect, when the sum of the queue cache requirements of all queues in the next configuration cycle is less than or equal to the size of the shared memory, the adjustment module is specifically used to divide the remaining cache resources in the shared memory into n parts, and determine the queue waterline of the target queue in the next configuration cycle as the sum of the queue cache requirements of the target queue in the next configuration cycle and one part of the remaining cache resources.

[0020] In conjunction with the above possible implementations of the second aspect, in the fifth possible implementation of the second aspect, when the sum of the queue cache requirements of all queues in the next configuration cycle is greater than the shared memory size, the probability of micro-burst collision between the target queue and other queues in the current configuration cycle is obtained. Based on the probability of micro-burst collision between the target queue and other queues in the current configuration cycle, the queue cache requirements of all queues in the next configuration cycle, and the shared memory size, the deduction amount of the target queue is determined. The queue waterline of the target queue in the next configuration cycle is determined to be the queue cache requirements of the target queue in the next configuration cycle minus the deduction amount of the target queue.

[0021] In conjunction with the above possible implementations of the second aspect, in another possible implementation, when the maximum queue length of the target queue is lower than the micro-burst threshold for M consecutive configuration cycles, the adjustment module is specifically used to release the cache resources occupied by the target queue.

[0022] For the explanations of terms, the specific steps for each module, and the beneficial effects in the second part, please refer to the corresponding descriptions in the first part.

[0023] A third aspect provides a switching device including a processor and a memory, the memory storing computer-readable instructions, the processor executing the computer-readable instructions to cause the switching device to perform the methods as described in the foregoing aspects or any possible implementation thereof.

[0024] A fourth aspect provides a computer-readable storage medium including computer-readable instructions; the computer-readable instructions are used to implement the methods of the foregoing aspects or any possible implementations of the foregoing aspects.

[0025] The fifth aspect provides a computer program product comprising computer-readable instructions; the computer-readable instructions are used to implement the methods of the foregoing aspects or any possible implementations of the foregoing aspects. Attached Figure Description

[0026] Figure 1 This is a schematic diagram illustrating cross-regional transmission of RDMA data streams in an embodiment of this application;

[0027] Figure 2This is a flowchart of a method for processing micro-burst traffic in an embodiment of this application;

[0028] Figure 3 This is another flowchart of the micro-burst traffic processing method in the embodiments of this application;

[0029] Figure 4 This is a schematic diagram of micro-burst collisions among multiple queues in an embodiment of this application;

[0030] Figure 5A This is a diagram illustrating packet loss in the case of static queue waterlining.

[0031] Figure 5B This is a schematic diagram of a static queue waterline and a dynamic queue waterline in an embodiment of this application;

[0032] Figure 6 This is another schematic diagram of the static queue waterline and the dynamic queue waterline in the embodiments of this application;

[0033] Figure 7 This is a structural diagram of a switching device in an embodiment of this application;

[0034] Figure 8 This is a schematic diagram of a switching device processing micro-burst traffic in an embodiment of this application;

[0035] Figure 9 This is another structural diagram of the switching device in the embodiments of this application. Detailed Implementation

[0036] The micro-burst traffic handling method in this application can be applied to scenarios involving remote model training. Currently, the amount of data used to train models can reach hundreds of billions or more. For such a massive amount of data, a small number of computing nodes is insufficient to meet training requirements. To address this, a method for remote model training has been proposed, which involves training the model using computing nodes located at greater distances. Under lossless network conditions, remote training has less than a 10% impact on the training efficiency of data parallelism (DP) models with trillions of data points. Therefore, remote training is a feasible method for training models. Remote model training includes, but is not limited to, cross-regional training. Cross-regional training can also be considered cross-WAN training, which utilizes computing nodes in different regions (e.g., provinces or cities) to train the model. Aggregating a large number of computing nodes to train the model effectively improves the efficiency of model training.

[0037] In cross-region training, RDMA is used to transfer data between computing nodes. RDMA is a technology that bypasses the operating system kernel of a remote host to access data in its memory. Because it does not go through the operating system, it not only saves a lot of central processing unit (CPU) resources, but also improves system throughput and reduces network communication latency, making it particularly suitable for widespread use in large-scale parallel computer clusters. RDMA has the following characteristics: (1) Data is transferred between remote machines via the network; (2) There is no involvement of the operating system kernel, and all content related to sending and transmitting is offloaded to the smart network card; (3) Data is transferred directly between user space virtual memory and the smart network card without involving the operating system kernel, and there is no additional data movement or copying. The data stream transmitted using RDMA can be called an RDMA data stream. RDMA data streams are very sensitive to packet loss. For example, a packet loss rate of 0.1% will seriously affect training efficiency and cause a 50% loss of computing power.

[0038] The following is combined with Figure 1 This section describes the process of transmitting RDMA data streams during cross-regional training. (See also...) Figure 1 In one embodiment, for RDMA services, the computing network orchestration system can orchestrate computing service paths for RDMA data streams. The controller selects edge clouds, edge routers (e.g., edge router 1 and edge router 2), and carrier routers (e.g., carrier routers 1 to 6), and then transmits the RDMA data stream through the selected edge clouds, edge routers, and carrier routers. Cross-provincial transmission of RDMA data streams can be achieved when edge routers 1 and 2 are located in different provinces, edge router 2 and carrier router 5 are located in different provinces, or carrier router 2 and carrier router 3 are located in different provinces, or carrier router 2 and the hyperconverged computing center are located in different provinces.

[0039] The computing network orchestration system is used to orchestrate computing power service paths. It connects the edge cloud, computing hub, and routers through a controller, performing computing power routing and forwarding to achieve unified orchestration, deployment, and assurance of computing network services. The system also connects to hyperconverged computing centers through a computing platform. These centers provide large-scale computing resources to meet complex computing needs. Hyperconverged computing centers may include, but are not limited to, high-performance computing clusters and / or artificial intelligence computing clusters, as well as internal networks connecting the computing nodes.

[0040] It should be noted that, Figure 1Only terminals for some services are shown, such as enterprise terminals, personal terminals, and home terminals. The terminals involved in this application can also be terminals for other services. It should be understood that the connection methods between the terminals and access network equipment in this application are not limited to the examples above. The edge cloud, edge router, and carrier router connected to the controller are illustrative examples, and this application does not limit their number.

[0041] To ensure quality of service (QoS) for RDMA data streams traversing a wide area network (WAN), it's crucial to minimize congestion, packet loss, and bit errors during transmission. RDMA data streams can experience micro-bursts during transmission. When the instantaneous rate of a micro-burst exceeds the forwarding capacity of a switch, the switch buffers the micro-burst data for later transmission. If the switch lacks sufficient buffer space, the excess data must be discarded, resulting in congestion and packet loss.

[0042] In this application, a queue is a cache resource allocated for data in the shared memory of the switching device. Data is accessed and retrieved from the queue according to a first-in, first-out (FIFO) rule. The queue waterline represents the cache resource that the queue is allowed to use. When the amount of data in the queue exceeds the queue waterline, the switching device discards data at the tail of the queue. The initial queue waterline represents the cache resource available to the queue in the default configuration.

[0043] In view of this, this application can detect micro-bursts and dynamically adjust the queue waterline based on the micro-burst traffic, thereby reducing packet loss caused by micro-bursts. The micro-burst traffic processing method in this application is described below; please refer to [link / reference]. Figure 2 In one embodiment, the micro-burst traffic processing method of this application includes the following steps:

[0044] S201. Detect the length of the target queue according to the micro-burst detection cycle.

[0045] In this embodiment, the target queue can be any queue in the switching device, including but not limited to the queue containing the RDMA data stream. After adding data packets from one or more data streams to the target queue, the length of the target queue is detected according to the micro-burst detection period. The micro-burst detection period can be any duration less than 1 millisecond, including but not limited to 1 microsecond, 5 microseconds, 10 microseconds, 50 microseconds, and 100 microseconds. It should be noted that RDMA data streams have a high probability of micro-bursts, and the queue containing the RDMA data stream is prone to packet loss. When there are multiple queues in the switching device, prioritizing micro-burst detection on the queue containing the RDMA data stream can improve fault detection speed.

[0046] S202. After detecting that the length of the target queue exceeds the micro-burst threshold, determine the maximum queue length of the target queue in the current configuration period.

[0047] If the length of the target queue exceeds the micro-burst threshold, a micro-burst traffic event is determined to have occurred in the target queue. The micro-burst threshold can be set according to actual conditions, and this application does not impose any restrictions. Specifically, a configuration period can have multiple micro-burst detection periods. In the current configuration period, the queue length is detected according to the micro-burst detection period, and the maximum queue length of the target queue can be collected in each micro-burst detection period. When the maximum queue length of the target queue collected in the micro-burst detection period is equal to the static queue waterline, the packet loss count of the micro-burst detection period is greater than 0. At this time, the packet loss count of the micro-burst detection period can also be obtained, and the requested queue length of the queue is equal to the sum of the maximum queue length and the packet loss count. When the maximum queue length of the target queue collected in the micro-burst detection period is less than the static queue waterline, the packet loss count of the micro-burst detection period is 0, and the requested queue length of the queue is equal to the maximum queue length.

[0048] In the micro-burst detection cycle, the request queue length of the q-th queue is denoted as Qlen. req,q The maximum queue length of the q-th queue is denoted as Qlen. maxq The number of packet losses in the q-th queue is denoted as L. q They satisfy the following formula:

[0049]

[0050] Where q is the queue number, which can be any integer in [1, n], and n is the total number of queues in the switching device.

[0051] In each configuration cycle, in addition to collecting the maximum queue length of the target queue, the maximum queue length of other queues can also be collected. Besides collecting the maximum queue length, other micro-burst characteristic data of the queues can also be collected, such as the micro-burst duration of the micro-burst period, the number of micro-burst periods in the current configuration cycle (i.e., the number of micro-bursts), the average queue depth in the micro-burst period, the standard deviation of the average queue depth in the micro-burst period, the average micro-burst duration in the current configuration cycle, and the proportion of micro-burst duration in the current configuration cycle. The configuration cycle can be set according to actual conditions; it can be any duration greater than or equal to 1 millisecond, such as 1 millisecond or 10 milliseconds, and this application does not impose any limitation. Optionally, the start time when the detected queue length is greater than the first micro-burst threshold is taken as the start time of the micro-burst period. After this start time, the start time when the queue length is less than the second micro-burst threshold is taken as the end time of the micro-burst period. The first and second micro-burst thresholds can be set according to actual conditions, and this application does not impose any limitation. Optionally, the first and second micro-burst thresholds are equal.

[0052] S203. Based on the maximum queue length of the target queue in the current configuration period, predict the queue cache requirement of the target queue in the next configuration period.

[0053] Optionally, S203 includes: when there is no packet loss in the target micro-burst detection period and the maximum queue length of the target queue is greater than or equal to the initial queue waterline, determining the queue buffer requirement of the target queue in the next configuration period to be the maximum queue length of the target queue; when there is no packet loss in the target micro-burst detection period and the maximum queue length of the target queue is less than the initial queue waterline, determining the queue buffer requirement of the target queue in the next configuration period to be the initial queue waterline; when the number of packet losses in the target micro-burst detection period is greater than 0, determining the queue buffer requirement of the target queue in the next configuration period to be the sum of the maximum queue length of the target queue and the number of packet losses. Here, the target micro-burst detection period is the micro-burst detection period in which the maximum queue length of the target queue is obtained in the current configuration period.

[0054] In this embodiment, the switching device sets an initial queue waterline for each queue, which represents the default available cache size for each queue. It can be the minimum cache resource value allocated to the queue. Its specific value can be set according to actual conditions, and this application does not limit it. The target queue is the q-th queue, and the initial queue waterline of the q-th queue is denoted as QTH. min,q The queue cache requirement for the q-th queue in the next configuration cycle can be denoted as max(Qlen). req,q QTH min,q ).

[0055] Alternatively, S203 includes: when there is no packet loss in the target micro-burst detection period, determining the queue buffer requirement of the target queue in the next configuration period to be the maximum queue length, where the target micro-burst detection period is the micro-burst detection period in the current configuration period with the maximum queue length of the target queue; when the number of packet losses in the target micro-burst detection period is greater than 0, determining the queue buffer requirement of the target queue in the next configuration period to be the sum of the maximum queue length of the target queue and the number of packet losses. When the switching device does not set an initial queue level, the queue buffer requirement of the target queue in the next configuration period is Qlen. req,q .

[0056] S204. Set the queue waterline for the target queue in the next configuration cycle based on the queue caching requirements of the target queue in the next configuration cycle.

[0057] Optionally, S204 includes: when the sum of the queue cache requirements of all queues in the next configuration period is less than or equal to the shared memory size, dividing the remaining cache resources in the shared memory into n equal parts, and determining the queue waterline of the target queue in the next configuration period as the sum of the queue cache requirements of the target queue in the next configuration period and one remaining cache resource; when the sum of the queue cache requirements of all queues in the next configuration period is greater than the shared memory size, obtaining the micro-burst collision probability of the target queue with other queues in the current configuration period, determining the deduction amount of the target queue based on the micro-burst collision probability of the target queue with other queues in the current configuration period, the queue cache requirements of all queues in the next configuration period, and the shared memory size, and determining the queue waterline of the target queue in the next configuration period as the queue cache requirements of the target queue minus the deduction amount of the target queue in the next configuration period. Wherein, the micro-burst collision probability of two queues is the ratio of the number of micro-burst collision periods in the statistical period to the total number of micro-burst periods of the two queues. The deduction amount of the target queue is positively correlated with (the sum of the micro-burst collision probabilities of the target queue with other queues).

[0058] In this embodiment, the queue buffer requirement for each configuration period can be determined based on the maximum queue length of the target queue in each configuration period. The queue buffer requirement can reflect the micro-burst peak. Based on the queue buffer requirement of the configuration period, the queue waterline in the next configuration period can be predicted. In this way, the dynamically adjusted queue waterline can reduce packet loss caused by micro-bursts and make the packet loss rate of micro-burst traffic less than 1%.

[0059] Secondly, dynamically adjusting the waterline allows micro-burst flows to enter at high speed and exit at low speed, meaning the inlet bandwidth is greater than the outlet bandwidth. This effectively improves the uplink and downlink bandwidth convergence ratio and enhances the performance of data exchange.

[0060] Next, execute the procedure for the queue containing the RDMA data stream. Figure 2 The method of the illustrated embodiment can effectively reduce packet loss in RDMA data streams, reduce the impact of network packet loss on remote training services, and enhance the competitiveness of cross-wide area intelligent computing training routers.

[0061] See Figure 3 In another embodiment, the micro-burst traffic processing method of this application includes the following steps:

[0062] S301. Detect the length of the target queue according to the micro-burst detection cycle.

[0063] S302. After detecting that the length of the target queue exceeds the micro-burst threshold, determine the maximum queue length of the target queue in the current configuration period.

[0064] S303. Predict the queue cache requirements of the target queue in the next configuration period based on the maximum queue length of the target queue in the current configuration period.

[0065] S301 to S303 are similar to S203 to S203; please refer to the relevant documentation for details. Figure 2 The corresponding description in the illustrated embodiment.

[0066] S304. Determine whether the sum of the queue cache requirements of all queues in the next configuration cycle is less than or equal to the shared memory size. If yes, execute S305; otherwise, execute S306.

[0067] If the sum of the queue cache requirements for all queues in the next configuration cycle is less than or equal to the shared memory size, it indicates that the shared memory can meet the cache requirements of all queues in the next configuration cycle. If the sum of the queue cache requirements for all queues in the next configuration cycle is greater than the shared memory size, it indicates that the shared memory cannot meet the cache requirements of all queues in the next configuration cycle, and the cache requirements of some queues need to be limited.

[0068] S305. Divide the remaining cache resources in the shared memory into n equal parts, and determine the queue waterline of the target queue in the next configuration cycle as the sum of the queue cache requirement of the target queue in the next configuration cycle and one remaining cache resource.

[0069] Where n is the total number of queues on the switching device, and the remaining cache resources in shared memory are the cache resources excluding all queues in shared memory. The size of shared memory is denoted as Vol, and the remaining cache resources in shared memory are denoted as Mar. In the next configuration cycle, when the sum of the queue cache requirements of all queues is less than or equal to the size of shared memory, they satisfy the following formula: Mar = Vol - ∑ q max(Qlen req,q QTH min,q ), where q is the queue number, QTH min,q Let Qlen be the initial queue waterline for the q-th queue. req,q Let Q be the length of the request queue for the q-th queue. The queue waterline for the next configuration cycle is denoted as QTH. q Let n be the total number of queues in the switching equipment, and they satisfy the following formula:

[0070] S306. Obtain the probability of micro-burst collisions between the target queue and other queues in the current configuration period.

[0071] The probability of a micro-burst collision between two queues is the ratio of the number of colliding micro-burst periods to the total number of micro-burst periods in both queues during the statistical period. Micro-burst period collision refers to collisions between micro-burst periods of different queues, including overlapping micro-burst detection cycles. See also... Figure 4 In one optional embodiment, during the configuration period, the time periods during which micro-burst traffic occurs in queue 1 include time periods 411, 412, 413, 414, and 415; the time periods during which micro-burst traffic occurs in queue 2 include time periods 421, 422, 423, 424, and 425; and the time periods during which micro-burst traffic occurs in queue 3 include time periods 431, 432, 433, 434, and 435. That is, the number of micro-bursts in queue 1 is 5, the number of micro-bursts in queue 2 is 5, and the number of micro-bursts in queue 3 is 5.

[0072] Because time periods 411 and 421 overlap, and time periods 412 and 422 overlap, there are 4 micro-burst time periods where queues 1 and 2 collide during this configuration period, with a collision probability of 4 / 10. Because time periods 421 and 431 overlap, and time periods 422 and 432 overlap, and time periods 423 and 433 overlap, and time periods 424 and 434 overlap, there are 8 micro-burst time periods with collisions, with a collision probability of 8 / 10 between queues 1 and 2. Because time periods 414 and 433 overlap, and time periods 415 and 435 overlap, there are 4 micro-burst time periods with collisions, with a collision probability of 4 / 10 between queues 1 and 3.

[0073] S307. Determine the deduction amount for the target queue based on the probability of micro-burst collisions between the target queue and other queues in the current configuration cycle, the queue cache requirements of all queues in the next configuration cycle, and the size of shared memory.

[0074] The cache deficit for the current configuration period is the difference between the queue cache requirements and the shared memory size for all queues in the current configuration period. The deduction amount for the queue in the current configuration period is positively correlated with the probability of micro-burst collisions in the queue in the current configuration period.

[0075] In one optional embodiment, the deduction amount k for the q-th queue q Shared memory size Vol, queue cache requirement of the q-th queue max(Qlen) req,q QTH min,q The queue buffer requirement of the j-th queue is max(Qlen). req,j QTH min,j The probability of micro-burst collision between the q-th queue and the j-th queue in the current configuration period, denoted as α. qj Satisfy the following formula:

[0076]

[0077] j and q are both variables, j∈[1,n], q∈[1,n]. When j=q, a qj =0. It should be noted that β qj Optional. β qj This is a weighting coefficient, and its value can be set according to the actual situation. Optional, β qj ∈[0,1].

[0078] In another alternative embodiment, the cache difference for the current configuration period is denoted as delta, which satisfies the following formula:

[0079]

[0080] The sum of the probabilities of micro-burst collisions in all queues is denoted as a. t It satisfies the following formula:

[0081]

[0082] The deduction amount for the q-th queue and the sum of the micro-burst collision probabilities between the q-th queue and the j-th queue in the current configuration period. delta and a t Satisfy the following formula:

[0083]

[0084] S308. Determine the queue waterline of the target queue in the next configuration cycle as the queue cache requirement of the target queue in the next configuration cycle minus the deduction amount of the target queue.

[0085] The queue waterline of the target queue in the next configuration cycle is denoted as QTH. q It satisfies the following formula: QTH q =max(Qlen req,q QTH min,q )-k q .

[0086] In this embodiment, for queues with a low probability of micro-burst collisions, no cache resources are deducted or only a small amount is deducted to reduce packet loss issues in these queues. For queues with a high probability of micro-burst collisions, more cache resources are deducted. This prevents queues with a high probability of micro-burst collisions from occupying all cache resources, causing other queues to starve.

[0087] Secondly, dynamically adjusting the waterline allows micro-burst flows to enter at high speed and exit at low speed, meaning the inlet bandwidth is greater than the outlet bandwidth. This effectively improves the uplink and downlink bandwidth convergence ratio and enhances the performance of data exchange.

[0088] Next, execute the procedure for the queue containing the RDMA data stream. Figure 3 The method of the illustrated embodiment can effectively reduce packet loss in RDMA data streams, reduce the impact of network packet loss on remote training services, and enhance the competitiveness of cross-wide area intelligent computing training routers.

[0089] Packet loss in a network can be caused by network congestion, network latency, incorrect routing information, or poor wireless link quality. This application can identify packet loss caused by micro-bursts. The following describes a micro-burst fault location method. In one optional embodiment, the micro-burst traffic processing method in this application includes: setting static queue waterlines for all queues of the switching device; when packet loss is detected in a target queue of the switching device, detecting the length of the target queue according to the micro-burst detection cycle; and outputting a micro-burst alert message after detecting that the length of the target queue exceeds the micro-burst threshold.

[0090] In this embodiment, when packet loss occurs in the switching device, it can be determined whether the packet loss is caused by micro-burst traffic in the target queue based on the micro-burst alert information, thus providing a packet loss fault location method. Methods for displaying micro-burst alert information include, but are not limited to, the following: displaying the micro-burst alert information in the device log, displaying the micro-burst alert information as an alarm message, or displaying the micro-burst alert information via device command line echo.

[0091] Because micro-burst traffic is very large, the queues configured for it are also very large. Prolonged occupation of cache resources can starve other queues on the switching device. This application can also release the corresponding cache resources when there is no micro-burst traffic.

[0092] In another optional embodiment, the micro-burst traffic processing method of this application further includes: when the maximum queue length of the target queue is lower than the micro-burst threshold in M ​​consecutive configuration periods, releasing the cache resources occupied by the target queue.

[0093] The configuration period for which the maximum queue length of the target queue is lower than the micro-burst threshold (i.e., the configuration period without micro-burst traffic) is counted. When there are M consecutive configuration periods without micro-burst traffic, it indicates that the micro-burst traffic has aged out, and the cache resources occupied by the target queue can be released. M is the aging period length, and its value can be set according to the actual situation. This application does not limit it. For example, if the configuration period is 1 millisecond, M can be 100.

[0094] In one example, the code for configuring device caching enable on the board includes:

[0095] [~Router]slot 4

[0096] [~Router-slot-4]cache-pool enable

[0097] [*Router-slot-4]commit

[0098] [~Router]display current-configuration

[0099] slot 4

[0100] cache-pool enable

[0101] In another example, the code for viewing board cache adjustments and usage includes:

[0102] [~Router]display cache-pool status slot 4

[0103] Cache-pool status:

[0104] ---------------------------------

[0105] Slot 4

[0106] ---------------------------------

[0107] Status: Adjusting

[0108] Cache usage: 65%

[0109] Cache recommendations:Enable cache adjustment

[0110] The following example illustrates the method for handling micro-burst traffic in this application. (See attached document.) Figure 5A In one embodiment, the switching device adds multiple RDMA data streams to queues 1, 2, and 3, respectively. The switching device configures static buffer waterlines for the three queues; each queue's buffer waterline is a static queue waterline. Figure 5A It can be seen that at t1, there is data exceeding the buffer watermark of queue 1; at t2, there is data exceeding the buffer watermark of queue 2; and at t3, there is data exceeding the buffer watermark of queue 3. When the traffic of a queue exceeds the buffer watermark, the portion exceeding the buffer watermark needs to be discarded, i.e., micro-burst packet loss.

[0111] See Figure 5BAccording to the method of this application, dynamic queue waterlines can be set. For example, at t1, the buffer waterline of queue 1 can be adjusted to a larger value based on the maximum queue length of queue 1, and the buffer waterline of queue 2 and queue 3 can be adjusted based on the traffic of queue 2 and queue 3, respectively. This ensures that all three queues can accommodate the corresponding data, avoiding packet loss. Similarly, queue waterlines can be dynamically adjusted in real time. For example, at t2, the buffer waterline of queue 2 can be adjusted to a larger value, and at t3, the buffer waterline of queue 3 can be adjusted to a larger value. This can fully utilize cache resources and reduce micro-burst packet loss.

[0112] To facilitate understanding, another concrete example will be used below to introduce static queue waterlining and dynamic queue waterlining. (See reference...) Figure 6 In one embodiment, the switching device sets a static queue waterline of 16MB for RDMA data streams. After adding data to the queue, when RDMA traffic is detected to be greater than 16MB, the maximum queue length is obtained during the learning period. Based on the maximum queue length, the buffer requirement for the first configuration period in the adjustment period is determined, and the queue waterline for the first configuration period is set according to the queue buffer requirement of the first configuration period. During the adjustment period, the maximum queue length for the i-th configuration period is obtained, and the buffer requirement for the (i+1)-th configuration period in the adjustment period is determined based on the maximum queue length for the i-th configuration period. The queue waterline for the (i+1)-th configuration period is set according to the queue buffer requirement of the (i+1)-th configuration period, where i is a variable. When no queue length exceeding the micro-burst threshold is detected for 100 consecutive milliseconds, for example, from 900 milliseconds to 1000 milliseconds (i.e., the aging period), the queue waterline is adjusted to a static queue waterline after 1000 milliseconds to release the queue's buffer resources.

[0113] The switching device in this application can be a switching device or a switching device chip, such as a gateway, router, switch, gateway chip, router chip, or switch chip. See also... Figure 7 This application provides a switching device 700, which is capable of realizing Figure 2 The illustrated embodiment or Figure 3 The embodiment shown illustrates a method for processing micro-burst traffic. In one embodiment, the switching device 700 includes a feature acquisition module 701 and an adjustment module 702. The following describes a method for processing micro-burst traffic. Figure 8 The feature acquisition module 701 and the adjustment module 702 are described below:

[0114] See Figure 8 The feature acquisition module 701 can detect the length of the target queue according to the micro-burst detection cycle; the feature acquisition module 701 can also collect one or more other micro-burst features, such as the micro-burst start time, the micro-burst end time, the maximum enqueue rate, the minimum enqueue rate, the total number of data packets passing through the queue, the total number of lost packets in the queue, the number of bytes passing through the queue, etc.

[0115] The adjustment module 702 is used to determine the maximum queue length of the target queue in the current configuration period after detecting that the length of the target queue exceeds the micro-burst threshold; predict the queue buffer requirement of the target queue in the next configuration period based on the maximum queue length of the target queue in the current configuration period; and set the queue waterline of the target queue in the next configuration period based on the queue buffer requirement of the target queue in the next configuration period.

[0116] In other embodiments, the adjustment module 702 is further configured to set a static queue waterline for all queues of the switching device before detecting the length of the target queue according to the micro-burst detection cycle; when packet loss is detected in the target queue of the switching device, the feature acquisition module 701 is triggered to detect the length of the target queue according to the micro-burst detection cycle; after detecting that the length of the target queue exceeds the micro-burst threshold, a micro-burst prompt message is output.

[0117] In other embodiments, when there is no packet loss in the target micro-burst detection period and the maximum queue length of the target queue is greater than or equal to the initial queue waterline, the adjustment module 702 is specifically used to determine the queue buffer requirement of the target queue in the next configuration period as the maximum queue length of the target queue. The target micro-burst detection period is the micro-burst detection period in the current configuration period in which the maximum queue length of the target queue is obtained.

[0118] When there is no packet loss during the target micro-burst detection period and the maximum queue length of the target queue is less than the initial queue waterline, the adjustment module 702 is specifically used to determine the queue buffer requirement of the target queue in the next configuration period as the initial queue waterline; when the number of packet losses during the target micro-burst detection period is greater than 0, the adjustment module 702 is specifically used to determine the queue buffer requirement of the target queue in the next configuration period as the sum of the maximum queue length of the target queue and the number of packet losses.

[0119] In other embodiments, when the sum of the queue cache requirements of all queues in the next configuration cycle is less than or equal to the size of the shared memory, the adjustment module 702 is specifically used to divide the remaining cache resources in the shared memory into n parts, where n is the total number of queues in the switching device, and the remaining cache resources in the shared memory are the cache resources other than all queues in the shared memory; and to determine the queue waterline of the target queue in the next configuration cycle as the sum of the queue cache requirements of the target queue in the next configuration cycle and one part of the remaining cache resources.

[0120] When the sum of the queue cache requirements of all queues in the next configuration cycle is greater than the shared memory size, the adjustment module 702 is specifically used to obtain the micro-burst collision probability of the target queue with other queues in the current configuration cycle, and determine the deduction amount of the target queue based on the micro-burst collision probability of the target queue with other queues in the current configuration cycle, the queue cache requirements of all queues in the next configuration cycle, and the shared memory size; and determine the queue waterline of the target queue in the next configuration cycle as the queue cache requirements of the target queue minus the deduction amount of the target queue in the next configuration cycle.

[0121] In other embodiments, when the maximum queue length of the target queue is lower than the micro-burst threshold for M consecutive configuration periods, the adjustment module 702 is specifically used to release the cache resources occupied by the target queue.

[0122] It should be noted that the information interaction and execution process between the modules / units of the above-mentioned device are based on the same concept as the method embodiments of this application, and the resulting technical effects are the same as those of the method embodiments of this application. For details, please refer to the description in the method embodiments shown above in this application, and will not be repeated here.

[0123] The switching device in this application may be, but is not limited to, a gateway, router, or switch. See also... Figure 9 This application provides a switching device 900. For example... Figure 9 As shown, the switching device 900 includes a bus 902, a processor 904, a memory 906, and a communication interface 908. The processor 904, the memory 906, and the communication interface 908 communicate with each other via the bus 902. It should be understood that this application does not limit the number of processors and memory in the switching device 900.

[0124] The 902 bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 9 The bus 904 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 904 may include a path for transmitting information between various components of the switching device 900 (e.g., memory 906, processor 904, communication interface 908).

[0125] Processor 904 may include any one or more processors such as a central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP). The processor may include, but is not limited to, multiple processing cores.

[0126] The memory 906 may include volatile memory, such as random access memory (RAM). The memory 906 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD). In some embodiments, the memory 906 stores executable program code, which the processor 904 executes to implement the functions of the aforementioned feature acquisition module 701 and adjustment module 702, thereby implementing the micro-burst traffic processing method described above.

[0127] The communication interface 908 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between the switching device 900 and other devices or communication networks.

[0128] This application also provides a chip system comprising a processor and a memory coupled to each other. The memory stores computer programs or instructions, and the processing unit executes the computer programs or instructions stored in the memory to cause the routing device to perform the steps performed by the first routing device, the target routing device, or the second routing device in the above embodiments. Optionally, the memory is on-chip memory, such as registers, caches, etc. The memory can also be off-chip memory within a site, such as read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, random access memory (RAM), etc. The processor mentioned above can be a general-purpose central processing unit, a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for implementing the above communication methods.

[0129] This application provides a computer program product containing instructions. The computer program product may be software or program products containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform a micro-burst traffic processing method.

[0130] This application provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center that includes one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to perform a micro-burst traffic processing method.

[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this application.

Claims

1. A method for processing micro-burst flow, characterized in that, The method is applied to a switching device configured with multiple queues for storing data packets of Remote Direct Memory Access (RDMA) data streams. The method includes: The length of the target queue is detected according to the micro-burst detection cycle; After detecting that the length of the target queue exceeds the micro-burst threshold, the maximum queue length of the target queue in the current configuration period is determined; Predict the queue caching requirements of the target queue in the next configuration period based on the maximum queue length of the target queue in the current configuration period; Set the queue waterline of the target queue in the next configuration cycle according to the queue caching requirements of the target queue in the next configuration cycle.

2. The method according to claim 1, characterized in that, The method further includes: Before detecting the length of the target queue according to the micro-burst detection cycle, a static queue waterline is set for all queues of the switching device; When packet loss is detected in the target queue of the switching device, the step of detecting the length of the target queue according to the micro-burst detection cycle is triggered; After detecting that the length of the target queue exceeds the microburst threshold, a microburst alert message is output.

3. The method according to claim 1 or 2, characterized in that, The step of predicting the queue caching requirement of the target queue in the next configuration period based on the maximum queue length of the target queue in the current configuration period includes: If there is no packet loss during the target micro-burst detection period and the maximum queue length of the target queue is greater than or equal to the initial queue waterline, the queue buffer requirement of the target queue in the next configuration period is determined to be the maximum queue length of the target queue. The target micro-burst detection period is the micro-burst detection period in which the maximum queue length of the target queue is obtained in the current configuration period. If there is no packet loss during the target micro-burst detection period and the maximum queue length of the target queue is less than the initial queue waterline, the queue buffer requirement of the target queue in the next configuration period is determined to be the initial queue waterline. When the number of packet losses in the target micro-burst detection period is greater than 0, the queue buffer requirement of the target queue in the next configuration period is determined to be the sum of the maximum queue length of the target queue and the number of packet losses.

4. The method according to any one of claims 1 to 3, characterized in that, The step of setting the queue waterline of the target queue in the next configuration cycle according to the queue caching requirements of the target queue in the next configuration cycle includes: If the sum of the queue cache requirements of all queues in the next configuration cycle is less than or equal to the size of the shared memory, the remaining cache resources in the shared memory are divided into n parts, where n is the total number of queues of the switching device, and the remaining cache resources in the shared memory are the cache resources other than all queues in the shared memory. The queue waterline of the target queue in the next configuration cycle is determined to be the sum of the queue cache requirement of the target queue in the next configuration cycle and a remaining cache resource.

5. The method according to any one of claims 1 to 3, characterized in that, The step of setting the queue waterline of the target queue in the next configuration cycle according to the queue caching requirements of the target queue in the next configuration cycle includes: When the sum of the queue cache requirements of all queues in the next configuration period is greater than the shared memory size, obtain the micro-burst collision probability between the target queue and other queues in the current configuration period. The micro-burst collision probability between the two queues is the ratio of the number of micro-burst periods of collision in the statistical period to the total number of micro-burst periods of the two queues. The deduction amount for the target queue is determined based on the probability of micro-burst collisions between the target queue and other queues in the current configuration cycle, the queue cache requirements of all queues in the next configuration cycle, and the shared memory size. The deduction amount for the target queue is positively correlated with the sum of the probabilities of micro-burst collisions between the target queue and other queues. The queue waterline of the target queue in the next configuration cycle is determined as the queue buffer requirement of the target queue in the next configuration cycle minus the deduction amount of the target queue.

6. The method according to any one of claims 1 to 5, characterized in that, The method includes: When the maximum queue length of the target queue is lower than the micro-burst threshold for M consecutive configuration cycles, the cache resources occupied by the target queue are released, where M is the aging cycle length.

7. The method according to any one of claims 1 to 6, characterized in that, The micro-burst detection period is less than 1 millisecond.

8. The method according to any one of claims 1 to 7, characterized in that, The target queue is the queue where the Remote Direct Memory Access (RDMA) data stream resides in the switching device.

9. A switching device, characterized in that, include: The feature acquisition module is used to detect the length of the target queue according to the micro-burst detection cycle; The adjustment module is used to determine the maximum queue length of the target queue in the current configuration period after detecting that the length of the target queue exceeds the micro-burst threshold; Predict the queue buffer requirement of the target queue in the next configuration period based on the maximum queue length of the target queue in the current configuration period; set the queue waterline of the target queue in the next configuration period based on the queue buffer requirement of the target queue in the next configuration period.

10. The apparatus according to claim 9, characterized in that, The adjustment module is also used to set a static queue waterline for all queues of the switching device before detecting the length of the target queue according to the micro-burst detection cycle; when packet loss is detected in the target queue of the switching device, the feature acquisition module is triggered to detect the length of the target queue according to the micro-burst detection cycle; after detecting that the length of the target queue exceeds the micro-burst threshold, a micro-burst prompt message is output.

11. The apparatus according to claim 9 or 10, characterized in that, When there is no packet loss in the target micro-burst detection period and the maximum queue length of the target queue is greater than or equal to the initial queue waterline, the adjustment module is specifically used to determine the queue buffer requirement of the target queue in the next configuration period as the maximum queue length of the target queue. The target micro-burst detection period is the micro-burst detection period in which the maximum queue length of the target queue is obtained in the current configuration period. When there is no packet loss in the target micro-burst detection period and the maximum queue length of the target queue is less than the initial queue waterline, the adjustment module is specifically used to determine the queue buffer requirement of the target queue in the next configuration period as the initial queue waterline; When the number of packet losses in the target micro-burst detection period is greater than 0, the adjustment module is specifically used to determine the queue buffer requirement of the target queue in the next configuration period as the sum of the maximum queue length of the target queue and the number of packet losses.

12. The apparatus according to any one of claims 9 to 11, characterized in that, When the sum of the queue cache requirements of all queues in the next configuration cycle is less than or equal to the size of the shared memory, the adjustment module is specifically used to divide the remaining cache resources in the shared memory into n parts, where n is the total number of queues of the switching device, and the remaining cache resources in the shared memory are the cache resources other than all queues in the shared memory; the queue waterline of the target queue in the next configuration cycle is determined to be the sum of the queue cache requirements of the target queue in the next configuration cycle and one part of the remaining cache resources.

13. The apparatus according to any one of claims 9 to 11, characterized in that, When the sum of the queue cache requirements of all queues in the next configuration period is greater than the shared memory size, the adjustment module is specifically used to: obtain the micro-burst collision probability between the target queue and other queues in the current configuration period; the micro-burst collision probability between the two queues is the ratio of the number of micro-burst periods of collision in the statistical period to the total number of micro-burst periods of the two queues; determine the deduction amount of the target queue based on the micro-burst collision probability of the target queue and other queues in the current configuration period, the queue cache requirements of all queues in the next configuration period, and the shared memory size; the deduction amount of the target queue is positively correlated with the sum of the micro-burst collision probabilities of the target queue and other queues; and determine the queue waterline of the target queue in the next configuration period as the queue cache requirements of the target queue minus the deduction amount of the target queue in the next configuration period.

14. The apparatus according to any one of claims 9 to 13, characterized in that, When the maximum queue length of the target queue is lower than the micro-burst threshold for M consecutive configuration cycles, the adjustment module is specifically used to release the cache resources occupied by the target queue, where M is the aging cycle length.

15. A switching device, characterized in that, It includes a processor and a memory, the memory storing computer-readable instructions, the processor executing the computer-readable instructions to cause the switching device to perform the method as described in any one of claims 1 to 8.

16. A computer-readable storage medium, characterized in that, The storage medium stores a computer program or instructions, which, when executed by a communication device, implement the method as described in any one of claims 1 to 8.

17. A computer program product, characterized in that, The computer program product stores a computer program or instructions, which, when executed by a communication device, implement the method as described in any one of claims 1 to 8.