Method, switch, module and system for traffic management in a tree topology of switches
By monitoring the switch load in real time and building traffic sharing links, the problem of difficult load balancing of PCIe switches in high-concurrency scenarios is solved, efficient traffic management and load balancing are achieved, and system performance and stability are improved.
Patent Information
- Application Number
- CN202510875913.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-06-27
AI Technical Summary
Existing PCIe switches cannot effectively cope with sudden and dynamically changing traffic patterns in high-concurrency scenarios, resulting in load balancing difficulties and congestion on single paths, affecting system performance and user experience.
By monitoring the switch uplink load in real time, dynamically identifying busy switches and introducing sharing switches, building traffic sharing links, using the traffic management module to coordinate traffic transfer between switches, and using sharing registers to store device IDs and handover records, flexible traffic management and load balancing are achieved.
It improves the overall throughput and response time of the system, enhances the stability and reliability of the system, avoids performance bottlenecks caused by single-point congestion, and achieves efficient traffic sharing and load balancing.
Smart Images

Figure CN120416167B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a traffic management method, switch, module and system for a switch tree topology. Background Art
[0002] As data center networks grow in size and complexity, PCIe (Peripheral Component Interconnect Express) switches play a crucial role in interconnecting multiple devices. In large-scale parallel computing environments, multiple PCIe switches are connected via a tree topology to support high-bandwidth and low-latency data transmission. However, this architecture faces severe load balancing and traffic management challenges in the face of growing network traffic and complex application scenarios. In high-concurrency scenarios, congestion on a single path is particularly prominent, severely hindering overall performance improvements.
[0003] Currently, most PCIe switches use static priority assignment strategies that lack flexibility and are unable to effectively handle sudden and dynamically changing traffic patterns, leading to poor resource utilization. These approaches typically rely on pre-set rules or periodic load monitoring to adjust data transmission paths. While these methods can alleviate congestion to a certain extent, they often fail to respond promptly to transient changes in traffic patterns, resulting in overall performance instability.
[0004] First, static priority allocation strategies lack flexibility and cannot adapt to changing real-time traffic characteristics, such as bandwidth utilization and latency sensitivity. Second, simple load balancing strategies struggle to accurately predict and handle traffic bursts, leading to overloaded paths and idleness in others, impacting overall system throughput and response time. Furthermore, when a path experiences high load, existing solutions are unable to quickly and effectively shift traffic to other paths. This can lead to performance bottlenecks across the entire system, impacting user experience and overall system performance.
[0005] The disclosure of the above background technology content is only used to assist in understanding the inventive concept and technical solution of the present invention. It does not necessarily belong to the prior art of the present application, nor does it necessarily provide technical guidance. In the absence of clear evidence that the above content has been disclosed before the filing date of the present application, the above background technology should not be used to evaluate the novelty and creativity of the present application. Summary of the Invention
[0006] The purpose of the present invention is to provide a traffic management method, switch, module and system for a switch tree topology, which can achieve flexible traffic management and load balancing, and improve the overall performance and stability of the switch tree topology.
[0007] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0008] A method for managing traffic in a tree-type switch topology includes the following steps:
[0009] Configuring electrical connections between switches at the same level in a switch tree topology;
[0010] Monitor the uplink load of each switch in real time, and determine whether the uplink traffic of the switch needs to be shared based on the preset correspondence between the uplink load and the traffic sharing requirement. If so, determine that the switch is a busy switch;
[0011] Determine a peer switch corresponding to the busy switch, and determine whether there is a peer switch that supports sharing the uplink traffic of the busy switch; if so, determine the peer switch that supports sharing the uplink traffic of the busy switch as a sharing switch;
[0012] Some downstream devices of the busy switch are determined to be handover devices, and the data transmission path between the handover devices and the upper-level devices of the busy switch is switched from data transmission through the uplink of the busy switch to data transmission through the uplink of the sharing switch.
[0013] Furthermore, any one of the above technical solutions or a combination of multiple technical solutions may further include the following steps:
[0014] A traffic management module is configured for each group of peer switches, and the traffic management module is electrically connected to each peer switch in the group of peer switches;
[0015] In response to determining that a busy switch exists, the traffic management module sends a query signal to a switch at the same level as the busy switch, asking whether traffic sharing is supported. Specifically, each switch may monitor its own uplink load and determine whether there is a traffic sharing requirement. In response to the busy switch having the traffic sharing requirement, the busy switch sends a traffic sharing request to the traffic management module. In response to receiving the traffic sharing request, the traffic management module determines that there is a busy switch. Alternatively, the traffic management module may monitor the uplink load of each switch and determine whether there is a busy switch.
[0016] The sharing switch supporting traffic sharing replies a first response signal to the traffic management module;
[0017] In response to receiving the first response signal, the traffic management module constructs a traffic sharing link from the busy switch to the traffic management module, then to the sharing switch, and then to the upper-level device;
[0018] The handover device transmits data with the upper-level device of the busy switch through the traffic sharing link.
[0019] Furthermore, any one of the above technical solutions or a combination of multiple technical solutions may further include the following steps:
[0020] In response to receiving the traffic sharing request, the traffic management module further sends a query signal to the upper-level device of the busy switch whether traffic sharing is supported;
[0021] If the upper-level device supports traffic sharing, it replies with a second response signal to the traffic management module;
[0022] The traffic management module establishes the traffic sharing link in response to receiving the first response signal and the second response signal.
[0023] Furthermore, according to any one of the above technical solutions or a combination of multiple technical solutions, a sharing register is pre-set in each switch, the sharing register including a first area and a second area, the first area is configured to store a handover device ID, and the second area is configured to store a receiving device ID. For the sharing switch, the handover device of the busy switch is the receiving device of the sharing switch;
[0024] The traffic sharing link is constructed in the following manner:
[0025] The busy switch writes the handover device ID of the handover device into the first area of its shared register and sends the handover device ID to the traffic management module, and does not transmit data between the handover device and the upper-level device through the uplink of the busy switch;
[0026] The traffic management module sends the handover device ID to the sharing switch;
[0027] The sharing switch writes the handover device ID into the second area of its sharing register and determines it as the accommodating device ID, and performs data transmission between the handover device and the upper-level device through the uplink of the sharing switch.
[0028] Further, based on any one of the above technical solutions or a combination of multiple technical solutions, the sharing register of each switch further includes a third area, the third area is configured to store a device handover record, and the handover record includes a transfer path of the handover device;
[0029] The upper-level device is an upper-level switch of the busy switch, and the upper-level switch is configured to store the handover record in the third area of its shared register.
[0030] Further, based on any one of the above technical solutions or a combination of multiple technical solutions, the preset correspondence between the uplink load and the traffic sharing requirement includes: if the uplink load of the switch is greater than a preset first load threshold, then determining that the switch has a traffic sharing requirement; and / or,
[0031] The switches in the switch tree topology are PCIe switches.
[0032] Further, based on any one of the above technical solutions or a combination of multiple technical solutions, the evaluation parameters of the uplink load of the switch include one or more of packet loss rate, bit error rate and stability of the level signal;
[0033] If the packet loss rate of the switch exceeds a preset first packet loss rate threshold, and / or the bit error rate of the switch exceeds a preset first bit error rate threshold, and / or the stability of the level signal of the switch does not meet the preset requirements, it is determined that the switch has a traffic sharing requirement.
[0034] Furthermore, based on any one of the above technical solutions or a combination of multiple technical solutions, it is determined whether there is a sharing switch that supports sharing the busy switch traffic by the following method:
[0035] Determining peer switches corresponding to the busy switch, and determining an uplink load of each of the peer switches;
[0036] According to the preset correspondence between the uplink load and the supported traffic sharing, it is determined whether there is a switch at the same level that supports traffic sharing. If so, the switch at the same level that supports sharing the busy switch traffic is determined to be the sharing switch; if not, it is determined that the sharing switch does not exist.
[0037] Furthermore, based on any one of the above technical solutions or a combination of multiple technical solutions, the preset correspondence between the uplink load and the supported traffic sharing includes:
[0038] If the uplink load of the switch at the same level is not greater than a preset second load threshold, the switch at the same level supports traffic sharing.
[0039] Furthermore, according to any one of the aforementioned technical solutions or a combination of multiple technical solutions, the uplink loads of multiple switches at the same level are compared, and the switch at the same level with the smallest uplink load is determined as the sharing switch.
[0040] Furthermore, based on any one of the above technical solutions or a combination of multiple technical solutions, it is determined whether there is a sharing switch that supports sharing the busy switch traffic by the following method:
[0041] Determine a switch at the same level as the busy switch;
[0042] And determine the peer switch with the smallest uplink load as the target peer switch;
[0043] Determine whether the uplink load corresponding to the target peer switch is not greater than a preset second load threshold; if so, determine that the target peer switch is a sharing switch; if not, determine that there is no sharing switch that supports sharing the busy switch traffic.
[0044] Further, based on any one of the above technical solutions or a combination of multiple technical solutions, the busy switch determines that some of its downstream devices are the handover devices in the following manner:
[0045] Determine the task priority of the downstream device of the busy switch, wherein the more urgent the data to be sent by the downstream device is, the higher the corresponding task priority is;
[0046] One or more downstream devices with low task priority are determined as the handover devices.
[0047] Further, based on any one of the above technical solutions or a combination of multiple technical solutions, the busy switch determines that some of its downstream devices are the handover devices in the following manner:
[0048] The traffic priority corresponding to each downstream device is calculated by the following formula: traffic priority = α × delay sensitivity + β × bandwidth occupancy, where α is the delay sensitivity coefficient, 0 < α < 1, β is the bandwidth occupancy coefficient, 0 < β < 1, and α + β = 1;
[0049] If the traffic priority of the downstream device is lower than the preset traffic priority threshold, then the downstream device is indeed the handover device; alternatively, multiple downstream devices are sorted in order from low to high according to the traffic priority, and one or more downstream devices sorted first are determined to be the handover devices.
[0050] Further, based on any one of the above technical solutions or a combination of multiple technical solutions, if multiple busy switches are included, the busy switches with large uplink loads are preferentially matched with the sharing switches. Specifically, the busy switches are sorted in descending order of uplink load, and the busy switches with the highest sorting levels are matched with the sharing switches to establish the corresponding traffic sharing links; and / or,
[0051] If there are multiple sharing switches, the sharing switch with the smallest uplink load is preferentially matched to the busy switch. Specifically, the sharing switches are sorted in ascending order of uplink load, and the sharing switch with the highest sorting order is matched to the busy switch to establish the corresponding traffic sharing link.
[0052] According to another aspect of the present invention, a switch is provided, which is configured as a switch in a switch tree topology, and is configured to perform data transmission based on the traffic management method for the switch tree topology as described in any one of the above technical solutions or a combination of multiple technical solutions.
[0053] According to another aspect of the present invention, there is provided a traffic management module applicable to a switch tree topology, wherein the switch tree topology has one or more groups of peer switches, and the traffic management module corresponds one-to-one to the multiple groups of peer switches;
[0054] For each group of switches at the same level, the traffic management module is electrically connected to each switch respectively;
[0055] In response to receiving a traffic sharing request sent to it by a switch, or detecting that uplink traffic of a switch needs to be shared, the traffic management module determines that the switch is a busy switch, and sends an inquiry signal to other switches electrically connected to it, asking whether traffic sharing is supported;
[0056] If the traffic management module receives a response signal indicating support for traffic sharing returned by another switch, the traffic management module determines that the switch that returns the response signal indicating support for traffic sharing is a sharing switch, and the traffic management module establishes a traffic sharing link. The traffic sharing link is for transmitting data between some downstream devices of the busy switch and an upstream device of the busy switch through the sharing switch.
[0057] According to another aspect of the present invention, there is provided a data transmission system, the data transmission system comprising a plurality of switches, wherein the plurality of switches form a switch tree topology structure;
[0058] The data transmission system performs data transmission based on the traffic management method for the switch tree topology as described in any one of the above technical solutions or a combination of multiple technical solutions.
[0059] The beneficial effects brought about by the technical solution provided by the present invention are as follows:
[0060] a. This invention proposes an efficient and dynamic traffic sharing mechanism. By dynamically identifying busy switches in real time and introducing less busy switches of the same level as sharing switches, when traffic on a particular link becomes busy, the system can quickly shift some of the traffic to the traffic sharing link built around the sharing switches, handing some downstream devices from the busy switches to other less busy switches. This avoids performance bottlenecks caused by single-point congestion, improving the overall throughput and response time of the data transmission system while also enhancing system stability and reliability.
[0061] b. The proposed technical solution offers enhanced real-time adaptability: By employing a dynamic priority algorithm, it can evaluate the traffic priorities of downstream devices of busy switches in real time and dynamically adjust device priorities based on real-time traffic characteristics such as bandwidth utilization and delay sensitivity. This flexibility enables the system to maintain high performance under varying traffic patterns, avoiding the limitations of traditional static priority allocation strategies and the performance instability that can result from such allocations, thereby improving system responsiveness and throughput.
[0062] c. The intelligent traffic management method proposed in the present invention has strong reliability, wide applicability and good scalability: the traffic management module can intelligently process traffic sharing requests and coordinate traffic transfer between upstream and downstream switches. By confirming the uplink load status of the same-level switch and the downlink load of the upper-level device, the traffic management module can make decisions quickly, and by setting a sharing register in each switch, configuring the first area, the second area and the third area in the sharing register, which correspond to the storage of the transfer device ID, the receiving device ID and the transfer record respectively, efficient data forwarding and management are achieved. In this way, no matter whether the switch is a busy switch, a sharing switch or an upper-level switch, the traffic management method proposed in this application can be stably and reliably applied, which also reduces the hardware development cost of the switch and improves the scalability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] 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, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0064] Figure 1 A schematic diagram of a PCIe switch tree topology structure provided by an exemplary embodiment of the present invention;
[0065] Figure 2 A schematic diagram of the principle of creating a traffic sharing link provided by an exemplary embodiment of the present invention;
[0066] Figure 3 A flow chart of a traffic management method provided for an exemplary embodiment of the present invention;
[0067] Figure 4 A flow chart of a traffic sharing mechanism provided for an exemplary embodiment of the present invention;
[0068] Figure 5 A schematic diagram of a question-answer signal transmission process during establishment of a traffic sharing link provided by an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0069] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part 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 ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0070] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0071] In one embodiment of the present invention, a method for managing traffic in a tree topology of a switch is provided. Figure 1 As shown, the method includes the following steps:
[0072] Configuring electrical connections between switches at the same level in a switch tree topology;
[0073] Monitor the uplink load of each switch in real time, and determine whether the uplink traffic of the switch needs to be shared based on the preset correspondence between the uplink load and the traffic sharing requirement. If so, determine that the switch is a busy switch;
[0074] Determine a peer switch corresponding to the busy switch, and determine whether there is a peer switch that supports sharing the uplink traffic of the busy switch; if so, determine the peer switch that supports sharing the uplink traffic of the busy switch as a sharing switch;
[0075] Some downstream devices of the busy switch are determined to be handover devices, and the data transmission path between the handover devices and the upper-level devices of the busy switch is switched from data transmission through the uplink of the busy switch to data transmission through the uplink of the sharing switch.
[0076] In this embodiment, if Figure 1 As shown, the module is initialized in advance, for example, by polling the device through other connections (IIC, SPI, etc.), obtaining the PCIe version information of the switch device and its connected upper and lower level devices, establishing a switch tree topology based on the polling results, and determining the same-level switches and upper level devices in the PCIe switch tree topology.
[0077] It should be noted that, in this application, the upper-level device can be the upper-level switch corresponding to the same-level switch or other upper-level devices such as CPU, GPU, etc. Figure 1 As shown in the figure, Switch B and Switch C are switches at the same level, and Switch A is the upper-level switch of Switch B and Switch C. Figure 1 In the example, Switch B and Switch C are directly connected to the CPU, so the upper-level device of Switch B and Switch C is the CPU. In addition, in a PCIe switch tree topology, there can be multiple groups of switches at the same level, such as Figure 1 Multiple switches of the same level can be set below Switch B in the example, and the number of switches of the same level in each group must be at least two.
[0078] For example, in this embodiment, a traffic management module is configured for each group of switches at the same level. The traffic management module is electrically connected to each switch in the group of switches at the same level and the upper-level device corresponding to the group of switches.
[0079] Specifically, if Figure 1As shown in the figure, the traffic management module queries the BDF (BUS, DEVICE, FUNCTION) numbers of the switch itself and its downstream devices. Based on the BDF information, it determines the hierarchical relationship of the switches in the tree topology. For example, if the BUS number of Switch A is 1 and the BUS numbers of its downstream devices are 3, 4, and 7, and the BUS number of Switch B is 3 and that of Switch C is 7, it can be determined that Switch B and Switch C are directly connected to Switch A and are at the same level. Therefore, they can share traffic with each other.
[0080] A sharing register is set in each switch, and the sharing register includes a first area, a second area and a third area. The first area is configured to store the handover device ID, the second area is configured to store the receiving device ID, and the third area is configured to store the device handover record.
[0081] like Figure 1 and Figure 2 As shown, a sharing register is set in Switch A, Switch B, and Switch C respectively, and the sharing register is divided into three areas: Area A, i.e., the first area, is used to store the handover device ID; Area B, i.e., the second area, is used to store the receiving device ID; and Area C, i.e., the third area, is used to store the handover record of the downstream device.
[0082] In this embodiment, each peer switch may monitor its own uplink load. Based on a preset correspondence between the uplink load and the traffic sharing requirement, the peer switch determines whether it has a demand for uplink traffic to be shared. If so, the switch is a busy switch, and the busy switch sends a traffic sharing request to the traffic management module.
[0083] The correspondence between the preset uplink load and the traffic sharing requirement can be set in a variety of ways. In one approach, the correspondence between the preset uplink load and the traffic sharing requirement includes determining that the switch has a traffic sharing requirement if the uplink load of the switch is greater than a preset first load threshold. Specifically, the uplink load of the switch can be comprehensively evaluated / calculated based on indicators such as packet loss rate, bit error rate, and jitter of the level signal.
[0084] Another approach is to directly preset the correspondence between uplink load and traffic sharing requirements based on uplink load evaluation parameters, such as packet loss rate, bit error rate, and level signal stability. For example, it can be set to determine that a switch has traffic sharing requirements if one or more of the following conditions are met:
[0085] If the packet loss rate of the switch exceeds a preset first packet loss rate threshold;
[0086] The bit error rate of the switch exceeds a preset first bit error rate threshold;
[0087] The stability of the level signal of the switch does not meet the preset requirements, for example, the jitter amplitude and frequency of the level signal exceed the preset range.
[0088] like Figures 3 to 5 As shown, in response to receiving the traffic sharing request, the traffic management module sends a query signal to the busy switch's peer switch and the busy switch's upstream device, asking whether traffic sharing is supported. The sharing switch that supports traffic sharing replies with a first response signal to the traffic management module. If the upstream device supports traffic sharing, it replies with a second response signal to the traffic management module; otherwise, it returns a rejection signal (NACK). In response to receiving the first and second response signals, or otherwise returning a rejection signal (NACK), the traffic management module establishes a traffic sharing link from the busy switch to the traffic management module, then to the sharing switch, and then to the upstream device. The handover device transmits data with the busy switch's upstream device via the traffic sharing link. It should be noted that this data transmission path is bidirectional, including both a data transmission path from the handover device through the busy switch, the traffic management module, and the sharing switch to the upstream device, and a data transmission path from the upstream device through the sharing switch, the traffic management module, and the busy switch to the handover device.
[0089] Determining whether a sharing switch supports traffic sharing is performed by determining a peer switch corresponding to the busy switch. Based on a preset correspondence between uplink load and traffic sharing support, determining whether a peer switch supports traffic sharing is determined. If so, determining the peer switch that supports sharing traffic of the busy switch as the sharing switch.
[0090] For a peer switch, the corresponding relationship between its preset uplink load and support for traffic sharing can be: if the uplink load of the peer switch is not greater than a preset second load threshold, the peer switch supports traffic sharing. The second load threshold is less than the preset first load threshold. In this embodiment, the uplink loads of multiple peer switches are compared, and the peer switch with the smallest uplink load is determined to be the sharing switch.
[0091] You can also determine whether there is a sharing switch that supports sharing the busy switch traffic by:
[0092] Determining that a switch at the same level as the busy switch is a switch at the same level;
[0093] And determine the peer switch with the smallest uplink load as the target peer switch;
[0094] Determine whether the uplink load corresponding to the target peer switch is not greater than a preset second load threshold; if so, determine that the target peer switch is a sharing switch; if not, determine that there is no sharing switch that supports sharing the busy switch traffic.
[0095] Another approach is to directly preset the correspondence between uplink load and traffic sharing support based on uplink load evaluation parameters, such as packet loss rate, bit error rate, and level signal stability. For example, the correspondence can be set to support traffic sharing if the uplink load of the switch meets the following conditions:
[0096] If the packet loss rate of the switch does not exceed a preset second packet loss rate threshold, and the second packet loss rate threshold is less than the first packet loss rate;
[0097] The bit error rate of the switch does not exceed a preset second bit error rate threshold, and the second bit error rate threshold is less than the first bit error rate threshold;
[0098] The stability of the level signal of the switch meets the preset requirements, for example, the jitter amplitude and frequency of the level signal do not exceed the preset range.
[0099] For the upper-level device, the correspondence between its preset uplink load and supported traffic sharing is preferably set based on the upper-level device's downlink load / the traffic volume of the downstream device. Specifically, if the upper-level device's downlink load is less than a preset downlink load threshold, it is determined that the upper-level device supports traffic sharing. If the upper-level device's downlink load is not less than the preset downlink load threshold, it indicates that the upper-level device's downlink load is currently large. Even if the busy switch's peer switch supports traffic sharing, it is not appropriate to increase the upper-level device's downlink load through a traffic sharing link.
[0100] For upstream devices, traffic sharing support can be dynamically evaluated based on the actual traffic volume and traffic characteristics of the upstream device's downlink. Traffic volume and traffic characteristics can be determined based on the bandwidth usage and delay sensitivity of each downstream device (including multiple switches).
[0101] In this embodiment, during the process of establishing the traffic sharing link, the busy switch determines that some of its downstream devices are handover devices, and transmits the data to be transmitted by the handover devices to the upper-level device of the busy switch through the traffic sharing link.
[0102] In one embodiment of the present invention, the busy switch determines some of its downstream devices as handover devices by determining the task priorities of the busy switch's downstream devices, where the more urgent the data being sent, the higher the corresponding task priority; and then determining downstream devices with lower task priorities as handover devices. This embodiment uses downstream devices with lower task priorities as handover devices, transferring their data via the traffic sharing link.
[0103] In another embodiment of the present invention, the traffic priority of each downstream device is determined based on the real-time traffic characteristics of the downstream device of the switch, including bandwidth occupancy and delay sensitivity.
[0104] In this embodiment, the busy switch determines that some of its downstream devices are the handover devices in the following manner: the traffic priority corresponding to each of the downstream devices is calculated by the following formula: traffic priority = α × delay sensitivity + β × bandwidth occupancy, where α is the delay sensitivity coefficient, 0 < α < 1, and β is the bandwidth occupancy coefficient, 0 < β < 1. α and β can be set according to actual needs. Preferably, α + β = 1.
[0105] Based on these real-time traffic characteristics, the traffic priority of each downstream device of a busy switch is dynamically adjusted and a priority list is generated. Specifically, the PCIe switch integrates hardware counters that count traffic data passing through each port. These counters periodically activate a dynamic priority algorithm to monitor the bandwidth usage and delay sensitivity of downstream devices in real time. The algorithm then calculates the traffic priority of each downstream device based on the bandwidth usage and delay sensitivity.
[0106] Common counters can monitor:
[0107] Number of bytes sent / received: Counts the total number of bytes sent and received by each port within a certain monitoring window, thereby calculating the bandwidth utilization.
[0108] Number of packets: Counts the number of packets sent / received, which can be used to analyze the packet rate.
[0109] Delay counter: Assists in measuring delay and counts the queuing time and forwarding time of statistical packets within the Switch.
[0110] The traffic management module periodically reads the values of these hardware counters (for example, every few or tens of milliseconds). This sampling period needs to be set based on the actual application scenario and the real-time requirements. The device's delay sensitivity is its unique attribute, and bandwidth utilization is determined by monitoring. After the real-time traffic detection is completed, the Switch calculates the priority of each device according to the priority formula above, sorts multiple downstream devices in order of traffic priority from low to high to obtain a priority list, and determines one or more downstream devices ranked first as the handover device.
[0111] Of course, in other embodiments, the priority list may not be generated, and if the traffic priority of the downstream device is lower than the preset traffic priority threshold, the downstream device is determined to be the handover device, which can save the sorting operation.
[0112] During the process of establishing the traffic sharing link, the sharing register corresponding to the busy switch is determined to be a first sharing register, and the handover device ID of the handover device is written into a first area of the first sharing register. The busy switch determines not to forward to-be-sent data corresponding to these devices through its own uplink based on the device ID written into the first area.
[0113] The traffic management module transmits the handover device ID to the sharing switch, determines that the sharing register corresponding to the sharing switch is a second sharing register, and the sharing switch writes the handover device ID into the second area of the second sharing register. When the sharing switch determines that the device ID is written into the second area of its sharing register, the sharing switch forwards the to-be-sent data corresponding to these devices via its uplink to a shared upper-level device of the sharing switch and the busy switch.
[0114] In this embodiment, the upper-level device is an upper-level switch, which is configured to store the handover record in the third area of its traffic sharing register. The handover record includes the transfer path of the handover device. For example, if the original data transmission path of the handover device is from Switch B to Switch A (Switch B → Switch A), and according to the traffic sharing link, the handover device transfer path is from Switch B to Switch C and then to Switch A (Switch B → Switch C → Switch A), then the handover record may be "B to C to A" or "B change C," or other methods that can express the transfer path.
[0115] Specifically, if Figures 2 to 5As shown in the figure, when Switch B's uplink load is high, it sends a high-load interrupt (BUSY_IQR) to the traffic management module, requesting traffic sharing and establishing a traffic sharing link. For example, the uplink load threshold can be set to 80%. When the load exceeds 80%, traffic sharing is considered necessary.
[0116] The traffic management module queries Switch A and Switch C to determine whether they support traffic sharing. It's important to note that mutual traffic sharing refers to a situation where a less busy switch on the same level helps a busy switch forward traffic. Since all traffic sharing operations require collaboration between the peer and superior switches, the superior Switch A is asked to support traffic sharing. Specifically, it inquires whether the superior Switch A is allowed to forward traffic to Switch A through its peer switches. It also inquires about traffic sharing support (Ass_Enable) and the current traffic status (Status). After receiving the query, Switches A and C respond with their own responses (Ass_Enable, Status_packet). Based on these responses, the traffic management module evaluates the load and traffic sharing support of Switches A and C, and determines whether traffic sharing is permitted (e.g., whether Ass_Enable is set to supported and whether the switch load in the Status_packet is below the threshold). If the link load and load sharing support of Switches A and C are allowed, the traffic management module first sends an Ass_allowance message to Switch B to approve Switch B's load sharing request.
[0117] After Switch B receives the Ass_allowance, it replies with the handover device list to the traffic management module. It sends Switch B's low-priority device list (Device_list) to the traffic management module and writes the device IDs to be handed over (i.e., the handover device IDs) into area A (i.e., the first area) of Switch B's sharing register. Information about these devices will no longer be transmitted through its own uplink, but will be forwarded through the traffic management module.
[0118] After successfully receiving Device_list, the traffic management module responds with an Ack and sends the handover information Device_set to Switches A and C. Switch A writes the handover device ID in Device_set and the bus number of the switch sharing the forwarding activity of the device into area C, the third area, of its sharing register. Switch A will no longer transmit the written device information through the original link. Data forwarded to the device will be forwarded to the corresponding forwarding switch in the newly created traffic sharing link, the sharing switch. For Switch C, the handover device is its receiving device. Switch C writes the receiving device ID into area B, the second area, of its sharing register. Devices in the second area will be considered downstream devices of Switch C. Switch C receives and forwards the uplink information of the device, and forwards it to its original switch, Switch B, through the traffic management module.
[0119] Finally, the traffic links and traffic management policies in the PCIe switch tree topology are updated based on the newly created traffic sharing links. This includes traffic sharing links created by the traffic management module, and the transferred device transmits PCIe uplink data through the sharing switch. Through these steps, this solution achieves efficient and flexible traffic management and load balancing, improving the overall performance and stability of the PCIe switch tree topology.
[0120] By introducing innovative technologies such as a dynamic priority algorithm and a shared register mechanism, this invention effectively addresses the changing real-time traffic characteristics of downstream devices on busy switches, significantly improving overall system performance and stability. Specifically, when a switch's uplink traffic becomes busy, this solution automatically adjusts the priority of downstream devices and diverts traffic from lower-priority devices to other paths, avoiding performance bottlenecks caused by single-point congestion. This not only improves system responsiveness and throughput, but also enhances reliability and scalability.
[0121] Based on the above embodiments, the present invention can achieve the following technical effects:
[0122] 1) Enhanced real-time adaptability: By employing a dynamic priority algorithm, this solution can evaluate the priorities of downstream devices of busy switches in real time and dynamically adjust the priorities of downstream devices based on real-time traffic characteristics such as bandwidth utilization and delay sensitivity. This flexibility enables the system to maintain high performance under different traffic patterns, avoiding the limitations of traditional static priority allocation strategies and the performance instability caused by static priority allocation, thereby improving system responsiveness and throughput.
[0123] 2) Efficient Traffic Sharing: By introducing a traffic sharing register mechanism, when traffic on a particular link becomes busy, the system can quickly shift some of the traffic from the busy switch to other paths, namely, newly created traffic sharing links. Specifically, lower-priority downstream devices corresponding to the busy switch are transferred to other switches at the same level, thus avoiding performance bottlenecks caused by single points of congestion. This not only improves overall system throughput and response time, but also enhances system stability and reliability.
[0124] 3) Intelligent Traffic Management Improves System Performance: The traffic management module in this solution intelligently handles high-load requests and coordinates traffic transfers between upstream and downstream switches and between peer switches. By confirming the uplink load status of peer switches, the traffic management module can quickly make decisions and write the device IDs to be transferred into the traffic sharing register that supports traffic sharing, thereby achieving efficient data forwarding and management. This intelligent management mechanism ensures efficient system operation and improves overall performance.
[0125] In summary, this solution has significant technical advantages, including real-time adaptability, efficient traffic sharing mechanism, and intelligent traffic management. These advantages together improve the overall performance and stability of the PCIe switch tree topology.
[0126] In one embodiment of the present invention, a switch is provided. The switch is configured as a switch in a PCIe switch tree topology. The switch performs data transmission based on the traffic management method for the switch tree topology as described in any of the above embodiments.
[0127] In one embodiment of the present invention, a traffic management module suitable for a PCIe switch tree topology is provided. In this embodiment, the PCIe switch tree topology has one or more groups of peer switches, and the traffic management module corresponds one-to-one to the multiple groups of peer switches.
[0128] In this embodiment, for each group of switches at the same level, the traffic management module is electrically connected to each switch respectively.
[0129] In response to receiving a traffic sharing request from a switch, the traffic management module determines that the switch is busy and sends a query signal to other switches electrically connected to it, asking whether they support traffic sharing. In this embodiment, each switch independently determines whether it requires traffic sharing and, if so, sends a traffic sharing request to the traffic management module.
[0130] In another embodiment, the traffic management module monitors the uplink load of each switch electrically connected thereto, and determines whether the switch has a traffic sharing requirement based on the uplink load. For details, please refer to the determination method provided in the traffic management method embodiment, which will not be described in detail. If so, the switch whose uplink traffic needs to be shared is determined to be a busy switch.
[0131] In response to determining that the switch is busy, the traffic management module inquires other switches of the same level electrically connected to it, ie, the switches of the same level and the upper-level device of the busy switch, whether traffic sharing is supported.
[0132] If the traffic management module receives a response signal indicating support for traffic sharing returned by other switches and upper-level devices, the traffic management module determines that the switch that returns the response signal indicating support for traffic sharing is a sharing switch, and the traffic management module establishes a traffic sharing link, wherein the traffic sharing link is for transmitting data between some downstream devices of the busy switch and the upper-level device of the busy switch through the sharing switch.
[0133] In one embodiment of the present invention, a data transmission system is provided. The system includes multiple switches, which form a PCIe switch tree topology. Each group of peer switches is provided with a corresponding traffic management module, each of which is electrically connected to its corresponding peer switches. The system performs data transmission based on the traffic management method for a switch tree topology as described in any of the above embodiments.
[0134] It should be noted that the switch, traffic management module and data transmission system embodiments provided by the present invention have the same inventive concept as the above-mentioned switch tree topology traffic management method embodiment, and the entire content of the switch tree topology traffic management method embodiment is incorporated into the switch and data transmission system embodiments by introduction.
[0135] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device 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 device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0136] The above is only a specific implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A traffic management method for a switch tree topology, characterized in that: The following steps are involved: Configuring electrical connections between switches at the same level in a switch tree topology; Monitor the uplink load of each switch in real time, and determine whether the uplink traffic of the switch needs to be shared based on the preset correspondence between the uplink load and the traffic sharing requirement. If so, determine that the switch is a busy switch; Determine a peer switch corresponding to the busy switch, and determine whether there is a peer switch that supports sharing the uplink traffic of the busy switch; if so, determine the peer switch that supports sharing the uplink traffic of the busy switch as a sharing switch; Some downstream devices of the busy switch are determined to be handover devices, and the data transmission path between the handover devices and the upper-level devices of the busy switch is switched from data transmission through the uplink of the busy switch to data transmission through the uplink of the sharing switch.
2. The traffic management method for a switch tree topology according to claim 1, characterized in that: The following steps are also included: A traffic management module is configured for each group of peer switches, and the traffic management module is electrically connected to each peer switch in the group of peer switches; In response to determining that there is a busy switch, the traffic management module sends an inquiry signal to a switch at the same level of the busy switch, asking whether traffic sharing is supported; The sharing switch supporting traffic sharing replies a first response signal to the traffic management module; In response to receiving the first response signal, the traffic management module establishes a traffic sharing link for the handover device to transmit data with the upper-level device through the uplink of the sharing switch; The handover device is configured to transmit data with the upper-level device through the traffic sharing link.
3. The traffic management method for a switch tree topology according to claim 2, characterized in that: The following steps are also included: In response to determining the busy switch, the traffic management module further sends a query signal to the upper-level device of the busy switch, asking whether traffic sharing is supported; If the upper-level device supports traffic sharing, it replies with a second response signal to the traffic management module; The traffic management module establishes the traffic sharing link in response to receiving the first response signal and the second response signal.
4. The traffic management method for a switch tree topology according to claim 2, characterized in that: Pre-setting a sharing register in each switch, wherein the sharing register includes a first area and a second area; The traffic sharing link is constructed in the following manner: The busy switch writes the handover device ID of the handover device into the first area of its sharing register and sends the handover device ID to the traffic management module; The traffic management module sends the handover device ID to the sharing switch; The sharing switch writes the handover device ID into the second area of its sharing register.
5. The traffic management method for a switch tree topology according to claim 4, characterized in that: The sharing register of each switch further includes a third area, wherein the third area is configured to store a handover record corresponding to a handover device, wherein the handover record includes a transfer path of the handover device; The upper-level device is an upper-level switch of the busy switch, and the upper-level switch is configured to store the handover record in the third area of its shared register.
6. The traffic management method for a switch tree topology according to claim 1, characterized in that: The preset correspondence between the uplink load and the traffic sharing requirement includes: if the uplink load of the switch is greater than a preset first load threshold, determining that the switch has a traffic sharing requirement; and / or, The switches in the switch tree topology are PCIe switches.
7. The method for managing traffic in a tree-type switch topology according to claim 1, wherein: The evaluation parameters of the uplink load of the switch include one or more of packet loss rate, bit error rate and stability of level signal; If the packet loss rate of the switch exceeds a preset first packet loss rate threshold, and / or the bit error rate of the switch exceeds a preset first bit error rate threshold, and / or the stability of the level signal of the switch does not meet the preset requirements, it is determined that the switch has a traffic sharing requirement.
8. The traffic management method for a switch tree topology according to claim 1, characterized in that: Determine whether there is a switch that supports sharing the traffic of the busy switch by the following methods: Determining peer switches corresponding to the busy switch, and determining an uplink load of each of the peer switches; Determine, based on a preset correspondence between uplink load and supported traffic sharing, whether there is a switch at the same level that supports traffic sharing; if so, determine the switch at the same level that supports sharing the traffic of the busy switch as the sharing switch; If not, it is determined that the sharing switch does not exist.
9. The method for managing traffic in a tree-type switch topology according to claim 8, wherein: The correspondence between the preset uplink load and supported traffic sharing includes: If the uplink load of the switch at the same level is not greater than a preset second load threshold, the switch at the same level supports traffic sharing.
10. The traffic management method for a switch tree topology according to claim 8, characterized in that: The uplink loads of the plurality of switches at the same level are compared, and the switch at the same level with the smallest uplink load is determined as the sharing switch.
11. The method for managing traffic in a tree-type switch topology according to claim 1, wherein: Determine whether there is a switch that supports sharing the traffic of the busy switch by the following methods: Determine a switch at the same level as the busy switch; And determine the peer switch with the smallest uplink load as the target peer switch; Determine whether the uplink load corresponding to the target peer switch is not greater than a preset second load threshold; if so, determine that the target peer switch is a sharing switch; if not, determine that there is no sharing switch that supports sharing the busy switch traffic.
12. The method for managing traffic in a tree-type switch topology according to claim 1, wherein: The busy switch determines that some of its downstream devices are the handover devices in the following manner: Determine the task priority of the downstream device of the busy switch, wherein the more urgent the data to be sent by the downstream device is, the higher the corresponding task priority is; One or more downstream devices with low task priority are determined as the handover devices.
13. The traffic management method for a switch tree topology according to claim 1, characterized in that: The busy switch determines that some of its downstream devices are the handover devices in the following manner: The traffic priority corresponding to each downstream device is calculated by the following formula: traffic priority = α × delay sensitivity + β × bandwidth occupancy, where α is the delay sensitivity coefficient, 0 < α < 1, β is the bandwidth occupancy coefficient, 0 < β < 1, and α + β = 1; If the traffic priority of the downstream device is lower than the preset traffic priority threshold, then the downstream device is indeed the handover device; alternatively, multiple downstream devices are sorted in order from low to high according to the traffic priority, and one or more downstream devices sorted first are determined to be the handover devices.
14. The method for managing traffic in a tree-type switch topology according to claim 1, wherein: If there are multiple busy switches, the busy switch with the largest uplink load is preferentially matched with the shared switch; and / or, If there are multiple sharing switches, the sharing switch with a smaller uplink load is preferentially matched to the busy switch.
15. A switch, characterized in that: The switch is configured as a switch in a switch tree topology, and the switch is configured to perform data transmission based on the traffic management method for the switch tree topology according to any one of claims 1 to 14.
16. A data transmission system, characterized in that: The data transmission system includes a plurality of switches, wherein the plurality of switches form a switch tree topology structure; The data transmission system performs data transmission based on the traffic management method of the switch tree topology according to any one of claims 1 to 14.
Citation Information
Patent Citations
Data monitoring system based on SDN (Software Defined Network)
CN220823094U
Network traffic load balancing method and apparatus for data center
WO2023201933A1