Method for dynamically adjusting threshold value of flow control switch, related device and program instruction

By dynamically adjusting the network flow control switch threshold and dynamically calculating the threshold according to the size of the remaining cache resources in the switch, the problems of low network resource utilization and unstable service quality caused by static configuration are solved, and network performance and stability are improved.

CN119232653APending Publication Date: 2024-12-31SUZHOU CENTEC COMM CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411330253.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

In the existing network flow control mechanism, the statically configured backpressure threshold and backpressure revocation threshold lead to the switching of backpressure state too early or too late, resulting in low network resource utilization and unstable service quality.

Method used

Dynamically adjust the flow control switch threshold, calculate the backpressure revocation threshold by obtaining the turn-on threshold related to the size of the remaining cache resources in the switch, and replace the historical threshold of the target port to switch the threshold as the cache resource changes.

Benefits of technology

It avoids premature or late backpressure switching caused by static configuration, improves network resource utilization and service quality stability, and reduces network oscillation and data packet loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119232653A_ABST
    Figure CN119232653A_ABST
Patent Text Reader

Abstract

The invention provides a method for dynamically adjusting a flow control switch threshold value, a related device and a program instruction, and relates to the field of network communication. Wherein the switch obtains a reverse starting voltage threshold value of the target port, and the reverse starting voltage threshold value is in positive correlation with the size of residual cache resources in the switch; according to the back pressure starting threshold value, a back pressure starting threshold value and a back pressure revocation threshold value are obtained, the back pressure revocation threshold value is smaller than the back pressure starting threshold value, and the back pressure starting threshold value is larger than the back pressure revocation threshold value; and replacing the back pressure starting historical threshold value and the back pressure revocation historical threshold value of the target port by the back pressure starting threshold value and the back pressure revocation threshold value. In this way, the upper and lower limit thresholds for switching the back pressure state change along with the change of the residual cache resources in the switch, thereby avoiding the premature back pressure starting or premature back pressure revocation caused by the statically configured upper and lower limit thresholds.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communications, and more specifically, to a method, related devices, and program instructions for dynamically adjusting a flow control switch threshold. Background Art

[0002] In the traditional network flow control mechanism, once congestion is detected on a link, data transmission on the entire link will be completely blocked. Although this method can alleviate congestion, it also leads to waste of network resources and reduced service quality. In order to overcome this drawback, the Priority Flow Control (PFC) technology is introduced to achieve more refined traffic management on Ethernet links.

[0003] like Figure 1 As shown in the figure, this technology creates multiple virtual channels between two network devices (device A and device B), so that each channel can be given a priority level according to its business needs. In this way, when a virtual channel is congested, it can be paused and restarted in a targeted manner, that is, back pressure operation, while the traffic of other virtual channels can still run normally and is not affected. This flexible flow control strategy not only improves the utilization of network resources, but also ensures the service quality of key business traffic, thereby improving the performance and stability of the network as a whole.

[0004] At present, the implementation mechanism of PFC is to compare the number of used cache resources of a certain priority on the port with two statically configured upper and lower thresholds (start back pressure threshold, back pressure cancellation threshold) to switch the back pressure state. For example, when the count of used cache resources is greater than the start back pressure threshold, in order to prevent more data packets from entering the already congested channel, the network device will enter the back pressure state, that is, send a signal to the upstream device to require it to reduce the sending rate or temporarily stop sending data packets. When the count of used cache resources is less than the back pressure cancellation threshold, the flow control state will be cancelled.

[0005] Although this method can achieve flow control in a simple way, it is found in practice that the upper and lower thresholds in the above-mentioned prior art are static values ​​with fixed configurations. When the cache resources are sufficient, the back pressure may be initiated too early because the back pressure threshold is relatively small, resulting in low cache resource utilization. When the cache resources are insufficient, the back pressure may be withdrawn too early because the back pressure withdrawal threshold is relatively large, resulting in the upstream sending packets too early, causing oscillations or even packet loss. Summary of the invention

[0006] In order to overcome at least one of the deficiencies in the prior art, the present application provides a method, a related device and a program instruction for dynamically adjusting a flow control switch threshold, specifically including:

[0007] In a first aspect, the present application provides a method for dynamically adjusting a flow control switch threshold, the method comprising:

[0008] Obtaining a reverse pressure threshold of the target port, wherein the reverse pressure threshold is positively correlated with the size of the remaining cache resources in the switch;

[0009] According to the back pressure start threshold, a back pressure cancellation threshold is obtained, wherein the back pressure cancellation threshold is less than the back pressure start threshold;

[0010] The back pressure start threshold and the back pressure cancellation threshold are used to replace the back pressure start history threshold and the back pressure cancellation history threshold of the target port.

[0011] In combination with the optional implementation manner of the first aspect, obtaining the back pressure cancellation threshold according to the back pressure activation threshold includes:

[0012] The back pressure cancellation initial threshold is obtained by subtracting a preset difference from the back pressure start threshold;

[0013] The back pressure cancellation threshold is obtained according to the back pressure cancellation initial threshold.

[0014] In combination with the optional implementation manner of the first aspect, the step of obtaining the back pressure cancellation initial threshold by subtracting a preset difference from the back pressure start threshold includes:

[0015] Determine the magnitude relationship between the back pressure cancellation initial threshold and the threshold interval;

[0016] If the magnitude relationship indicates that the back pressure cancellation initial threshold is within the threshold interval, the back pressure cancellation initial threshold is used as the back pressure cancellation threshold;

[0017] If the magnitude relationship indicates that the back pressure cancellation initial threshold is greater than the upper limit of the threshold interval, the upper limit of the threshold interval is used as the back pressure cancellation threshold;

[0018] If the magnitude relationship indicates that the back pressure cancellation initial threshold is smaller than the lower limit of the threshold interval, the lower limit of the threshold interval is used as the back pressure cancellation threshold.

[0019] In conjunction with the optional implementation manner of the first aspect, the taking the lower limit of the threshold interval as the back pressure cancellation threshold includes:

[0020] Determine whether the lower limit of the threshold interval is greater than or equal to the start-up reverse pressure threshold or whether the difference between the lower limit of the threshold interval and the start-up reverse pressure threshold is less than a preset limit threshold;

[0021] If yes, 0 is determined as the back pressure cancellation threshold;

[0022] If not, the lower limit of the threshold interval is used as the back pressure cancellation threshold.

[0023] In combination with the optional implementation manner of the first aspect, the switch reserves emergency buffer space, and the method further includes:

[0024] If the size of the cache space used by the switch is greater than the back pressure threshold, the data in the line corresponding to the target port is stored in the emergency cache space.

[0025] In a second aspect, the present application further provides a device for dynamically adjusting a flow control switch threshold, the device comprising:

[0026] A dynamic threshold module, used to obtain a reverse pressure threshold of a target port, wherein the reverse pressure threshold is positively correlated with the size of the remaining cache resources in the switch;

[0027] A threshold adjustment module, configured to obtain a back pressure cancellation threshold according to the back pressure start threshold, wherein the back pressure cancellation threshold is smaller than the back pressure start threshold;

[0028] The threshold configuration module is used to replace the back pressure start history threshold and the back pressure cancellation history threshold of the target port with the back pressure start threshold and the back pressure cancellation threshold.

[0029] In conjunction with the optional implementation manner of the second aspect, the threshold adjustment module is further specifically configured to:

[0030] The back pressure cancellation initial threshold is obtained by subtracting a preset difference from the back pressure start threshold;

[0031] The back pressure cancellation threshold is obtained according to the back pressure cancellation initial threshold.

[0032] In conjunction with the optional implementation manner of the second aspect, the threshold adjustment module is further specifically configured to:

[0033] Determine the magnitude relationship between the back pressure cancellation initial threshold and the threshold interval;

[0034] If the magnitude relationship indicates that the back pressure cancellation initial threshold is within the threshold interval, the back pressure cancellation initial threshold is used as the back pressure cancellation threshold;

[0035] If the magnitude relationship indicates that the back pressure cancellation initial threshold is greater than the upper limit of the threshold interval, the upper limit of the threshold interval is used as the back pressure cancellation threshold;

[0036] If the magnitude relationship indicates that the back pressure cancellation initial threshold is smaller than the lower limit of the threshold interval, the lower limit of the threshold interval is used as the back pressure cancellation threshold.

[0037] In conjunction with the optional implementation manner of the second aspect, the threshold adjustment module is further specifically configured to:

[0038] Determine whether the lower limit of the threshold interval is greater than or equal to the start-up reverse pressure threshold or whether the difference between the lower limit of the threshold interval and the start-up reverse pressure threshold is less than a preset limit threshold;

[0039] If yes, 0 is determined as the back pressure cancellation threshold;

[0040] If not, the lower limit of the threshold interval is used as the back pressure cancellation threshold.

[0041] In conjunction with the optional implementation manner of the second aspect, the dynamic threshold module is further used to:

[0042] If the size of the cache space used by the switch is greater than the back pressure threshold, the data in the line corresponding to the target port is stored in the emergency cache space.

[0043] On the third aspect, the present invention also provides a storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of dynamically adjusting the flow control switch threshold is implemented.

[0044] In a fourth aspect, the present application further provides a switch, comprising a processor and a storage, wherein the storage stores a computer program, and when the computer program is executed by the processor, the method of dynamically adjusting the flow control switch threshold is implemented.

[0045] In a fifth aspect, the present application also provides a program instruction, which, when executed by a processor, implements the method of dynamically adjusting the flow control switch threshold.

[0046] Compared with the prior art, this application has the following beneficial effects:

[0047] The present application provides a method, related device and program instruction for dynamically adjusting the flow control switch threshold. Among them, the switch obtains the reverse pressure threshold of the target port, wherein the reverse pressure threshold is positively correlated with the size of the remaining cache resources in the switch; according to the reverse pressure threshold, the reverse pressure threshold and the reverse pressure cancellation threshold are obtained, wherein the reverse pressure cancellation threshold is less than the reverse pressure threshold, and the reverse pressure cancellation threshold is greater than the reverse pressure cancellation threshold; the reverse pressure history threshold and the reverse pressure cancellation history threshold of the target port are replaced by the reverse pressure threshold and the reverse pressure cancellation threshold. In this way, the upper and lower limit thresholds of switching the reverse pressure state change with the changes in the remaining cache resources in the switch, thereby avoiding the premature initiation or premature cancellation of the reverse pressure caused by the statically configured upper and lower limit thresholds. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 A schematic diagram of the PFC principle provided in an embodiment of the present application;

[0050] Figure 2 A flow chart of a method for dynamically adjusting a flow control switch threshold provided in an embodiment of the present application;

[0051] Figure 3 A structural diagram of a device for dynamically adjusting a flow control switch threshold provided in an embodiment of the present application;

[0052] Figure 4 A schematic diagram of the structure of a switch provided in an embodiment of the present application.

[0053] Icons: 11 - dynamic threshold module; 12 - threshold adjustment module; 13 - threshold configuration module; 21 - memory; 22 - processor; 23 - communication unit; 24 - system bus. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0055] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0056] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0057] In the description of the present application, it should be noted that the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance. In addition, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0058] Based on the above statement, as introduced in the background technology, the upper and lower thresholds of the static configuration may cause back pressure to occur prematurely or cancel back pressure prematurely. Based on the discovery of the above technical problems, the inventors have proposed the following technical solutions through creative work to solve or improve the above problems. It should be noted that the defects existing in the solutions in the above prior art are the results obtained by the inventors after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed in the embodiments of the present application below for the above problems should all be the contributions made by the inventors to the present application in the process of invention and creation, and should not be understood as technical contents known to those skilled in the art.

[0059] In view of the above problems, this embodiment provides a method for dynamically adjusting the flow control switch threshold. In this method, the switch obtains the reverse pressure threshold of the target port, wherein the reverse pressure threshold is positively correlated with the size of the remaining cache resources in the switch; according to the reverse pressure threshold, the reverse pressure threshold and the reverse pressure cancellation threshold are obtained, wherein the reverse pressure cancellation threshold is less than the reverse pressure threshold, and the reverse pressure cancellation threshold is greater than the reverse pressure cancellation threshold; the reverse pressure history threshold and the reverse pressure cancellation history threshold of the target port are replaced by the reverse pressure threshold and the reverse pressure cancellation threshold. In this way, the upper and lower limit thresholds of the switching reverse pressure state change with the changes in the remaining cache resources in the switch, thereby avoiding the premature initiation or premature cancellation of reverse pressure caused by the statically configured upper and lower limit thresholds.

[0060] To make the solution provided by this embodiment clearer, Figure 2 Each step of the method is described in detail. However, it should be understood that the operations of the flowchart may not be implemented in order, and steps without logical contextual relationships may be reversed in order or implemented simultaneously. In addition, those skilled in the art may add one or more other operations to the flowchart, or remove one or more operations from the flowchart under the guidance of the content of this application. Figure 2 As shown, the method includes:

[0061] S1, obtain the reverse pressure threshold of the target port.

[0062] It should be noted that, through the PFC technology, multiple virtual channels can be constructed between network devices, and the above-mentioned target port corresponds to one of the multiple virtual channels, and is used to receive data from the virtual channel. In addition, the start-up backpressure threshold is positively correlated with the size of the remaining cache resources in the switch. Therefore, the start-up backpressure threshold in this embodiment will increase with the increase of the remaining cache resources in the switch, and decrease with the decrease, and will continue to be in a dynamic change process.

[0063] In the related technology, the reverse pressure threshold can be automatically calculated by real-time monitoring of the network status and applying statistical learning, real-time monitoring, feedback control and machine learning to adapt to the ever-changing network conditions, thereby optimizing network performance, ensuring the smooth operation of key services, and improving the overall utilization of network resources. For example, a statistical model can be trained with historical traffic data, such as an autoregressive moving average model, and then the reverse pressure threshold can be predicted based on the model. For another example, the network rate can be monitored in real time, and the reverse pressure threshold can be obtained according to the preset mapping relationship of the rate.

[0064] In this embodiment, in order to adapt to the change of cache resources in the switch, the start-up back pressure threshold that is positively correlated with the size of the remaining cache resources in the switch can be obtained by monitoring the change of the cache occupancy rate. For example, when the cache occupancy rate is lower than a certain lower limit, the current start-up back pressure threshold is lowered; when the cache occupancy rate is higher than a certain upper limit, the current start-up back pressure threshold is increased.

[0065] In addition, this embodiment also provides a stepless adjustment method for the reverse pressure threshold, and the expression of the adjustment method is as follows:

[0066] MaxBuffer=RemainBuffer*Factor / (1+Factor)

[0067] In the formula, MaxBuffer represents the calculated start-up back pressure threshold, RemainBuffer represents the size of the remaining buffer resources in the switch, and Factor represents the preset calculation factor related to the target port priority. In this way, the start-up back pressure threshold calculated by the above expression is positively correlated with the size of the remaining buffer resources.

[0068] Based on the introduction of the back pressure threshold in the above embodiment, this embodiment further uses the back pressure threshold to obtain the back pressure cancellation threshold for flow control. Figure 2 The method for dynamically adjusting the flow control switch threshold provided in this embodiment further includes:

[0069] S2, obtaining a back pressure cancellation threshold according to the back pressure start threshold.

[0070] Among them, the back pressure cancellation threshold is less than the back pressure start threshold. It can be understood that since the back pressure start threshold will increase with the increase of the remaining cache resources in the switch, and decrease with the decrease; the back pressure cancellation threshold obtained based on the back pressure start threshold will also increase with the increase of the remaining cache resources in the switch, and decrease with the decrease. In order to achieve this purpose, this embodiment provides the following optional implementation of step S2:

[0071] S2-1, obtaining the back pressure cancellation initial threshold by subtracting the preset difference from the back pressure start threshold.

[0072] The preset difference value may be a constant set by the developer during the development process. In addition, in some embodiments, the switch also provides a corresponding configuration interface, so that the user can configure the preset difference value through the configuration interface during the operation of the device.

[0073] S2-2, obtaining a back pressure cancellation threshold according to the back pressure cancellation initial threshold.

[0074] It is found in practice that if the reverse pressure threshold and the reverse pressure cancellation threshold are too close, the switch will frequently switch between the reverse pressure state and the non-reverse pressure state, which will cause PFC oscillation, which is not conducive to the stable transmission of the network. Although the reverse pressure cancellation initial threshold obtained by subtracting the preset difference from the reverse pressure threshold maintains a certain difference interval with the reverse pressure threshold, it is found in practice that if the calculated reverse pressure threshold is small, it means that the reverse pressure cancellation initial threshold will be even smaller, which is not conducive to the switch to quickly release the reverse pressure state. On the contrary, if the calculated reverse pressure threshold is large, it means that the reverse pressure cancellation initial threshold will increase accordingly, which will cause the switch to release the reverse pressure state too quickly. In this regard, the present embodiment provides a threshold interval for limiting the range of variation of the reverse pressure cancellation threshold.

[0075] In a specific implementation, the switch determines the size relationship between the initial back pressure cancellation threshold and the threshold interval; if the size relationship indicates that the initial back pressure cancellation threshold is within the threshold interval, the initial back pressure cancellation threshold is used as the back pressure cancellation threshold; if the size relationship indicates that the initial back pressure cancellation threshold is greater than the upper limit of the threshold interval, the upper limit is used as the back pressure cancellation threshold; if the size relationship indicates that the initial back pressure cancellation threshold is less than the lower limit of the threshold interval, the lower limit of the threshold interval is used as the back pressure cancellation threshold.

[0076] It can be understood that, in the above embodiment, if the back pressure cancellation initial threshold is greater than the upper limit of the preset threshold interval, the upper limit of the preset threshold interval is used as the back pressure cancellation threshold, thereby suppressing the excessively large back pressure cancellation initial threshold. Similarly, when the back pressure cancellation initial threshold is less than the lower limit of the threshold interval, the excessively small back pressure cancellation initial threshold needs to be increased, and the lower limit of the threshold interval can be directly used as the back pressure cancellation threshold.

[0077] In practice, it is found that directly using the lower limit of the threshold interval as the back pressure cancellation threshold may cause the back pressure cancellation threshold and the back pressure start threshold to be too close or even the back pressure start threshold to be less than the back pressure cancellation threshold, resulting in PFC oscillation. Therefore, in the optional implementation provided by this embodiment:

[0078] The switch further determines whether the lower limit of the threshold interval is greater than or equal to the reverse pressure threshold or the difference between the lower limit of the threshold interval and the reverse pressure threshold is less than the preset limit threshold; if so, 0 is determined as the reverse pressure cancellation threshold; otherwise, if not, the lower limit of the threshold interval is used as the reverse pressure cancellation threshold. It can be understood that this embodiment provides a mode without a lower limit for the reverse pressure cancellation threshold, so that the reverse pressure cancellation threshold can be close to zero, thereby alleviating the occurrence of the above extreme situation.

[0079] For example, assuming that the back pressure threshold is 8, the difference is 5, and the threshold interval is 9-19, since the back pressure cancellation initial threshold obtained by 8-5 is 3, which is less than the lower limit of the threshold interval 9, 9 is used as the back pressure cancellation threshold, which is greater than the back pressure threshold at this time, 8. In this regard, this embodiment uses 0 as the back pressure cancellation threshold, thereby avoiding the situation where the back pressure threshold is less than the back pressure cancellation threshold.

[0080] Based on the back pressure threshold and back pressure cancellation threshold obtained in the above embodiment, continue to participate Figure 2 The method for dynamically adjusting the flow control switch threshold provided in this embodiment also includes:

[0081] S3: Replace the back pressure enable history threshold and the back pressure disable history threshold of the target port with the back pressure enable threshold and the back pressure disable threshold.

[0082] The historical threshold for starting reverse pressure and the historical threshold for canceling reverse pressure are thresholds currently adopted by the switch, and the latest threshold for starting reverse pressure and the threshold for canceling reverse pressure are used to replace them.

[0083] In practice, it is found that when the switch triggers the back pressure operation, there is actually undelivered data remaining in the virtual channel. In order to achieve lossless forwarding, the switch provided in this embodiment reserves emergency buffer space. If the switch detects that the size of the used buffer space is greater than the back pressure threshold, the data in the line corresponding to the target port is stored in the emergency buffer space. In this way, the loss of data in the line corresponding to the target port is avoided.

[0084] Based on the same inventive concept as the method for dynamically adjusting the flow control switch threshold provided in this embodiment, this embodiment also provides a device for dynamically adjusting the flow control switch threshold. The device includes at least one software function module that can be stored in a memory or fixed in a switch in the form of software. The processor in the switch is used to execute the executable module stored in the memory. For example, the software function module and computer program included in the device. Please refer to Figure 3 , functionally speaking, the device may include:

[0085] The dynamic threshold module 11 is used to obtain the reverse pressure threshold of the target port, wherein the reverse pressure threshold is positively correlated with the size of the remaining cache resources in the switch;

[0086] A threshold adjustment module 12, configured to obtain a back pressure cancellation threshold according to a back pressure start threshold, wherein the back pressure cancellation threshold is smaller than the back pressure start threshold;

[0087] The threshold configuration module 13 is used to replace the back pressure start history threshold and the back pressure cancellation history threshold of the target port with the back pressure start threshold and the back pressure cancellation threshold.

[0088] In this embodiment, the dynamic threshold module 11 is used to implement Figure 2 In step S1, the threshold adjustment module 12 is used to implement Figure 2 In step S2, the threshold configuration module 13 is used to implement Figure 2 Therefore, for a detailed description of each of the above modules, please refer to the specific implementation of the corresponding step. It should be noted that, given that the method for dynamically adjusting the flow control switch threshold provided in this embodiment has the same inventive concept, the above modules can also be used to implement other steps or sub-steps of the method.

[0089] For example, the threshold adjustment module is further specifically configured to obtain the back pressure cancellation initial threshold by subtracting the preset difference from the back pressure start threshold; and obtain the back pressure cancellation threshold according to the back pressure cancellation initial threshold.

[0090] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0091] It should also be understood that if the above implementation is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application.

[0092] Therefore, this embodiment further provides a storage medium, which is a computer-readable storage medium. The storage medium stores a computer program, and when the computer program is executed by the processor, the method for dynamically adjusting the flow control switch threshold provided in this embodiment is implemented. Among them, the storage medium can be a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, etc., which can store program codes.

[0093] This embodiment provides a switch that implements a method for dynamically adjusting a flow control switch threshold. Figure 4 As shown, the switch may include a processor and a memory. In addition, the memory stores a computer program, and the processor implements the method for dynamically adjusting the flow control switch threshold provided in this embodiment by reading and executing the computer program corresponding to the above implementation mode in the memory.

[0094] Continue to see Figure 4 The electronic device further includes a communication unit 23. The memory 21, the processor 22 and the communication unit 23 may be integrated into a switching chip, in which the components are electrically connected to each other directly or indirectly through a system bus 24 to achieve data transmission or interaction.

[0095] The memory 21 may be an information recording device based on any electronic, magnetic, optical or other physical principle, used to record execution instructions, data, etc. In some embodiments, the memory 21 may be, but is not limited to, a volatile memory, a non-volatile memory, a storage drive, etc.

[0096] In some embodiments, the volatile memory may be a random access memory (RAM); in some embodiments, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), a flash memory, etc.; in some embodiments, the storage drive may be a disk drive, a solid-state drive, any type of storage disk (such as a CD, a DVD, etc.), or a similar storage medium, or a combination thereof, etc.

[0097] The communication unit 23 is used to send and receive data through a network. In some embodiments, the network may include a wired network, a wireless network, a fiber optic network, a telecommunication network, an intranet, the Internet, a local area network (LAN), a wide area network (WAN), a wireless local area network (WLAN), a metropolitan area network (MAN), a wide area network (WAN), a public switched telephone network (PSTN), a Bluetooth network, a ZigBee network, or a near field communication (NFC) network, or any combination thereof. In some embodiments, the network may include one or more network access points. For example, the network may include a wired or wireless network access point, such as a base station and / or a network switching node, through which one or more components of the service request processing system may be connected to the network to exchange data and / or information.

[0098] The processor 22 may be an integrated circuit chip having a signal processing capability, and the processor may include one or more processing cores (e.g., a single-core processor or a multi-core processor). By way of example only, the processor may include a central processing unit (CPU), an application specific integrated circuit (ASIC), an application specific instruction set processor (ASIP), a graphics processing unit (GPU), a physical processing unit (PPU), a digital signal processor (DSP), a field programmable gate array (FPGA), a programmable logic device (PLD), a controller, a microcontroller unit, a reduced instruction set computer (RISC), or a microprocessor, or any combination thereof.

[0099] Understandably, Figure 4 The structure shown is for illustration only. Figure 4 More or fewer components than shown, or with Figure 4 Different configurations shown. Figure 4 The components shown may be implemented in hardware, software or a combination thereof.

[0100] In addition, this embodiment also provides a program instruction, which implements a method for dynamically adjusting the flow control switch threshold when the program instruction is executed by a processor.

[0101] It should be understood that the apparatus and method disclosed in the above-mentioned embodiments can also be implemented in other ways. The apparatus embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the apparatus, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0102] The above are only various implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for dynamically adjusting a flow control switch threshold, characterized in that: The method comprises: Obtaining a reverse pressure threshold of the target port, wherein the reverse pressure threshold is positively correlated with the size of the remaining cache resources in the switch; According to the back pressure start threshold, a back pressure cancellation threshold is obtained, wherein the back pressure cancellation threshold is less than the back pressure start threshold; The back pressure start threshold and the back pressure cancellation threshold are used to replace the back pressure start history threshold and the back pressure cancellation history threshold of the target port.

2. The method for dynamically adjusting the flow control switch threshold according to claim 1, characterized in that: The step of obtaining a back pressure cancellation threshold according to the back pressure start threshold comprises: The back pressure cancellation initial threshold is obtained by subtracting a preset difference from the back pressure start threshold; The back pressure cancellation threshold is obtained according to the back pressure cancellation initial threshold.

3. The method for dynamically adjusting the flow control switch threshold according to claim 2, characterized in that: The step of subtracting a preset difference from the back pressure threshold to obtain the back pressure cancellation initial threshold includes: Determine the magnitude relationship between the back pressure cancellation initial threshold and the threshold interval; If the magnitude relationship indicates that the back pressure cancellation initial threshold is within the threshold interval, the back pressure cancellation initial threshold is used as the back pressure cancellation threshold; If the magnitude relationship indicates that the back pressure cancellation initial threshold is greater than the upper limit of the threshold interval, the upper limit of the threshold interval is used as the back pressure cancellation threshold; If the magnitude relationship indicates that the back pressure cancellation initial threshold is smaller than the lower limit of the threshold interval, the lower limit of the threshold interval is used as the back pressure cancellation threshold.

4. The method for dynamically adjusting the flow control switch threshold according to claim 3, characterized in that: The taking the lower limit of the threshold interval as the back pressure cancellation threshold includes: Determine whether the lower limit of the threshold interval is greater than or equal to the start-up reverse pressure threshold or whether the difference between the lower limit of the threshold interval and the start-up reverse pressure threshold is less than a preset limit threshold; If yes, 0 is determined as the back pressure cancellation threshold; If not, the lower limit of the threshold interval is used as the back pressure cancellation threshold.

5. The method for dynamically adjusting the flow control switch threshold according to claim 1, characterized in that: The switch has reserved emergency buffer space, and the method further includes: If the size of the cache space used by the switch is greater than the back pressure threshold, the data in the line corresponding to the target port is stored in the emergency cache space.

6. A device for dynamically adjusting a flow control switch threshold, characterized in that: The device comprises: A dynamic threshold module, used to obtain a reverse pressure threshold of a target port, wherein the reverse pressure threshold is positively correlated with the size of the remaining cache resources in the switch; A threshold adjustment module, configured to obtain a back pressure cancellation threshold according to the back pressure start threshold, wherein the back pressure cancellation threshold is smaller than the back pressure start threshold; The threshold configuration module is used to replace the back pressure start history threshold and the back pressure cancellation history threshold of the target port with the back pressure start threshold and the back pressure cancellation threshold.

7. The device for dynamically adjusting the flow control switch threshold according to claim 6, characterized in that: The threshold adjustment module is also specifically used for: The back pressure cancellation initial threshold is obtained by subtracting a preset difference from the back pressure start threshold; The back pressure cancellation threshold is obtained according to the back pressure cancellation initial threshold.

8. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method for dynamically adjusting the flow control switch threshold according to any one of claims 1 to 4 is implemented.

9. A switch, characterized in that: The switch includes a processor and a memory, the memory stores a computer program, and when the computer program is executed by the processor, the method for dynamically adjusting the flow control switch threshold according to any one of claims 1 to 4 is implemented.

10. A program instruction, characterized in that: When the program instructions are executed by the processor, the method for dynamically adjusting the flow control switch threshold according to any one of claims 1 to 4 is implemented.

Citation Information

Cited By

  • Backpressure flow control verification method and device, storage medium and equipment

    CN120893386A