A per-port flow control method, medium and device suitable for BCube topology

By designing a port-by-port flow control method in the BCube topology network, and adopting independent queues and dynamic flow control mechanisms, the problems of packet loss and deadlock in the BCube topology network are solved, thereby improving transmission efficiency and network stability.

CN119966899BActive Publication Date: 2025-11-04NANJING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510209981.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-11-04
Estimated Expiration
2045-02-25

AI Technical Summary

Technical Problem

Existing flow control methods are prone to packet loss and deadlock issues in BCube topology networks, especially in scenarios with sudden traffic surges. Existing PFC and CBFC algorithms cannot effectively solve link-layer flow control problems.

Method used

A port-by-port flow control method is adopted, which involves designing independent queues on switch and host ports, allocating traffic according to traffic type, and combining congestion detection and dynamic flow control mechanisms to prevent head-of-line blocking and deadlock.

Benefits of technology

It effectively reduces congestion caused by sudden traffic surges, improves transmission efficiency, prevents network outages, and ensures network stability and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119966899B_ABST
    Figure CN119966899B_ABST
Patent Text Reader

Abstract

The application provides a per-port flow control method, medium and equipment suitable for BCube topology, which comprises a per-port queue allocation strategy, a dynamic flow control mechanism and a queue grouping strategy. In the design of the switch port queue, each outgoing port of the switch has an independent queue corresponding to the downstream switch port, thereby reducing the congestion problem caused by burst traffic. In the design of the host port queue, the host is allocated a special queue according to the traffic characteristics, thereby avoiding the head-of-line blocking when different types of traffic contend for resources. The dynamic flow control mechanism dynamically adjusts the sending rate of the upstream node queue according to the buffer state of the downstream switch, thereby preventing the buffer overflow; the queue type of the congested port is monitored in real time, a pause or resume signal is generated, different types of traffic are managed separately, and the transmission efficiency is improved. In the queue grouping strategy, the switch port queue is divided into different priorities, the propagation of the congestion signal is reduced, the circular dependency is avoided, and the network is prevented from stalling.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of computer network and architecture, and relates to traffic control and lossless transmission technology of data center network. BACKGROUND

[0002] Modern data center network often uses RDMA technology with high bandwidth and low latency. This technology realizes fast data transmission by skipping the operating system kernel and offloading the protocol stack. However, in the burst traffic scenario, RDMA is prone to packet loss. This will affect the lossless transmission of data.

[0003] Now, the industry often uses two methods to realize lossless network. One is the priority-based flow control (PFC) algorithm, and the other is the credit-based flow control (CBFC). For example, the optimization scheme of RDMA in cloud storage in the prior art improves the transmission efficiency by adjusting the hardware and flow control protocol. However, most of these methods are for switch-centered tree topology. They are not suitable for server-centered network, such as BCube topology. BCube network is often used in data-intensive tasks due to its multi-path high bandwidth and modular design. However, in the BCube network, the shallow buffer switch cannot handle burst traffic and is prone to packet loss under burst traffic, affecting service performance. In addition, the pause and resume mechanism of PFC may cause circular dependency in multi-hop paths, causing traffic deadlock and leading to traffic stagnation. Although the existing technology proposes a flow scheduling method suitable for BCube, these existing methods only solve the problem of traffic allocation and do not solve the problem of link layer flow control. SUMMARY

[0004] The present application provides a per-port flow control method, medium and equipment suitable for BCube topology to solve the packet loss and deadlock problems of BCube topology in the prior art.

[0005] To achieve the above object, the present application adopts the following technical solutions:

[0006] In the first aspect, the present application provides a per-port flow control method suitable for BCube topology. In the architecture of the BCube topology, each host has k+1 ports, which are connected to k+1 switches distributed in layers 0 to k in turn, and each switch has n ports. The per-port flow control method comprises:

[0007] Executing a queue allocation strategy for switch ports, and allocating queues for switches according to the types of traffic flowing through the switches, wherein each out port of the switch has an independent queue corresponding to a downstream switch port;

[0008] Executing a queue allocation strategy for host ports, and allocating queues for hosts according to traffic characteristics;

[0009] The detection of congestion occurrence and congestion removal is performed on the switch, and a flow control message is sent out; the host and the switch process the flow control message, and a deadlock avoidance strategy is applied to prevent the deadlock phenomenon.

[0010] Optionally, the queue allocation strategy of the switch port is as follows:

[0011] The traffic flowing through the switch is divided into two categories: the first category is the traffic whose next hop host is not the destination host and needs to be forwarded by the next hop host, and the second category is the traffic whose next hop is the destination host;

[0012] Corresponding to the two categories of traffic flowing through the switch, the queues in the switch port are also divided into two categories: for the first category of traffic, the traffic is respectively put into different first category queues according to the egress port of the traffic in the next hop switch, and there are a total of n-1 queues; for the second category of traffic, the traffic is directly stored in a separate first category queue.

[0013] Optionally, the queue allocation strategy of the host port is as follows:

[0014] The traffic sent out by the host is classified according to the number of hops, and each category is configured with n-1 queues corresponding to the n-1 possible egress port selections of the next hop; in addition, a queue is configured as a relay queue to store the traffic that needs to be forwarded by the host, and a high priority queue is also configured.

[0015] Optionally, the detection of congestion occurrence on the switch is as follows:

[0016] The congestion threshold X is set for the first category of queues and the second category of queues in the switch port, respectively. off and

[0017] When the data packet arrives at the egress port on the switch, port congestion detection is performed: when the data packet enters the first category of queues, the length of the first category of n-1 queues is detected to see whether it exceeds the congestion threshold X off , and if it exceeds, a pause message carrying the congestion queue number and the congestion port number is sent to the upstream to pause the queue of the corresponding congestion port of the upstream port; when the data packet enters the second category of queues, the length of the second category of queues is detected to see whether it exceeds the congestion threshold , and if it exceeds, a pause message carrying the congestion queue number and the congestion port number is sent to pause the queue of the corresponding congestion port of the upstream port.

[0018] Optionally, the detection of congestion removal on the switch is as follows:

[0019] The congestion removal threshold X is set for the first category of queues and the second category of queues in the switch port, respectively. onand

[0020] When the switch out port of a certain queue sends a data packet, the congestion state of the switch is re-judged: when the data packet is sent from the first type queue, whether the congestion is released is judged according to the length of the first type n-1 queues and whether it is less than X on When the data packet is sent from the second type queue, whether the congestion is released is judged according to whether the length of the second type queue is less than X .

[0021] Optionally, the host processes the flow control message as follows:

[0022] The host parses the congestion / congestion release port number, congestion / congestion release queue number and control message type of the downstream switch in the flow control message;

[0023] When the host receives the flow control message generated by the first type queue on the switch, the state of the local corresponding queue is set according to the control message type;

[0024] When the host receives the flow control message generated by the second type queue on the switch, the state of the local corresponding queue is set according to the control message type, and the state of the corresponding queue of the upstream switch is set.

[0025] Optionally, the switch processes the flow control message as follows:

[0026] The switch parses the congestion / congestion release port information of the downstream switch in the flow control message and the control message type, and operates the queue corresponding to the congestion / congestion release port in the switch according to the control message type.

[0027] Optionally, the deadlock avoidance strategy is as follows:

[0028]

[0029] In the formula, the first type queue and the second type queue of the switch are respectively denoted as A type queue and B type queue; the flow sent by the host is divided into four-hop flow, two-hop flow and flow needing forwarding, which are respectively put into a type queue, b type queue and c type queue; X off and respectively represent the congestion threshold of the A type queue and the B type queue; Switch i Q A and Switch i Q B respectively represent the A type queue and the B type queue of the i-hop switch out port; Host i-1 Q a and Host i-1 Q brespectively represent the a-type queue and b-type queue of the i-1 hop host; PAUSE represents the pause operation.

[0030] In a second aspect, the application provides a computer readable storage medium, which stores a computer program, and the computer program causes a computer to execute the per-port flow control method suitable for BCube topology in the first aspect.

[0031] In a third aspect, the application provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the per-port flow control method suitable for BCube topology in the first aspect is realized.

[0032] The application has the following beneficial effects:

[0033] (1) The application proposes a per-port queue allocation strategy, in the design of switch port queues, each outgoing port of a switch has an independent queue corresponding to a downstream switch port, reducing the congestion problem caused by burst traffic; in the design of host port queues, a dedicated queue is allocated to a host according to traffic characteristics, avoiding the head-of-line blocking when different types of traffic contend for resources.

[0034] (2) The application proposes a dynamic flow control mechanism, which dynamically adjusts the sending rate of upstream node queues according to the buffer status of downstream switches, preventing buffer overflow; real-time monitoring of the queue type of congested ports generates a pause or resume signal, and different types of traffic are managed separately, improving transmission efficiency.

[0035] (3) The application proposes a queue grouping strategy, in which switch port queues are divided into different priorities, reducing the propagation of congestion signals, avoiding circular dependencies, and preventing network stagnation. By reasonably setting the number and type of queues, the propagation of deadlocks can be effectively limited, preventing network stagnation. BRIEF DESCRIPTION OF DRAWINGS

[0036] Figure 1 is a BCube(4,1) network topology architecture diagram.

[0037] Figure 2 is a schematic diagram of switch upstream port queue allocation in the BCube(4,1) network topology architecture.

[0038] Figure 3 is a schematic diagram of host upstream port queue allocation in the BCube(4,1) network topology architecture.

[0039] Figure 4 is a schematic diagram of BCube scenario flow control deadlock avoidance.

[0040] Figure 5is a Bcube(8, 1) network topology architecture diagram.

[0041] Figure 6 is a cumulative distribution function (CDF) diagram of WebSearch, FB_Hadoop, and Storage three traffic sizes. DETAILED DESCRIPTION

[0042] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.

[0043] In an embodiment, the present application proposes a per-port flow control method suitable for a BCube topology.

[0044] The per-port queue allocation strategy is an important part of the design. In the design of the switch port queue, each switch egress port has an independent queue corresponding to the downstream switch port. This design can reduce the congestion problem caused by burst traffic. In the design of the host port queue, according to the traffic characteristics, such as two-hop traffic or four-hop traffic, a dedicated queue is allocated for the host. This can avoid the head-of-line blocking that occurs when different types of traffic contend for resources.

[0045] The dynamic flow control mechanism dynamically adjusts the sending rate of the upstream node queue according to the buffer state of the downstream switch, which can prevent buffer overflow. This mechanism also monitors the queue type of the congested port in real time and generates a pause (PAUSE) or resume (RESUME) signal. In this way, different types of traffic can be managed separately, improving transmission efficiency.

[0046] In order to avoid the deadlock problem in the network, the queue grouping strategy is adopted in the design. The switch port queue is divided into different priorities. This can reduce the propagation of congestion signals and avoid circular dependencies. In the BCube(4, 1) topology, by reasonably setting the number and type of queues, the propagation of deadlocks is limited within three hops. This method can effectively prevent network stagnation.

[0047] Before describing the queue allocation scheme of the BCube per-port flow method, the construction method of the BCube network will be briefly introduced. BCube(n, k) (k≥1) is a recursively defined structure, which is composed of n BCube(n, k-1) and n k switches with n ports. Each server in BCube(n, k) has k+1 ports, which are connected to k+1 switches in layers 0 to k in turn. According to the above definition, the number of servers in BCube(n, k) is n k+1 , and the number of switches is (k+1)·n k . Among them, these switches are distributed in layers 0 to k, and there are nk a BCube (4, 1) as an example. The topology architecture is shown in Figure 1

[0048] Similar to the PFC algorithm commonly used in lossless RDMA technology, the present embodiment also prevents the problem of buffer overflow in the downstream switch by controlling the sending of a certain queue. Different from the PFC algorithm based on the ingress queue detection, the present embodiment detects congestion based on the queue of the egress port. The way of controlling the congestion flow based on the egress port detection can alleviate the head-of-line blocking problem of the ingress flow control algorithm. The queue allocation of the per-port flow control is mainly designed based on the fact that each switch in the BCube network topology has a fixed number of ports. The main idea is to maintain a number of queues corresponding to the ports of the downstream node in the egress port of the upstream node. When congestion occurs in a certain port of the downstream node, the corresponding queue of the upstream switch suspends sending to the downstream. Specifically, the queue allocation scheme of the BCube per-port flow control method designed in the present embodiment is divided into two types, i.e., queue allocation of the switch port and queue allocation of the host. Next, the BCube (4, 1) in Figure 1 will be taken as an example to describe the two allocation methods in detail.

[0049] (1) Queue allocation of switch port

[0050] Since the adjacent nodes of the switch in the BCube network are hosts, the flow through the switch can be divided into two categories. The first category is the flow that needs to be forwarded by the next hop host and the second category is the flow that reaches the destination host at the next hop. Corresponding to the above two categories of flow, the queues in the switch port are also divided into two categories. The first category of queue stores the flow that needs to be forwarded by the next hop host for further transmission. This part of flow reaches the next next hop which is a switch after being forwarded by the next hop host, and thus is placed in different queues according to the egress port through which the flow passes in the next next hop switch. The other category is the queue that stores the flow that reaches the destination at the next hop. There is only one queue in this category, and all the flows that reach the destination at the next hop are placed in this queue.

[0051] Taking the topology in Figure 1 as an example, it is assumed that there are four flows F1, F2, F3 and F4, which all come from the host No. 11 and pass through the egress port of the switch No. 23 connected to the host No. 15. The queue allocation of the data packets of the four flows in the egress port of the switch No. 23 is shown in Figure 2 ​F2, F3, F4 arrive at host 15, they need to be forwarded by host 15 to the next hop, switch 19. Assume all ports and queues are numbered from 0. Since F2 will be sent out from port 0 of switch 19, F2 is queued in Q0 of switch 23; since F3 will be sent out from port 1 of switch 19, F3 is queued in Q1 of switch 23; similarly, F4 will be sent out from port 2 of switch 19, so F4 is queued in Q2 of switch 23. Unlike the above three flows, F1 will be sent out from switch 23 to its destination host, so it is queued in a separate queue Q3. In Figure 2 A highest priority queue HQ is also drawn in Fig. 1, which can be used to store some control packets (e.g. ACK 1 or CNP 2 messages, etc.) in the network.

[0052] From the above example, it can be seen that the per-port flow control method of BCube assigns queues in the switch port according to which port the packet will be sent out from the next hop switch (since the next hop of a BCube switch is a host). Packets that will be sent out to their destination hosts are queued in a separate queue. The number of queues in a switch port is equal to the number of downstream switch ports, which makes the per-port flow control method of BCube use very few hardware resources in the switch. For a BCube (n, k) topology, where each switch has n ports, each port of a switch only needs n-1 queues to store packets that will be sent out to the n-1 possible ports of the next hop switch, and only one queue to store packets that will be sent out to their destination hosts. If needed, one highest priority queue can also be added. In summary, each port of a switch in a BCube (n, k) topology only needs n+1 queues in the per-port flow control method.

[0053] (2) Queue assignment in host ports

[0054] There are three kinds of traffics on a host in BCube topology, the first kind is four-hop traffics sent by the host itself, the second kind is two-hop traffics sent by the host itself, and the third kind is traffics sent by other hosts and need to be sent out by the host. For the above three kinds of traffics, the per-port traffic control method gives different queue allocation schemes. In BCube(n, k) topology, each switch has n ports. The data packets of the first kind of four-hop traffics sent by the host itself will enter the 0 to n-2 queues according to the out port number (n-1 kinds of possibilities) of the next-hop switch. The data packets of the second kind of two-hop traffics sent by the host itself will enter the n-1 to 2n-3 queues according to the out port number (n-1 kinds of possibilities) of the next-hop switch. The data packets of the third kind of traffics need to be sent out by the host and will enter the 2n-2 "relay queue".

[0055] In the topology of Figure 1 , it is assumed that there are four-hop traffics F1, F2, F3 sent by the host 15, which pass through the hosts 12, 13, 14 and finally reach the respective destination hosts 0, 1, 2. There are also two-hop traffics F4, F5, F6 sent by the host 15, which pass through the 0, 1, 2 ports of the switch 19 and finally reach the respective destination hosts 12, 13, 14. The third kind of traffic F7 is sent by the host 11 through the host 15 and finally reaches the destination host 12.

[0056] Figure 3 In the above traffic, the queue allocation of the host 15 connected to the ports of the switch 19 is given. First, for the first kind of four-hop traffics sent by the host 15, since F1, F2, F3 pass through the 0, 1, 2 out ports of the next-hop switch 19, F1 is put into Q0, F2 is put into Q1, and F3 is put into Q2 on the host 15. The second kind of traffics F4, F5, F6 on the host 15 are two-hop traffics, which will be sent out by the switch 19 from the 0, 1, 2 out ports and then reach the respective destination hosts, so they are put into Q3, Q4, Q5 respectively on the host 15. The data packets flowing through the host 15 need to be sent out and are put into RQ (representing Relay Queue). Similarly, Figure 3 In the above traffic, the queue allocation of the host 15 connected to the ports of the switch 19 is given. First, for the first kind of four-hop traffics sent by the host 15, since F1, F2, F3 pass through the 0, 1, 2 out ports of the next-hop switch 19, F1 is put into Q0, F2 is put into Q1, and F3 is put into Q2 on the host 15. The second kind of traffics F4, F5, F6 on the host 15 are two-hop traffics, which will be sent out by the switch 19 from the 0, 1, 2 out ports and then reach the respective destination hosts, so they are put into Q3, Q4, Q5 respectively on the host 15. The data packets flowing through the host 15 need to be sent out and are put into RQ (representing Relay Queue). Similarly,

[0057] As can be seen from the above example, the queue allocation on the host is slightly more complicated than that on the switch. This more refined classification is more convenient for the per-port flow control method to control the flow, so that the control granularity is finer and the control effect is better. Even so, the number of port queues on the host in the BCube(n, k) topology is still linearly proportional to the number of switch ports. Specifically, in the BCube(n, k) topology architecture, the traffic sent out by the host can be divided into k+1 classes according to the number of hops, wherein each class needs n-1 queues (corresponding to the n-1 possible port selection of the next hop) to store, another queue as a relay queue to store the data packets that need to be forwarded locally, and a high-priority queue. In summary, in the BCube(n, k) topology, the host port needs (k+1)×(n-1)+2 queues (where k is generally less than or equal to 4). Current commercial switches can generally support tens of queues, so the queue allocation scheme designed in this embodiment can still support large BCube networks and has good scalability.

[0058] (3) Congestion occurrence and congestion removal

[0059] The foregoing gives the allocation mode of the two types of queues on the switch, so there are two groups of congestion detection and congestion removal thresholds in the per-port flow control method of the BCube. For the queues (n-1, numbered 0 to n-2) in the switch egress port that store the traffic of the next hop through different switch egress ports, the congestion threshold X off and the congestion removal threshold X on are set. For the second type of queue, i.e., the queue (1, numbered n-1) that stores the traffic of the next hop to the destination host, the congestion threshold and the congestion removal threshold

[0060] When a data packet arrives at the egress port on the switch, port congestion detection is performed, and the detailed logic is shown in the pseudo code 1 in Table 1. The fourth to eighteenth lines of the pseudo code 1 give the processing logic when the data packet enters the first type of queue in the BCube(n, k). In this embodiment, the length of the n-1 queues and whether it exceeds the congestion threshold are used as the judgment standard of whether the port is congested. When a data packet is received in the first type of queue in the switch egress port, the length of the n-1 queues of the first type is detected and whether it exceeds the congestion threshold X offIf the condition is met, a pause message (carrying the queue number and the congested port number) is sent to the upstream of the other port connection, and the queue of the congested port is paused. Similar to the operation of the first type of queue, the logic of the second type of queue, which stores the data packets that reach the destination at the next hop, is given in lines 19-27 of the pseudo code 1. In addition, the flow control method proposed in this embodiment does not control the highest priority transmission. The number of data packets of the highest priority is usually small, and if the data packet belongs to the highest priority, the detection of whether the highest priority queue is congested is not performed, and the logic is given in line 29 of the pseudo code 1.

[0061] Table 1 Pseudo code 1

[0062]

[0063] When a data packet is sent from a queue of an egress port of a switch, the congestion state of the switch needs to be re-judged, and it is detected whether the length of the current queue satisfies the condition of congestion removal. In lines 3-15 of the pseudo code 2 shown in Table 2, it is judged whether the congestion is removed according to the length of n-1 queues and whether it is less than a given threshold X on Similar to the congestion removal of the first type of queue and whether the congestion removal message is sent to the upstream, the processing logic of the second type of queue when the congestion is removed is given in lines 16-24 of the pseudo code 2. Similarly, the data packet of the highest priority is not processed by the flow control logic. The variable upstreamIsPaused is used to judge whether the control message needs to be sent to the upstream, and upstreamIsPaused can ensure that the same congestion or congestion removal information is not reported to the upstream repeatedly.

[0064] Table 2 Pseudo code 2

[0065]

[0066] (4) Host processing logic

[0067] Since there are two types of queues on the switch that can generate flow control messages, there are corresponding operations on the upstream host to receive these two types of flow control messages. First, the host can parse the number of the downstream congested (or de-congested) port, the queue number that is congested (or de-congested), and the type of control message (Pause or Resume) from the content carried in the flow control message. As shown in the pseudo code 3 in Table 3, when the host receives the flow control message generated by the first type of queue on the switch, the host sets the state of the queue with the number of congestedQIdx in the first n-1 queues of the host according to the type of control message (Pause or Resume). This is because, in the BCube network topology, the traffic is divided into four-hop traffic and two-hop traffic, and when the host receives the control message from the first type of queue on the downstream switch, it means that the four-hop traffic sent by the host can cause the downstream port with the number of congestedPortIdx to continue to be congested, and thus the queue corresponding to the congested downstream port on the local host should be paused.

[0068] Table 3 Pseudo code 3

[0069]

[0070] If the host receives the flow control message from the second type of queue on the downstream switch, it means that the queue on the downstream switch sending traffic to the next-hop host is congested. These flows can be two-hop traffic from the local host or four-hop traffic from the upstream. Thus, the second type of queue (the number range is (n-1) to (2n-3)) in the second type of queue on the local host should be paused, because the packets in the queue will aggravate the congestion of the downstream congested port. Thus, as shown in the 14th line, the queue number indicated by congestedPortIdx needs to be offset by a size of n-1. The above logic corresponds to the 12th to 20th lines in the pseudo code 3. And the 21st to 23rd lines in the pseudo code 3 show that the host needs to pass the flow control message to the upstream switch to control the influence of the four-hop traffic sent by the upstream on the congested port.

[0071] By observing the reaction of the host to the congestion of the two types of queues on the downstream switch, it can be found that the congestion caused by the traffic in the first type of queue on the switch (the traffic that needs to be forwarded by the next-hop host) will only pause the corresponding queue of the upstream host of the switch; and the congestion caused by the traffic in the second type of queue on the switch (the queue storing the traffic whose next-hop host is the destination host) will not only pause the corresponding queue of the upstream host, but also pause the corresponding queue of the upstream switch. Since there is no new congestion detected on the host, in the flow control method designed in the embodiment, the congestion can propagate at most three hops in the network.

[0072] (5) Switch processing logic

[0073] The processing of the control message received by the switch is relatively simple, which is given in the pseudo code 4 shown in Table 4. When the switch receives the flow control message, the port information of the downstream switch congestion (or congestion removal) and the type of the flow control message (pause or resume) carried in the flow control message are first parsed. Then, according to the type of the flow control message, the queue corresponding to the congested port in the switch is paused or resumed to send the operation.

[0074] Table 4 Pseudo code 4

[0075]

[0076] (6) Deadlock avoidance algorithm

[0077] The traditional flow control algorithm such as PFC will cause deadlock phenomenon in the topology scenario with loop. The control logic of the flow control algorithm is usually that the downstream node discovers congestion or congestion removal, and sends a flow control message to the upstream node to report the congestion or congestion removal of the downstream. After receiving the flow control message, the upstream node pauses or resumes the sending of the corresponding port or queue according to the type of the message (Pause or Resume). Under this logic, since there is a loop in the BCube topology, there may be multiple flows entering the same queue, causing congestion to occur, and then the congestion propagates hop by hop in the network, eventually forming a pause loop in the network. Each port in the pause loop is waiting for the next hop congestion to be removed, and in this situation, each node in the loop cannot send data packets, resulting in a deadlock phenomenon.

[0078] The queue allocation strategy and flow control logic of the embodiment successfully break the loop of flow control, effectively avoiding the deadlock problem described above. Without considering the highest priority queue, the queue allocation strategy proposed in the embodiment can be summarized as follows: on the switch, the traffic is divided into two types, traffic that needs to be forwarded by the next hop host and traffic whose next hop host is the destination, and they are put into two different queues, respectively, which are called B-type queue and C-type queue; the traffic type on the host is slightly more complex, which is divided into three types, four-hop traffic sent by the host, two-hop traffic sent by the host, and traffic from other hosts that needs to be forwarded by the host, which are put into three queues, respectively, which are called b, c, and d queues.

[0079]

[0080] The congestion propagation path after the congestion is detected at the switch egress port is briefly presented in Figure 4In the above, formula (1) and formula (2) give the case of suspending upstream queues after detecting congestion on the switch. As shown in formula (1), one case of congestion on the egress port of the i-hop switch is that the B-class queue on it generates congestion, which suspends the b-class queue of the i-1-hop host and the A-class queue of the i-2-hop switch. Assuming that the A-class queue of the i-2-hop switch also generates congestion due to being suspended, according to formula (2), the congestion will continue to suspend the a-class queue of the i-3-hop host; therefore, when the C-class queue of the i-hop switch generates congestion, the congestion propagates at most three hops to the i-3-hop host to be suspended. Another case is described in formula (2), that is, the A-class queue of the i-hop switch generates congestion, in which case the congestion only propagates to the i-1-hop host, that is, the last hop, and does not spread further upstream. In combination with the above analysis, it can be seen that the queue allocation strategy and congestion control logic designed in this embodiment can effectively prevent the continuous propagation of congestion, thereby preventing deadlock.

[0081] Next, the performance of the method proposed in this embodiment will be evaluated through simulation experiments. In the following experiments and analysis, the BCube per-port flow control method is referred to as PPFC (Per-Port Flow Control).

[0082] BCube (4, 1) and BCube (8, 1) are selected as the topologies of the simulation experiments to evaluate the performance of PPFC. As shown in Figure 1 BCube (4, 1) is composed of 16 hosts and 8 switches. In the first dimension, four hosts are connected by a 4-port switch to form a Pod, and four Pods are connected by another four 4-port switches in the second dimension. The four hosts connected by the switch in the second dimension are located at the same position in the four Pods. Similarly, as shown in Figure 5 BCube (8, 1) is composed of 64 hosts and 16 switches. In the first dimension, eight hosts are connected by an 8-port switch to form a Pod. In the second dimension, eight Pods are connected by eight 8-port switches, and each switch in the second dimension connects the hosts at the same position in the eight Pods. The link bandwidth in the above topologies is set to 100 Gbps, the link delay is set to 1us, and the buffer size of the switch is set to 5MB.

[0083] Three traffic scenarios commonly used in data centers, WebSearch, FB_Hadoop, and Storage, are selected for the experiments. Figure 6The cumulative distribution function (CDF) of the three traffic sizes is shown in the middle figure. It can be seen that there are more short flows (less than 1 KB) in FB_Hadoop than in WebSearch and Storage, and there are more long flows (MB level) in WebSearch. In the experiment, the three traffic models are used to generate traffic with a Poisson arrival load of 50%. In addition, in order to increase the congestion level in the network and simulate the traffic in a data center network more realistically, incast traffic with a load of 30% is also added. The scale of the incast traffic is 8 hosts sending traffic to 1 host in the BCube(4, 1) network and 32 hosts sending traffic to 1 host in the BCube(8, 1) network, and the size of the traffic is fixed at 1 MB.

[0084] Compared with the traditional IRN algorithm, PPFC can reduce the average completion time of traffic by 16.92% to 41.65%, and increase the throughput by 1 to 1.32 times. Compared with the GBN algorithm, PPFC performs better, with the average completion time reduced by 91.57% to 96.54% and the throughput increased by 1.74 to 20.62 times. These improvements greatly improve the overall performance of the network. To solve the deadlock problem in the BCube network, PPFC designs a fine queue allocation strategy and a dynamic flow control mechanism, which successfully avoids deadlock. This not only improves the network stability, but also ensures the reliable operation of the complex network structure.

[0085] In another embodiment, the present application provides a computer readable storage medium, which stores a computer program, and the computer program causes a computer to execute the per-port flow control method suitable for the BCube topology of the foregoing embodiments.

[0086] In another embodiment, the present application provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the per-port flow control method suitable for the BCube topology of the foregoing embodiments when executing the computer program.

[0087] In the embodiments disclosed in the present application, the computer storage medium can be a tangible medium which can contain or store programs for use by or in connection with an instruction execution system, apparatus or device. The computer storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination of the above. More specific examples of computer storage medium can include one or more wires, portable computer disks, hard drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), fiber optics, compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.

[0088] Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the present application can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software manner depends on the specific application and design constraints of the technical solutions. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0089] The above is only the preferred embodiment of the present application, and the protection scope of the present application is not limited to the above-mentioned embodiments. Any technical solution falling within the concept of the present application shall fall within the protection scope of the present application. It should be noted that, for ordinary skilled persons in the art, some improvements and refinements without departing from the principles of the present application shall be considered within the protection scope of the present application.

Claims

1. A port-by-port flow control method suitable for BCube topology, wherein in the BCube topology architecture, each host has k+1 ports, which are sequentially connected to k+1 switches distributed from layer 0 to layer k, and each switch has n ports; characterized in that, The port-by-port flow control method includes: The switch port queue allocation strategy is implemented, allocating queues to the switches based on the type of traffic flowing through them. Each switch's outgoing port has an independent queue corresponding to a downstream switch port. The specific switch port queue allocation strategy is as follows: Traffic flowing through the switch is divided into two categories: the first category is traffic whose next-hop host is not the destination host and needs to be forwarded by the next-hop host; the second category is traffic that reaches the destination host at the next hop. Corresponding to the two types of traffic flowing through the switch, the queues in the switch port are also divided into two categories: For the first type of traffic, it is placed into different first-category queues according to the outgoing port it passes through in the next-hop switch, for a total of n-1 queues; For the second type of traffic, it is directly stored in a separate second-category queue. The queue allocation strategy for host ports is implemented, and queues are allocated to hosts based on traffic characteristics; the specific queue allocation strategy for host ports is as follows: Traffic originating from the host is categorized according to the number of hops, with each category configured with n-1 queues, corresponding to n-1 possible outgoing port selections for the next hop; one additional queue is configured as a relay queue to store traffic that needs to be forwarded by this host, and one high-priority queue is also configured. The switch detects congestion occurrence and resolution based on queue type and issues flow control messages; the host and switch process the flow control messages and apply deadlock avoidance strategies to prevent deadlock.

2. The port-by-port flow control method suitable for BCube topology as described in claim 1, characterized in that: The congestion detection on the switch based on queue type is as follows: Set congestion thresholds X for the first and second type queues in the switch port, respectively. off and When a data packet arrives at the outgoing port of the switch, port congestion detection is performed: when a data packet enters the first type of queue, it is checked whether the sum of the lengths of the first type of n-1 queues exceeds the congestion threshold X. off If the congestion threshold is exceeded, a pause message carrying the congestion queue number and the congested port number is sent upstream to pause the queue of the corresponding congested port upstream. When a data packet enters the second type of queue, it is checked whether the length of the second type of queue exceeds the congestion threshold. If the number of cases exceeds the limit, a pause message carrying the congestion queue number and the congestion port number is sent to pause the queue of the corresponding congested port of the upstream port.

3. The port-by-port flow control method suitable for BCube topology as described in claim 1, characterized in that: The congestion relief detection based on queue type on the switch is as follows: Set congestion relief thresholds X for the first and second type queues in the switch port, respectively. on and When a data packet needs to be sent from a queue on a switch's outgoing port, the switch's congestion status is reassessed: when a data packet is sent from the first type of queue, the congestion status is reassessed based on whether the sum of the lengths of the n-1 queues in the first type is less than X. on To determine whether congestion has been cleared; when a data packet is sent from the second type of queue, check if the length of the second type of queue is less than... This is used to determine whether the congestion has been relieved.

4. The port-by-port flow control method suitable for BCube topology as described in claim 1, characterized in that: The host processes flow control messages as follows: The host parses the congestion / relief port number, congestion / relief queue number, and control message type of the downstream switch from the flow control message; When a host receives a flow control message generated by the first type of queue on the switch, it sets the status of the corresponding local queue according to the control message type. When a host receives a flow control message generated by the second type of queue on the switch, it sets the status of the corresponding queue on the local side according to the control message type, and also sets the status of the corresponding queue on the upstream switch.

5. A port-by-port flow control method suitable for BCube topology as described in claim 1, characterized in that: The switch processes flow control messages as follows: The switch parses the congestion / congestion relief port information and control message type of the downstream switch from the flow control message, and then operates on the queue of the corresponding congestion / congestion relief port in this switch according to the control message type.

6. The port-by-port flow control method suitable for BCube topology as described in claim 1, characterized in that: The deadlock avoidance strategy is as follows: In the formula, the first and second type queues of the switch are denoted as Class A queue and Class B queue, respectively; the traffic sent by the host is divided into four-hop traffic, two-hop traffic, and traffic that needs to be forwarded, which are placed into Class A queue, Class B queue, and Class C queue, respectively; X off and These represent the blocking thresholds for queue A and queue B, respectively; Switch i Q A and Switch i Q B These represent the Class A queue and Class B queue at the outgoing port of the i-th hop switch, respectively; Host i-1 Q a and Host i-1 Q b These represent queues of type a and type b of the (i-1)th hop host, respectively; PAUSE indicates a pause operation.

7. A computer-readable storage medium storing a computer program, characterized in that, The computer program causes the computer to execute the port-by-port flow control method suitable for BCube topology as described in any one of claims 1-6.

8. An electronic device, characterized in that, include: The memory, the processor, and the computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the port-by-port flow control method suitable for a BCube topology as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Flow isolation method for avoiding head-of-queue congestion and congestion diffusion in lossless network

    CN115134302A

  • Method and device for displaying congestion notification mark and electronic equipment

    CN119052174A