On-chip transient congestion detection method, device, equipment and storage medium

By monitoring the resource occupancy of chip port queues, dynamically adjusting thresholds and storing transient congestion events, the problem of detecting transient congestion on the chip is solved, efficient event capture and analysis is achieved, and resource consumption and network performance impact are reduced.

CN115834484BActive Publication Date: 2025-09-26SEAL CORE SEMICON (NANJING) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211558203.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-06
Publication Date
2025-09-26
Estimated Expiration
2042-12-06

AI Technical Summary

Technical Problem

Existing technologies make it difficult to effectively monitor and analyze transient congestion on chips, resulting in worsening network latency and jitter. Frequent transient congestion events also place a heavy strain on on-chip resource consumption and CPU access bandwidth.

Method used

By obtaining the resource occupancy rate of the chip port queue, it is determined whether the transient congestion capture conditions are met, triggering the capture engine to enter the transient congestion capture state, capturing and storing transient congestion event information, and adopting dynamic threshold adjustment and cache merging mechanisms to reduce resource consumption and CPU access bandwidth.

Benefits of technology

It can accurately capture and record instantaneous congestion events in a very short time, reduce the impact on network and application performance, improve detection accuracy and save resources and bandwidth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115834484B_ABST
    Figure CN115834484B_ABST
Patent Text Reader

Abstract

The present application discloses a method, apparatus, device, and storage medium for detecting transient congestion on a chip. The method comprises: obtaining the resource occupancy rate of a chip port queue; judging whether the port queue meets a preset transient congestion capture condition based on the resource occupancy rate; when the transient congestion capture condition is met, triggering a preset capture engine to enter a transient congestion capture state, capturing transient congestion event information of the port queue; and storing the captured transient congestion event information. The transient congestion detection method provided by the present application can capture and record transient congestion events within a very short duration of transient congestion, and the solution can be applied to extremely fine detection granularity of port queues, facilitating subsequent analysis and reducing the impact of transient congestion traffic on network and application performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network communication technology, and in particular to a method, device, equipment and storage medium for detecting transient congestion on a chip. Background Art

[0002] Mircoburst refers to the phenomenon of a large number of network data packets being transmitted on a chip port within a very short period of time. During this extremely short duration, the instantaneous rate can far exceed the average port rate. This transient congestion can have a significant negative impact on network and application performance, exacerbating network latency, jitter, and packet loss.

[0003] Currently, commonly used network monitoring methods have a long time dimension, making it difficult to capture and analyze transient congestion. Furthermore, frequent reporting of transient congestion events places a heavy strain on on-chip resource consumption and CPU access bandwidth. Summary of the Invention

[0004] The embodiments of the present application provide a method, apparatus, device, and storage medium for detecting transient congestion on a chip. To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is provided below. This summary is not intended to be a comprehensive review, identify key or important components, or delineate the scope of protection for these embodiments. Its sole purpose is to present some concepts in a simplified form as a prelude to the detailed description that follows.

[0005] In a first aspect, an embodiment of the present application provides a method for detecting transient congestion on a chip, comprising:

[0006] Get the resource occupancy rate of the chip port queue;

[0007] Determining whether the port queue meets a preset transient congestion capture condition according to the resource occupancy rate, and when the transient congestion capture condition is met, triggering a preset capture engine to enter a transient congestion capture state to capture transient congestion event information of the port queue;

[0008] The captured transient congestion event information is stored.

[0009] In an optional embodiment, determining whether the port queue meets a preset transient congestion capture condition according to the resource occupancy rate includes:

[0010] Determine whether the resource usage of the port queue is greater than or equal to the preset upper threshold;

[0011] Determine whether the port queue enable switch is on;

[0012] When the resource occupancy rate of the port queue is greater than or equal to the upper threshold, and the enabling switch is in an on state, it is determined that the port queue meets a preset transient congestion capture condition.

[0013] In an optional embodiment, before determining whether the resource occupancy rate of the port queue is greater than or equal to a preset upper threshold, the method further includes:

[0014] The upper threshold value is dynamically adjusted according to the port queue rate and the current resource occupancy rate of the port queue.

[0015] In an optional embodiment, after triggering the preset capture engine to enter the transient congestion capture state, the method further includes:

[0016] Determine whether the current port queue resource occupancy rate is less than the preset lower threshold;

[0017] When the port queue resource occupancy rate is lower than the preset lower threshold, the preset capture engine is triggered to exit the transient congestion capture state;

[0018] Determine whether the instantaneous congestion capture time of the current port queue is greater than the preset capture time threshold;

[0019] When the instantaneous congestion capture time of the port queue is greater than the preset capture time threshold, the preset capture engine is triggered to exit the instantaneous congestion capture state.

[0020] In an optional embodiment, capturing transient congestion event information of a port queue includes:

[0021] Captures the capture start time, capture port queue number, capture end time, instantaneous congestion peak value, and the total number of times the port queue enters the capture state.

[0022] In an optional embodiment, storing the captured transient congestion event information includes:

[0023] Storing the instantaneous congestion event information in a cache module of a capture engine;

[0024] Merging the instantaneous congestion events within the preset merging time window stored in the cache module to obtain merged instantaneous congestion event information;

[0025] The merged instantaneous congestion event information is stored in a storage module and / or a remote sensing packager.

[0026] In an optional embodiment, merging the transient congestion events within a preset merging time window stored by the cache module to obtain merged transient congestion event information includes:

[0027] Obtain the maximum resource occupancy rate of all instantaneous congestion events within the preset merging time window as the maximum resource occupancy rate of the merged instantaneous congestion event;

[0028] Obtain the sum of the numbers of all instantaneous congestion events within the preset merging time window as the merged number of instantaneous congestion events;

[0029] Obtaining the minimum capture start time of all transient congestion events within the preset merging time window as the capture start time of the merged transient congestion event;

[0030] The maximum capture end time of all transient congestion events within the preset merging time window is obtained as the capture end time of the merged transient congestion event.

[0031] In a second aspect, an embodiment of the present application provides an on-chip transient congestion detection device, comprising:

[0032] An acquisition module is used to obtain the resource occupancy rate of the chip port queue;

[0033] A capture module is used to determine whether the port queue meets a preset transient congestion capture condition based on the resource occupancy rate, and when the transient congestion capture condition is met, trigger a preset capture engine to enter a transient congestion capture state to capture transient congestion event information of the port queue;

[0034] The storage module is used to store the captured instantaneous congestion event information.

[0035] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory storing program instructions, wherein the processor is configured to execute the on-chip transient congestion detection method provided in the above embodiment when executing the program instructions.

[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable medium having computer-readable instructions stored thereon, and the computer-readable instructions are executed by a processor to implement the on-chip transient congestion detection method provided in the above embodiment.

[0037] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:

[0038] The transient congestion detection method provided in the embodiments of the present application determines whether the transient congestion capture conditions are met based on the resource usage of the port. When the capture conditions are met, the preset capture engine is controlled to enter the transient congestion capture state, capturing and storing transient congestion event information on the chip. This method can capture and record transient congestion events within their extremely short duration, facilitating subsequent analysis and reducing the impact of transient congestion traffic on network and application performance. The capture granularity can be accurate to the port queue level.

[0039] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0041] Figure 1 This is a flow chart showing a method for detecting transient congestion on a chip according to an exemplary embodiment;

[0042] Figure 2 is a schematic diagram showing a method for detecting transient congestion on a chip according to an exemplary embodiment;

[0043] Figure 3 is a schematic diagram showing a method for detecting transient congestion on a chip according to an exemplary embodiment;

[0044] Figure 4 is a schematic diagram showing a condition for detecting instantaneous congestion flow according to an exemplary embodiment;

[0045] Figure 5 is a schematic structural diagram of a transient congestion detection device on a chip according to an exemplary embodiment;

[0046] Figure 6 is a schematic structural diagram of an electronic device according to an exemplary embodiment;

[0047] Figure 7 It is a schematic diagram of a computer storage medium according to an exemplary embodiment. DETAILED DESCRIPTION

[0048] The following description and the drawings sufficiently illustrate specific embodiments of the invention to enable those skilled in the art to practice them.

[0049] It should be understood that the embodiments described are only a portion of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative work are within the scope of protection of the present invention.

[0050] In the following description, unless otherwise indicated, identical numbers in different figures represent identical or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of systems and methods consistent with certain aspects of the present invention, as detailed in the appended claims.

[0051] The instantaneous congestion detection method on a chip provided by the embodiment of the present application will be described in detail below with reference to the accompanying drawings. Figure 1 , the method specifically includes the following steps.

[0052] S101 obtains the resource occupancy rate of the chip port queue.

[0053] In one embodiment, transient congestion traffic on a switch chip is detected, specifically the resource usage of ports or port queues within the chip. Those skilled in the art may, based on actual needs, detect transient port congestion events or more finely granularly monitor the resource usage of each queue within a port.

[0054] In one possible implementation, capture sources are divided into event capture and background scanning capture. Event capture refers to the on-chip resource changes caused by data packets entering or exiting a port or port queue. Therefore, when data packets enter or exit, the port resource utilization rate or port queue resource utilization rate is collected. Background scanning supplements event capture and scans on-chip resources when event capture is not occurring.

[0055] S102 determines whether the port queue meets the preset transient congestion capture condition according to the resource occupancy rate. When the transient congestion capture condition is met, a preset capture engine is triggered to enter the transient congestion capture state to capture transient congestion event information of the port queue.

[0056] In one exemplary embodiment, multiple capture engines are pre-configured on the switch chip, each supporting multiple ports and queues. The number of capture engines can be flexibly increased or decreased based on the number of ingress and egress planes in the chip and the number of ports or queues required for detection. For example, a capture engine can be configured for each port, or more finely granularly, a capture engine can be configured for each queue. Those skilled in the art can customize this configuration based on actual needs.

[0057] Furthermore, based on the obtained resource occupancy of the port queue, determining whether to enter transient congestion capture includes: determining whether the resource occupancy rate of the port queue is greater than or equal to a preset upper threshold, and determining whether the enable switch of the port queue is in the on state. When the resource occupancy rate of the port queue is greater than or equal to the upper threshold and the enable switch is in the on state, determining that the port queue meets the preset transient congestion capture condition.

[0058] Among them, in the solution provided by the embodiment of the present application, the upper threshold limit can be dynamically adjusted based on the port queue rate and the current resource occupancy of the port queue. A dynamic threshold is built into the detection judgment, and the upper threshold limit is dynamically adjusted based on the port queue rate and the current port queue status. When the actual resource occupancy is high, the dynamic threshold is appropriately increased, thereby reducing the number of required captures, saving storage resources and chip power consumption. For port queues with different rates, by configuring different port queue rate coefficients, the number of static threshold configuration items is reduced, while ensuring that port queues with different rates use different upper threshold limits.

[0059] In one possible implementation, the upper threshold value may be determined according to the following formula:

[0060] Upper threshold = static threshold + port queue rate coefficient * (actual resource usage - static threshold);

[0061] Among them, the port queue rate coefficient and static threshold are software configuration items, which can be configured by those skilled in the art according to actual conditions, and are not specifically limited in the embodiments of this application.

[0062] Furthermore, after determining that the port queue meets the preset transient congestion capture condition, a preset capture engine is triggered to enter a transient congestion capture state to capture transient congestion event information of the port.

[0063] In an optional embodiment, the capture engine captures the capture start time, capture port or port queue number, capture end time, instantaneous congestion peak value, and the total number of times the port or port queue enters the capture state. A capture counter is set in the capture state to count the total number of times the port or port queue enters the capture state.

[0064] After entering the capture state, it also includes determining whether the instantaneous congestion event has ended. In an exemplary embodiment, it also includes setting a lower threshold to determine whether the current port resource occupancy rate is less than the preset lower threshold; when the port resource occupancy rate is less than the preset lower threshold, the preset capture engine is triggered to exit the instantaneous congestion capture state. In addition, it also includes a software-configurable maximum capture exit time. When the capture state lasts for more than this preset capture time threshold, the capture engine exits the capture state. This function ensures that when a port is congested for a long time, other ports can still be captured in the same engine. Among them, the specific value of the preset capture time threshold can be set according to actual conditions.

[0065] The lower threshold can be a fixed value, such as one set based on a static threshold, or a dynamic value that automatically adjusts to the upper threshold based on the port speed and actual resource usage. For example, the lower threshold is determined using the following formula: Lower threshold = Upper threshold - Fluctuation coefficient. The fluctuation coefficient can be customized based on actual conditions. Using different upper and lower thresholds effectively mitigates false captures caused by resource jitter near a single threshold.

[0066] According to this step, transient congestion on the switch chip can be detected, and information such as the start time information, end time information, burst spike value, and port queue number entering the capture state of the transient congestion event can be captured.

[0067] Each transient congestion capture engine can provide the CPU with real-time access to the following status information: whether it is currently in transient congestion monitoring; the port number and queue number of the currently monitored transient congestion; the maximum resource occupancy of the currently detected transient congestion port number; and the total number of transient congestion detections that have occurred.

[0068] S103 stores the captured instantaneous congestion event information.

[0069] In one possible implementation, a cache module is set up in each transient congestion capture engine to temporarily store the captured data before the transient congestion event information is stored in the shared memory. There is also a built-in merging mechanism in the cache to merge the capture events of the same port or the capture events of the same port queue within a software-configurable time window, thereby reducing storage space and reducing the bandwidth required for software access.

[0070] Specifically, the instantaneous congestion event information is stored in a cache module of the capture engine, and the instantaneous congestion events within a preset merging time window stored in the cache module are merged to obtain merged instantaneous congestion event information.

[0071] In one embodiment, instantaneous congestion events for the same port or the same port queue within a preset merge time window are obtained and merged. The maximum resource occupancy rate of all instantaneous congestion events within the preset merge time window is used as the maximum resource occupancy rate of the merged instantaneous congestion event; the sum of the number of all instantaneous congestion events within the preset merge time window is used as the number of merged instantaneous congestion events; the minimum capture start time of all instantaneous congestion events within the preset merge time window is used as the capture start time of the merged instantaneous congestion event; and the maximum capture end time of all instantaneous congestion events within the preset merge time window is used as the capture end time of the merged instantaneous congestion event.

[0072] like Figure 4The figure shows the port resource usage. Capture is triggered when the resource usage exceeds the upper threshold and ends when it falls below the lower threshold. A merge window is set to merge transient congestion events within the specified time period.

[0073] Furthermore, in the instantaneous congestion detection solution provided by this application, in order to improve storage efficiency and save chip resources, a fixed-depth shared storage space is allocated according to actual needs to store the recorded data generated by all capture engines. This shared storage space only requires a single-port static random access memory (SRAM). The capture engine can store the merged instantaneous congestion event information in a shared storage module for the CPU to read the instantaneous congestion traffic detection data at any time. Compared with real-time reporting, it saves a lot of CPU access path bandwidth.

[0074] In an optional embodiment, the combined transient congestion event information can be stored in a remote sensing packetizer, and the transient congestion information can be inserted into the LNS (local name space) field of the IFA (Inband Flow Analyzer) packet. This expands the function of sending the local switch's transient congestion information in the form of a network remote sensing data packet. This allows the acquisition of transient congestion capture information without involving the CPU.

[0075] In order to facilitate understanding of the instantaneous congestion detection method on a chip provided in the embodiment of the present application, the following is a Figure 2 Provide explanation.

[0076] like Figure 2 As shown, the instantaneous congestion detection method provided in the embodiment of the present application includes the steps of background scanning, event change scanning, detection and judgment, state capture, caching, and storage.

[0077] First, the system captures on-chip resource changes when packets enter and exit the port, as well as on-chip resource usage when no packets are entering or exiting. It then performs a test to determine whether to enter transient congestion capture. This includes determining whether the port's resource utilization is greater than or equal to the preset upper threshold and whether the port's enable switch is on. If the port's resource utilization is greater than or equal to the upper threshold and the enable switch is on, the port is determined to meet the preset transient congestion capture conditions. Once the capture conditions are determined to be met, the capture engine is triggered to perform state capture and record information such as the start and end time of the transient congestion event, the burst spike value, and the port queue number that entered the capture state.

[0078] Furthermore, the transient congestion event information is stored in the capture engine's cache module. The transient congestion events stored in the cache module within a preset merging time window are merged to obtain merged transient congestion event information. The capture engine can store the merged transient congestion event information in a shared storage module, allowing the CPU to read the transient congestion traffic detection data. The merged transient congestion event information can also be stored in a remote sensing packetizer, thereby expanding the functionality of transmitting the local switch's transient congestion information in the form of network remote sensing data packets.

[0079] In order to facilitate understanding of the instantaneous congestion detection method on a chip provided in the embodiment of the present application, the following is a Figure 3 Provide explanation.

[0080] like Figure 3 As shown, the transient congestion detection method provided by an embodiment of the present application includes: first, obtaining on-chip resource changes when data packets enter and exit the port, as well as on-chip resource occupancy when no data packets enter or exit. Then, a detection judgment is performed to determine whether to enter transient congestion capture. This includes: determining whether the resource occupancy rate of the port is greater than or equal to a preset upper threshold, and determining whether the enable switch of the port is in the on state. When the resource occupancy rate of the port is greater than or equal to the upper threshold and the enable switch is in the on state, it is determined that the port meets the preset transient congestion capture conditions.

[0081] Furthermore, it is determined whether the capture time has timed out and whether the resource occupancy rate is lower than a lower threshold. If the capture time has timed out or the resource occupancy rate is lower than a lower threshold, the capture state is exited and the capture information is saved.

[0082] According to the transient congestion detection method provided in the embodiments of the present application, whether the transient congestion capture conditions are met is determined based on the port's resource usage. When the capture conditions are met, a preset capture engine is controlled to enter the transient congestion capture state, capturing and storing transient congestion event information on the chip. This method can capture and record transient congestion events within their extremely short duration, facilitating subsequent analysis and reducing the impact of transient congestion traffic on network and application performance.

[0083] The proposed instant congestion detection solution for switch chips provides highly flexible and configurable capture and recording based on sudden events. While ensuring fine-grained detection, it can adaptively adjust the capture window and frequency, saving chip resources and CPU bandwidth during the detection process. This solution is applicable to both egress and ingress ports and queues and does not rely on the chip's internal main data path.

[0084] The present application also provides an on-chip transient congestion detection device, which is used to execute the on-chip transient congestion detection method of the above embodiment, such as Figure 5As shown, the device includes:

[0085] An acquisition module 501 is used to acquire the resource occupancy rate of a chip port queue;

[0086] Capture module 502, configured to determine whether a port queue meets a preset transient congestion capture condition based on resource occupancy, and when the transient congestion capture condition is met, trigger a preset capture engine to enter a transient congestion capture state to capture transient congestion event information of the port queue;

[0087] The storage module 503 is configured to store the captured transient congestion event information.

[0088] It should be noted that the on-chip transient congestion detection device provided in the above embodiment, when executing the on-chip transient congestion detection method, only uses the division of the above-mentioned functional modules as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the on-chip transient congestion detection device provided in the above embodiment and the on-chip transient congestion detection method embodiment are based on the same concept. The implementation process is detailed in the method embodiment and will not be repeated here.

[0089] An embodiment of the present application further provides an electronic device corresponding to the on-chip transient congestion detection method provided in the aforementioned embodiment, so as to execute the above-mentioned on-chip transient congestion detection method.

[0090] Please refer to Figure 6 , which shows a schematic diagram of an electronic device provided by some embodiments of the present application. Figure 6 As shown, the electronic device includes: a processor 600, a memory 601, a bus 602 and a communication interface 603, and the processor 600, the communication interface 603 and the memory 601 are connected via the bus 602; the memory 601 stores a computer program that can be run on the processor 600, and when the processor 600 runs the computer program, it executes the on-chip transient congestion detection method provided in any of the aforementioned embodiments of the present application.

[0091] The memory 601 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage. The system network element communicates with at least one other network element via at least one communication interface 603 (which may be wired or wireless), and may utilize the Internet, a wide area network, a local area network, a metropolitan area network, or the like.

[0092] Bus 602 may be an ISA bus, a PCI bus, or an EISA bus. Buses may be classified as address buses, data buses, and control buses. Memory 601 is used to store programs, and processor 600 executes the programs upon receiving execution instructions. The on-chip transient congestion detection method disclosed in any of the aforementioned embodiments of the present application may be applied to, or implemented by, processor 600.

[0093] The processor 600 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor 600 or by software instructions. The above processor 600 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory 601 , and the processor 600 reads the information in the memory 601 and completes the steps of the above method in combination with its hardware.

[0094] The electronic device provided in the embodiment of the present application and the instantaneous congestion detection method on a chip provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented by them.

[0095] The present application also provides a computer-readable storage medium corresponding to the on-chip transient congestion detection method provided in the above embodiment. Figure 7 The computer-readable storage medium shown is a CD 700 on which a computer program (ie, a program product) is stored. When the computer program is run by a processor, it executes the on-chip transient congestion detection method provided by any of the aforementioned embodiments.

[0096] It should be noted that examples of computer-readable storage media may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.

[0097] The computer-readable storage medium provided in the above-mentioned embodiments of the present application and the on-chip transient congestion detection method provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.

[0098] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0099] The above embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.

Claims

1. A method for detecting transient congestion on a chip, characterized in that: include: Get the resource occupancy rate of the chip port queue; Determine whether the resource usage of the port queue is greater than or equal to the preset upper threshold; Determine whether the port queue enable switch is on; When the resource occupancy rate of the port queue is greater than or equal to the upper threshold and the enable switch is in the on state, it is determined that the port queue meets the preset transient congestion capture condition; wherein the upper threshold is dynamically adjusted according to the port queue rate and the current resource occupancy rate of the port queue; different upper thresholds are used for port queues with different rates; the upper threshold can be determined according to the following formula: upper threshold = static threshold + port queue rate coefficient * (actual resource occupancy - static threshold); When the transient congestion capture condition is met, a preset capture engine is triggered to enter the transient congestion capture state to capture the transient congestion event information of the port queue; multiple capture engines are pre-configured on the switch chip, one capture engine is configured for each port, or a capture engine is configured for each queue in a more fine-grained manner; The instantaneous congestion event information is stored in a cache module of a capture engine; the instantaneous congestion events within a preset merging time window stored in the cache module are merged to obtain merged instantaneous congestion event information; the merged instantaneous congestion event information is stored in a storage module and / or a remote sensing packager.

2. The method according to claim 1, characterized in that After the preset capture engine is triggered to enter the transient congestion capture state, the following also occurs: Determine whether the current port queue resource occupancy rate is less than the preset lower threshold; When the port queue resource occupancy rate is lower than the preset lower threshold, the preset capture engine is triggered to exit the transient congestion capture state; Determine whether the instantaneous congestion capture time of the current port queue is greater than the preset capture time threshold; When the instantaneous congestion capture time of the port queue is greater than the preset capture time threshold, the preset capture engine is triggered to exit the instantaneous congestion capture state.

3. The method according to claim 1, characterized in that Captures instantaneous congestion event information of port queues, including: Captures the capture start time, capture port queue number, capture end time, instantaneous congestion peak value, and the total number of times the port queue enters the capture state.

4. The method according to claim 1, wherein Merging the instantaneous congestion events within the preset merging time window stored by the cache module to obtain merged instantaneous congestion event information, including: Obtain the maximum resource occupancy rate of all instantaneous congestion events within the preset merging time window as the maximum resource occupancy rate of the merged instantaneous congestion event; Obtain the sum of the numbers of all instantaneous congestion events within the preset merging time window as the merged number of instantaneous congestion events; Obtaining the minimum capture start time of all transient congestion events within the preset merging time window as the capture start time of the merged transient congestion event; The maximum capture end time of all transient congestion events within the preset merging time window is obtained as the capture end time of the merged transient congestion event.

5. A transient congestion detection device on a chip, characterized in that: include: An acquisition module is used to obtain the resource occupancy rate of the chip port queue; The capture module is used to determine whether the resource utilization rate of the port queue is greater than or equal to the preset upper threshold; Determine whether the port queue enable switch is on; When the resource occupancy rate of the port queue is greater than or equal to the upper threshold, and the enable switch is in the on state, it is determined that the port queue meets the preset transient congestion capture condition; wherein, the upper threshold is dynamically adjusted according to the port queue rate and the current resource occupancy rate of the port queue; the upper threshold can be determined according to the following formula: upper threshold = static threshold + port queue rate coefficient * (actual resource occupancy - static threshold); different upper thresholds are used for port queues with different rates; when the transient congestion capture condition is met, a preset capture engine is triggered to enter the transient congestion capture state, and the transient congestion event information of the port queue is captured; A storage module, configured to store the captured transient congestion event information; The on-chip transient congestion detection device is further configured to pre-configure multiple capture engines on the switch chip, configuring one capture engine for each port, or more finely granularly configuring one capture engine for each queue; storing the transient congestion event information in a cache module of the capture engine; merging the transient congestion events within a preset merging time window stored in the cache module to obtain merged transient congestion event information; and storing the merged transient congestion event information in a storage module and / or a remote sensing packetizer.

6. An electronic device, characterized in that: The system comprises a processor and a memory storing program instructions, wherein the processor is configured to execute the on-chip transient congestion detection method according to any one of claims 1 to 4 when executing the program instructions.

7. A computer-readable medium, characterized in that Computer-readable instructions are stored thereon, and the computer-readable instructions are executed by a processor to implement the on-chip transient congestion detection method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Congestion management in managed packet-switched networks

    US6473398B1