A data center network TCP and RDMA mixed flow scheduling method, system and device
By differentiating and allocating TCP and RDMA packets on the switch according to priority and category, and combining strict priority and round-robin scheduling, the problem of mixed scheduling of TCP and RDMA flows in data center networks is solved, achieving efficient and fair traffic scheduling and improving the transmission performance of data center networks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING UNIV OF POSTS & TELECOMM
- Filing Date
- 2022-09-20
- Publication Date
- 2026-06-09
AI Technical Summary
Existing traffic scheduling strategies are ill-suited for the mixed scheduling of TCP and RDMA flows in data center networks, resulting in low transmission efficiency and unfair resource allocation.
The switch distinguishes between TCP packets and RDMA packets and assigns them to multiple switch queues based on priority and category. A combination of strict priority and round-robin scheduling is used for transmission to ensure that RDMA packets are transmitted in a lossless environment.
It achieves efficient and fair scheduling of TCP streams and RDMA streams, improves the transmission performance and bandwidth utilization of data center networks, and meets the latency and throughput requirements of different traffic volumes.
Smart Images

Figure CN115695578B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data communication technology, and in particular to a method, system and apparatus for hybrid TCP and RDMA flow scheduling in data center networks. Background Technology
[0002] The rapid construction of data centers has brought many challenges to network technology. The total network traffic in data centers worldwide is growing rapidly. Among them, cloud computing data centers that have deployed Software Defined Network (SDN) and Network Function Virtualization (NFV) functions handle more than 90% of the workload, and this proportion will become even higher with the development of data center network technology. Data center network transmission performance is becoming an increasingly important goal for major enterprises.
[0003] Early data centers were small, and data traffic within their internal networks was primarily TCP-based. However, with the rapid development of the internet, the amount of data in data centers exploded, and traditional networks gradually exposed many shortcomings. For example, the traditional TCP / IP transmission model incurs significant overhead from data copying and context switching, consuming substantial CPU and bus resources during data transmission. Furthermore, it suffers from TCP incast issues; when a client simultaneously sends requests to multiple servers, a large number of servers may send response packets concurrently, leading to insufficient buffering capacity in Ethernet switches and resulting in traffic collapse. This makes it difficult for traditional networks to meet the current network performance requirements of data centers in terms of latency and bandwidth. Therefore, by introducing RDMA technology, some kernel tasks, including those at the transport, IP, and data link layers, are offloaded to the hardware network interface card (NIC). By enabling direct access to and read / write operations on the peer host's memory, a significant amount of CPU resources are freed up, resulting in increased transmission efficiency and a substantial reduction in latency.
[0004] Although RDMA offers significant advantages over traditional TCP / IP, it cannot completely replace TCP in data centers. Therefore, both RDMA and TCP streams coexist within data centers. However, because RDMA bypasses kernel and protocol stack data processing, packet loss and retransmission cause more severe performance degradation, necessitating a lossless transmission environment. TCP streams, on the other hand, have lower requirements for the transmission environment due to their acknowledgment and automatic retransmission mechanisms. This makes traditional TCP-based traffic scheduling strategies unsuitable for hybrid TCP / RDMA streams. Existing traffic scheduling strategies struggle to provide targeted services for different types of traffic. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a method, system and apparatus for scheduling mixed TCP and RDMA streams in data center networks, so as to eliminate or improve one or more defects existing in the prior art and solve the problem that TCP streams and RDMA streams cannot be directly mixed and scheduled due to different requirements for the transmission environment.
[0006] On one hand, the present invention provides a hybrid flow scheduling method for TCP and RDMA in a data center network, the method being executed on a switch, and the method comprising the following steps:
[0007] During data packet transmission, query the traffic category and priority flag fields added to the headers of multiple data packets to be output in order to distinguish the types of TCP data packets and RDMA data packets and to mark the priority of each data packet;
[0008] Each data packet is assigned to multiple switch queues according to the content recorded in the traffic category and priority marking fields, based on priority and category. The switch queues are divided into multiple priorities, each priority containing a first type queue and a second type queue. The first type queue of each priority is used to buffer TCP data packets of the corresponding priority, and the second type queue of each priority is used to buffer RDMA data packets of the corresponding priority.
[0009] TCP packets and RDMA packets in each switch queue are transmitted according to the set rules, wherein the set rules include: transmitting each TCP packet and each RDMA packet in descending order of priority, and transmitting TCP packets in the first type queue and RDMA packets in the second type queue in a round-robin scheduling manner within each priority, wherein a lossless transmission environment is configured for the RDMA packets in the second type queue within each priority.
[0010] In some embodiments, querying the traffic category and priority flag fields added to the headers of multiple data packets to be output includes:
[0011] The priority and traffic category of TCP packets are marked by a set number of odd natural numbers in ascending order; the priority and traffic category of RDMA packets are marked by the same set number of even natural numbers in ascending order.
[0012] In some embodiments, the second-class queues of each priority in the switch queues use PFC flow control for lossless transmission.
[0013] In some embodiments, the traffic category and priority labeling fields are configured with corresponding priorities by the source host of the corresponding data packet according to latency requirements, and the value of the priority is inversely proportional to the maximum acceptable latency of the data packet.
[0014] In some embodiments, a first upper limit value is set for the number of data packet transmission tasks in each switch queue. If the number of data packet transmission tasks in a switch queue is greater than or equal to the first upper limit value, the data packets to be added to that switch queue are buffered in a switch queue of the next lower priority and wait for transmission.
[0015] In some embodiments, a second upper limit value for data packet transmission time is set for each priority. If the data packet transmission time in a priority is greater than or equal to the second upper limit value, the transmission bandwidth resources are increased according to a set ratio until the data packet transmission in the corresponding priority is completed.
[0016] In some embodiments, before allocating each data packet to multiple switch queues according to priority and category based on the content recorded in the traffic category and priority tagging field, the method further includes:
[0017] Set a remaining storage space limit for each switch queue. If it is determined that the remaining storage space capacity of the specified switch queue is less than the corresponding remaining storage space limit after a data packet to be added to the specified switch queue is written, then the data packet is pre-stored in the cache space.
[0018] On the other hand, the present invention also provides a hybrid flow scheduling system for data center networks using TCP and RDMA, comprising:
[0019] The source host is used to generate data packets and configure priorities according to the latency requirements of the data. It adds traffic category and priority tag fields to the header of the data packets according to the data packet type and the priority.
[0020] The switch is used to execute the aforementioned hybrid flow scheduling method of TCP and RDMA for data center networks.
[0021] On the other hand, the present invention also provides a hybrid flow scheduling device for TCP and RDMA in a data center network, including a processor and a memory, wherein the memory stores computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the device implements the steps of the above method.
[0022] On the other hand, the present invention also provides a computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the steps of the above-described method.
[0023] The beneficial effects of the present invention are at least as follows:
[0024] In the data center network TCP and RDMA hybrid flow scheduling method, system, and apparatus described in this invention, TCP packets and RDMA packets are cached in different switch queues according to their respective priorities, and the transmission environments required for each type of packet are configured separately. During transmission, TCP packets and RDMA packets are transmitted sequentially in descending order of priority, and the two queues storing TCP and RDMA packets within the same priority are transmitted using a round-robin scheduling method. This invention can adapt to the requirements of TCP and RDMA hybrid flow scheduling, effectively utilize bandwidth resources, and schedule TCP and RDMA flows relatively fairly and efficiently, providing targeted services for traffic with different latency and throughput requirements.
[0025] Additional advantages, objects, and features of the invention will be set forth in part in the description which follows, and will also become apparent in part to those skilled in the art upon studying the description, or may be learned by practice of the invention. The objects and other advantages of the invention can be realized and obtained by means of the structures specifically pointed out in the description and drawings.
[0026] Those skilled in the art will understand that the objectives and advantages achievable with the present invention are not limited to those specifically described above, and that the above and other objectives achievable with the present invention will become clearer from the following detailed description. Attached Figure Description
[0027] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, are not intended to limit the scope of the invention. In the drawings:
[0028] Figure 1 This is a flowchart illustrating a hybrid TCP and RDMA flow scheduling method for data center networks according to an embodiment of the present invention.
[0029] Figure 2 (a) is a comparison chart of TCP short-stream completion times under different loads for the round-robin scheduling strategy, the strict priority scheduling strategy, and the priority-based round-robin scheduling strategy of this invention.
[0030] Figure 2 (b) is a comparison chart of the completion time of RDMA short-flow under different loads for the polling scheduling strategy, the strict priority scheduling strategy, and the priority-based polling scheduling strategy in this invention.
[0031] Figure 3 (a) is a comparison chart of TCP long stream completion times under different loads for the round-robin scheduling strategy, the strict priority scheduling strategy, and the priority-based round-robin scheduling strategy in this invention.
[0032] Figure 3(b) is a comparison chart of the completion time of RDMA long-running streams under different loads for the polling scheduling strategy, the strict priority scheduling strategy, and the priority-based polling scheduling strategy in this invention.
[0033] Figure 4 (a) is a comparison chart of TCP overall stream (TCP statistics stream) completion time under different loads for the round-robin scheduling strategy, the strict priority scheduling strategy, and the priority-based round-robin scheduling strategy in this invention.
[0034] Figure 4 (b) is a comparison chart of the completion time of RDMA overall stream (RDMA statistical stream) under different loads for the polling scheduling strategy, the strict priority scheduling strategy, and the priority-based polling scheduling strategy in this invention.
[0035] Figure 5 (a) is a comparison chart of the completion time of TCP short flow and RDMA short flow under the polling scheduling strategy, the strict priority scheduling strategy, and the priority-based polling scheduling strategy in this invention.
[0036] Figure 5 (b) is a comparison chart of the completion time of TCP long streams and RDMA long streams using the polling scheduling strategy, the strict priority scheduling strategy, and the priority-based polling scheduling strategy in this invention.
[0037] Figure 5 (c) is a comparison chart of average flow completion time for the polling scheduling strategy, the strict priority scheduling strategy, and the priority-based polling scheduling strategy in this invention. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this invention are used to explain the invention, but are not intended to limit the invention.
[0039] It should also be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.
[0040] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.
[0041] It should also be noted that, unless otherwise specified, the term "connection" in this article can refer not only to a direct connection, but also to an indirect connection involving an intermediary.
[0042] In the following description, embodiments of the invention will be illustrated with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar parts, or the same or similar steps.
[0043] In existing technologies, central networks heavily utilize TCP and RDMA streams. RDMA primarily employs zero-copy and kernel bypass techniques to reduce data copying overhead, saving significant CPU and bus resources. Zero-copy allows applications to bypass the network protocol stack and send data directly to the buffer, while kernel bypass avoids substantial context switching overhead, enabling direct data transmission in user space. Aside from connection establishment and memory registration, the CPUs of both hosts consume no resources during the entire data transmission process. Therefore, RDMA can achieve high throughput with low latency and high bandwidth, making it highly popular in data center scenarios. However, because RDMA bypasses kernel and protocol stack data processing, and is limited by network card hardware resources, current RDMA congestion control relies on a simple go-back-n method to recover lost packets. Packet loss retransmission can severely degrade RDMA performance; once the packet loss rate increases, RDMA connection performance degrades drastically. Therefore, a PFC mechanism is needed to ensure lossless Ethernet. Correspondingly, TCP streams do not require corresponding transmission environment configurations. Therefore, during transmission scheduling, the two must be distinguished. However, existing strict priority scheduling strategies require switches to set up priority queues internally, dividing the switch's buffer area according to priority. Under strict priority scheduling, high-priority queues can preempt the output rights of low-priority queues. This traffic scheduling strategy ensures that high-priority data streams can be transmitted quickly, with short stream completion times. For example, short streams such as notifications and requests can be transmitted quickly through the switch. However, when elements in the high-priority queue are continuous, data packets in the low-priority queue cannot be output or need to wait a long time before being output. This will bring high latency to some streams, affecting the overall stream completion time and greatly impacting the end-user experience. This method does not consider the transmission environment requirements of RDMA streams. Restricting RDMA to a fixed queue under strict priority transmission will result in unfairness between RDMA streams and TCP streams. For example, allocating the switch's first priority queue to either TCP or RDMA streams will cause preemption of transmission resources for the other type of traffic, which does not conform to the fair design principle.
[0044] When scheduling traffic, the transmission requirements of data streams of different sizes should be considered. For example, web search mainly involves short streams, which are more sensitive to transmission latency and closely related to user experience, so they need to be transmitted as quickly as possible. Data mining mainly involves long streams, which are more sensitive to transmission throughput performance, so their throughput needs to be guaranteed without requiring fast transmission. Rationally allocating network resources to traffic of different sizes can significantly improve network transmission performance and increase bandwidth utilization.
[0045] Therefore, this invention provides a method for scheduling mixed TCP and RDMA flows in data center networks, specifically addressing the simultaneous existence of TCP and RDMA flows. This method is executed on a switch, as follows: Figure 1 As shown, the method includes the following steps S101 to S103:
[0046] Step S101: During data packet transmission, query the traffic category and priority flag fields added to the headers of multiple data packets to be output, in order to distinguish the types of TCP data packets and RDMA data packets and to mark the priority of each data packet.
[0047] Step S102: Allocate each data packet to multiple switch queues according to the content recorded in the traffic category and priority labeling fields, and assign each data packet to multiple switch queues according to priority and category. The switch queues are divided into multiple priorities, and each priority contains a first-class queue and a second-class queue. The first-class queue of each priority is used to buffer TCP data packets of the corresponding priority, and the second-class queue of each priority is used to buffer RDMA data packets of the corresponding priority.
[0048] Step S103: Transmit TCP data packets and RDMA data packets in each switch queue according to the set rules. The set rules include: transmitting each TCP data packet and each RDMA data packet in descending order of priority, and transmitting TCP data packets in the first type queue and RDMA data packets in the second type queue in a round-robin scheduling manner within each priority. Lossless transmission environment is configured for the RDMA data packets in the second type queue within each priority.
[0049] In step S101, TCP packets and RDMA packets are generated by the corresponding source hosts. The source hosts configure the data to be transmitted into packets of the appropriate format according to the TCP / IP transmission protocol or RDMA transmission protocol based on the transmission requirements of specific services, and send them to the switch for transmission.
[0050] In some embodiments, the traffic category and priority label fields are configured by the source host of the corresponding data packet according to the latency requirements, and the priority value is inversely proportional to the maximum acceptable latency of the data packet.
[0051] Because TCP packets and RDMA packets have different transmission environment requirements, this embodiment requires the source host to add a marker to the packet header during packet generation to indicate the packet type and corresponding priority for efficient subsequent scheduling. The packet priority can be set according to the service type. Services that are more sensitive to latency, such as web search data, can be assigned a higher priority. Conversely, data mining and data transmission services, which have lower latency requirements but require a stable transmission environment, can be assigned a lower priority.
[0052] Specifically, in some embodiments, querying the traffic category and priority flag fields added to the headers of multiple data packets to be output includes: using a predetermined number of odd natural numbers in ascending order to mark the priority and traffic category of TCP data packets; and using a predetermined number of even natural numbers in ascending order to mark the priority and traffic category of RDMA data packets. For example, odd natural numbers 1, 3, 5, 7… are used to mark the priority of TCP data packets, with 1 being the highest priority; even natural numbers 0, 2, 4, 6… are used to mark the priority of RDMA data packets, with 0 being the highest priority. In application, if the traffic category and priority flag fields are odd numbers, it can be determined that the data packet belongs to the TCP category; if they are even numbers, it can be determined that the data packet belongs to the RDMA category. The priority can decrease from smallest to largest, and the traffic category and priority flag fields can be used to indicate the switch queue to which the data is written. The priorities of TCP packets and RDMA packets are in a one-to-one correspondence. For example, a TCP packet with header flag 1 has the same priority as an RDMA packet with header flag 0, a TCP packet with header flag 3 has the same priority as an RDMA packet with header flag 2, and so on.
[0053] In step S102, the switch sets up multiple switch queues to buffer data packets to be transmitted. Since TCP data packets and RDMA data packets have different transmission environment requirements, two types of priority queues are configured for TCP data packets and RDMA data packets within the same priority level, and the corresponding required transmission environments are configured. Specifically, the switch queue transmission environment for TCP data packets has no special requirements, while the switch queue transmission environment for RDMA data packets needs to be configured for lossless transmission. Therefore, in some embodiments, the second type of queues of each priority level in the switch queues uses PFC flow control for lossless transmission.
[0054] In step S103, in order to balance efficiency and fairness, this embodiment adopts a combination of strict priority scheduling and round-robin scheduling strategies. Among different priorities, a strict priority scheduling strategy is used to transmit data from higher priorities to lower priorities in sequence. Within the same priority, in order to balance TCP data packets and RDMA data packets and fairly allocate link resources, a round-robin scheduling strategy is used for transmission within the same priority.
[0055] In some embodiments, in step S103, a first upper limit value for the number of data packet transmission tasks is set for each switch queue. If the number of data packet transmission tasks in a switch queue is greater than or equal to the first upper limit value, the data packets to be added to that switch queue are buffered in a switch queue of the next lower priority and wait for transmission.
[0056] Since transmitting each piece of data in the data queue consumes a certain amount of time, an excessive amount of data in the queue will cause data transmission timeouts, affecting the timeliness of data transmission. In this embodiment, after setting up data queues corresponding to different priorities for storing data information—that is, after setting up each switch queue—a maximum queue depth is set for each switch queue. The maximum queue depth is the maximum capacity of data information that the switch queue can store. It should be noted that the maximum queue depth can be different for different data queues and can be adjusted in practice according to actual needs and operational conditions.
[0057] In order to prevent a large accumulation of one type of data packet within a priority level from affecting the transmission of another type of data packet, this embodiment can control the number of the two types of data packets in each priority level to be approximately equal, so as to make data transmission more efficient and fairer to the transmission of the two types of data packets.
[0058] In some embodiments, in step S103, a second upper limit value for data packet transmission time is set for each priority. If the data packet transmission time in a priority is greater than or equal to the second upper limit value, the transmission bandwidth resources are increased according to a set ratio until the data packet transmission in the corresponding priority is completed.
[0059] In practical applications, switches may execute multiple services simultaneously, and their bandwidth resources are dynamically allocated among different services. During data packet transmission, if the transmission duration of TCP and RDMA data packets within a certain priority level is greater than or equal to the second upper limit, it will affect the transmission of subsequent lower-priority data packets. In this case, bandwidth resources can be dynamically adjusted, allocating more bandwidth resources appropriately to complete the transmission of data packets of the current priority in a timely manner.
[0060] In some embodiments, before allocating each data packet to multiple switch queues according to priority and category according to the content recorded in the traffic category and priority marking fields in step S103, the method further includes: setting a remaining storage space limit for each switch queue; if it is determined that the remaining storage space capacity of the specified switch queue is less than the corresponding remaining storage space limit after the data packet to be added to the specified switch queue is written, then the data packet is pre-stored in the cache space.
[0061] To ensure that the corresponding TCP packets or RDMA packets are fully stored in the switch queue, the writing of data can be limited by setting a limit on the remaining storage space, thus ensuring that each switch queue has a certain amount of redundant space for emergency scheduling.
[0062] If there is insufficient space remaining in the switch queue, and the remaining storage space is less than the corresponding remaining storage space limit after the data packet to be added to the specified switch queue is written, the corresponding data packet will be stored in the buffer first. After a certain period of data transmission, if the remaining storage space exceeds the corresponding remaining storage space limit after the data packet to be added to the specified switch queue is written, the data packet to be transmitted stored in the buffer can be woken up and stored in the corresponding switch queue.
[0063] Furthermore, upon receiving the data packet to be transmitted, the system determines whether the size of the data to be transmitted exceeds the remaining capacity of the data queue based on the maximum queue depth of the data queue corresponding to the data to be transmitted and the amount of data to be transmitted currently stored in that data queue. If so, the data to be transmitted is stored in the buffer; otherwise, the data to be transmitted is stored in the data queue. In other words, when the amount of data to be transmitted in a data queue reaches the maximum queue depth, the data to be transmitted is stored in the buffer to avoid data loss.
[0064] On the other hand, the present invention also provides a hybrid flow scheduling system for data center networks using TCP and RDMA, comprising:
[0065] The source host is used to generate data packets and configure priorities according to the latency requirements of the data. It adds traffic category and priority tag fields to the header of the data packets according to the data packet type and the priority.
[0066] The switch is used to execute the aforementioned hybrid flow scheduling method of TCP and RDMA for data center networks.
[0067] On the other hand, the present invention also provides a hybrid flow scheduling device for TCP and RDMA in a data center network, including a processor and a memory, wherein the memory stores computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the device implements the steps of the above method.
[0068] On the other hand, the present invention also provides a computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the steps of the above-described method.
[0069] The present invention will now be described with reference to a specific embodiment:
[0070] For mixed traffic of several data stream types in a data center, ordinary switches cannot identify the traffic types. To classify data streams, the key is to mark different types of data packets so that they can be recognized and classified by the host network card and the switch. This embodiment uses the Differential Service Code Point (DSCP) concept to mark the Traffic Class field (hereinafter referred to as TC) in the IP header of data packets with a special value, thereby achieving data stream category differentiation and priority allocation. Data packets are specially marked when the source host generates the data stream; different types of data streams are marked with different values. Maintaining this value throughout the data transmission process enables data stream classification. The specific implementation is as follows:
[0071] When a data stream is generated at the source host, it carries a priority group value (hereinafter referred to as PG). For TCP and RDMA packets, special markers are filled into the TC field of their IP headers in the protocol stack and hardware network card, respectively. In order to distinguish between the two types of traffic and assign them priorities, this embodiment assigns odd-number markers to TCP data streams, where 1 is the highest priority; and assigns odd-number markers to RDMA data streams, where 0 is the highest priority. Different markers can cause packets to enter different switch queues. By assigning different markers to TCP and RDMA streams, TCP and RDMA streams can be isolated. RDMA streams can be controlled separately using PFC without affecting the normal transmission of TCP streams.
[0072] To balance efficiency and fairness, a priority-based round-robin scheduling strategy can be designed by combining strict priority scheduling and round-robin scheduling. For TCP and RDMA flows sent from the host network card, the switch places them into pre-configured priority queues based on the content of the Traffic Class field in the IP header of the data packets. The highest priority queue can be used to send some flow control information, such as pause frames in PFC technology, and data packets that are very sensitive to latency. TCP and RDMA data packets of the same priority are output in a relatively fair round-robin scheduling manner. Based on this design idea, the following specific scheduling strategy is obtained.
[0073] The switch's 2n priority queues are evenly distributed among TCP and RDMA flows. Each type of traffic is assigned n priorities. TCP and RDMA flows within the same priority level are scheduled using a round-robin method, prioritizing them based on their sensitivity to latency and throughput. For the switch's 2n priority queues, queue 0 is the highest priority, and queue 2n-1 is the lowest priority. Different priority levels (PG) are assigned to TCP and RDMA flows to ensure they are routed to different queues. RDMA flows are configured to use the lossless transmission queue that supports PFC (Predicted Frequency Conversion).
[0074] This involves a priority issue between priority criteria and polling criteria. For example, if the RDMA stream queue has no packets while the TCP stream queue has packets in the first-priority queues, should the higher-priority TCP stream be sent according to the priority criterion, or should the lower-priority RDMA stream be sent according to the polling criterion? This design uses priority criteria for data transmission because there are multiple priority levels. Consider an extreme case where the RDMA queue contains only the lowest-priority data stream, while the TCP queue contains a large amount of high-priority data. In this case, ignoring priority to balance the transmission resources of the two types of traffic is clearly inappropriate. During data transmission, the higher-priority queue can preempt the output right of the lower-priority queue, and the bandwidth of TCP and RDMA streams of the same priority is allocated fairly, achieving a relative balance between fairness and efficiency. This algorithm theoretically combines the advantages of both algorithms, enabling not only faster passage of short streams through the switch but also more reasonable transmission of long streams.
[0075] The beneficial effects of this embodiment include the following description:
[0076] A simulation experiment was conducted on a switch with eight priority queues to test the transmission performance of short-flow, long-flow, and average-flow signals. The results are as follows: Figure 2 The figure shows the completion time of two types of short streams under different load conditions when using different scheduling methods to output data packets. Figure 2-a specifies the short stream completion time for TCP stream statistics in the data stream. Figure 2 -b represents the completion time of the RDMA short flow. Experimental results show that the scheme in this embodiment significantly improves the completion time of short flows. Compared to the polling scheduling algorithm, which is not very friendly to short flow transmission, strict priority scheduling achieves priority transmission of latency-sensitive flows by marking short flows with high priority. However, the scheme in this embodiment, due to the introduction of a priority transmission mechanism, is slightly better than strict priority scheduling in short flow transmission performance and far better than polling scheduling. The reason it is better than strict priority scheduling is that in strict priority scheduling, only RDMA flows are allowed to pass through the highest priority, while the scheme in this embodiment allows TCP flows and RDMA flows to share high priority, making full use of bandwidth resources. In a data center application scenario with a certain type of traffic, the scheme in this embodiment will be more flexible and have better performance than strict priority scheduling.
[0077] as follows Figure 3 The figure shows the completion time of two types of long streams under different load conditions when using different scheduling methods to output data packets. Figure 3 -a specifies the completion time of the TCP stream in the data stream statistics. Figure 3 -b represents the completion time of the RDMA stream in the data stream. The solution in this embodiment does not significantly improve the completion time of long streams. Under low load conditions, it falls between the two traditional algorithms. Under high load conditions, it is not as good as the round-robin scheduling algorithm, but it is worse than the strict priority scheduling algorithm overall. However, considering that high-priority latency-sensitive streams preempt the output rights of low-priority data streams, the transmission performance of long streams can be reasonably sacrificed in exchange for the timeliness of short streams.
[0078] as follows Figure 4 The figure shows the average stream completion time for two types of data packets under different load conditions, using different scheduling methods for data packet output. Figure 4 -a specifies the completion time of the TCP stream in the data stream statistics. Figure 4 -b represents the completion time of the RDMA stream statistics in the data stream. Overall, the scheme in this embodiment is superior to the two traditional traffic scheduling algorithms in terms of overall stream completion time. As the load increases, the performance of the scheme in this embodiment becomes more apparent. This is mainly due to the fast transmission of short streams brought about by the priority mechanism and the traffic fairness brought about by the polling mechanism. To a certain extent, it overcomes the shortcomings of the two traditional algorithms and is more balanced and efficient in scheduling different types of traffic.
[0079] The fairness of the transmission of the two types of traffic was tested through experiments, as follows: Figure 5 The figure shows the completion time of TCP and RDMA streams under different scheduling methods, which can demonstrate the scheduling fairness of the traffic scheduling algorithm. Figure 5-a is a comparison of short flows under different scheduling methods. Figure 5 -b is a comparison of long flows under different scheduling methods. Figure 5 -c represents a comparison of average flow under different scheduling methods. The flow completion time used for comparison is the average flow completion time under different loads. Here, a bar chart comparing the average flow completion time of the two types of traffic is drawn using RDMA flow as the standard. The chart shows that the scheme in this embodiment achieves the best balance between TCP and RDMA traffic, followed by the round-robin mechanism where all queues have equal status. Strict priority scheduling is the worst in terms of traffic fairness, which is determined by the characteristics of this algorithm. Because the allocation of priority queues cannot be evenly distributed between the two sides, TCP flows allocated to odd-numbered queues have a greater transmission disadvantage compared to RDMA flows. The scheme in this embodiment has similar traffic fairness settings to round-robin scheduling, so its overall performance is close to round-robin scheduling, and it is even better than round-robin scheduling in scheduling short flows.
[0080] Furthermore, it can be seen that the completion time of TCP streams is longer than that of RDMA streams under different scheduling methods. This may be related to the fact that RDMA uses the RoCEv2 protocol and UDP transmission mode. Due to the smaller network scale, the probability of network congestion is lower, and the possibility of PFC flow control being triggered is smaller, so the transmission speed of RDMA streams is very fast. However, due to the introduction of a random packet loss mechanism when configuring the network link, TCP streams with acknowledgment and automatic retransmission mechanisms may require more time to complete the transmission of data streams.
[0081] In summary, the solution in this embodiment can schedule TCP and RDMA streams fairly and efficiently, while providing targeted services for traffic with different requirements for latency and throughput. Compared with the two traditional traffic scheduling algorithms, it has a significant performance improvement.
[0082] In the data center network TCP and RDMA hybrid flow scheduling method, system, and apparatus described in this invention, TCP packets and RDMA packets are cached in different switch queues according to their respective priorities, and the transmission environments required for each type of packet are configured separately. During transmission, TCP packets and RDMA packets are transmitted sequentially in descending order of priority, and the two queues storing TCP and RDMA packets within the same priority are transmitted using a round-robin scheduling method. This invention can adapt to the requirements of TCP and RDMA hybrid flow scheduling, effectively utilize bandwidth resources, and schedule TCP and RDMA flows relatively fairly and efficiently, providing targeted services for traffic with different latency and throughput requirements.
[0083] Corresponding to the above method, the present invention also provides a data center network TCP and RDMA hybrid flow scheduling device / system, the device / system including a computer device, the computer device including a processor and a memory, the memory storing computer instructions, the processor being used to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the device / system implements the steps of the method as described above.
[0084] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned edge computing server deployment method. The computer-readable storage medium can be a tangible storage medium, such as random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disks, removable storage disks, CD-ROMs, or any other form of storage medium known in the art.
[0085] Those skilled in the art will understand that the exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Whether implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention. When implemented in hardware, it can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the desired tasks. The programs or code segments can be stored in a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave.
[0086] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.
[0087] In this invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or in place of features of other embodiments.
[0088] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations of the embodiments of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A hybrid flow scheduling method using TCP and RDMA for data center networks, characterized in that, The method is executed on a switch and includes the following steps: During data packet transmission, the traffic category and priority flag fields added to the headers of multiple data packets to be output are queried to distinguish the types of TCP data packets and RDMA data packets and to mark the priority of each data packet. Specifically, the priority and traffic category of the TCP data packets are marked by a set number of odd natural numbers in ascending order, while the priority and traffic category of the RDMA data packets are marked by a set number of even natural numbers in ascending order. The source host configures the corresponding priority according to latency requirements, and the priority value is inversely proportional to the maximum acceptable latency of the data packet. Each data packet is allocated to multiple switch queues according to the content recorded in the traffic category and priority marking fields, based on priority and category. The switch queues are divided into multiple priorities, each priority containing a first-class queue and a second-class queue. The first-class queue of each priority is used to cache TCP data packets of the corresponding priority, and the second-class queue of each priority is used to cache RDMA data packets of the corresponding priority. A first upper limit value is set for the number of data packet transmission tasks in each switch queue. If the number of data packet transmission tasks in a switch queue is greater than or equal to the first upper limit value, then the data packets to be added to that switch queue are cached in the next lower priority switch queue for transmission. TCP and RDMA data packets in each switch queue are transmitted according to predefined rules. These rules include: transmitting TCP and RDMA data packets sequentially in descending order of priority; within each priority level, TCP data packets in the first type of queue and RDMA data packets in the second type of queue are transmitted using a round-robin scheduling method; a lossless transmission environment is configured for the RDMA data packets in the second type of queue within each priority level; and a second upper limit value is set for data packet transmission time for each priority level. If the transmission time of a data packet in a priority level is greater than or equal to the second upper limit value, the transmission bandwidth resources are increased by a predefined ratio until the data packet transmission in the corresponding priority level is completed. The second-class queues of each priority level in the switch queues use PFC flow control for lossless transmission; Before allocating each data packet to multiple switch queues according to priority and category, based on the content recorded in the traffic category and priority marking fields, the method further includes: setting a remaining storage space limit for each switch queue; if it is determined that the remaining storage space capacity of the specified switch queue is less than the corresponding remaining storage space limit after a data packet to be added to the specified switch queue is written, then the data packet is pre-stored in the cache space.
2. A hybrid TCP and RDMA flow scheduling system for data center networks, characterized in that, include: The source host is used to generate data packets and configure priorities according to the latency requirements of the data. It adds traffic category and priority tag fields to the header of the data packets according to the data packet type and the priority. A switch for executing the hybrid flow scheduling method of TCP and RDMA for data center networks as described in claim 1.
3. A hybrid TCP and RDMA flow scheduling device for data center networks, comprising a processor and a memory, characterized in that, The memory stores computer instructions, and the processor executes the computer instructions stored in the memory. When the computer instructions are executed by the processor, the device implements the steps of the method as described in claim 1.
4. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in claim 1.