Cache allocation method, apparatus and device
By identifying the congestion control algorithm and statistical bandwidth information of network equipment, and determining the cache allocation value based on these information and cache allocation rules, the problem of unfair allocation of bandwidth resources is solved and the fairness of the congestion control algorithm is improved.
Patent Information
- Application Number
- PCT/CN2023/131355
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-16
- Filing Date
- 2023-11-13
- Publication Date
- 2025-02-20
AI Technical Summary
In the prior art, bandwidth resources cannot be reasonably allocated according to demand, resulting in a decrease in fairness of bandwidth preemption of different congestion control algorithms.
By identifying the congestion control algorithm used by network equipment to send traffic, and counting the bandwidth information of the traffic, determining the cache allocation value of the network equipment based on the congestion control algorithm, the bandwidth information of the occupancy of the network equipment, and then cache allocation is cached.
It realizes the rational allocation of bandwidth resources according to needs, and improves the fairness of bandwidth preemption of different congestion control algorithms.
Smart Images

Figure CN2023131355_20022025_PF_FP_ABST
Abstract
Description
Cache allocation method, device and equipment
[0001] This application claims priority to Chinese patent application No. 202311037769.6 filed on August 16, 2023, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the technical field of network transmission management, and in particular to a cache allocation method, apparatus, and device. Background Art
[0003] As the types of network devices increase, in order to reduce data flow congestion when each network device is in use, different congestion control algorithms are often used to seize network bandwidth resources from edge network devices.
[0004] Each edge network device is connected to multiple network devices. Since the bandwidth resources available to edge network devices are limited and each congestion control algorithm has different bandwidth resource preemption capabilities, network devices using congestion control algorithms with strong bandwidth preemption capabilities will occupy more bandwidth resources, while network devices using congestion control algorithms with weak bandwidth preemption capabilities will occupy less bandwidth resources. As a result, bandwidth resources cannot be reasonably allocated according to demand, reducing the fairness of bandwidth preemption among different congestion control algorithms. Technical issues
[0005] The main purpose of this application is to provide a cache allocation method, device and equipment, aiming to solve the technical problem in the prior art that bandwidth resources cannot be reasonably allocated according to demand, which reduces the fairness of bandwidth preemption of different congestion control algorithms. Technical Solutions
[0006] To achieve the above objectives, the present application provides a cache allocation method, the cache allocation method comprising:
[0007] Identify the congestion control algorithm used by network devices when sending traffic, and collect statistics on the bandwidth occupied by the traffic;
[0008] Determining a cache allocation value of the network device based on the congestion control algorithm, the occupied bandwidth information, and a cache allocation rule;
[0009] Traffic of the network device is allocated to a cache based on the cache allocation value.
[0010] In one embodiment, 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 step further includes:
[0011] Obtaining a cache capacity of a traffic cache area in the network device and an egress bandwidth of each output port in the network device;
[0012] Determining a device type of the network device based on a preset classification cache threshold, the cache amount, and the egress bandwidth;
[0013] Based on the device type, a cache allocation rule is determined.
[0014] In one embodiment, the device types include Cubic algorithm dominant devices and BBR algorithm dominant devices;
[0015] The step of determining the device type of the network device based on the preset classification cache threshold, the cache amount, and the egress bandwidth includes:
[0016] Taking the quotient of the cache amount and the egress bandwidth to obtain a relative cache value of the network device;
[0017] Comparing the relative cache value with a preset classification cache threshold;
[0018] If the relative cache value is greater than the preset classification cache threshold, determining that the network device is the Cubic algorithm leading device;
[0019] If the relative cache value is less than or equal to the preset category cache threshold, the network device is determined to be the BBR algorithm leading device.
[0020] In one embodiment, the cache allocation rule includes a scheduling cache rule, the congestion control algorithm includes a 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:
[0021] If the device type of the network device is the BBR algorithm dominant device, then filter out from the occupied bandwidth information the total cache value of the port connected to the network device, the egress bandwidth, the BBR occupied bandwidth of the BBR traffic at the current moment, the number of other traffic flows that adopt congestion control algorithms other than the BBR algorithm to transmit traffic, and the number of BBR flows of the BBR traffic;
[0022] Wherein, the BBR traffic is the traffic transmitted using the BBR algorithm;
[0023] Determining a preset scheduling cache threshold of the network device based on the scheduling cache rule, the total port cache value, the egress bandwidth, the BBR occupied bandwidth, the number of remaining traffic items, and the number of BBR flows;
[0024] The preset scheduling threshold belongs to the cache allocation value.
[0025] In one embodiment, the cache allocation rule further includes a cache allocation value rule, and the congestion control algorithm further includes a 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:
[0026] If the device type of the network device is a Cubic algorithm dominant device, the total port cache value, the egress bandwidth, the Cubic occupied bandwidth occupied by the Cubic traffic at the current moment, the number of Cubic flows of the Cubic traffic at the current moment, and the number of irrelevant flows that use the Cubic algorithm to transmit traffic are filtered out from the occupied bandwidth information;
[0027] Wherein, the Cubic traffic is the traffic transmitted based on the Cubic algorithm;
[0028] Determine, based on the cache allocation value rule, the total port cache value, the egress bandwidth, the Cubic occupied bandwidth, the number of Cubic flows, and the number of irrelevant flows, a cache allocation value of the Cubic traffic that needs to be allocated to the network device at a current moment;
[0029] The cache value belongs to the cache allocation value.
[0030] In one embodiment, the step of identifying a congestion control algorithm used by a network device when sending traffic includes:
[0031] Extract window trend features of traffic sent by each network device;
[0032] The window trend characteristics are compared with different types of preset theoretical window trends to determine a congestion control algorithm used for sending the traffic.
[0033] In one embodiment, 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:
[0034] Based on the congestion control algorithm and the occupied bandwidth information, generating a flow information table updated in real time;
[0035] 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 other flows, and the number of BBR flows are filtered out from the flow information table.
[0036] The cache allocation value of the network device is determined 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 flows, the number of BBR flows and the cache allocation rule.
[0037] In addition, to achieve the above-mentioned purpose, the present application further provides a cache allocation device, which includes:
[0038] An information collection module is used to identify the congestion control algorithms used by different network devices when sending traffic, and to collect statistics on the bandwidth occupied by the traffic;
[0039] a determination module, configured to determine a cache allocation value of the network device based on the congestion control algorithm, the occupied bandwidth information, and a cache allocation rule;
[0040] An allocation module is used to allocate traffic to a cache of the network device based on the cache allocation value.
[0041] In one embodiment, the determination module is further used to obtain the cache capacity of the traffic cache area in the network device and the export 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 capacity and the export bandwidth; and determine the cache allocation rules based on the device type.
[0042] In addition, to achieve the above-mentioned purpose, the present application also proposes a cache allocation device, which includes: a memory, a processor, and a cache allocation program stored on the memory and executable on the processor, wherein the cache allocation program is configured to implement the steps of the cache allocation method described above.
[0043] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, on which a cache allocation program is stored. When the cache allocation program is executed by a processor, the steps of the cache allocation method described above are implemented. Beneficial effects
[0044] The present application provides a cache allocation method, apparatus, and device. Compared with the prior art in which each congestion control algorithm has different bandwidth resource preemption capabilities, bandwidth resources cannot be reasonably allocated according to demand, and the fairness of bandwidth preemption of different congestion control algorithms is reduced, in the present application, the congestion control algorithms used by different network devices when sending traffic are identified, and the occupied bandwidth information of the traffic is counted; the cache allocation value of the network device is determined based on the congestion control algorithm, the occupied bandwidth information, and the cache allocation rule; and the traffic of the network device is allocated to the cache based on the cache allocation value. In the present application, after identifying the congestion control algorithm used by different network devices when sending traffic and counting the occupied bandwidth information of the traffic, the cache allocation value that needs to be allocated to the network device is determined based on the congestion control algorithm, occupied bandwidth information and cache allocation rules, so that the network device can accurately allocate the network traffic to the cache according to the cache allocation value. That is, in the present application, the cache allocation value that needs to be allocated to the network device is determined based on the congestion control algorithm, occupied bandwidth information and cache allocation rules, and the network device's traffic is allocated to the cache according to the cache allocation value, so that bandwidth resources can be reasonably allocated according to demand, thereby improving the fairness of bandwidth preemption of different congestion control algorithms. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0047] FIG1 is a schematic diagram of the equipment structure of the hardware operating environment involved in the embodiment of the present application;
[0048] FIG2 is a flow chart of a first embodiment of a cache allocation method of the present application;
[0049] FIG3 is a schematic diagram of the actual working process of the cache allocation method of the present application;
[0050] FIG4 is a flow chart of a second embodiment of the cache allocation method of the present application;
[0051] FIG5 is a schematic diagram of a device classification process of network devices in the cache allocation method of the present application;
[0052] FIG6 is a flow chart of a third embodiment of the cache allocation method of the present application;
[0053] FIG7 is a schematic diagram of the structural configuration of the cache allocation device of the present application.
[0054] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. Modes for Carrying Out the Invention
[0055] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] Refer to Figure 1, which is a schematic diagram of the structure of a cache allocation device in a hardware operating environment involved in an embodiment of the present application.
[0057] As shown in Figure 1, 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 and an input unit, such as a keyboard. The user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may include a standard wired interface or a wireless interface (such as a wireless fidelity (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 be a storage device independent of the processor 1001.
[0058] Those skilled in the art will appreciate that the structure shown in FIG1 does not limit the cache allocation device, and may include more or fewer components than shown, or a combination of certain components, or a different arrangement of components.
[0059] As shown in FIG. 1 , the memory 1005 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.
[0060] In the cache allocation device shown in Figure 1, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the cache allocation device of the present application can be set in the cache allocation device, and 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 the present application.
[0061] An embodiment of the present application provides a cache allocation method. Referring to FIG. 2 , FIG. 2 is a flow chart of a first embodiment of a cache allocation method of the present application.
[0062] It should be noted that the execution subject of this embodiment can be the cache allocation device, and the cache allocation device can be an edge network device of electronic devices such as personal computers, smart phones, tablet computers, etc., or other 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 method of this application is explained using the cache allocation device as an example.
[0063] 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), a device cache calculation management module (not shown in the figure), and may also include a flow information table (refer to Figure 3).
[0064] Among them, the traffic identification and classification module is used to identify network devices and the congestion control algorithm used when sending traffic, and classify and record the traffic according to the congestion control algorithm. It can also determine the key value of each group of traffic through the hash algorithm based on the traffic quintuple information; the traffic bandwidth statistics module can monitor the occupied bandwidth information of various traffic in real time; the flow information table is used to record the traffic information obtained by the traffic identification and classification module and the occupied bandwidth information obtained by the traffic bandwidth statistics module, and is updated in real time based on the traffic information and occupied bandwidth information; the device cache calculation management module is used to perform cache calculation and allocation according to the traffic information table, and send it to the data layer for execution.
[0065] In this embodiment, the cache allocation method includes:
[0066] Step S10, identifying the congestion control algorithm used by the network device when sending traffic, and collecting statistics on the bandwidth occupied by the traffic;
[0067] The network device may be a computer, server, mobile phone, tablet or other electronic device that can use the network to transmit data, and there is no specific limitation.
[0068] Among them, the congestion control algorithm can be an algorithm used to adjust the number of data packets sent continuously at a single time by the Transmission Control Protocol (TCP). The network bandwidth can be gradually adjusted by increasing or decreasing the number of data packets sent at a single time to make it close to the current network's carrying capacity.
[0069] The congestion control algorithms may include a Cubic algorithm, a BBR (Bottleneck Bandwidth and Round-trip time) algorithm, etc., without specific limitation.
[0070] It's important to note that each congestion control algorithm uses different methods and strengths to preempt bandwidth. To prevent some congestion control algorithms from excessively preempting bandwidth and preventing other algorithms from transmitting traffic, it's necessary to identify the congestion control algorithm used by network devices to transmit traffic and compile statistics on the bandwidth occupied by each congestion-controlled flow. Congestion-controlled traffic can be considered traffic transmitted using the congestion control algorithm used.
[0071] For example, traffic transmitted using the Cubic algorithm can be considered Cubic traffic; traffic transmitted using the BBR algorithm can be considered BBR traffic.
[0072] In a 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 device. Based on the window trend characteristics, the congestion control algorithm used by the network device 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 occupied bandwidth information of each congestion control traffic.
[0073] Furthermore, in order to improve the efficiency of identifying the congestion control algorithm used by the network device when sending traffic, step S10 in this embodiment further includes:
[0074] Step S11, extracting window trend features of traffic sent by each network device;
[0075] Step S12: comparing the window trend characteristics with different types of preset theoretical window trends to determine a congestion control algorithm to be used for sending the traffic.
[0076] It should be noted that the window can be regarded as the congestion window where traffic congestion occurs; the window trend can be regarded as the congestion trend at the congestion window during traffic transmission; and the preset theoretical window trend can be the congestion trend of the congestion window traffic obtained through experimental data.
[0077] In the specific implementation, the traffic identification and classification module is first used to collect experimental data, and the Cubic window trend of the Cubic algorithm and the BBR window trend of the BBR algorithm are sorted out through the experimental data, and the window trend characteristics of the network device sending traffic are extracted. By comparing the window trend characteristics with the preset theoretical window trends, the congestion control algorithm used for sending traffic is determined. That is, 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, which avoids complex calculation processes and improves the efficiency of identifying the congestion control algorithm for sending flows.
[0078] Step S20, determining a cache allocation value of the network device based on the congestion control algorithm, the occupied bandwidth information and a cache allocation rule;
[0079] It should be noted that the congestion control algorithm corresponding to each group of traffic is determined, and the maximum bandwidth that can be used by each network device is determined based on the occupied bandwidth information and bandwidth allocation rules of each group. The cache allocation value of each network device is determined based on the maximum bandwidth, so that network devices using each congestion control algorithm can obtain bandwidth resources that can meet their own needs, thereby avoiding the situation where a certain congestion control algorithm occupies too much 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, thereby improving the fairness of bandwidth preemption of different congestion control algorithms.
[0080] In the specific implementation, the cache calculation management module is used to determine the occupied bandwidth corresponding to each congestion control algorithm at the current moment, and the total cache size that can cache traffic on each network device port, the export bandwidth of each network device port, the total bandwidth occupied by each congestion control algorithm at the current moment, and the number of flows of each traffic are analyzed from the occupied bandwidth information. The cache allocation rule is used to determine the cache allocation value of each network device in the cache calculation management module to reasonably allocate bandwidth resources according to the cache allocation value.
[0081] The egress bandwidth of a network device port may be the maximum bandwidth that the network device can occupy when sending traffic. If the bandwidth is exceeded, port congestion may occur, and packet loss may occur due to congestion.
[0082] Step S30: Allocate traffic of the network device to a cache based on the cache allocation value.
[0083] It should be noted that the cache allocation value may 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.
[0084] It should be noted that, by allocating network bandwidth to network devices based on the cache allocation value, the bandwidth occupancy of the network devices can be detected in real time during the allocation process until the occupied bandwidth of the network device is equal to the average bandwidth of the traffic or the traffic packets in the transmission are equal to the bandwidth-delay product, that is, the cache space set in the network device is full of traffic cache, and the outflow and inflow of traffic in the cache space are equal. When the occupied bandwidth is equal to 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.
[0085] In a specific implementation, referring to FIG3 , the traffic in the data forwarding channel is respectively identified by the traffic identification and classification module for the type of traffic (traffic type), and the key value (Key) of each group of traffic is determined. The occupied bandwidth (traffic bandwidth) of each group of traffic is counted by the traffic bandwidth statistics module, and the traffic type, key value, traffic bandwidth, etc. are sorted out to obtain a flow information table. The cache calculation management module (device cache calculation management) is used to filter out the required data from the flow information table. The cache calculation management module determines the bandwidth value allocated to the Cubic traffic at the current moment (time t) or the cache space threshold (preset scheduling cache threshold) of the network device cache BBR traffic based on the data, and determines the bandwidth value allocated to the scheduled BBR traffic based on the preset scheduling cache threshold.
[0086] In this embodiment, a cache allocation method is provided. Compared with the prior art, in which each congestion control algorithm has different bandwidth resource preemption capabilities, bandwidth resources cannot be reasonably allocated according to demand, and the fairness of bandwidth preemption of different congestion control algorithms is reduced. In this application, the congestion control algorithm used by different network devices when sending traffic is identified, and the occupied bandwidth information of the traffic is counted; the cache allocation value of the network device is determined based on the congestion control algorithm, the occupied bandwidth information, and the cache allocation rule; and the traffic of the network device is 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 counting the occupied bandwidth information of the traffic, the cache allocation value to be allocated to the network device is determined based on the congestion control algorithm, the occupied bandwidth information, and the cache allocation rule, so that the network traffic is accurately allocated to the network device according to the cache allocation value. That is, in this application, the cache allocation value to be allocated to the network device is determined based on the congestion control algorithm, the occupied bandwidth information, and the cache allocation rule, and the traffic of the network device is cached according to the cache allocation value, so that bandwidth resources are reasonably allocated according to demand, thereby improving the fairness of bandwidth preemption of different congestion control algorithms.
[0087] Refer to FIG4 , which is a flow chart of the second embodiment of the picture sharing method of the present application.
[0088] Based on the above embodiment, in this embodiment, before step 20, the following steps are included:
[0089] Step S01, obtaining the buffer capacity of the traffic buffer area in the network device and the egress bandwidth of each output port in the network device;
[0090] Step S02: determining the device type of the network device based on a preset classification cache threshold, the cache amount, and the egress bandwidth;
[0091] Step S03: determining a cache allocation rule based on the device type.
[0092] It should be noted that since the congestion control algorithm occupies bandwidth to send traffic at a speed greater than the transmission speed of the traffic, the traffic sent through the congestion control algorithm needs to be cached in the cache area of the network device to avoid packet loss. However, different network devices use different congestion control algorithms. According to the characteristics of the congestion control algorithm in seizing bandwidth, the cache space of the network bandwidth can be classified, and then the network devices can be classified. The cache allocation rules need to be used when determining the cache allocation value of the network device to save data processing steps and improve the efficiency of bandwidth allocation.
[0093] In the specific implementation, the preset classification cache threshold is first determined according to the needs, and the cache capacity of the traffic cache area in the network device and the export bandwidth that can be occupied by the network device summary output port are obtained. By taking the quotient of the cache capacity and the export bandwidth, and then multiplying it by the preset classification cache threshold, the device type of the network device is determined. Finally, according to the device type, it is selected whether to use the scheduling cache rule in the cache allocation rule or the cache allocation value rule.
[0094] Furthermore, the device types include Cubic algorithm-dominant devices and BBR algorithm-dominant devices;
[0095] The step of determining the device type of the network device based on the preset classification cache threshold, the cache amount, and the egress bandwidth includes:
[0096] Step S021, calculating the quotient of the cache amount and the egress bandwidth to obtain a relative cache value of the network device;
[0097] Step S022, comparing the relative cache value with a preset classification cache threshold;
[0098] Step S023: If the relative cache value is greater than the preset classification cache threshold, the network device is determined to be the Cubic algorithm leading device;
[0099] Step S024: If the relative cache value is less than or equal to the preset classification cache threshold, it is determined that the device type of the network device is the BBR algorithm leading device.
[0100] It should be noted that when the cache space of the network device is relatively large, the Cubic algorithm can obtain more bandwidth resources by preempting the cache, and its bandwidth preemption performance is significantly better than the BBR algorithm; however, when the cache space is small, since the bandwidth that the Cubic algorithm can preempt is smaller, and the BBR algorithm does not need to perceive available resources by preempting bandwidth, its performance is significantly better than the Cubic algorithm. Therefore, the congestion control algorithm that dominates the transmission traffic of the network device can be determined by the size of the cache space, and the congestion control algorithm that needs to be suppressed can be determined, that is, the bandwidth of the traffic needs to be allocated so that the traffic will not be congested in the cache space and cause packet loss.
[0101] In actual implementation, referring to Figure 5, the cache calculation management module is used to calculate the quotient of the exchange capacity Q and the export bandwidth B to obtain the relative cache value C of the network device, that is, C=Q / B, and 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 transmitting traffic of the dominant network device is determined to be 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.
[0102] Furthermore, in order to improve the accuracy of the cache allocation value, step S20 of this embodiment further includes:
[0103] Step S211: generating a real-time updated flow information table based on the congestion control algorithm and the occupied bandwidth information;
[0104] Step S212 filters 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 other flows, and the number of BBR flows from the flow information table;
[0105] 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 flows, the number of BBR flows, and the cache allocation rule.
[0106] It should be noted that a flow information table can be generated based on the congestion control algorithm and occupied bandwidth information, but the data required to determine the cache allocation value needs to be filtered out from the congestion control algorithm and occupied bandwidth information. In this embodiment, the flow information table is generated based on the congestion control algorithm and occupied bandwidth information, so that the cache calculation 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.
[0107] In a specific implementation, when calculating the cache allocation value, it is necessary to first select the cache allocation rule required to determine the cache allocation value for the network device based on the device type. The 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) that limits BBR traffic in the cache space, thereby controlling the transmission rate. This prevents network devices with BBR traffic from excessively preempting traffic, thereby preventing Cubic traffic in the network device from being sent. Alternatively, the cache allocation value rule is used to determine the bandwidth available for Cubic traffic during transmission, thereby preventing the Cubic algorithm from occupying excessive bandwidth, which could lead to overfilling the network device's cache space and causing packet loss. That is, in this embodiment, by controlling the preset scheduling threshold for BBR traffic and the cache allocation value for Cubic traffic, bandwidth resources are reasonably allocated according to demand, improving the fairness of bandwidth preemption among different congestion control algorithms.
[0108] Refer to FIG6 , which is a flowchart of the third embodiment of the picture sharing method of the present application.
[0109] Based on the above embodiment, in this embodiment, the cache allocation rule includes a scheduling cache rule, and the congestion control algorithm includes a BBR algorithm. When the cache allocation rule is a scheduling cache rule and the congestion control algorithm is a BBR algorithm, step S20 further includes:
[0110] Step S1: If the network device is a BBR algorithm-dominant device, the total cache value of the port connected to the network device, the egress bandwidth, the BBR occupied bandwidth of the BBR traffic at the current moment, the number of remaining traffic flows that use congestion control algorithms other than the BBR algorithm to transmit traffic, and the number of BBR flows of the BBR traffic are filtered out from the occupied bandwidth information.
[0111] Wherein, the BBR traffic is the traffic transmitted using the BBR algorithm;
[0112] Step S2, determining a preset scheduling cache threshold of the network device based on the scheduling cache rule, the total port cache value, the egress bandwidth, the BBR occupied bandwidth, the number of remaining traffic items, and the number of BBR flows;
[0113] The preset scheduling threshold belongs to the cache allocation value.
[0114] 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 displaying the BBR cache or increasing the Cubic cache. Therefore, it is necessary to delay the scheduling of traffic through network devices, that is, to make the BBR traffic wait in the cache space. When the queue in the scheduling cache space reaches a certain length (the preset scheduling cache threshold), the BBR traffic is sent according to the queue scheduling bandwidth. Since the BBR algorithm is a congestion scheduling algorithm based on round-trip delay, the BBR traffic sending rate is actively reduced through delayed scheduling, thereby reducing the bandwidth occupied by BBR.
[0115] In a specific implementation, when the device type is determined to be a BBR dominant device, a scheduling cache rule is selected, wherein the scheduling cache rule can be a calculation formula for a preset scheduling cache threshold, and the preset scheduling cache threshold is calculated using the calculation formula for the preset scheduling threshold.
[0116] The calculation formula for the preset scheduling buffer threshold is:
[0117]
[0118] Among them, Qb(t) is the preset scheduling cache threshold. If the threshold is lower than the threshold, BBR traffic will not be scheduled. At this time, the BBR traffic newly entering the device will be added to the cache until the queue length exceeds the preset scheduling cache threshold. is a custom coefficient, Q is the cache capacity, B is the egress 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 items at time t (the number of TCP sessions using the Cubic algorithm), that is, the number of other traffic items, and Nb(t) is the number of BBR traffic items at time t (the number of TCP sessions using the BBR algorithm).
[0119] It's important to note that in network devices with relatively small caches, the BBR algorithm will occupy more bandwidth in competition with the Cubic algorithm. The above formula monitors the bandwidth occupied by BBR traffic in real time and sets a preset scheduling cache threshold for BBR traffic based on this 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, increasing the RTT causes the sender of BBR traffic to reduce the amount of traffic sent. When the traffic falls to the average bandwidth, Qb(t) drops to 0. The threshold value also changes dynamically as traffic changes, achieving dynamic fairness in bandwidth preemption between BBR and Cubic traffic.
[0120] In one embodiment, the cache allocation rule further includes a cache allocation value rule, and the congestion control algorithm further includes a Cubic algorithm. When the cache allocation rule is a cache allocation value rule, step 20 in this embodiment further includes:
[0121] Step S3: If the network device is a Cubic algorithm-dominated device, the total port cache value, the egress bandwidth, the Cubic bandwidth occupied by the current Cubic traffic, the number of Cubic flows of the current Cubic traffic, and the number of irrelevant flows that use the Cubic algorithm to transmit traffic are filtered out from the occupied bandwidth information.
[0122] Wherein, the Cubic traffic is the traffic transmitted based on the Cubic algorithm;
[0123] Step S4, determining 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 rule, the total port cache value, the egress bandwidth, the Cubic occupied bandwidth, the number of Cubic flows, and the number of irrelevant flows;
[0124] The cache value belongs to the cache allocation value.
[0125] 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 and dynamically allocating it to the Cubic traffic cache space using the cache allocation value rule, the dynamic cache allocation value is determined until the bandwidth occupied by Cubic traffic is equal to the average loan, and the cache allocation is maintained in this stable state. If the traffic or bandwidth changes, the cache allocation value needs to be re-determined.
[0126] In a specific implementation, if the device type of the network device is a Cubic dominant device, the cache allocation rule is determined to be a cache allocation value rule, wherein the cache allocation value rule can be a calculation formula for the cache allocation value, and the cache allocation value is calculated using the cache allocation value calculation formula.
[0127] The calculation formula for the cache allocation value can be:
[0128]
[0129] Among them, Qc(t) is the cache value allocated to Cubic traffic at time t, This is a custom value that can be configured by network administrators or users based on actual conditions. Bc(t) is the total bandwidth occupied by all Cubic traffic at time t. Nc(t) is the number of Cubic traffic items (the number of TCP sessions using the Cubic algorithm) at time t, and Nb(t) is the number of BBR traffic items (the number of TCP sessions using the BBR algorithm) at time t, that is, the number of irrelevant flows.
[0130] It should be noted that when the Cubic traffic fills the cache space, the Cubic traffic packets are discarded by random dropping or other discarding methods in the low-priority queue, while the BBR scheduling method is not affected and still uses the high-priority priority scheduling and the first-in-first-out principle of the same priority.
[0131] The present application further provides a cache allocation device. Referring to FIG7 , the cache allocation device includes:
[0132] The information collection 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;
[0133] A determination module 702 is configured to determine a buffer allocation value of the network device based on the congestion control algorithm, the occupied bandwidth information, and a buffer allocation rule;
[0134] The allocation module 703 is configured to allocate traffic of the network device to a cache based on the cache allocation value.
[0135] In one embodiment, the determination module 702 is further used to obtain the cache capacity of the traffic cache area in the network device and the export 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 capacity and the export bandwidth; and determine the cache allocation rules based on the device type.
[0136] In one embodiment, the device types include Cubic dominant devices and BBR dominant devices;
[0137] The determination module 702 is further used to calculate the quotient of the cache amount and the export bandwidth to obtain the relative cache value of the network device; compare the relative cache value with the preset category cache threshold; if the relative cache value is greater than the preset category cache threshold, determine that the network device is the Cubic dominant device; if the relative cache value is less than or equal to the preset category cache threshold, determine that the network device is the BBR dominant device.
[0138] In one embodiment, the cache allocation rule includes a scheduling cache rule, and the congestion control algorithm includes a BBR algorithm;
[0139] The determination module 702 is further configured to, if the device type of the network device is the BBR algorithm dominant device, filter out from the occupied bandwidth information the total cache value of the port connected to the network device, the egress bandwidth, the BBR occupied bandwidth of the BBR traffic at the current moment, the number of remaining traffic items that use congestion control algorithms other than the BBR algorithm to transmit traffic, and the number of BBR flows of the BBR traffic; wherein the BBR traffic is traffic transmitted using the BBR algorithm; and determine the preset scheduling cache threshold of the network device based on the scheduling cache rule, the total cache value of the port, the egress bandwidth, the BBR occupied bandwidth, the number of remaining traffic items, and the number of BBR flows; wherein the preset scheduling threshold belongs to the cache allocation value.
[0140] In one embodiment, the cache allocation rule includes a cache allocation value rule, and the congestion control algorithm further includes a Cubic algorithm;
[0141] The determination module 702 is also used to, if the device type of the network device is a Cubic algorithm-dominated device, filter out the total port cache value, the egress bandwidth, the Cubic occupied bandwidth occupied by the Cubic traffic at the current moment, the number of Cubic flows of the Cubic traffic at the current moment, and the number of irrelevant flows that use a Cubic algorithm to transmit traffic from the occupied bandwidth information; wherein, the Cubic traffic is traffic transmitted based on the Cubic algorithm; based on the cache allocation value 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 the Cubic traffic that needs to be allocated to the network device at the current moment; wherein, the cache value belongs to the cache allocation value.
[0142] In one embodiment, the information collection module 701 is further used to extract the window trend characteristics of the traffic sent by each network device; compare the window trend characteristics with different types of preset theoretical window trends to determine the congestion control algorithm used to send the traffic.
[0143] In one embodiment, the determination module 702 is further used to generate a real-time updated flow information table based on the congestion control algorithm and the occupied bandwidth information; filter out the port total cache value, the egress bandwidth, the Cubic occupied bandwidth, 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; and determine the cache allocation value of the network device based on the port total cache value, the egress bandwidth, the Cubic occupied bandwidth, the number of irrelevant flows, the number of Cubic flows, the number of remaining flows, the number of BBR flows and the cache allocation rule.
[0144] The specific implementation of the cache allocation device of the present application is basically the same as the above-mentioned embodiments of the cache allocation method, and will not be repeated here.
[0145] An embodiment of the present application provides a storage medium, and the storage medium stores one or more programs, and the one or more programs can also be executed by one or more processors to implement the steps of any of the above-mentioned cache allocation methods.
[0146] The specific implementation of the storage medium of the present application is basically the same as the embodiments of the cache allocation method described above, and will not be repeated here.
[0147] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising an etc." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0148] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0149] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a more preferred embodiment. Based on this understanding, the technical solution of this application, or the part that contributes to the existing technology, 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 a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods of each embodiment of this application.
[0150] The above are merely optional embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A cache allocation method, wherein: The cache allocation method comprises: Identify the congestion control algorithm used by the network device when sending traffic, and collect statistics on the occupied bandwidth information of the traffic; Determine a cache allocation value of the network device based on the congestion control algorithm, the occupied bandwidth information and a cache allocation rule; The traffic of the network device is allocated to a cache based on the cache allocation value.
2. The cache allocation method according to claim 1, wherein: 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 step further includes: Acquire the cache capacity of the traffic cache area in the network device and the egress bandwidth of each output port in the network device; Determining the device type of the network device based on a preset classification cache threshold, the cache amount, and the egress bandwidth; Based on the device type, a cache allocation rule is determined.
3. The cache allocation method according to claim 2, wherein: The device types include Cubic algorithm dominant devices and BBR algorithm dominant devices; The step of determining the device type of the network device based on the preset classification cache threshold, the cache amount and the egress bandwidth includes: Taking the quotient of the cache amount and the egress bandwidth to obtain a relative cache value of the network device; Comparing the relative cache value with a preset classification cache threshold; If the relative cache value is greater than the preset classification cache threshold, determining that the network device is the Cubic algorithm leading device; If the relative cache value is less than or equal to the preset category cache threshold, the network device is determined to be the BBR algorithm leading device.
4. The cache allocation method according to claim 3, wherein: The cache allocation rule includes a scheduling cache rule, the congestion control algorithm includes a 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 device type of the network device is the BBR algorithm dominant device, the total cache value of the port connected to the network device, the egress bandwidth, the BBR occupied bandwidth of the BBR traffic at the current moment, the number of other traffic items that use congestion control algorithms other than the BBR algorithm to transmit traffic, and the number of BBR flows of the BBR traffic are filtered out from the occupied bandwidth information; Wherein, the BBR traffic is the traffic transmitted using the BBR algorithm; Determine a preset scheduling cache threshold of the network device based on the scheduling cache rule, the total port cache value, the egress bandwidth, the BBR occupied bandwidth, the number of remaining traffic items and the number of BBR flows; The preset scheduling threshold belongs to the cache allocation value.
5. The cache allocation method according to claim 4, wherein: The cache allocation rule further includes a cache allocation value rule, the congestion control algorithm further includes a 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 device type of the network device is a Cubic algorithm dominant device, the total port cache value, the egress bandwidth, the Cubic occupied bandwidth occupied by the Cubic traffic at the current moment, the number of Cubic flows of the Cubic traffic at the current moment, and the number of irrelevant flows that use the Cubic algorithm to transmit traffic are filtered out from the occupied bandwidth information; Wherein, the Cubic traffic is the traffic transmitted based on the Cubic algorithm; Determine the cache value of the Cubic traffic that needs to be allocated to the network device at the current moment based on the cache allocation value rule, the total port cache value, the egress bandwidth, the Cubic occupied bandwidth, the number of Cubic flows, and the number of irrelevant flows; Wherein, the cache value belongs to the cache allocation value.
6. The cache allocation method according to any one of claims 1 to 5, wherein: The step of identifying the congestion control algorithm used by the network device when sending traffic includes: Extract window trend features of traffic sent by each network device; The window trend characteristics are compared with different types of preset theoretical window trends to determine a congestion control algorithm used to send the traffic.
7. The cache allocation method according to claim 5, wherein: 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 also includes: Based on the congestion control algorithm and the occupied bandwidth information, generating a flow information table updated in real time; 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 other flows and the number of BBR flows 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 occupied bandwidth, the number of irrelevant flows, the number of Cubic flows, the number of remaining flows, the number of BBR flows and the cache allocation rule.
8. A cache allocation device, wherein: The cache allocation device comprises: An information collection 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; A determination module, configured to determine a cache allocation value of the network device based on the congestion control algorithm, the occupied bandwidth information and a cache allocation rule; An allocation module is used to allocate cache to the network device based on the cache allocation value.
9. The cache allocation device according to claim 8, wherein: The determination module is further used to obtain the cache capacity of the traffic cache area in the network device and the egress bandwidth of each output port in the network device; Determining the device type of the network device based on a preset classification cache threshold, the cache amount, and the egress bandwidth; Based on the device type, a cache allocation rule is determined.
10. A cache allocation device, wherein: The cache allocation device comprises: a memory, a processor, and a cache allocation program stored in the memory and executable on the processor, wherein the cache allocation program is configured to implement the steps of the cache allocation method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Congestion control selection method and system based on transmission content size
CN114726790A
Cross-layer end network cooperative congestion control method based on event driving
CN115865827A
Optimization method for data retransmission of BBR congestion control algorithm
CN116155825A
Cache allocation method, device and equipment
CN117041151A
Data transmission cache queue allocation method and apparatus, and computer storage medium
WO2018001222A1
Cited By
Traffic scheduling method and device for industrial switch
CN120811997A