Host-in-network congestion control method based on p4 programmable rack switch
By using P4 programmable top-of-rack switches to monitor and embed congestion information in real time in data center networks, the problem of delayed response and traffic type differentiation in network congestion control within hosts is solved, enabling immediate and compatible congestion mitigation and improving service quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG UNIV
- Filing Date
- 2026-07-02
- Publication Date
- 2026-07-31
AI Technical Summary
Existing host-based network congestion control technologies suffer from issues such as slow response, inability to distinguish different traffic types, inability to handle UDP traffic, ignoring internal host congestion, and high deployment costs in high-speed data center networks, leading to loss of critical business traffic and performance degradation.
A congestion control method based on P4 programmable top-of-rack switches is adopted. By monitoring congestion information in real time in the server and embedding it into the packet header, the P4 programmable top-of-rack switches are used to perform instantaneous, type-aware congestion mitigation without modifying the transport layer protocol, thus realizing data plane control.
It achieves instant response and differentiated scheduling, reduces packet loss rate and latency, improves the service quality of multi-tenant data center networks, has strong compatibility, and low deployment cost.
Smart Images

Figure CN122496465A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network congestion control technology within a host, and specifically to a network congestion control method within a host based on a P4 programmable top-of-rack switch. Background Technology
[0002] With the rapid development of cutting-edge technologies such as high-performance computing, cloud storage, machine learning, big data analytics, and large-scale language model training, an increasing number of data center applications are being developed and deployed in production environments. These applications place stringent demands on network throughput and latency performance, requiring not only high throughput but also extremely low tail latency. Some applications even consume significant amounts of central processing unit (CPU) and graphics processing unit (GPU) computing resources. However, when the network interface card (NIC) performs Direct Memory Access (DMA) operations to transfer received messages to memory, this process generates intense contention for limited memory bandwidth between the NIC and the CPU performing the computation. Due to the high throughput characteristics of data center applications, host network congestion arises, with packets queuing in the NIC buffer, leading to significant packet loss and increased latency, severely impacting application performance and quality of service.
[0003] In existing technologies, host network congestion control is mainly implemented through the following process: (I) collecting host network congestion signals in the Linux kernel; (II) when a congestion signal is detected, triggering a network congestion control mechanism, i.e., notifying all packet senders based on Transmission Control Protocol (TCP) to reduce their sending rate. This rate reduction process is specifically implemented by setting the Explicit Congestion Notification (ECN) bit of TCP packets; (III) when network throughput is lower than a given value, allocating more host resources to local host traffic instead of network traffic. This congestion control mechanism based on end-to-end feedback has played a certain role in traditional networks, but it has revealed many shortcomings in modern high-speed data center network environments.
[0004] In recent years, researchers have proposed a series of improved congestion control protocols. Data Center TCP (DCTCP), a foundational ECN-based protocol, reduces queue congestion and improves throughput for long TCP streams through precise congestion feedback mechanisms. D2TCP introduces deadline-aware capabilities on top of DCTCP, providing higher priority for delay-critical flows. Some studies have proposed hybrid flow scheduling mechanisms that seek a balance between short and long flows to simultaneously meet the performance requirements of both types. The Swift protocol demonstrates that a simple delay-based controller can achieve effective performance by reacting to queuing delays rather than ECN signals. High Precision Congestion Control (HPCC) utilizes in-band network telemetry to precisely adjust the sender rate at the round-trip time (RTT) granularity, achieving high-precision congestion control. Transport Informed by Measurement of Latency (TIMELY) proposes an RTT-based congestion control scheme that adjusts the sending rate by accurately measuring packet delay.
[0005] Meanwhile, researchers have also conducted extensive research on queue management and scheduling. Active Buffer Management (ABM) introduces an active buffer management mechanism, preventing tail latency accumulation caused by burst traffic by dynamically allocating shared switch buffers among flows. Active Queue Management (AQM) proposes an intra-network queue abstraction that enforces cross-tenant service fairness while maintaining high utilization. Host Congestion Control (HostCC) represents a cross-layer approach capable of detecting DMA and Peripheral Component Interconnect Express (PCIe) congestion within the host and reacting before the signal propagates to the network.
[0006] However, the aforementioned existing technical solutions still have several defects and shortcomings:
[0007] First, existing end-to-end congestion control schemes all rely on the sender adjusting the transmission rate based on feedback signals, a process that requires at least one round-trip time. In high-speed data center networks, the network card buffer may overflow during the round-trip time, causing a large number of data packets to be dropped indiscriminately, and congestion control always lags behind the occurrence of congestion events.
[0008] Second, the existing solution treats all TCP streams equally, ignoring the different traffic requirements of different types of applications in data centers. Applications sensitive to traffic, such as control loops and interactive streaming media, are treated the same as applications insensitive to traffic, such as log synchronization and batch replication. This results in a severe performance degradation in the former, failing to meet quality of service requirements.
[0009] Third, existing solutions primarily focus on TCP traffic, while User Datagram Protocol (UDP) traffic is also a crucial component of the intranet. For example, the widely used RDMA v2 (RDMA over Converged Ethernet v2, RoCEv2) protocol is based on UDP. Existing congestion control mechanisms cannot effectively handle UDP traffic congestion, resulting in a lack of effective protection for Remote Direct Memory Access (RDMA) traffic during congestion.
[0010] Fourth, due to limitations in network interface card (NIC) buffer size, overflowing data packets are indiscriminately dropped during congestion, while time-sensitive data packets that should be retained are discarded. Current technology cannot selectively drop packets based on their importance during congestion, resulting in critical and non-critical traffic suffering equal losses.
[0011] Fifth, existing solutions primarily focus on network-internal congestion while neglecting host-internal congestion. When the network card performs DMA operations, host-internal resources such as the PCIe bus and memory controller may become bottlenecks, causing data packets to queue within the host. This type of host-internal congestion is invisible to transport layer protocols and network devices and cannot be effectively handled by existing mechanisms.
[0012] Sixth, most existing solutions require modification of transport layer protocols or application layer code, resulting in high deployment costs and poor compatibility. For example, DCTCP requires modification of the TCP protocol stack, and HPCC requires network devices to support in-band network telemetry. These requirements are difficult to meet in existing network environments, limiting the practical deployment and application of the technologies.
[0013] In summary, based on the existing host-based network architecture, how to achieve more immediate, differentiated, and compatible host network congestion mitigation, how to achieve unified congestion control of TCP and UDP traffic without modifying the transport layer protocol, how to perform fine-grained scheduling based on service type when congestion occurs, and how to quickly transmit internal host congestion signals to network devices to achieve closed-loop feedback are all research problems that have both significant economic value and technical challenges. Summary of the Invention
[0014] The purpose of this invention is to address the shortcomings of existing technologies by providing a host-based network congestion control method based on a P4 programmable top-of-rack switch. This invention offloads the congestion control component to the P4 programmable top-of-rack switch, achieving real-time, type-aware congestion mitigation at the data plane without modifying the transport layer protocol. This effectively reduces packet loss rate and tail latency, improving the quality of network service within hosts in multi-tenant data center networks.
[0015] The objective of this invention is achieved through the following technical solution: The first aspect of this invention provides a host-based network congestion control method based on a P4 programmable top-of-rack switch, applied to a data center network. The data center network includes multiple servers and a P4 programmable top-of-rack switch, with each server directly connected to the P4 programmable top-of-rack switch via a network interface card (NIC). The method specifically includes: Host-side congestion labeling: In each server, obtain congestion-related information to characterize the network resource usage within the server, determine the congestion level within the server based on the congestion-related information, and obtain the service type of the data packet; add the congestion level and service type to the data packet, and send the data packet to the P4 programmable top-of-rack switch; Switch-side congestion status tracking: The P4 programmable top-of-rack switch receives data packets, parses and extracts the congestion level and service type in the inbound pipeline; and maintains the congestion status of the destination host of the data packets according to the congestion level. Priority-based differentiated scheduling: The P4 programmable top rack switch determines the scheduling priority and packet loss eligibility of data packets based on the current congestion status of the destination host and the service type of the data packets. It then performs queue scheduling and congestion control on the data packets based on the scheduling priority, packet loss eligibility, and the instantaneous queue occupancy rate of the P4 programmable top rack switch. Congestion mitigation: When persistent congestion is detected, differentiated processing is performed based on the service type, and the default scheduling policy is reset when the destination host enters the recovery state.
[0016] Furthermore, the congestion level within the server is determined using the following method: The kernel monitoring module in the server monitors the usage of the direct memory access send queue in real time and calculates the normalized utilization rate. Based on a preset first threshold and a second threshold, the normalized utilization rate index is mapped to discrete congestion levels: when the normalized utilization rate index is less than the first threshold, the congestion level is determined to be 0, indicating no congestion; when the normalized utilization rate index is greater than or equal to the first threshold and less than the second threshold, the congestion level is determined to be 1, indicating mild congestion; when the normalized utilization rate index is greater than or equal to the second threshold, the congestion level is determined to be 2, indicating severe congestion.
[0017] Furthermore, the business type is determined according to at least one of the following methods: Static allocation method: Configured via socket options, differential service code point rules, or destination port; Dynamic allocation method: Real-time labeling is performed using application metadata or tenant-level classifiers; The business types include best-effort, delay-sensitive, and lossless critical.
[0018] Furthermore, adding the congestion level and service type to the data packet specifically includes: The congestion level and service type are embedded as labels in the header of the data packet. Specifically, the congestion level and service type labels are carried by using reserved fields in the header of the data packet, explicit congestion notification fields, differential service code point fields, or optional fields in the tunnel encapsulation header. The embedding operation does not increase the header length of the data packet and does not modify the application layer protocol or transport layer protocol of the data packet.
[0019] Furthermore, the maintenance of the congestion status of the destination host of the data packets specifically includes: A finite state machine is maintained for each destination host, and the finite state machine is used to characterize the congestion evolution trend of the destination host within a continuous time window; The state of the finite state machine is updated based on the congestion level in multiple consecutive received data packets; the states of the finite state machine include normal state, light congestion state, heavy congestion state, and recovery state. The normal state indicates that no congestion has been observed, and its corresponding congestion level is 0; the mild congestion state is defined as a continuous state of congestion. The state is entered when the congestion level of a data packet is 1; the severe congestion state is entered when the congestion level of a data packet is 1. The recovery state is entered when the congestion level of a data packet is 2; the recovery state is the state that occurs consecutively after the severe congestion state. The cooling state is entered when the congestion level of a data packet is 0.
[0020] Furthermore, determining the scheduling priority and packet loss eligibility of data packets specifically includes: Based on the current congestion state of the destination host and the service type of the data packet, a preset mapping strategy is used to determine the scheduling priority and packet loss eligibility. The value of the scheduling priority is negatively correlated with the degree of congestion represented by the congestion state and positively correlated with the quality of service requirements represented by the service type. The packet loss eligibility is used to indicate whether data packets are allowed to be dropped when congestion occurs. In determining scheduling priorities, the basic priorities are first determined based on the congestion status and service type, and then the basic priorities are downgraded based on the degree of congestion represented by the congestion status to obtain the scheduling priorities.
[0021] Furthermore, determining the scheduling priority and packet loss eligibility of data packets also includes: Obtain the tenant or service group identifier associated with the data packet; The scheduling priority is adjusted based on the weight corresponding to the tenant or service group identifier in order to achieve differentiated services in a multi-tenant data center environment.
[0022] Furthermore, the step of performing differentiated processing based on service type when continuous congestion is detected, and resetting to the default scheduling policy when the destination host enters the recovery state, specifically includes: When the current congestion state of the destination host is severe congestion, differentiated processing is performed according to the service type: For packets with a best-effort service type, they are dropped directly at the entry point of the P4 programmable top rack switch; for packets with a delay-sensitive service type, their scheduling priority is reduced to the first level, while retaining their eligibility to enter the queue for transmission; for packets with a lossless critical service type, their scheduling priority is reduced to the second level, while retaining their eligibility to enter the queue for transmission, wherein the second level is higher than or equal to the first level. When the current congestion state of the destination host is in the recovery state, the scheduling priority, packet loss eligibility, and per-flow priority freeze state of the data packets are reset to the default policy corresponding to the service type.
[0023] A second aspect of this invention provides a host-based intranet congestion control system based on a P4 programmable top-of-rack switch, comprising: Multiple servers, each server is equipped with a host-side congestion labeling module, which is used to perform the host-side congestion labeling steps described above; P4 programmable top-of-rack switch, connecting to multiple servers, including: The switch-side congestion state tracking module is used to perform the above-mentioned switch-side congestion state tracking steps; The differentiated scheduling module is used to execute the priority-based differentiated scheduling steps described above. The congestion mitigation module is used to perform the congestion mitigation steps described above. The control plane communicates with the P4 programmable top-of-rack switch via an application programming interface (API) and is used to dynamically configure the operating parameters of the switch-side congestion status tracking module and differentiated scheduling module.
[0024] A third aspect of the present invention provides an electronic device, including one or more processors and a memory, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the above-described host-based network congestion control method based on a P4 programmable top-of-rack switch.
[0025] The beneficial effects of this invention are as follows: The congestion control method of this invention operates entirely in the data plane, requiring no modification to the TCP / IP protocol stack, ensuring compatibility with existing applications and transmission protocols, and resulting in low deployment costs; This invention achieves zero-latency transmission of congestion signals by real-time monitoring of DMA queue congestion on the host side and embedding the information into data packets, avoiding the response delay of at least one RTT in traditional solutions; This invention performs congestion control directly in the data plane through a P4 programmable top-of-rack switch, utilizing terabit line-speed processing capabilities to achieve instantaneous response, significantly reducing packet loss and latency; This invention filters out transient micro-burst noise using a finite state machine, accurately... This invention identifies persistent congestion trends and avoids scheduling jitter caused by misjudgments. Based on differentiated scheduling according to service type and congestion state, it ensures that latency-sensitive and lossless critical traffic is prioritized during congestion, improving service quality in multi-tenant environments. Through a tenant-aware priority enhancement mechanism, it achieves refined service quality assurance in multi-tenant environments. This invention has low resource consumption, high portability, and is easy to deploy on modern P4 programmable top-of-rack switch platforms. It demonstrates significant benefits in improving the immediacy of congestion response, ensuring service quality for critical traffic, and reducing intra-host network packet loss rate and tail latency. Attached Figure Description
[0026] Figure 1 This is a schematic diagram of the system architecture of a host-based network congestion control method based on a P4 programmable top-of-rack switch provided in an embodiment of the present invention;
[0027] Figure 2 This is a schematic diagram of a host-side DMA transfer pipeline and congestion generation provided in an embodiment of the present invention;
[0028] Figure 3 This is a flowchart of the host-side congestion level and service type labeling algorithm provided in an embodiment of the present invention;
[0029] Figure 4 This is a schematic diagram of the state transition of a finite state machine on the switch side according to an embodiment of the present invention;
[0030] Figure 5 This is a logical block diagram of the mapping between congestion level, service type and scheduling priority provided in an embodiment of the present invention. Detailed Implementation
[0031] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0032] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The singular forms “a,” “the,” and “the” used in this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0033] It should be understood that although the terms first, second, third, etc., may be used in this invention to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of this invention, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0034] The present invention will now be described in detail with reference to the accompanying drawings. Unless otherwise specified, the features of the following embodiments and implementations can be combined with each other.
[0035] Regarding the overall system architecture, such as Figure 1 As shown in this embodiment, a precise intra-host network congestion control system based on a P4 programmable top-of-rack switch (ToR switch) is provided, mainly composed of an end host and a P4 programmable top-of-rack switch (ToR switch). The end host deploys a lightweight kernel monitoring module configured to sense the pressure on internal host resources (such as PCIe bus and memory bandwidth) in real time, and achieves zero-latency propagation of congestion signals by embedding congestion context information in the header of each outgoing data packet. The P4 programmable top-of-rack switch (e.g., a P4 switch based on an Intel Tofino chip) is directly connected to the end host and is responsible for parsing this labeling information (i.e., congestion level and service type labels) at terabit-level line rate in the data plane, and executing state tracking and differentiated scheduling logic based on a finite state machine (FSM). The congestion context information includes congestion level labels and service type labels.
[0036] In this embodiment, the intra-host network refers to the internal congestion that occurs within the server during Direct Memory Access (DMA) data transfer between the network interface card (NIC) and host memory, caused by limitations in PCIe path, memory bandwidth, or NIC processing capabilities. This congestion is typically invisible to traditional external network transport layer protocols but significantly impacts end-to-end latency and throughput at the application layer. The network transport layer protocol stack can contain various network transport layer protocols, such as Transmission Control Protocol (TCP), User Datagram Protocol (UDP), and IP protocol.
[0037] This invention relates to a host-based network congestion control method based on a P4 programmable top-of-rack switch, applied to a data center network. The data center network includes multiple servers and a P4 programmable top-of-rack switch, with each server directly connected to the P4 programmable top-of-rack switch via a network interface card (NIC). The method includes the following steps:
[0038] (1) Host-side congestion labeling: In each server, obtain congestion-related information to characterize the network resource occupancy of the server, determine the congestion level (CL) of the server based on the congestion-related information, and obtain the business type (BT) of the data packet; add the congestion level and business type to the data packet and send the data packet to the P4 programmable rack top switch.
[0039] Sampling and classification of host-side congestion levels, combined with Figure 2 In high-throughput data transmission between applications in a data center network, the network interface card (NIC) transfers received packet data to memory via DMA operations. When the PCIe path, NIC hardware, or receiver processing capacity becomes a bottleneck, DMA descriptors accumulate in the send queue, leading to increased queuing latency. This internal host congestion is usually invisible to traditional external network transport layer protocols (such as standard TCP, UDP, IP, etc.).
[0040] In this embodiment, the kernel monitoring module is mounted on the DMA enqueue path of the network card driver. The congestion level inside the server is determined by the following method: the kernel monitoring module set in the server monitors the occupancy of the direct memory access send queue in real time, that is, the DMA queue occupancy rate and the availability of descriptors, in order to calculate the normalized utilization index within a fixed time interval. This metric reflects the real-time pressure level of the data path within the host. The normalized utilization rate (NRR) is used as a congestion metric to determine the congestion level within the server. The kernel monitoring module maps the NRR to discrete congestion levels based on preset first and second thresholds: When the NRR is less than the first threshold, the congestion level is determined to be 0, indicating no congestion and sufficient internal resources; when the NRR is greater than or equal to the first threshold and less than the second threshold, the congestion level is determined to be 1, indicating mild congestion, where pressure begins to appear within the host but performance is not yet severely affected; when the NRR is greater than or equal to the second threshold, the congestion level is determined to be 2, indicating severe congestion, where a serious bottleneck has occurred within the host, requiring immediate mitigation measures. This discrete mapping process can be expressed by the following formula:
[0041] In the formula, CL represents the congestion level, CL=0 represents no congestion, CL=1 represents mild congestion, and CL=2 represents severe congestion; Represents a mapping function; Indicates the first threshold. This represents the second threshold and the first threshold. Second threshold Based on network interface card (NIC) model, queue length, average traffic rate, and queuing latency under load, empirical optimization can be performed to ensure that the congestion level classification accurately reflects the service quality requirements of actual applications.
[0042] In this embodiment, the labeling mechanism for service types is as follows: the server labels each data packet with a service type tag based on the application's quality of service requirements. Specifically, service types are divided into the following three categories:
[0043] ① Best-effort (BE) type: Used for background services that are not sensitive to latency, such as log synchronization or large-scale replication. This type of traffic can be dropped first when congestion occurs.
[0044] ② Delay-sensitive (DS) type: Used for control loops or interactive streaming media and other streams that are extremely sensitive to delay. This type of traffic needs to be transmitted with low latency and should be dropped as much as possible even when congested.
[0045] ③ Lossless (LC) type: Used for streams that require high reliability, such as Remote Direct Memory Access (RDMA) or real-time commands. This type of traffic requires zero packet loss and must ensure reliable transmission even when the network is severely congested.
[0046] Furthermore, the business type is determined according to at least one of the following methods:
[0047] ① Static allocation method: Configured via socket options, Differentiated Services Code Point (DSCP) rules, or destination port.
[0048] ② Dynamic allocation method: Real-time labeling is performed by applying metadata or tenant-level classifiers.
[0049] In this embodiment, the embedding and transmission of congestion level and service type information are combined with... Figure 3 The labeling algorithm shown demonstrates how the kernel monitoring module performs real-time labeling along the packet transmission path via a Netfilter hook. Without increasing the total packet length, congestion level and service type are added to the packet. Specifically, this involves embedding the congestion level and service type as labels into the packet header. This is achieved by utilizing reserved fields in the packet header, the Explicit Congestion Notification (ECN) field, the Differential Service Code Point field, or optional fields in the tunnel encapsulation header to carry the congestion level and service type labels. This embedding operation does not increase the packet header length and does not modify the application layer or transport layer protocol of the packet.
[0050] Specifically, for TCP / IP traffic, the congestion level (2 bits, representing 3 levels) and service type label (2 bits, representing 3 levels) are carried using either the 2-bit reserved TCP field or the explicit congestion notification field / DSCP field in the IP header. For tunnel-encapsulated traffic in virtualized environments, optional fields in the tunnel encapsulation header of Virtual eXtensible Local Area Network (VXLAN) or Generic Network Virtualization Encapsulation (GENEVE) can be reused to carry the congestion level and service type label. This labeling process is completely transparent to user application layer and transport layer protocols, with an average processing overhead of approximately 210.426 ns per packet, effectively compatible with existing TCP / UDP traffic and supporting line-rate forwarding.
[0051] (2) Switch-side congestion status tracking: The P4 programmable rack top switch receives data packets, parses and extracts the congestion level and service type in the inbound pipeline; and maintains the congestion status of the destination host (i.e., the destination server) of the data packets according to the congestion level.
[0052] For congestion status tracking on the P4 programmable top rack switch side, combined with Figure 4When a data packet arrives at the P4 programmable top-of-rack switch, the inbound pipeline of the P4 programmable top-of-rack switch parses and extracts the congestion level and service type label from the header. Since scheduling based directly on the instantaneous CL value is prone to scheduling jitter under small bursts of traffic, in order to avoid this problem, this embodiment instantiates a finite state machine (FSM) for each destination host in the data plane to filter transient noise and maintain historical congestion states.
[0053] In this embodiment, maintaining the congestion state of the destination host of the data packets specifically includes: maintaining a finite state machine for each destination host, the finite state machine being used to characterize the congestion evolution trend of the destination host within a continuous time window; and updating the state of the finite state machine according to the congestion level in multiple consecutive received data packets to distinguish between transient micro-bursts and continuous congestion trends.
[0054] Furthermore, for the specific state transition logic of the finite state machine, the FSM defines four hierarchical states to capture the complete lifecycle of congestion events. The states of the finite state machine include: Normal state. Light congestion Heavy congestion state and Recovery state The normal state indicates that no congestion has been observed, and its corresponding congestion level CL is 0; the mild congestion state is characterized by continuous congestion. The state is entered when the congestion level CL of a data packet is 1 (i.e., mild congestion), indicating that potential pressure is beginning to appear; the severe congestion state is entered when the congestion level CL of a data packet is 1 (i.e., mild congestion). The state is entered when the congestion level CL of a data packet is 2 (i.e., severe congestion), indicating a serious bottleneck that requires active mitigation measures; the recovery state occurs consecutively after the severe congestion state. This is a cooling state entered when the congestion level of a data packet is 0 (i.e., no congestion), used to prevent premature return to the normal state under oscillating conditions.
[0055] For example, when the current state of the FSM is normal. At that time, during continuous observation When CL=1, the FSM will enter a state of mild congestion. At this time, CL=1, such as Figure 4 As shown. When the current state of the FSM is mild congestion. At that time, during continuous observation When CL=2, the FSM will enter a state of severe congestion. At this point, CL=2; and when a CL=0 is observed, the FSM will enter a normal state. At this point, CL=0. Mild congestion state. It's just a warning period for potential stress, without any destructive actions (such as packet loss), so it doesn't need to be treated like a severe congestion state. That would require a cooling-off period (i.e., recovery period). It takes time to recover; once the pressure disappears (i.e., CL=0 occurs once), it should immediately return to normal. To maintain scheduling sensitivity. When the current state of the FSM is heavily congested. At that time, during continuous observation When CL=0, FSM will enter recovery state. At this point, CL=0; while in continuous observation When CL=1, the FSM will enter a state of mild congestion. At this point, CL=1. This occurs when the current state of the FSM is in a normal state. Suddenly, multiple servers simultaneously sent packets at full speed to the same destination host, causing the P4 programmable top-of-rack switch to receive a continuous stream of packets. A number of data packets with CL=2, meaning continuously observed When CL=2, the FSM will skip the mild congestion state. Directly from normal state Switch to severe congestion state Implement emergency packet loss protection.
[0056] It should be understood that, , and All parameters are configurable and can be optimized according to the dynamics of the network environment and the requirements for response speed. The counters for each destination and the current status tracking are realized through the register array in the data plane where the P4 programmable top-of-rack switch is located.
[0057] (3) Priority-based differentiated scheduling: The P4 programmable top-of-rack switch determines the scheduling priority of data packets based on the current congestion status of the destination host and the service type of the data packets. And packet loss eligibility It performs queue scheduling and congestion control on data packets based on scheduling priority, packet loss eligibility, and instantaneous queue occupancy rate of the P4 programmable top-of-rack switch.
[0058] For priority-based differentiated scheduling mechanisms, combined with Figure 5 The P4 programmable top-of-rack switch determines the congestion status of the destination host, i.e., the current FSM status. Based on the service type of the data packets, a scheduling decision is calculated by matching the action table, which includes the scheduling priority of the data packets. And packet loss eligibility Scheduling priority The hardware exit queue used to determine which data packets enter. The value of is a non-negative integer, that is, it satisfies , A higher value indicates a higher scheduling urgency. Packet loss eligibility The decision is made on whether to allow the packet to be dropped when the buffer is under pressure. The matching action table consists of two parts: a matching key (input) and an action (output execution). The matching key is a composite index composed of two fields: the current FSM state of the destination host. Both the data packet's service type (BT) and the matching type are exact matches; the action refers to scheduling decisions, including scheduling priorities. And packet loss eligibility The core innovation of the differentiated scheduling mechanism proposed in this invention lies in providing a guiding principle and method for control and scheduling under dynamic constraints of congestion state and application service type within a multi-dimensional host, rather than being limited to a specific finite discrete level.
[0059] In this embodiment, determining the scheduling priority and packet loss eligibility of data packets specifically includes: determining the scheduling priority and packet loss eligibility based on the current congestion state of the destination host and the service type of the data packets through a preset mapping strategy; the scheduling priority value is negatively correlated with the congestion level represented by the congestion state and positively correlated with the service quality requirements represented by the service type; the packet loss eligibility is used to indicate whether data packets are allowed to be dropped when congestion occurs. Specifically, when determining the scheduling priority, a basic priority is first determined based on the congestion state and service type, and then the basic priority is downgraded based on the congestion level represented by the congestion state to obtain the scheduling priority.
[0060] Specifically, to facilitate understanding by those skilled in the art and to facilitate practical hardware implementation, a common four-queue switch environment will be used as an example for detailed explanation, where scheduling priority will be discussed. It is preferable to use a finite discrete set The value is taken from the middle to determine the hardware exit queue into which the data packet enters; Indicates packet loss eligibility, determining whether packet dropping is allowed when the buffer is under pressure; indicates whether a packet is eligible to be dropped when congestion occurs. This indicates that packet loss is possible. This indicates that the packet cannot be lost.
[0061] Among them, the one used to determine the scheduling priority And packet loss eligibility The mapping strategy can be expressed by the following formula:
[0062] In the formula, This indicates the current congestion state of the destination host (i.e., the current FSM state), and BT indicates the service type of the data packet. This represents the scheduling decision output obtained from the mapping calculation. It is used to determine scheduling priorities. When a priority degradation rule is introduced to downgrade the basic priority, the scheduling priority is obtained, which can be expressed by the following formula:
[0063] In the formula, Indicates the current congestion state based on the destination host. The scheduling priority mapping function for the service type BT of the data packet; The integer encoding of the congestion state can be coded as 0, 1, 2, and 3 to represent normal state, light congestion state, heavy congestion state, and recovery state, respectively. This indicates the basic priority associated with the service type BT, which can be pre-configured based on the service type. This is a configurable degradation factor used to control the strength of the priority decrease as congestion levels rise. The above priority degradation rule formula has strong generality in control logic, with a base priority... It can be flexibly expanded according to the actual number of queue levels in the system, so that the final calculated scheduling priority can be adjusted. It can adaptively map to a wider space of non-negative integers. For example, in a heavily congested state. Under these conditions, BE type traffic will be completely discarded, DS type traffic will be downgraded but will be given priority for transmission, while LC type traffic will maintain the lowest level of connectivity guarantee.
[0064] For example, a preferred example of priority-based differentiated scheduling is based on scheduling priority. In a specific implementation, the final scheduling priority and packet loss eligibility are determined using the mapping strategy shown in Table 1.
[0065] Table 1: Examples of scheduling strategies based on congestion status and service type (when...) hour)
[0066] In Table 1, N / A indicates that the data packet is immediately discarded and no scheduling priority is assigned. Those skilled in the art should understand that the specific mapping relationships and discrete priority values listed in Table 1 are merely typical application examples of the control concept of this invention in a specific queue environment, and should not constitute an exclusive limitation on the actual scope of protection of this invention. The dynamic coupling degradation concept provided by this invention can be seamlessly extended to scheduling strategies with any number of priority levels.
[0067] Furthermore, to address the potential packet out-of-order issues caused by dynamic scheduling, this embodiment innovatively introduces a per-flow priority freezing mechanism. The P4 programmable top-of-rack switch identifies specific network flows by the five-tuple hash value of the data packets and stores their current frozen priority in a dedicated register. The 5-tuple includes the source IP address, destination IP address, source port number, destination port number, and transport layer protocol. When congestion causes a decrease in the calculated scheduling priority, the flow will maintain a frozen scheduling priority. Until the destination host's FSM state enters the recovery state Furthermore, the relevant outbound queues are emptied. Newly arriving packets from the same class will be forcibly mapped to... This strictly guarantees First In First Out (FIFO) semantics, preventing packet out-of-order delivery caused by feedback delays or queue backlogs, such as... Figure 5 As shown.
[0068] Furthermore, determining the scheduling priority and packet loss eligibility of data packets also includes: for multi-tenancy expansion and compatibility with traditional transport layer protocols, in the host-based network environment of a multi-tenant data center, the system superimposes a tenant priority policy on top of the basic scheduling decisions, implemented through a tenant-aware priority enhancement mechanism. Specifically, it obtains the tenant or service group identifier associated with each data packet; and adjusts the scheduling priority according to the weight corresponding to the tenant or service group identifier to achieve differentiated services in a multi-tenant data center environment. Each data packet is associated with a tenant or service group identifier. Association, tenant or service group identifier Signed weights mapped to control plane configuration The final scheduling decision can then be expressed by the following formula:
[0069] In the formula, Indicates based on congestion state Business type (BT), tenant or service group identifier The scheduling decision output obtained from the mapping calculation; Indicates the current congestion state based on the destination host. And the scheduling priority of the data packet service type BT; Indicates tenant or service group identifier The corresponding weights are used: positive values are used for high-quality traffic, and negative values are used for best-effort tenants. This represents the scaling factor, used to control the intensity of tenant differentiation effects; Indicates the current congestion state based on the destination host. The packet loss eligibility obtained from the service type (BT) of the data packet allows the final scheduling priority strategy to balance congestion awareness with application-level quality of service commitments. Meanwhile, for traditional TCP traffic, when a switch detects persistent congestion and the packet belongs to a low-priority service (such as BE type), it will explicitly mark the ECN bit as "11" in the Type of Service (ToS) field of the data plane, indicating that congestion has been experienced. This allows the standard TCP sender to natively parse this network feedback and proactively reduce the congestion window, completing end-to-end closed-loop control without modifying the terminal host's decision-making logic.
[0070] It should be noted that when performing queue scheduling and congestion control for data packets based on scheduling priority and packet loss eligibility, the instantaneous queue occupancy rate of the P4 programmable top-of-rack switch is also used. The instantaneous queue occupancy rate of the P4 programmable top-of-rack switch can be directly obtained by reading the built-in metadata of the P4 hardware, without additional calculation. In the underlying architecture of the P4 programmable top-of-rack switch queue, the Flow Manager (TM) automatically writes the current queue length into the built-in metadata when data packets enter or leave the queue. When packet loss eligibility... The time indicates that the data packet is allowed to be dropped, but this does not mean it must be dropped immediately. If the P4 programmable top-of-rack switch's own queue occupancy is very low (the buffer is empty), even if the data packet contains... The P4 programmable top-of-rack switch will allow the marked device to enter the queue for forwarding normally; only when the instantaneous occupancy rate of the P4 programmable top-of-rack switch's queue also exceeds the limit will the P4 programmable top-of-rack switch actually execute the discarding. Data packets.
[0071] (4) Congestion mitigation: When persistent congestion is detected, differentiated processing is performed according to the service type, and the default scheduling policy is reset when the destination host enters the recovery state.
[0072] Specifically, when the destination host's current congestion state is severe congestion, differentiated processing is performed based on the service type: For best-effort type packets, they are directly dropped at the entry point of the P4 programmable top-rack switch without occupying queue resources; for delay-sensitive type packets, their scheduling priority is reduced to level one (i.e., the preset low priority level), while retaining their eligibility to enter the queue for transmission; for lossless critical type packets, their scheduling priority is reduced to level two (i.e., the preset guaranteed priority level), while retaining their eligibility to enter the queue for transmission. Level two is higher than or equal to level one to maintain basic connectivity guarantees, such as... Figure 5As shown, there are three corresponding scheduling decision execution rules. Rule one specifically states: In cases of severe congestion ( In this state, for backend services (BE), configure their priority to zero and allow them to be dropped. For latency-sensitive services (DS), their priority is downgraded but packet drop eligibility is restricted; Rule 2 specifically states: for lossless critical services (LC), regardless of the current congestion status of the destination host, a packet drop eligibility flag must be configured. To prevent device packet loss; Rule 3 specifically states: when the state machine enters the recovery state ( When this occurs, the system activates the priority freeze mechanism, forcibly mapping the priority of the flow to a previously frozen priority. To maintain the first-in, first-out (FIFO) semantics of data packets, when the destination host's current congestion state recovers, the packet scheduling priority, packet loss eligibility, and per-flow priority freeze state are reset to the default policy corresponding to the service type. Specifically, for best-effort traffic, its scheduling priority is reset back to the default normal priority (e.g., level 1, determined by the base priority). Confirmed), and the packet loss eligibility has been reset to allow packet loss. And unfreeze the priority of each flow; for latency-sensitive traffic, its scheduling priority is reset to the default high priority (such as level 2, which is determined by the base priority). Confirmed), and the packet loss eligibility has been reset to non-packet loss ( And unfreeze the priority of each flow; for lossless critical traffic, its scheduling priority is reset to the default highest priority (e.g., level 3, based on the base priority). Confirmed), and the packet loss eligibility has been reset to non-packet loss ( ), and unfreeze the priority of each stream.
[0073] It should be understood that when the destination host enters the recovery state, it resets all traffic actions to the initial default values corresponding to the service type. This is to serve as a cooling-off period, allowing standard traffic to resume flow, thereby observing and verifying whether the network within the host has recovered from congestion, and then transitioning from the recovery state back to the normal state. Specifically, to prevent out-of-order packet delivery due to dynamic adjustments in scheduling priorities, the P4 programmable top-of-rack switch uses registers to lock the frozen priority of the current flow in the pipeline. Therefore, after the relevant egress queues are emptied, the register state used to record the historical frozen priority of that flow needs to be cleared, the frozen priority binding for each flow needs to be released, and newly arriving packets can be dynamically mapped in real time according to the normal state.
[0074] For example, this embodiment takes a typical scenario in a data center where web search services (corresponding to DS traffic) and background backup services (corresponding to BE traffic) coexist. When a sudden surge in traffic occurs in the host network, causing backlog in the egress queue of the P4 programmable top-of-rack switch, the kernel monitoring module of the destination host samples... When the P4 programmable top-mounted switch continuously receives... After one such packet, the destination host's FSM state transitions to a heavily congested state. At this point, for backup traffic marked as BE type, the calculated packet loss eligibility... Furthermore, without assigning priority, the P4 programmable top-of-rack switch performs a drop operation at the ingress pipeline, thereby instantly releasing bandwidth resources and clearing the buffer; for search services marked as DS type, although scheduling priority... It may be downgraded, but the system ensures that it can still enter the corresponding queue to obtain basic forwarding guarantees.
[0075] It should be understood that in the four-level queuing strategy example shown in this embodiment, the low priority level and the guaranteed priority level are mapped to discrete values 0 and 1 in the hardware queue, respectively. In a broader general multi-level hardware queue or continuous control space, the above-mentioned priority degradation magnitude and specific boundary allocation can be flexibly configured according to the service quality constraints of the service flow. The core control idea is to completely strip BE traffic, while giving priority to DS traffic transmission qualification, and assigning higher queue forwarding guarantee to LC traffic, thereby ensuring the connectivity of core services when the network within the host is under severe pressure.
[0076] Furthermore, step (4) may also include the following protection strategies for congestion mitigation and protection response: ① Auditing and alarming: triggering audible and visual alarms, displaying abnormal behavior notifications in a pop-up window on the management page, and generating detailed log records, including timestamps, abnormal characteristics, and information about affected devices. ② Blocking strategies: limiting abnormal traffic rates, isolating suspicious devices, and blocking abnormal connections. ③ Configuration strategies: dynamically adjusting the parameters of the finite state machine. , , Alternatively, the system alert level may be adjusted.
[0077] It is worth mentioning that the present invention also provides a host-based intra-network congestion control system based on a P4 programmable top-of-rack switch, used to implement the host-based intra-network congestion control method based on a P4 programmable top-of-rack switch in the above embodiments. The system includes multiple servers, a P4 programmable top-of-rack switch, and a control plane.
[0078] Each server is equipped with a host-side congestion labeling module, which is used to perform the host-side congestion labeling step (1) in the above embodiment. Specifically, the host-side congestion labeling module is used to obtain congestion-related information that characterizes the network resource occupancy of the server, determine the congestion level of the server based on the congestion-related information, obtain the service type of the data packet, add the congestion level and service type to the data packet, and send the data packet to the P4 programmable top-of-rack switch.
[0079] The P4 programmable top-of-rack switch is connected to multiple servers and is equipped with a switch-side congestion status tracking module, a differentiated scheduling module, and a congestion mitigation module. The switch-side congestion status tracking module is used to execute the switch-side congestion status tracking step described in step (2) of the above embodiments. Specifically, the switch-side congestion status tracking module is used to receive data packets, parse and extract the congestion level and service type in the inbound pipeline, and maintain the congestion status of the destination host of the data packets according to the congestion level. The differentiated scheduling module is used to execute the priority-based differentiated scheduling step described in step (3) of the above embodiments. Specifically, the differentiated scheduling module is used to determine the scheduling priority and packet loss qualification of the data packets according to the current congestion status of the destination host and the service type of the data packets, and to perform queue scheduling and congestion control of the data packets according to the scheduling priority, packet loss qualification, and the instantaneous queue occupancy rate of the P4 programmable top-of-rack switch. The congestion mitigation module is used to execute the congestion mitigation step described in step (4) of the above embodiments. Specifically, the congestion mitigation module is used to perform differentiated processing according to the service type when continuous congestion is detected, and to reset to the default scheduling strategy when the destination host enters the recovery state.
[0080] The control plane communicates with the P4 programmable top-of-rack switch via the P4Runtime application programming interface (API) to dynamically configure the operating parameters of the switch-side congestion state tracking module and differentiated scheduling module, including the parameters of the finite state machine. Degradation coefficient Tenant or service group identifier Corresponding weights and scaling factor .
[0081] For example, considering the hardware implementation complexity and resource overhead, this embodiment was prototyped and deployed on an Intel Tofino P4 programmable top-of-rack switch with terabit-level processing capabilities. Experimental data shows that the congestion control logic proposed in this embodiment has extremely high resource efficiency, occupying less than 13.5% of the static random-access memory (SRAM) resources and 20% of the arithmetic logic unit (ALU) resources within the switch. In terms of performance, compared to traditional end-to-end feedback congestion control schemes, this invention can reduce the packet loss rate in the network by up to 96.7% and reduce the average tail latency by approximately 76%.
[0082] Corresponding to the aforementioned embodiments of the host-based network congestion control method based on P4 programmable top-of-rack switches, the present invention also provides embodiments of electronic devices, which may be end servers or control nodes deployed in data center networks.
[0083] An electronic device provided in this embodiment of the invention includes one or more processors and a memory, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the host network congestion control method based on a P4 programmable top-of-rack switch in the above embodiment.
[0084] The embodiments of the electronic device of the present invention can be applied to any device with data processing capabilities, such as a computer. The electronic device embodiments can be implemented through software, hardware, or a combination of both. Taking software implementation as an example, as a logically defined electronic device, it is formed by the processor of the device with data processing capabilities loading the corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, this is a hardware structure diagram of any device with data processing capabilities containing the electronic device of the present invention. Besides the processor, memory, network interface, and non-volatile memory, the device with data processing capabilities in the embodiments may also include other hardware depending on the actual function of the device, which will not be elaborated further.
[0085] The specific implementation process of the functions and roles of each unit in the above electronic device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0086] For the electronic device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The electronic device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the present invention according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0087] This invention also provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements the host-based network congestion control method based on a P4 programmable top-of-rack switch as described in the above embodiments.
[0088] The computer-readable storage medium can be an internal storage unit of any data processing device described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be any data processing device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units of any data processing device and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.
[0089] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for controlling network congestion within a host based on a P4 programmable top-of-rack switch, characterized in that, The method is applied to a data center network, which includes multiple servers and a P4 programmable top-of-rack switch, with each server directly connected to the P4 programmable top-of-rack switch via a network interface card (NIC). Specifically, the method includes: Host-side congestion labeling: In each server, obtain congestion-related information to characterize the network resource usage within the server, determine the congestion level within the server based on the congestion-related information, and obtain the service type of the data packet; add the congestion level and service type to the data packet, and send the data packet to the P4 programmable top-of-rack switch; Switch-side congestion status tracking: The P4 programmable top-of-rack switch receives data packets, parses and extracts the congestion level and service type in the inbound pipeline; and maintains the congestion status of the destination host of the data packets according to the congestion level. Priority-based differentiated scheduling: The P4 programmable top rack switch determines the scheduling priority and packet loss eligibility of data packets based on the current congestion status of the destination host and the service type of the data packets. It then performs queue scheduling and congestion control on the data packets based on the scheduling priority, packet loss eligibility, and the instantaneous queue occupancy rate of the P4 programmable top rack switch. Congestion mitigation: When persistent congestion is detected, differentiated processing is performed based on the service type, and the default scheduling policy is reset when the destination host enters the recovery state.
2. The host-based network congestion control method based on a P4 programmable top-of-rack switch according to claim 1, characterized in that, The congestion level within the server is determined using the following method: The kernel monitoring module in the server monitors the usage of the direct memory access send queue in real time and calculates the normalized utilization rate. Based on a preset first threshold and a second threshold, the normalized utilization rate index is mapped to discrete congestion levels: when the normalized utilization rate index is less than the first threshold, the congestion level is determined to be 0, indicating no congestion; when the normalized utilization rate index is greater than or equal to the first threshold and less than the second threshold, the congestion level is determined to be 1, indicating mild congestion; when the normalized utilization rate index is greater than or equal to the second threshold, the congestion level is determined to be 2, indicating severe congestion.
3. The host-based network congestion control method based on a P4 programmable top-of-rack switch according to claim 1, characterized in that, The business type is determined according to at least one of the following methods: Static allocation method: Configured via socket options, differential service code point rules, or destination port; Dynamic allocation method: Real-time labeling is performed using application metadata or tenant-level classifiers; The business types include best-effort, delay-sensitive, and lossless critical.
4. The host-based network congestion control method based on a P4 programmable top-of-rack switch according to claim 1, characterized in that, Adding congestion level and service type to the data packet specifically includes: The congestion level and service type are embedded as labels in the header of the data packet. Specifically, the congestion level and service type labels are carried by using reserved fields in the header of the data packet, explicit congestion notification fields, differential service code point fields, or optional fields in the tunnel encapsulation header. The embedding operation does not increase the header length of the data packet and does not modify the application layer protocol or transport layer protocol of the data packet.
5. The host-based network congestion control method based on a P4 programmable top-of-rack switch according to claim 1, characterized in that, The congestion status of the destination host for maintaining the data packets specifically includes: A finite state machine is maintained for each destination host, and the finite state machine is used to characterize the congestion evolution trend of the destination host within a continuous time window; The state of the finite state machine is updated based on the congestion level in multiple consecutive received data packets; the states of the finite state machine include normal state, light congestion state, heavy congestion state, and recovery state. The normal state indicates that no congestion has been observed, and its corresponding congestion level is 0; the mild congestion state is defined as a continuous state of congestion. The state is entered when the congestion level of a data packet is 1; the severe congestion state is entered when the congestion level of a data packet is 1. The recovery state is entered when the congestion level of a data packet is 2; the recovery state is the state that occurs consecutively after the severe congestion state. The cooling state is entered when the congestion level of a data packet is 0.
6. The host-based network congestion control method based on a P4 programmable top-of-rack switch according to claim 1, characterized in that, The determination of the scheduling priority and packet loss eligibility of data packets specifically includes: Based on the current congestion state of the destination host and the service type of the data packet, a preset mapping strategy is used to determine the scheduling priority and packet loss eligibility. The value of the scheduling priority is negatively correlated with the degree of congestion represented by the congestion state and positively correlated with the quality of service requirements represented by the service type. The packet loss eligibility is used to indicate whether data packets are allowed to be dropped when congestion occurs. In determining scheduling priorities, the basic priorities are first determined based on the congestion status and service type, and then the basic priorities are downgraded based on the degree of congestion represented by the congestion status to obtain the scheduling priorities.
7. The host-based network congestion control method based on a P4 programmable top-of-rack switch according to claim 1, characterized in that, The determination of the scheduling priority and packet loss eligibility of data packets also includes: Obtain the tenant or service group identifier associated with the data packet; The scheduling priority is adjusted based on the weight corresponding to the tenant or service group identifier in order to achieve differentiated services in a multi-tenant data center environment.
8. The host-based network congestion control method based on a P4 programmable top-of-rack switch according to claim 1, characterized in that, When persistent congestion is detected, differentiated processing is performed based on the service type, and the default scheduling policy is reset when the destination host enters the recovery state. Specifically, this includes: When the current congestion state of the destination host is severe congestion, differentiated processing is performed according to the service type: For packets with a best-effort service type, they are dropped directly at the entry point of the P4 programmable top rack switch; for packets with a delay-sensitive service type, their scheduling priority is reduced to the first level, while retaining their eligibility to enter the queue for transmission; for packets with a lossless critical service type, their scheduling priority is reduced to the second level, while retaining their eligibility to enter the queue for transmission, wherein the second level is higher than or equal to the first level. When the current congestion state of the destination host is in the recovery state, the scheduling priority, packet loss eligibility, and per-flow priority freeze state of the data packets are reset to the default policy corresponding to the service type.
9. A host-based intranet congestion control system based on a P4 programmable top-of-rack switch, characterized in that, include: Multiple servers, each server is equipped with a host-side congestion labeling module, the host-side congestion labeling module being used to perform the host-side congestion labeling steps as described in claim 1; P4 programmable top-of-rack switch, connecting to multiple servers, including: A switch-side congestion state tracking module is used to perform the switch-side congestion state tracking steps as described in claim 1; A differentiated scheduling module is used to execute the priority-based differentiated scheduling steps as described in claim 1; A congestion mitigation module for performing the congestion mitigation steps as described in claim 1; The control plane communicates with the P4 programmable top-of-rack switch via an application programming interface (API) and is used to dynamically configure the operating parameters of the switch-side congestion status tracking module and differentiated scheduling module.
10. An electronic device comprising one or more processors and a memory, characterized in that, The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the host-based network congestion control method based on a P4 programmable top-of-rack switch as described in any one of claims 1-8.