Cache allocation method, apparatus, and device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PENG CHENG LAB
- Filing Date
- 2023-08-16
- Publication Date
- 2026-08-07
AI Technical Summary
[0004]本申请的主要目的在于提供一种缓存分配方法、装置以及设备,旨在解决现有技术中带宽资源不能根据需求合理分配,降低了不同拥塞控制算法带宽抢占的公平性的技术问题
[0017] This application provides a cache allocation method, apparatus, and device. Compared with the prior art where each congestion control algorithm has different capabilities in preempting bandwidth resources, and bandwidth resources cannot be reasonably allocated according to demand, thus reducing the fairness of bandwidth preemption by different congestion control algorithms, this application identifies the congestion control algorithm used by different network devices when sending traffic and statistically analyzes the bandwidth occupied by the traffic; determines the cache allocation value of the network device based on the congestion control algorithm, the bandwidth occupied information, and cache allocation rules; and allocates the traffic of the network device to the cache based on the cache allocation value. In this application, after identifying the congestion control algorithms used by different network devices when sending traffic and statistically analyzing the bandwidth occupied by the traffic, the cache allocation value to be allocated to the network devices is determined based on the congestion control algorithm, bandwidth occupied information, and cache allocation rules. This allows for the accurate allocation of network traffic to the network devices based on the cache allocation value. In other words, this application determines the cache allocation value to be allocated to the network devices based on the congestion control algorithm, bandwidth occupied information, and cache allocation rules, and then allocates the network devices' traffic to the cache according to the cache allocation value. This ensures that bandwidth resources are allocated reasonably according to demand, improving the fairness of bandwidth contention among different congestion control algorithms.
Smart Images

Figure CN117041151B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network transmission management technology, and in particular to a cache allocation method, apparatus, and device. Background Technology
[0002] As the variety of network devices increases, different congestion control algorithms are often used to preempt network bandwidth resources from edge network devices in order to reduce data flow congestion when each network device is in use.
[0003] Each edge network device connects to multiple network devices. Since the bandwidth resources available to edge network devices are limited, and each congestion control algorithm has a different preemption capability for bandwidth resources, network devices using congestion control algorithms with strong preemption capabilities will occupy more bandwidth resources, while network devices using congestion control algorithms with weak preemption capabilities will occupy less bandwidth resources. This results in bandwidth resources not being allocated reasonably according to demand, reducing the fairness of bandwidth preemption among different congestion control algorithms. Summary of the Invention
[0004] The main purpose of this application is to provide a cache allocation method, apparatus, and device, which aims to solve the technical problem in the prior art that bandwidth resources cannot be reasonably allocated according to demand, thereby reducing the fairness of bandwidth contention among different congestion control algorithms.
[0005] To achieve the above objectives, this application provides a cache allocation method, the cache allocation method comprising: Identify the congestion control algorithm used by network devices when sending traffic, and statistically analyze the bandwidth occupied by the traffic; The network device's cache allocation value is determined based on the congestion control algorithm, the occupied bandwidth information, and the cache allocation rules. The network device allocates and caches traffic based on the cache allocation value.
[0006] Optionally, before the step of determining the cache allocation value of the network device based on the congestion control algorithm, the occupied bandwidth information, and the cache allocation rule, the method further includes: Obtain the buffer size of the traffic buffer in the network device, and the egress bandwidth of each output port in the network device; The device type of the network device is determined based on the preset classification cache threshold, the cache size, and the egress bandwidth; Based on the device type, determine the cache allocation rules.
[0007] Optionally, the device type includes Cubic algorithm-dominated devices and BBR algorithm-dominated devices; The step of determining the device type of the network device based on a preset classification cache threshold, the cache size, and the egress bandwidth includes: The relative cache value of the network device is obtained by quoting the cache size and the egress bandwidth. The relative cache value is compared with a preset category cache threshold; If the relative cache value is greater than the preset classification cache threshold, then the network device is determined to be the dominant device of the Cubic algorithm; If the relative cache value is less than or equal to the preset classification cache threshold, then the network device is determined to be the dominant device of the BBR algorithm.
[0008] Optionally, the cache allocation rule includes a scheduling cache rule, the congestion control algorithm includes the BBR algorithm, and the step of determining the cache allocation value of the network device based on the congestion control algorithm, the occupied bandwidth information, and the cache allocation rule includes: If the network device is a BBR algorithm-dominant device, then the following are filtered from the bandwidth occupancy information: total port buffer value connected to the network device, egress bandwidth, BBR bandwidth occupied by BBR traffic at the current moment, number of other traffic streams transmitted using congestion control algorithms other than the BBR algorithm, and number of BBR streams of the BBR traffic. Wherein, the BBR traffic is the traffic transmitted using the BBR algorithm; Based on the scheduling cache rules, the total port cache value, the egress bandwidth, the bandwidth occupied by the BBR, the number of remaining traffic entries and the number of BBR flow entries, the preset scheduling cache threshold of the network device is determined; The preset scheduling threshold is part of the cache allocation value.
[0009] Optionally, the cache allocation rule further includes a cache allocation value rule, the congestion control algorithm further includes the Cubic algorithm, and the step of determining the cache allocation value of the network device based on the congestion control algorithm, the occupied bandwidth information, and the cache allocation rule includes: If the network device is a Cubic algorithm-dominant device, then the following are filtered from the bandwidth occupancy information: the total port buffer value, the egress bandwidth, the Cubic bandwidth occupied by Cubic traffic at the current moment, the number of Cubic flow segments of the Cubic traffic at the current moment, and the number of irrelevant flow segments that use a method other than the Cubic algorithm to transmit traffic. Wherein, the Cubic traffic is the traffic transmitted based on the Cubic algorithm; Based on the cache allocation rules, the total port cache value, the egress bandwidth, the Cubic bandwidth occupied, the number of Cubic flows, and the number of irrelevant flows, determine the cache allocation value of Cubic traffic that needs to be allocated to the network device at the current moment; The cached value is a cache allocation value.
[0010] Optionally, the step of identifying the congestion control algorithm used by the network device when sending traffic includes: Extract the window trend characteristics of traffic sent by each network device; The congestion control algorithm used to send the traffic is determined by comparing the window trend characteristics with different types of preset theoretical window trends.
[0011] Optionally, the step of determining the cache allocation value of the network device based on the congestion control algorithm, the occupied bandwidth information, and the cache allocation rule further includes: Based on the congestion control algorithm and the occupied bandwidth information, a flow information table is generated in real time; The total port buffer value, the outbound bandwidth, the Cubic bandwidth occupied, the number of irrelevant flow entries, the number of Cubic flow entries, the number of remaining flow entries, and the number of BBR flow entries are filtered from the flow information table.
[0012] The cache allocation value of the network device is determined based on the total port cache value, the egress bandwidth, the Cubic bandwidth occupied, the number of irrelevant flows, the number of Cubic flows, the number of remaining flows, the number of BBR flows, and the cache allocation rules.
[0013] In addition, to achieve the above objectives, this application also provides a cache allocation device, which includes: The information acquisition module is used to identify the congestion control algorithm used by different network devices when sending traffic, and to collect statistics on the bandwidth occupied by the traffic. The determination module is used to determine the cache allocation value of the network device based on the congestion control algorithm, the occupied bandwidth information, and the cache allocation rules. The allocation module is used to allocate and cache the network device's traffic based on the cache allocation value.
[0014] Optionally, the determining module is further configured to obtain the cache size of the traffic buffer in the network device and the egress bandwidth of each output port in the network device; determine the device type of the network device based on a preset classification cache threshold, the cache size and the egress bandwidth; and determine cache allocation rules based on the device type.
[0015] In addition, to achieve the above objectives, this application also proposes a cache allocation device, the device comprising: a memory, a processor, and a cache allocation program stored on the memory and executable on the processor, the cache allocation program being configured to implement the steps of the cache allocation method as described above.
[0016] In addition, to achieve the above objectives, this application also proposes a storage medium storing a cache allocation program, which, when executed by a processor, implements the steps of the cache allocation method described above.
[0017] This application provides a cache allocation method, apparatus, and device. Compared with the prior art where each congestion control algorithm has different capabilities in preempting bandwidth resources, and bandwidth resources cannot be reasonably allocated according to demand, thus reducing the fairness of bandwidth preemption by different congestion control algorithms, this application identifies the congestion control algorithm used by different network devices when sending traffic and statistically analyzes the bandwidth occupied by the traffic; determines the cache allocation value of the network device based on the congestion control algorithm, the bandwidth occupied information, and cache allocation rules; and allocates the traffic of the network device to the cache based on the cache allocation value. In this application, after identifying the congestion control algorithms used by different network devices when sending traffic and statistically analyzing the bandwidth occupied by the traffic, the cache allocation value to be allocated to the network devices is determined based on the congestion control algorithm, bandwidth occupied information, and cache allocation rules. This allows for the accurate allocation of network traffic to the network devices based on the cache allocation value. In other words, this application determines the cache allocation value to be allocated to the network devices based on the congestion control algorithm, bandwidth occupied information, and cache allocation rules, and then allocates the network devices' traffic to the cache according to the cache allocation value. This ensures that bandwidth resources are allocated reasonably according to demand, improving the fairness of bandwidth contention among different congestion control algorithms. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of this application; Figure 2 This is a flowchart illustrating the first embodiment of the cache allocation method of this application; Figure 3This is a flowchart illustrating the actual operation of the cache allocation method in this application; Figure 4 This is a flowchart illustrating the second embodiment of the cache allocation method of this application; Figure 5 This is a schematic diagram illustrating the device classification process for network devices in the cache allocation method of this application. Figure 6 This is a flowchart illustrating the third embodiment of the cache allocation method of this application; Figure 7 This is a schematic diagram of the structural configuration of the cache allocation device in this application.
[0021] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0022] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0023] Reference Figure 1 , Figure 1 This is a schematic diagram of the cache allocation device structure of the hardware operating environment involved in the embodiments of this application.
[0024] like Figure 1 As shown, the cache allocation device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0025] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the cache allocation device and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0026] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a data storage module, a network communication module, a user interface module, and a cache allocation program.
[0027] exist Figure 1 In the cache allocation device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with users; the processor 1001 and the memory 1005 in the cache allocation device of this application can be set in the cache allocation device. The cache allocation device calls the cache allocation program stored in the memory 1005 through the processor 1001 and executes the cache allocation method provided in the embodiment of this application.
[0028] This application provides a cache allocation method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating a first embodiment of a cache allocation method according to this application.
[0029] It should be noted that the execution subject of this embodiment can be the cache allocation device, which can be an edge network device of electronic devices such as personal computers, smartphones, and tablets, or other devices that can achieve the same or similar functions. This embodiment does not limit this. In this embodiment and the following embodiments, the cache allocation device is used as an example to illustrate the cache allocation method of the present invention.
[0030] It should be noted that the network bandwidth allocation device also includes a traffic identification and classification module (not shown in the figure), a traffic bandwidth statistics module (not shown in the figure), and a device cache calculation and management module (not shown in the figure). It may also include a flow information table (see reference). Figure 3 ).
[0031] The traffic identification and classification module identifies network devices and the congestion control algorithms used when sending traffic, and classifies and records traffic according to the congestion control algorithms. It can also determine the key value of each traffic group through a hash algorithm based on the traffic 5-tuple information. The traffic bandwidth statistics module can monitor the bandwidth usage information of various traffic in real time. The flow information table records the traffic information obtained by the traffic identification and classification module and the bandwidth usage information obtained by the traffic bandwidth statistics module, and updates it in real time based on the traffic information and bandwidth usage information. The device cache calculation and management module performs cache calculation and allocation according to the traffic information table and sends it down to the data layer for execution.
[0032] In this embodiment, the cache allocation method includes: Step S10: Identify the congestion control algorithm used by the network device when sending traffic, and collect statistics on the bandwidth occupied by the traffic; Among them, network devices can be electronic devices such as computers, servers, mobile phones or tablets that can use networks to transmit data, and there is no specific limitation.
[0033] Among them, the congestion control algorithm can be an algorithm used to adjust the number of data packets sent continuously in a single transmission of the Transmission Control Protocol (TCP). It can gradually adjust the network bandwidth by increasing or decreasing the number of data packets sent in a single transmission, so that it approaches the current network capacity.
[0034] The congestion control algorithms may include Cubic algorithms, BBR (Bottleneck Bandwidth and Round-trip time) algorithms, etc., and there are no specific limitations.
[0035] It should be noted that since each congestion control algorithm preempts bandwidth in different ways and with varying degrees of intensity, to prevent some congestion control algorithms from excessively preempting bandwidth and preventing other congestion control algorithms from transmitting traffic, it is necessary to identify the congestion control algorithm used by network devices and to collect bandwidth usage information for each congestion control traffic. Specifically, congestion control traffic can be considered as traffic transmitted using the specific congestion control algorithm employed; once identified, that traffic is considered to belong to that algorithm.
[0036] For example, traffic transmitted using the Cubic algorithm can be considered as Cubic traffic; traffic transmitted using the BBR algorithm can be considered as BBR traffic.
[0037] In the specific implementation, after receiving traffic from all network devices connected to itself, the traffic identification and classification module is used to determine the window trend characteristics of the traffic sent by the network devices. Based on the window trend characteristics, the congestion control algorithm used by the network devices when transmitting traffic is identified, and the traffic bandwidth statistics module is used to count the traffic bandwidth occupied by each network device, that is, the bandwidth occupied information of each congestion control traffic.
[0038] Furthermore, in order to improve the efficiency of the congestion control algorithm used when identifying the traffic sent by network devices, step S10 in this embodiment also includes: Step S11: Extract the window trend characteristics of the traffic sent by each network device; Step S12: Compare the window trend characteristics with different types of preset theoretical window trends to determine the congestion control algorithm used to send the traffic.
[0039] It should be noted that a window can be viewed as a congestion window where traffic becomes congested; a window trend can be viewed as the congestion trend at the congestion window during traffic transmission; and a preset theoretical window trend can be the congestion trend of traffic within a congestion window obtained through experimental data.
[0040] In the specific implementation, experimental data is first collected using the traffic identification and classification module. The Cubic window trend of the Cubic algorithm and the BBR window trend of the BBR algorithm are then analyzed based on the experimental data. The window trend characteristics of the traffic sent by the network device are extracted. By comparing the window trend characteristics with the preset theoretical window trends, the congestion control algorithm used by the traffic is determined. In other words, the congestion trend at the congestion window of each congestion control algorithm is determined through experimental data, and the congestion trend is used to determine the congestion control algorithm used by the network device to send traffic. This avoids complex calculation processes and improves the efficiency of identifying the congestion control algorithm of the traffic.
[0041] Step S20: Determine the cache allocation value of the network device based on the congestion control algorithm, the occupied bandwidth information, and the cache allocation rules; It should be noted that by determining the congestion control algorithm corresponding to each group of traffic and based on the popular bandwidth usage information and bandwidth allocation rules for each group, the maximum bandwidth that each network device can use is determined. Based on the maximum bandwidth, the buffer allocation value for each network device is determined. This ensures that network devices using each congestion control algorithm can obtain bandwidth resources that meet their own needs, thus avoiding a situation where one congestion control algorithm excessively occupies bandwidth resources, causing network devices using other congestion control algorithms to be unable to use bandwidth or have too little available bandwidth to send traffic normally. This improves the fairness of bandwidth contention among different congestion control algorithms.
[0042] In the specific implementation, the cache calculation and management module is used to determine the bandwidth occupied by each congestion control algorithm at the current moment. From the bandwidth occupied information, the total cache size of each network device port that can cache traffic, the outbound bandwidth of each network device port, the total bandwidth occupied by each congestion control algorithm at the current moment, and the number of flow lines of each type of traffic are analyzed. The cache allocation rules are used in the cache calculation and management module to determine the cache allocation value of each network device, so as to reasonably allocate bandwidth resources according to the cache allocation value.
[0043] The outbound bandwidth of a network device port can be the maximum bandwidth that the network device can use when sending traffic. If this bandwidth is exceeded, port congestion may occur, resulting in packet loss.
[0044] Step S30: Allocate traffic to the network device for caching based on the cache allocation value.
[0045] It should be noted that the cache allocation value can be zero, that is, there is no need to allocate bandwidth to the network device or adjust the traffic cache area of the network device.
[0046] It should be noted that by allocating network bandwidth to network devices based on the cache allocation value, the bandwidth occupancy of network devices can be monitored in real time during the allocation process. This continues until the occupied bandwidth of the network device equals the average bandwidth of the traffic or the traffic packets in the transmission process equal the bandwidth-delay product. In other words, the cache space set in the network device is filled with traffic, and the outflow and inflow of traffic in the cache space are equal. When the occupied bandwidth equals the average bandwidth of the traffic or the outflow and inflow of traffic in the cache space are equal, the bandwidth allocation is maintained in a stable state to make the bandwidth resource allocation of each network device more reasonable.
[0047] In the specific implementation, refer to Figure 3 In the data forwarding channel, the traffic is identified by the traffic identification and classification module, which determines the key value of each group of traffic. The bandwidth occupied by each group of traffic is counted by the traffic bandwidth statistics module. After organizing the traffic type, key value, and traffic bandwidth, a flow information table is obtained. The cache calculation and management module (device cache calculation and management) selects the data to be used from the flow information table. Based on the data, the cache calculation and management module determines the bandwidth value allocated to Cubic traffic at the current time (time t), or the cache space threshold (preset scheduling cache threshold) of the network device for BBR traffic. Based on the preset scheduling cache threshold, the bandwidth value allocated to the scheduled BBR traffic is determined.
[0048] This embodiment provides a cache allocation method. Compared to existing technologies where each congestion control algorithm has different capabilities in preempting bandwidth resources, leading to inconsistent bandwidth allocation based on demand and reduced fairness in bandwidth contention among different congestion control algorithms, this application identifies the congestion control algorithm used by different network devices when sending traffic and statistically analyzes the bandwidth occupied by that traffic. Based on the congestion control algorithm, the bandwidth occupied information, and cache allocation rules, a cache allocation value for the network device is determined. The network device's traffic is then allocated and cached based on the cache allocation value. In this application, after identifying the congestion control algorithm used by different network devices when sending traffic and statistically analyzing the bandwidth occupied information, a cache allocation value to be allocated to the network device is determined based on the congestion control algorithm, bandwidth occupied information, and cache allocation rules. This allows for precise allocation of network traffic to the network device based on the cache allocation value. In other words, this application determines the cache allocation value to be allocated to the network device based on the congestion control algorithm, bandwidth occupied information, and cache allocation rules, and then allocates and caches the network device's traffic according to the cache allocation value, thereby rationally allocating bandwidth resources according to demand and improving the fairness of bandwidth contention among different congestion control algorithms.
[0049] refer to Figure 4 , Figure 4 This is a flowchart illustrating the second embodiment of the cache allocation method of the present invention.
[0050] Based on the above embodiments, in this embodiment, before step 20, the following is included: Step S01: Obtain the buffer size of the traffic buffer in the network device and the egress bandwidth of each output port in the network device; Step S02: Determine the device type of the network device based on the preset classification cache threshold, the cache size, and the egress bandwidth; Step S03: Determine the cache allocation rules based on the device type.
[0051] It should be noted that because the congestion control algorithm consumes bandwidth and sends traffic at a rate greater than the data transmission rate, the traffic sent through the congestion control algorithm needs to be buffered in the network device's buffer to avoid packet loss. However, different network devices use different congestion control algorithms. Based on the characteristics of bandwidth preemption by the congestion control algorithm, the network bandwidth buffer space can be classified, and thus the network devices can be classified. When determining the buffer allocation value for a particular network device, a buffer allocation rule needs to be used to save data processing steps and improve the efficiency of bandwidth allocation.
[0052] In the specific implementation, the preset category cache threshold is first determined according to the requirements, and the cache amount of the traffic cache area in the network device and the egress bandwidth that the network device's aggregate output port can occupy are obtained. By calculating the quotient of the cache amount and the egress bandwidth, and then comparing it with the preset category cache threshold, the device type of the network device is determined. Finally, based on the device type, it is selected whether to use the scheduling cache rule in the cache allocation rule or to select the cache allocation value rule.
[0053] Furthermore, the device types include Cubic algorithm-dominated devices and BBR algorithm-dominated devices; The step of determining the device type of the network device based on a preset classification cache threshold, the cache size, and the egress bandwidth includes: Step S021: Compare the buffer size with the egress bandwidth to obtain the relative buffer value of the network device; Step S022: Compare the relative cache value with a preset category cache threshold; Step S023: If the relative cache value is greater than the preset classification cache threshold, then the network device is determined to be the dominant device of the Cubic algorithm; Step S024: If the relative cache value is less than or equal to the preset classification cache threshold, then the device type of the network device is determined to be the BBR algorithm dominant device.
[0054] It should be noted that when the network device has a large cache space, the Cubic algorithm can obtain more bandwidth resources by preempting the cache, and its bandwidth preemption performance is significantly better than that of the BBR algorithm. However, when the cache space is small, the Cubic algorithm can preempt less bandwidth, while the BBR algorithm does not need to preempt bandwidth to perceive available resources, and its performance is significantly better than that of the Cubic algorithm. Therefore, the size of the cache space can be used to determine the congestion control algorithm that dominates the transmission traffic of the network device, and to determine the congestion control algorithm that needs to be suppressed. That is, the bandwidth that needs to be allocated to the traffic is to prevent the traffic from congesting in the cache space and causing packet loss.
[0055] In practice, refer to Figure 5 The cache calculation and management module calculates the quotient of the cache size Q and the outbound bandwidth B to obtain the relative cache value C of the network device, that is, C=Q / B. Then, the relative cache value is compared with the preset classification cache threshold M. If M is greater than C, the network device is determined to be a Cubic dominant device; if M is not greater than C, that is, M is less than or equal to C, the algorithm for determining the dominant network device's transmission traffic is the BBR algorithm, that is, the network device is a BBR dominant device, so as to determine the selection of bandwidth allocation rules based on these two device types.
[0056] Furthermore, in order to improve the accuracy of cache allocation values, step S20 of this embodiment also includes: Step S211: Based on the congestion control algorithm and the occupied bandwidth information, generate a real-time updated flow information table; Step S212 filters the total port buffer value, the egress bandwidth, the Cubic bandwidth occupied, the number of irrelevant flows, the number of Cubic flows, the number of remaining flows, and the number of BBR flows from the flow information table; Step S213: Determine the cache allocation value of the network device based on the total port cache value, the egress bandwidth, the Cubic occupied bandwidth, the number of irrelevant flows, the number of Cubic flows, the number of remaining traffic flows, the number of BBR flows, and the cache allocation rules.
[0057] It should be noted that a flow information table can be generated based on the congestion control algorithm and bandwidth usage information. However, it is necessary to filter out the data required to determine the cache allocation value from the congestion control algorithm and bandwidth usage information. In this embodiment, the flow information table is generated based on the congestion control algorithm and bandwidth usage information, so that the cache calculation and management module can quickly find the required data based on the organized directory of the flow information table, thereby improving the efficiency of determining the cache allocation value.
[0058] In the specific implementation, when calculating the cache allocation value, it is necessary to first select the cache allocation rule used to determine the cache allocation value of the network device based on the device type. This cache allocation rule includes at least a scheduling cache rule and a cache allocation value rule. The scheduling cache rule is used to determine the cache threshold (preset scheduling threshold) limiting BBR traffic in the cache space, thereby controlling the transmission rate to prevent network devices with BBR traffic type from excessively preempting traffic, thus preventing Cubic traffic from being transmitted. Alternatively, the cache allocation value rule is used to determine the bandwidth that Cubic traffic can use during transmission, thereby suppressing the Cubic algorithm from consuming too much bandwidth, which could lead to the network device's cache space becoming too full and causing packet loss. In other words, in this embodiment, by controlling the preset scheduling threshold of BBR traffic and the cache allocation value of Cubic traffic, bandwidth resources are rationally allocated according to demand, improving the fairness of bandwidth preemption by different congestion control algorithms.
[0059] refer to Figure 6 , Figure 6 This is a flowchart illustrating the third embodiment of the cache allocation method of the present invention.
[0060] Based on the above embodiments, in this embodiment, the cache allocation rule includes a scheduling cache rule, and the congestion control algorithm includes the BBR algorithm. When the cache allocation rule is a scheduling cache rule and the congestion control algorithm is the BBR algorithm, step S20 further includes: Step S1: If the network device is a BBR algorithm-dominant device, then filter out the total port buffer value, egress bandwidth, BBR bandwidth occupied by BBR traffic at the current moment, the number of other traffic streams transmitted using congestion control algorithms other than the BBR algorithm, and the number of BBR streams of the BBR traffic from the bandwidth occupied information. Wherein, the BBR traffic is the traffic transmitted using the BBR algorithm; Step S2: Based on the scheduling cache rule, the total port cache value, the egress bandwidth, the bandwidth occupied by the BBR, the number of remaining traffic entries, and the number of BBR flow entries, determine the preset scheduling cache threshold of the network device; The preset scheduling threshold is part of the cache allocation value.
[0061] It should be noted that when the relative cache value is less than or equal to the preset classification cache threshold, BBR traffic occupies most of the bandwidth. Since the BBR algorithm hardly occupies the cache, it is impossible to limit the rate of BBR traffic by explicitly displaying the BBR cache or increasing the Cubic cache. Therefore, it is necessary to delay the scheduling of traffic through network devices. That is, BBR traffic is made to wait in the cache space. When the queue in the scheduling cache space reaches a certain length (the preset scheduling cache threshold), BBR traffic is sent according to the bandwidth of the queue. Since the BBR algorithm is a congestion scheduling algorithm based on round-trip time, the BBR traffic sending rate is actively reduced by delaying the scheduling, thereby reducing the bandwidth occupied by BBR.
[0062] In the specific implementation, when the device type is determined to be a BBR dominant device, a scheduling cache rule is selected. The scheduling cache rule can be a calculation formula for a preset scheduling cache threshold. The preset scheduling cache threshold is calculated using the calculation formula for the preset scheduling threshold.
[0063] The formula for calculating the preset scheduling cache threshold is as follows:
[0064] Where Qb(t) is the preset scheduling buffer threshold. If the BBR traffic is below this threshold, no scheduling will be performed. At this time, newly arriving BBR traffic will be added to the buffer one after another until the queue length is higher than the preset scheduling buffer threshold. For custom coefficients, Q is the buffer size, B is the outbound bandwidth of the network device port, Bb(t) is the bandwidth occupied by BBR at time t, Nc(t) is the number of Cubic traffic entries at time t (the number of TCP sessions using the Cubic algorithm), that is, the number of other traffic entries, and Nb(t) is the number of BBR traffic entries at time t (the number of TCP sessions using the BBR algorithm).
[0065] It should be noted that in network devices with relatively small buffer spaces, the BBR algorithm will occupy more bandwidth in competition with the Cubic algorithm. The above formula sets a preset scheduling buffer threshold for BBR traffic based on real-time monitoring of the bandwidth occupied by BBR traffic and real-time bandwidth information. Increasing this threshold is equivalent to increasing the round-trip time (RTT) of BBR traffic. According to BBR's congestion management mechanism, when the RTT is increased, the BBR traffic sender will reduce the sending traffic. When the traffic decreases to the average bandwidth, Qb(t) drops to 0. When the traffic changes, this threshold value will also change dynamically, achieving a dynamic fairness in bandwidth contention between BBR and Cubic traffic.
[0066] Optionally, the cache allocation rule further includes a cache allocation value rule, and the congestion control algorithm further includes the Cubic algorithm. When the cache allocation rule is a cache allocation value rule, step 20 in this embodiment further includes: Step S3: If the network device is a Cubic algorithm-dominant device, then the following are filtered from the bandwidth occupancy information: the total port buffer value, the egress bandwidth, the Cubic bandwidth occupied by Cubic traffic at the current moment, the number of Cubic flow segments of the Cubic traffic at the current moment, and the number of irrelevant flow segments that transmit traffic using a method other than the Cubic algorithm. Wherein, the Cubic traffic is the traffic transmitted based on the Cubic algorithm; Step S4: Based on the cache allocation rule, the total port cache value, the egress bandwidth, the Cubic occupied bandwidth, the number of Cubic flows, and the number of irrelevant flows, determine the cache value of Cubic traffic that needs to be allocated to the network device at the current moment; The cached value is a cache allocation value.
[0067] It should be noted that when the relative cache value is greater than the preset classification cache threshold, the Cubic algorithm will occupy more bandwidth. By monitoring the bandwidth occupied by Cubic traffic in real time, the cache allocation value is dynamically allocated to Cubic traffic cache space using the cache allocation value rules until the bandwidth occupied by Cubic traffic equals the average bandwidth. Then, the dynamic cache allocation value is determined and the cache allocation is maintained in a stable state. If the traffic or bandwidth changes, the cache allocation value needs to be re-determined.
[0068] In a specific implementation, if the network device is a Cubic dominant device, then the cache allocation rule is determined to be the cache allocation value rule. The cache allocation value rule can be a calculation formula for the cache allocation value, and the cache allocation value is calculated using the calculation formula for the cache allocation value.
[0069] The formula for calculating the cache allocation value can be:
[0070] Where Qc(t) is the buffer value allocated to the Cubic flow at time t. These are custom values that can be configured by network administrators or users according to actual needs. Bc(t) represents the total bandwidth occupied by all Cubic traffic at time t. Nc(t) represents the number of Cubic traffic entries at time t (the number of TCP sessions using the Cubic algorithm), and Nb(t) represents the number of BBR traffic entries at time t (the number of TCP sessions using the BBR algorithm), which is also the number of irrelevant flows.
[0071] It should be noted that when Cubic traffic fills the buffer space, Cubic traffic packets will be randomly dropped in a low-priority queue or by other dropping methods. However, the BBR scheduling method is not affected and still adopts the principle of high-priority priority scheduling and first-in-first-out for packets of the same priority.
[0072] This application also provides a cache allocation device, referenced in... Figure 7 The cache allocation device includes: The information acquisition module 701 is used to identify the congestion control algorithm used by different network devices when sending traffic, and to collect statistics on the bandwidth occupied by the traffic. The determination module 702 is used to determine the cache allocation value of the network device based on the congestion control algorithm, the occupied bandwidth information, and the cache allocation rule; The allocation module 703 is used to allocate traffic of the network device to the cache based on the cache allocation value.
[0073] Optionally, the determining module 702 is further configured to obtain the cache size of the traffic buffer in the network device and the egress bandwidth of each output port in the network device; determine the device type of the network device based on a preset classification cache threshold, the cache size and the egress bandwidth; and determine cache allocation rules based on the device type.
[0074] Optionally, the equipment type includes Cubic-dominated equipment and BBR-dominated equipment; The determining module 702 is further configured to quotient the cache amount and the egress bandwidth to obtain the relative cache value of the network device; compare the relative cache value with a preset classification cache threshold; if the relative cache value is greater than the preset classification cache threshold, then determine the network device as the Cubic dominant device; if the relative cache value is less than or equal to the preset classification cache threshold, then determine the network device as the BBR dominant device.
[0075] Optionally, the cache allocation rule includes a scheduling cache rule, and the congestion control algorithm includes the BBR algorithm; The determining module 702 is further configured to, if the network device is a BBR algorithm-dominant device, filter out the total port buffer value, egress bandwidth, BBR occupied bandwidth of BBR traffic at the current moment, the number of remaining traffic entries transmitted using congestion control algorithms other than the BBR algorithm, and the number of BBR flow entries of the BBR traffic from the occupied bandwidth information; wherein, the BBR traffic is the traffic transmitted using the BBR algorithm; and determine the preset scheduling buffer threshold of the network device based on the scheduling buffer rules, the total port buffer value, the egress bandwidth, the BBR occupied bandwidth, the number of remaining traffic entries, and the number of BBR flow entries; wherein, the preset scheduling threshold belongs to the buffer allocation value.
[0076] Optionally, the cache allocation rule includes a cache allocation value rule, and the congestion control algorithm further includes the Cubic algorithm; The determining module 702 is further configured to, if the network device is a Cubic algorithm-dominated device, filter from the bandwidth occupancy information the total port cache value, the egress bandwidth, the Cubic bandwidth occupied by Cubic traffic at the current moment, the number of Cubic flows in the Cubic traffic at the current moment, and the number of irrelevant flows that transmit traffic using a method other than the Cubic algorithm; wherein, the Cubic traffic is traffic transmitted based on the Cubic algorithm; and determine the cache value of Cubic traffic that needs to be allocated to the network device at the current moment based on the cache allocation value rules, the total port cache value, the egress bandwidth, the Cubic bandwidth occupied, the number of Cubic flows, and the number of irrelevant flows; wherein, the cache value belongs to the cache allocation value.
[0077] Optionally, the information acquisition module 701 is further configured to extract the window trend characteristics of the traffic sent by each network device; compare the window trend characteristics with the preset theoretical window trends of different types, and determine the congestion control algorithm used to send the traffic.
[0078] Optionally, the determining module 702 is further configured to generate a real-time updated flow information table based on the congestion control algorithm and the occupied bandwidth information; filter out the total port cache value, the egress bandwidth, the Cubic occupied bandwidth, the number of irrelevant flows, the number of Cubic flows, the number of remaining traffic flows, and the number of BBR flows from the flow information table; and determine the cache allocation value of the network device based on the total port cache value, the egress bandwidth, the Cubic occupied bandwidth, the number of irrelevant flows, the number of Cubic flows, the number of remaining traffic flows, the number of BBR flows, and the cache allocation rules.
[0079] The specific implementation of the cache allocation device in this application is basically the same as the embodiments of the cache allocation method described above, and will not be repeated here.
[0080] This application provides a storage medium that stores one or more programs, which can be executed by one or more processors to implement the steps of any of the above-mentioned cache allocation methods.
[0081] The specific implementation of the storage medium in this application is basically the same as the embodiments of the cache allocation method described above, and will not be repeated here.
[0082] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one, etc." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0083] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0084] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0085] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention’s specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A cache allocation method, characterized in that, The cache allocation method includes: Identify the congestion control algorithm used by network devices when sending traffic, and statistically analyze the bandwidth occupied by the traffic; Obtain the buffer size of the traffic buffer in the network device, and the egress bandwidth of each output port in the network device; Based on the preset classification cache threshold, the cache size, and the egress bandwidth, the device type of the network device is determined, and the device type includes Cubic algorithm-dominated devices and BBR algorithm-dominated devices; Based on the device type, determine the cache allocation rules; The network device's cache allocation value is determined based on the congestion control algorithm, the occupied bandwidth information, and the cache allocation rules. The network device allocates and caches traffic based on the cache allocation value; The step of determining the device type of the network device based on a preset classification cache threshold, the cache size, and the egress bandwidth includes: The relative cache value of the network device is obtained by quoting the cache size and the egress bandwidth. The relative cache value is compared with a preset category cache threshold; If the relative cache value is greater than the preset classification cache threshold, then the network device is determined to be the dominant device of the Cubic algorithm; If the relative cache value is less than or equal to the preset classification cache threshold, then the network device is determined to be the dominant device of the BBR algorithm; The cache allocation rule includes a scheduling cache rule, the congestion control algorithm includes the BBR algorithm, and the step of determining the cache allocation value of the network device based on the congestion control algorithm, the occupied bandwidth information, and the cache allocation rule includes: If the network device is a BBR algorithm-dominant device, then the following are filtered from the bandwidth occupancy information: total port buffer value connected to the network device, egress bandwidth, BBR bandwidth occupied by BBR traffic at the current moment, number of other traffic streams transmitted using congestion control algorithms other than the BBR algorithm, and number of BBR streams of the BBR traffic. Wherein, the BBR traffic is the traffic transmitted using the BBR algorithm; Based on the scheduling cache rules, the total port cache value, the egress bandwidth, the bandwidth occupied by the BBR, the number of remaining traffic entries and the number of BBR flow entries, the preset scheduling cache threshold of the network device is determined; Wherein, the preset scheduling cache threshold is part of the cache allocation value; The scheduling cache rule is a calculation formula for the preset scheduling cache threshold. The preset scheduling cache threshold is calculated using the calculation formula for the preset scheduling cache threshold. The formula for calculating the preset scheduling cache threshold is: , The preset scheduling cache threshold, Here, Q is a custom coefficient, Q is the buffer size, and B is the outbound bandwidth of the network device port. Let Nc(t) be the bandwidth occupied by the BBR at time t, and let Nc(t) be the number of Cubic traffic entries at time t, i.e., the number of remaining traffic entries. The number of BBR streams at time t.
2. The cache allocation method as described in claim 1, characterized in that, The cache allocation rule further includes a cache allocation value rule, and the congestion control algorithm further includes the Cubic algorithm. The step of determining the cache allocation value of the network device based on the congestion control algorithm, the occupied bandwidth information, and the cache allocation rule includes: If the network device is a Cubic algorithm-dominant device, then the following are filtered from the bandwidth occupancy information: the total port buffer value, the egress bandwidth, the Cubic bandwidth occupied by Cubic traffic at the current moment, the number of Cubic flow segments of the Cubic traffic at the current moment, and the number of irrelevant flow segments that use a method other than the Cubic algorithm to transmit traffic. Wherein, the Cubic traffic is the traffic transmitted based on the Cubic algorithm; Based on the cache allocation rules, the total port cache value, the egress bandwidth, the Cubic bandwidth occupied, the number of Cubic flows, and the number of irrelevant flows, determine the cache value of Cubic traffic that needs to be allocated to the network device at the current moment; The cached value is a subset of the cache allocation value. The cache allocation value rule is the calculation formula for the cache allocation value, and the cache allocation value is calculated using the calculation formula for the cache allocation value. The formula for calculating the cache allocation value is: , Let t be the buffer value allocated to the Cubic flow. For custom values, Bc(t) is the total bandwidth occupied by all the Cubic traffic at time t, Nc(t) is the number of Cubic traffic at time t, and Nb(t) is the number of BBR traffic at time t, i.e. the number of irrelevant traffic.
3. The cache allocation method as described in any one of claims 1 to 2, characterized in that, The steps for identifying the congestion control algorithm used by the network device when sending traffic include: Extract the window trend characteristics of traffic sent by each network device; The congestion control algorithm used to send the traffic is determined by comparing the window trend characteristics with different types of preset theoretical window trends.
4. The cache allocation method as described in claim 2, characterized in that, The step of determining the cache allocation value of the network device based on the congestion control algorithm, the bandwidth occupancy information, and the cache allocation rules further includes: Based on the congestion control algorithm and the occupied bandwidth information, a flow information table is generated in real time; The total port buffer value, the outgoing bandwidth, the bandwidth occupied by Cubic, the number of irrelevant flows, the number of Cubic flows, the number of remaining traffic flows, and the number of BBR flows are filtered from the flow information table. The cache allocation value of the network device is determined based on the total port cache value, the egress bandwidth, the Cubic bandwidth occupied, the number of irrelevant flows, the number of Cubic flows, the number of remaining flows, the number of BBR flows, and the cache allocation rules.
5. A cache allocation apparatus for implementing the cache allocation method according to any one of claims 1-4, characterized in that, The cache allocation device includes: The information acquisition module is used to identify the congestion control algorithm used by different network devices when sending traffic, and to collect statistics on the bandwidth occupied by the traffic. The determination module is used to determine the cache allocation value of the network device based on the congestion control algorithm, the occupied bandwidth information, and the cache allocation rules. The allocation module is used to allocate cache to the network device based on the cache allocation value.
6. The cache allocation device as described in claim 5, characterized in that, The determining module is further configured to obtain the buffer size of the traffic buffer in the network device and the egress bandwidth of each output port in the network device; The device type of the network device is determined based on the preset classification cache threshold, the cache size, and the egress bandwidth; Based on the device type, determine the cache allocation rules.
7. A cache allocation device, characterized in that, The cache allocation device includes: a memory, a processor, and a cache allocation program stored on the memory and executable on the processor, the cache allocation program being configured to implement the steps of the cache allocation method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Method and system for bi-level congestion control for multipath transport
US20080144504A1
Computer network congestion control management
US20230254262A1