A DCQCN-based congestion control method, device and medium
Patent Information
- Application Number
- CN202611435185.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-16
- Publication Date
- 2026-10-20
AI Technical Summary
[0003]但是,在大规模队列对场景下,会存在部分非活跃状态的队列对,即没有数据传输任务的队列对;通过上述方法进行拥塞控制,即使非活跃状态的队列对不发送数据,也会由于计时器事件的频发触发导致频繁进行升速处理,造成无效的处理开销;并且,每次进行升速处理均需读取并更新队列对的上下文信息;当队列对位于片外时,这些操作必须访问外部内存,从而引入显著的额外延迟;此外,为了处理非活跃状态的队列对的升速请求,系统往往需要将片内缓存中原本活跃的队列对驱除出去,并将该非活跃状态的队列对加载回片内,这种频繁的替换不仅挤占了片上资源,还会干扰活跃的队列对,导致整体吞吐量下降,因此可知,通过上述方法进行拥塞控制的效率较低
[0014]本申请的实施例提供了一种基于DCQCN的拥塞控制方法、设备及介质,在所述方法中,当发送端网卡的发送字节计数器的数值达到预设数量阈值或发送端网卡接收到CNP报文时,获取当前时间戳T1与计时起始时间戳T2的间隔时长T3,并确定当前的速率更新触发事件SJ的事件标识B;B为标识1或标识2,标识1表示SJ为发送端网卡的发送字节计数器的数值达到预设数量阈值;标识2表示SJ为发送端网卡接收到CNP报文;当B为标识1时,或当B为标识2且令T2=T1以使得对T2进行更新后,若T3大于预设的计时器周期D,则基于T3和D,获取升速补偿次数N;对当前队列对对应的当前报文发送速率V执行N次DCQCN升速处理以获取当前队列对对应的中间报文发送速率V2;若B为标识1,则对V2执行DCQCN升速处理以获取当前队列对对应的目标报文发送速率V1,并根据预设更新方式对T2进行更新;若B为标识2,则对V2执行DCQCN降速处理以获取V1。可知,本申请不单独基于计时器事件触发升速处理,而是将基于计时器事件触发升速处理的过程融入到基于发送字节计数器事件触发升速处理或基于CNP报文事件触发升速处理的过程,使得不再针对非活跃状态的队列对频繁进行无效的、基于计时器事件触发的升速处理,从而避免了不必要的处理开销、额外延迟与片上资源浪费,在保障RDMA传输无损性及避免拥塞丢包的同时,显著提升了拥塞控制效率。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This application relates to the field of congestion control, and in particular to a congestion control method, device and medium based on DCQCN. Background Technology
[0002] In modern data center networks, remote direct memory access (RDMA) technology is widely used to meet the demands of high throughput, low latency, and low CPU consumption. To ensure lossless RDMA transmission and avoid performance loss caused by congestion and packet loss, existing technologies typically employ the datacenter quantized congestion notification (DCQCN) algorithm to slow down or speed up packet transmission rates for congestion control. Specifically, when a switch detects queue congestion, it applies an explicit congestion notification (ECN) tag to passing data packets. Upon recognizing the ECN tag, the receiving network interface card (NIC) sends a congestion notification message (CNP) to the sending NIC. Upon receiving the CNP message, the sending NIC immediately slows down its packet transmission rate. Simultaneously, the sending NIC uses a timer or byte counter to trigger speed-up processing. When the duration for which the sending NIC has not received a CNP message exceeds a preset threshold, or when the cumulative number of bytes sent reaches a preset upper limit, the packet transmission rate is increased.
[0003] However, in large-scale queue scenarios, some queue pairs may be inactive, meaning they have no data transmission tasks. Using the above congestion control method, even though inactive queue pairs are not sending data, frequent timer events trigger frequent acceleration processes, resulting in ineffective processing overhead. Furthermore, each acceleration process requires reading and updating the queue pair's context information. When the queue pair is off-chip, these operations must access external memory, introducing significant additional latency. Moreover, to handle acceleration requests from inactive queue pairs, the system often needs to remove previously active queue pairs from the on-chip cache and load the inactive queue pair back onto the chip. This frequent replacement not only consumes on-chip resources but also interferes with active queue pairs, leading to a decrease in overall throughput. Therefore, it is clear that the above congestion control method is inefficient. Summary of the Invention
[0004] To address the aforementioned technical problem, the technical solution adopted in this application is as follows:
[0005] According to a first aspect of this application, a congestion control method based on DCQCN is provided, the method comprising the following steps:
[0006] S1. When the value of the transmit byte counter of the transmitting network card reaches the preset number threshold or the transmitting network card receives a CNP packet, obtain the interval T3 between the current timestamp T1 and the timing start timestamp T2, and determine the event identifier B of the current rate update trigger event SJ; B is identifier 1 or identifier 2. Identifier 1 indicates that SJ is when the value of the transmit byte counter of the transmitting network card reaches the preset number threshold; identifier 2 indicates that SJ is when the transmitting network card receives a CNP packet.
[0007] S2. When B is identifier 1, proceed to step S3; when B is identifier 2, set T2=T1 to update T2 and proceed to step S3.
[0008] S3. When T3 > D, obtain the acceleration compensation count N based on T3 and D; D is the preset timer period.
[0009] S4. Perform DCQCN speed-up processing N times on the current message sending rate V corresponding to the current queue to obtain the intermediate message sending rate V2 corresponding to the current queue.
[0010] S5. If B is identifier 1, then perform DCQCN speed-up processing on V2 to obtain the current queue's target message sending rate V1, and update T2 according to the preset update method; if B is identifier 2, then perform DCQCN speed-down processing on V2 to obtain V1.
[0011] According to a second aspect of this application, a non-transitory computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored in the non-transitory computer-readable storage medium, and the at least one instruction or at least one program is loaded and executed by a processor to implement the above-described congestion control method based on DCQCN.
[0012] According to a third aspect of this application, an electronic device is provided, including a processor and the aforementioned non-transitory computer-readable storage medium.
[0013] This application has at least the following beneficial effects:
[0014] This application provides a congestion control method, device, and medium based on DCQCN. In the method, when the value of the transmit byte counter of the transmitting network card reaches a preset threshold or the transmitting network card receives a CNP packet, the interval T3 between the current timestamp T1 and the timing start timestamp T2 is obtained, and the event identifier B of the current rate update trigger event SJ is determined; B is identifier 1 or identifier 2. Identifier 1 indicates that SJ is when the value of the transmit byte counter of the transmitting network card reaches the preset threshold; identifier 2 indicates that SJ is when the transmitting network card receives a CNP packet; when B is identifier 1... If B is identifier 2 and T2 = T1, and after updating T2, if T3 is greater than the preset timer period D, then based on T3 and D, obtain the number of speed-up compensations N; perform N DCQCN speed-up processing on the current queue corresponding to the current message sending rate V to obtain the current queue corresponding to the intermediate message sending rate V2; if B is identifier 1, perform DCQCN speed-up processing on V2 to obtain the current queue corresponding to the target message sending rate V1, and update T2 according to the preset update method; if B is identifier 2, perform DCQCN speed-down processing on V2 to obtain V1. As can be seen, this application does not trigger speed-up processing solely based on timer events, but rather integrates the process of triggering speed-up processing based on timer events into the process of triggering speed-up processing based on transmit byte counter events or CNP message events. This eliminates the need for frequent and invalid timer event-based speed-up processing on inactive queues, thereby avoiding unnecessary processing overhead, additional latency, and waste of on-chip resources. While ensuring lossless RDMA transmission and avoiding congestion packet loss, it significantly improves congestion control efficiency. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 A flowchart illustrating a congestion control method based on DCQCN provided in this application embodiment;
[0017] Figure 2 This is the first throughput curve obtained statistically when using existing technology for congestion control;
[0018] Figure 3 This is a second throughput curve obtained statistically when using existing technologies for congestion control;
[0019] Figure 4This is a third throughput curve obtained statistically when performing congestion control using embodiments of this application;
[0020] Figure 5 This is a fourth throughput curve obtained statistically when performing congestion control using embodiments of this application;
[0021] Figure 6 This is a graph showing the first CNP message processing rate obtained statistically when using existing technologies for congestion control.
[0022] Figure 7 This is a graph showing the second CNP message processing rate obtained statistically when performing congestion control using embodiments of this application. Detailed Implementation
[0023] The technical solutions in the embodiments of this application will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] It is worth noting that in the following description, specific details such as particular system structures and techniques are set forth for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application can also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of this application with unnecessary details.
[0025] It should be understood that in this application specification and the appended claims, the terms "comprising," "including," "including but not limited to," "including but not limited to," "mainly composed of," or "mainly made of" all indicate the presence of the described features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof.
[0026] It should be understood that in this application specification and the appended claims, the use of the terms "consisting of" or "component of" indicates the presence of the described feature, integral, step, operation, element and / or component, but excludes the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0027] It should be understood that, in this specification and the appended claims, the term "and" indicates a combination in which multiple of the associated listed items exist simultaneously. For example, "A, B, C, and D" means a combination in which "A and B and C and D exist simultaneously".
[0028] It should be understood that in this application specification and the appended claims, the use of the term "or" indicates a combination in which one of the associated listed items exists alone. For example, "A, B, C or D" refers to the four combinations of "A alone", "B alone", "C alone", and "D alone".
[0029] It should be understood that, in this application specification and the appended claims, the term "and / or" indicates any combination of one or more of the associated listed items, as well as all possible combinations, and includes such combinations. For example, "A and / or B" refers to the three combinations of "A alone," "B alone," or "A and B simultaneously." For example, "A, B, and / or C" refers to the seven combinations of "A alone," "B alone," "C alone," "A and B simultaneously," "A and C simultaneously," "B and C simultaneously," and "A, B, and C simultaneously."
[0030] It should be understood that, in this specification and the appended claims, the term "if" is used to indicate, depending on the context, "in the case of," "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" can be interpreted, depending on the context, as "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."
[0031] It should be understood that in this application specification and the appended claims, the terms "greater than", "less than", "exceeding", etc. are understood to exclude the number itself; and the terms "above", "below", "within", etc. are understood to include the number itself.
[0032] It should be understood that in this application specification and the appended claims, the terms "the," "the," "the," "the," "the," "the described," "the mentioned," etc., may be understood, depending on the context, to refer to the content mentioned above.
[0033] It should be understood that in this application specification and the appended claims, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance, nor are they used to describe a specific order or sequence.
[0034] It should be understood that in this application specification and appended claims, the designations such as "S100," "S200," and "S300" are used only for distinguishing descriptions and should not be construed as indicating or implying a specific order or sequence of execution of steps or processes. For example, "S100, acquire data A; S200, acquire data B; S300, acquire C based on A and B;" is merely an example providing a feasible execution order, not a necessary one. Those skilled in the art can determine the actual and feasible execution order based on the function and internal logic of each step. For example, "step S100 is executed before step S200, then step S300 is executed," "step S200 is executed before step S100, then step S300 is executed," or "steps S100 and S200 are executed in parallel, then step S300 is executed."
[0035] It should be understood that in this application specification and appended claims, if numbering or quantity in the form of “f(i); i=1, 2, ..., n;” is used, the specific value corresponding to the term “f(i)” should be understood as a value that changes with the value of i, and not as a fixed value. For example, in different practical scenarios, “f(1)” and “f(2)”, “f(1)” may be equal to “f(2)” or may not be equal to “f(2)”, and unless otherwise specified, there is no necessary size relationship between “f(1)” and “f(2)”.
[0036] It should be understood that in this application specification and appended claims, if numbers or symbols in the form of superscript are used, and the context or other corresponding locations provide a specific interpretation of them, they should be understood according to their corresponding explanatory description, and cannot be directly and simply understood as concepts such as "exponent" in mathematics or "atomic number" in chemistry. Similarly, if numbers or symbols in the form of subscript are used, they should be understood in the same way, without further explanation.
[0037] It should be understood that in the description of this application and the appended claims, if terms such as "A=(...)" are used, unless otherwise specifically interpreted, they should be understood as "A includes...", and not as "A is composed of...". Furthermore, unless otherwise specifically interpreted, the parentheses "(" and ")" are only used in conjunction with "=" to indicate what items or data A includes, and do not refer to any specific data structure, nor do they limit the type of its elements, whether the number of elements is fixed, whether the elements are ordered, whether the elements are repeatable, what query method is required to query its elements, or what access order is required to access its elements.
[0038] It should be understood that in the description of this application and the appended claims, if common processing functions such as "max(...)", "min(...)", and "avg(...)" are used, the context or other corresponding locations should provide a specific interpretation of these terms. If no specific interpretation exists, those skilled in the art should use relevant technical terms from computer science and technology for connection. For example, "max(...)" refers to a function for determining the maximum value, "min(...)" refers to a function for determining the minimum value, and "avg(...)" refers to a function for determining the average value.
[0039] Embodiments of this application provide a congestion control method based on DCQCN, the method comprising the following steps, such as... Figure 1 As shown:
[0040] S1. When the value of the transmit byte counter of the transmitting network card reaches the preset number threshold or the transmitting network card receives a CNP packet, obtain the interval T3 between the current timestamp T1 and the timing start timestamp T2, and determine the event identifier B of the current rate update trigger event SJ; B is identifier 1 or identifier 2. Identifier 1 indicates that SJ is when the value of the transmit byte counter of the transmitting network card reaches the preset number threshold; identifier 2 indicates that SJ is when the transmitting network card receives a CNP packet.
[0041] Specifically, in step S1, when the value of the transmit byte counter of the transmitting end network card reaches a preset number threshold, B is determined to be identifier 1.
[0042] Furthermore, when the sending network card receives the CNP message, it determines that B is identifier 2.
[0043] Specifically, the congestion control method based on DCQCN is applied to the process of transmitting data from the transmitting network card to the receiving network card through a queue; wherein, both the transmitting network card and the receiving network card are RDMA network cards.
[0044] Specifically, the transmitted byte counter and the CNP packet both correspond to the current queue pair; the current queue pair is the queue pair that triggers the value of the transmitted byte counter to reach a preset number threshold, or triggers the sending end network card to receive the CNP packet.
[0045] Furthermore, for any queue pair among all queue pairs maintained simultaneously by the sending network card, when the value of the sending byte counter corresponding to the queue pair reaches a preset number threshold, or when the CNP packet corresponding to the queue pair is received, the queue pair is taken as the current queue pair, and steps S1-S5 are executed independently to obtain the target packet sending rate corresponding to the current queue pair.
[0046] Specifically, the timing start timestamp is a timestamp maintained in the congestion control context of the current queue pair; the initial value of the timing start timestamp is the timestamp obtained by the current queue pair at the initialization time.
[0047] S2. When B is identifier 1, proceed to step S3; when B is identifier 2, set T2=T1 to update T2 and proceed to step S3.
[0048] Specifically, in step S2, when B is identifier 1, the method further includes: resetting the transmitted byte counter or clearing the transmitted byte counter to zero.
[0049] S3. When T3 > D, obtain the acceleration compensation count N based on T3 and D; D is the preset timer period.
[0050] S4. Perform DCQCN speed-up processing N times on the current message sending rate V corresponding to the current queue to obtain the intermediate message sending rate V2 corresponding to the current queue.
[0051] Specifically, the DCQCN acceleration process is the acceleration process in the DCQCN algorithm; it can be understood that when performing the DCQCN acceleration process, the additive acceleration process in the DCQCN algorithm is used for acceleration.
[0052] Specifically, perform N DCQCN acceleration processes on V, including: starting with the current value of V as the initial value, and continuously performing N DCQCN acceleration processes; each DCQCN acceleration process is based on the updated V value after the previous DCQCN acceleration process and updates V.
[0053] S5. If B is identifier 1, then perform DCQCN speed-up processing on V2 to obtain the current queue's target message sending rate V1, and update T2 according to the preset update method; if B is identifier 2, then perform DCQCN speed-down processing on V2 to obtain V1.
[0054] Specifically, in step S5, DCQCN acceleration processing is performed on V2, including:
[0055] S51. Obtain the aggregation count corresponding to the sent byte counter event, and determine the aggregation count as the current boost processing count DS.
[0056] Specifically, when a reported send byte counter event is received, it indicates that the value of the send byte counter of the sending end network card has reached a preset threshold. The send byte counter event carries an aggregate count, which is used to record the cumulative number of times the send byte counter event was triggered before it was reported.
[0057] S52. Perform DS times of DCQCN speed-up processing on V2; the method of performing DS times of DCQCN speed-up processing on V2 is the same as the method of performing N times of DCQCN speed-up processing on V, and will not be described again here.
[0058] Specifically, in step S5, DCQCN speed reduction processing is performed on V2, including:
[0059] S501. Obtain the time interval between the current time point when the sending network card receives a CNP message and the time point when the sending network card performs DCQCN speed-down processing after the last time it receives a CNP message.
[0060] S502. If the interval duration is not less than the preset interval duration, then perform a single DCQCN speed reduction process on V2.
[0061] Furthermore, in step S502, the method further includes: if the interval duration is less than the preset interval duration, then the DCQCN speed reduction process is not performed on V2, and V2 is directly used as V1.
[0062] Specifically, the DCQCN speed-down process is the speed-down process in the DCQCN algorithm; it can be understood that when performing the DCQCN speed-down process, the multiplicative speed-down process in the DCQCN algorithm is used to reduce the speed.
[0063] Specifically, after obtaining V1, let V=V1 to update V, thereby causing the sending network card to send the corresponding data packet of the current queue according to V1.
[0064] Specifically, step S3 also includes:
[0065] When T3≤D, if B is identifier 1, then DCQCN speed-up processing is performed on V to obtain the current queue's target message sending rate V1; if B is identifier 2, then DCQCN speed-down processing is performed on V to obtain V1.
[0066] Furthermore, in step S3, when T3≤D, the method of performing DCQCN acceleration processing or DCQCN deceleration processing on V to obtain V1 is the same as the method of performing DCQCN acceleration processing or DCQCN deceleration processing on V2 to obtain V1 in step S5, and will not be described again here.
[0067] In the embodiments of this application, T2 is used to record the timestamp of the most recent acceleration process triggered due to a long period of no CNP packets received. When T3≤D, if B is identifier 1, it indicates that the interval between the current timestamp and the timestamp of the most recent acceleration process triggered due to a long period of no CNP packets received has not yet reached the preset timer period. Therefore, no acceleration compensation is required, and T2 does not need to be updated. When B is identifier 1, it only indicates that the interval between the current timestamp and the timestamp of the most recent acceleration process triggered due to a long period of no CNP packets received exceeds the preset timer period when T3>D. Acceleration compensation is required, and T2 needs to be updated. Furthermore, when B is identifier 2, it means that the network congestion state has changed, and the duration of the continuous lack of CNP packets needs to be recalculated. Therefore, T2 must be updated synchronously.
[0068] Through the above steps, when the value of the transmit byte counter of the transmitting network card reaches the preset number threshold or the transmitting network card receives a CNP packet, the interval T3 between the current timestamp T1 and the timing start timestamp T2 is obtained, and the event identifier B of the current rate update trigger event SJ is determined; when B is identifier 1, or when B is identifier 2 and T2=T1 is set so that after updating T2, if T3 is greater than the preset timer period D, then based on T3 and D, the number of speed-up compensation N is obtained; N DCQCN speed-up processing is performed on the current queue for the corresponding current packet transmission rate V to obtain the current queue for the corresponding intermediate packet transmission rate V2; if B is identifier 1, then DCQCN speed-up processing is performed on V2 to obtain the current queue for the corresponding intermediate packet transmission rate V2. Obtain the target message transmission rate V1 corresponding to the current queue pair, and update T2 according to the preset update method; if B is identifier 2, then perform DCQCN speed-down processing on V2 to obtain V1; instead of triggering speed-up processing based solely on timer events, the process of triggering speed-up processing based on timer events is integrated into the process of triggering speed-up processing based on transmitted byte counter events or CNP message events. This avoids frequent and invalid speed-up processing based on timer events for inactive queue pairs, thereby avoiding unnecessary processing overhead, additional latency, and waste of on-chip resources. While ensuring lossless RDMA transmission and avoiding congestion packet loss, it significantly improves congestion control efficiency.
[0069] Specifically, in step S3, based on T3 and D, the number of acceleration compensation times N is obtained, including:
[0070] S31. Based on T3 and D, obtain the initial compensation count E, where E satisfies the following condition:
[0071] E = floor(T3 / D), where floor() is the floor function.
[0072] S32. Obtain N based on E, where N meets the following conditions:
[0073] N = min(F, E), where F is the preset maximum number of accelerations, and min() is the minimum value acquisition function; where, as those skilled in the art know, the preset maximum number of accelerations is the number of accelerations preset by those skilled in the art according to actual needs, for example: 2, which will not be elaborated here.
[0074] Through the above steps, the initial compensation count E is obtained based on T3 and D. E represents the number of speed-up processes that should have been triggered due to the long period of no CNP message received during the time interval from T2 to T1. Furthermore, E and F are compared, and the minimum value of the two is taken as N. By introducing a maximum speed-up count limit, the number of speed-up compensation counts is strictly controlled within a safe threshold, effectively preventing the queue from suddenly sending data at an extremely high rate, thereby avoiding sudden traffic surges to the network and ensuring the stability of the overall network.
[0075] In another specific embodiment, in step S32, N satisfies the following condition:
[0076] N = floor(log2(E+1)).
[0077] Through the above steps, the number of speed-up compensation operations is dynamically calculated using logarithmic operations. Due to the significant non-linear compression characteristics of the logarithmic function, regardless of the number of speed-up processes that should have been triggered due to the long period without receiving CNP packets during the time interval T2 to T1, the logarithmic processing will significantly suppress them, thus obtaining a reasonable number of speed-up compensation operations. This avoids the numerical explosion caused by the linear accumulation of speed-up compensation operations with the number of bytes, thereby reducing the excessive dominance of the number of bytes sent on the speed-up algorithm. It can more reasonably and smoothly adjust the sending rate according to the time interval, keeping the speed-up process smooth at all times. This prevents the queue from suddenly sending data at an extremely high rate, thus avoiding sudden traffic surges to the network and ensuring the stability of the overall network.
[0078] Specifically, T2 is updated according to the preset update method, including:
[0079] Set T2 = T1 so that T2 can be updated.
[0080] Through the above steps, when B is identifier 1, it indicates that the interval between the current timestamp and the timestamp of the most recent acceleration process triggered due to the long period of no CNP message received exceeds the preset timer period, which satisfies the trigger condition for acceleration compensation. Therefore, let T2=T1 so that T2 is updated, thereby providing a timing reference for the next rate adjustment.
[0081] In another specific embodiment, T2 is updated according to a preset update method, including:
[0082] Let T2 = T2 + E × D so that T2 can be updated.
[0083] Through the above steps, E×D accurately represents the theoretical total acceleration time corresponding to the number of acceleration processes that should have been triggered due to the long period without receiving CNP messages during the time interval from T2 to T1. Let T2 = T2 + E×D so that T2 is updated. The remaining time in the time interval from T2 to T1 that exceeds the theoretical total acceleration time is automatically carried over to the timing process of the next acceleration cycle, ensuring that the timing rhythm is not disrupted and effectively avoiding the loss of acceleration opportunities due to actual processing delays, thereby ensuring the stability and accuracy of the congestion control process.
[0084] Specifically, to verify the beneficial effects of this application, a congestion test scenario with two transmitters and one receiver was built on an FPGA environment; such as Figure 2 , Figure 3 , Figure 4 and Figure 5 As shown, a comparison of throughput performance is presented; among them, Figure 2 The first throughput curve obtained by using existing technology for congestion control is shown in the graph. It represents the transmission throughput curve obtained by using existing technology for congestion control when each of the two transmitters uses 4000 queue pairs. Figure 3 The second throughput curve is a statistical graph obtained when using existing technology for congestion control. It represents the receiving throughput curve obtained when the receiving end uses 8000 queue pairs and uses existing technology for congestion control. Figure 4 The third throughput curve obtained by performing congestion control using the embodiments of this application represents the transmission throughput curve obtained by performing congestion control using the embodiments of this application under the same configuration, when each of the two sending ends uses 4000 queue pairs. Figure 5 The fourth throughput curve is a statistical graph obtained when congestion control is performed using the embodiments of this application. It shows the receiving throughput curve obtained when the receiving end uses 8000 queue pairs under the same configuration and congestion control is performed using the embodiments of this application. It can be seen from the comparison that this application can achieve the same transmission performance as the prior art while maintaining high throughput, and ensures the lossless nature of RDMA transmission.
[0085] Specifically, such as Figure 6 and Figure 7 The diagram shows a comparison of CNP message processing rates; among them, Figure 6The graph shows the processing rate of the first CNP packet obtained by using existing technology for congestion control. It indicates that when using existing technology, each of the two sending ends uses 4000 queue pairs, the peak rate of the sending end processing CNP packets is 6.35 Mp / s. Figure 7 The graph shows the second CNP packet processing rate obtained by statistically analyzing the congestion control using the embodiments of this application. It indicates that when using the embodiments of this application, with the same configuration, each of the two sending ends uses 4000 queue pairs, and the peak rate of CNP packet processing is 6.02 Mp / s. It can be seen that the peak CNP packet processing rate corresponding to the embodiments of this application is slightly lower than that of the prior art, indicating that this application effectively reduces unnecessary CNP packet interactions.
[0086] Specifically, as shown in Tables 1 and 2, the counting statistics for each statistical indicator are presented. Table 1 shows the count values of each statistical indicator obtained when using existing technology for congestion control; Table 2 shows the count values of each statistical indicator obtained when using the embodiments of this application for congestion control. A comparison shows that when using the embodiments of this application for congestion control, the number of times acceleration processing is triggered due to timer events is 0, indicating that passive acceleration based on timers is no longer necessary. The aggregation counts of CNP message events and sent byte counter events show a significant decrease, indicating a significant reduction in the processing pressure of event caching and merging. Specifically, a timer event is an event reported when no CNP message is received within a preset timer period; a CNP message event is an event reported when a CNP message is received; and a sent byte counter event is an event reported when the value of the sent byte counter reaches a preset threshold.
[0087] Table 1
[0088] Table 2
[0089] Specifically, cnp_deliverd indicates the number of times the speed-down process was triggered due to the CNP message event; byte_deliverd indicates the number of times the speed-up process was triggered due to the sending byte counter event; time_deliverd indicates the number of times the speed-up process was triggered due to the timer event; cnp_aggregated indicates the number of times the CNP message event was cached and merged; byte_aggregated indicates the number of times the sending byte counter event was cached and merged; time_aggregated indicates the number of times the timer event was cached and merged. Among these, when the event triggering frequency is too high in a short period of time, multiple events will be cached and merged into one report to reduce interaction overhead.
[0090] Specifically, through Figures 2 to 7 As shown in Tables 1 and 2, this application significantly improves congestion control efficiency while ensuring lossless RDMA transmission and avoiding congestion packet loss.
[0091] In this application embodiment, a non-transitory computer-readable storage medium is also provided. This non-transitory computer-readable storage medium can be disposed in an electronic device to store at least one instruction or at least one program related to implementing the method provided in any embodiment of this application. The at least one instruction or the at least one program is loaded and executed by a processor to implement the method provided in any embodiment of this application, and can achieve the same technical effect. To avoid repetition, further details are omitted here.
[0092] Examples of non-transitory computer-readable storage media include: computer read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), compact disc read-only memory (CD-ROM), flash memory, magnetic disk, optical disk, portable computer disk, hard disk and / or solid-state drive, etc.
[0093] In this application embodiment, an electronic device is also provided, the electronic device including a processor and the non-transitory computer-readable storage medium. The processor loads and executes at least one instruction or at least one program stored in the non-transitory computer-readable storage medium related to implementing the method provided in any embodiment of this application, so as to implement the method provided in the embodiment of this application.
[0094] For example, the electronic device may be a mobile electronic device or a non-mobile electronic device that also includes other functions such as a personal digital assistant and / or music player. Further, the mobile electronic device may be any one of a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA); the non-mobile electronic device includes any one of a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine. No specific limitations are made in the embodiments of this application.
[0095] For example, the processor can be a processor in any electronic device.
[0096] Exemplary embodiments of this application also provide a feasible structure for an electronic device. For example, the electronic device may include a processor, an external memory interface, internal memory, a universal serial bus (USB) interface (hereinafter referred to as a USB interface), a charging management module, a power management module, a battery, a first antenna, a second antenna, a mobile communication module, a wireless communication module, an audio module, a speaker, a receiver, a microphone, a headphone jack, a sensor module, buttons, a motor, an indicator, a camera, a display screen, and a subscriber identification module (SIM) card interface (hereinafter referred to as a SIM card interface), etc. The sensor module may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, and / or bone conduction sensors, etc.
[0097] It should be understood that the exemplary structures of the embodiments of this application do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than the structure described herein, or combine some components, or split some components, or have different component arrangements. The components may be implemented in hardware, software, or a combination of software and hardware.
[0098] For example, the processor may include one or more processing units, wherein the processing units include: an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.
[0099] For example, the processor may further include a memory for storing instructions and data. In some embodiments of this application, the memory in the processor is a cache memory. The memory can store instructions or data that the processor has just used or that are used repeatedly. If the processor needs to use the instructions or data again, it can directly retrieve them from the memory.
[0100] For example, the processor may also include one or more interfaces. These interfaces include: an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface, etc.
[0101] The integrated circuit interface is a bidirectional synchronous serial bus, which includes a serial data line (SDA) and a serial clock line (SCL).
[0102] Integrated circuits with built-in audio interfaces can be used for audio communication. In some embodiments of this application, the processor may include multiple sets of integrated circuit-based audio interfaces. The processor can couple with an audio module through the integrated circuit-based audio interface to achieve communication between the processor and the audio module.
[0103] The pulse code modulation interface can also be used for audio communication, specifically for sampling, quantizing, and encoding analog signals. In some embodiments of this application, the audio module and the wireless communication module can be coupled through the pulse code modulation interface.
[0104] A Universal Asynchronous Receiver / Transmitter (UART) is a universal serial data bus interface used for asynchronous communication. This bus can be a bidirectional communication bus interface. It converts the data to be transmitted between serial and parallel communication. In some embodiments of this application, the processor and the wireless communication module can be connected via the UART.
[0105] Mobile industry processor interfaces can be used to connect processors to peripheral devices such as displays and cameras.
[0106] General purpose input / output interfaces can be configured via software.
[0107] Furthermore, the general-purpose input / output interface can be configured as a control signal or a data signal. In some embodiments of this application, the general-purpose input / output interface can be used to connect the processor to a camera, display screen, wireless communication module, audio module, sensor module, etc.
[0108] A USB interface is an interface that conforms to the USB standard specification, specifically including Mini USB, Micro USB, and USB Type-C interfaces. USB interfaces can be used to connect chargers to charge electronic devices, and also for transferring data between electronic devices and peripheral devices.
[0109] It should be understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a limitation on the structure of the electronic device. In other embodiments of this application, the electronic device may also employ different interface connection methods or a combination of multiple interface connection methods as described in the embodiments.
[0110] The charging management module receives charging input from a charger, which can be either a wireless or wired charger. In some wired charging embodiments, the charging management module receives charging input from the wired charger via a USB interface. In some wireless charging embodiments, the charging management module receives wireless charging input via the wireless charging coil of the electronic device. While charging the battery, the charging management module can also supply power to various parts of the electronic device via the power management module.
[0111] The power management module is used to connect the battery, the charging management module, and the processor.
[0112] Wireless communication functionality in electronic devices can be achieved through a first antenna, a second antenna, a mobile communication module, a wireless communication module, a modem processor, and a baseband processor.
[0113] Mobile communication modules can enable wireless communication solutions, including 2G / 3G / 4G / 5G, for use in electronic devices.
[0114] A modem processor may include a modulator and a demodulator. The modulator modulates a low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to a baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to an application processor. The application processor outputs sound signals through audio devices (not limited to speakers, receivers, etc.) or displays images or videos on a display screen. In some embodiments of this application, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor and housed within the same device as the mobile communication module or other functional modules.
[0115] Wireless communication modules can enable solutions for wireless communication applications in electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.
[0116] In some embodiments of this application, the first antenna of the electronic device is coupled to the mobile communication module, and the second antenna is coupled to the wireless communication module, enabling the electronic device to communicate with networks and other devices via wireless communication technology.
[0117] Electronic devices utilize GPUs, displays, and application processors to achieve their display functions. A GPU is a microprocessor for image processing, connecting the display and the application processor. GPUs perform mathematical and geometric calculations and are used for graphics rendering. A processor may include one or more GPUs, which execute program instructions to generate or modify display information.
[0118] The display screen is used to display images, videos, etc. The display screen includes a display panel. The display panel can be a liquid crystal display (LCD), or a display panel made of materials selected from organic light-emitting diodes (OLEDs), active-matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), minimized, microLEDs, micro-OLEDs, or quantum dot light-emitting diodes (QLEDs). In some embodiments of this application, the electronic device may include one or more display screens. In some embodiments of this application, the display screen may also integrate touch functionality and may also be referred to as a touch screen.
[0119] Electronic devices can achieve shooting functions through ISPs, cameras, video codecs, GPUs, displays, and application processors.
[0120] External storage interfaces can be used to connect external memory cards, such as Micro SD cards, to expand the storage capacity of electronic devices.
[0121] Internal memory can be used to store executable program code for a computer, which includes instructions. The processor executes the instructions stored in internal memory to perform various functional applications and data processing of electronic devices.
[0122] Electronic devices can implement audio functions through audio modules, speakers, receivers, microphones, headphone jacks, and application processors. Examples include music playback and recording.
[0123] The audio module converts digital audio information into analog audio signals for output, and also converts analog audio input into digital audio signals. The speaker, also called a "horn," converts audio electrical signals into sound signals. The receiver, also called a "handset," converts audio electrical signals into sound signals. The microphone, also called a "microphone" or "voice transducer," converts sound signals into electrical signals. The headphone jack is used to connect wired headphones.
[0124] Pressure sensors are used to sense pressure signals and convert them into electrical signals. In some embodiments of this application, the pressure sensor can be located on the display screen. A gyroscope sensor can be used to determine the motion posture of the electronic device. A barometric pressure sensor is used to measure air pressure. In some embodiments of this application, the electronic device calculates altitude using the air pressure value measured by the barometric pressure sensor, assisting in positioning and navigation. An accelerometer can detect the magnitude of acceleration of the electronic device in various directions (generally three axes). A distance sensor is used to measure distance. A fingerprint sensor is used to collect fingerprints. A touch sensor, also known as a "touch panel," can be located on the display screen, forming a touchscreen, also known as a "touch screen." A bone conduction sensor can acquire vibration signals. In some embodiments of this application, a bone conduction sensor can acquire vibration signals from vibrating bone fragments in the human vocal cords. A bone conduction sensor can also contact the human pulse to receive blood pressure signals.
[0125] The buttons include a power button and volume buttons. A motor can generate vibration alerts. Indicators can be indicator lights, used to show charging status, battery level changes, messages, missed calls, notifications, etc. A SIM card slot is used to connect a SIM card.
[0126] Embodiments of this application also provide a computer program product including program code that, when the program product is run on an electronic device, causes the electronic device to perform the steps of the methods described in this specification according to various exemplary embodiments of this application.
[0127] This application also provides a chip, which includes a processor and a communication interface. The communication interface is used to receive signals and transmit the signals to the processor. The processor processes the signals so that the methods described in the various exemplary embodiments of this application are executed.
[0128] While specific embodiments of this application have been described in detail by way of examples, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of this application. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of this application. The scope of this application is defined by the appended claims.
Claims
1. A congestion control method based on DCQCN, characterized in that, The method includes the following steps: S1. When the value of the transmit byte counter of the transmitting network card reaches the preset number threshold or the transmitting network card receives a CNP message, obtain the interval T3 between the current timestamp T1 and the timing start timestamp T2, and determine the event identifier B of the current rate update trigger event SJ; B is identifier 1 or identifier 2, identifier 1 indicates that SJ is the value of the transmit byte counter of the transmitting network card reaching the preset number threshold. Identifier 2 indicates that SJ is the CNP message received by the sending network card; S2. When B is identifier 1, proceed to step S3; when B is identifier 2, set T2=T1 to update T2 and proceed to step S3. S3. When T3 > D, obtain the acceleration compensation count N based on T3 and D; D is the preset timer period. S4. Perform DCQCN speed-up processing N times on the current message sending rate V corresponding to the current queue to obtain the intermediate message sending rate V2 corresponding to the current queue. S5. If B is identifier 1, then perform DCQCN speed-up processing on V2 to obtain the current queue's target message sending rate V1, and update T2 according to the preset update method; if B is identifier 2, then perform DCQCN speed-down processing on V2 to obtain V1.
2. The congestion control method based on DCQCN according to claim 1, characterized in that, Step S3 also includes: When T3≤D, if B is identifier 1, then DCQCN speed-up processing is performed on V to obtain the current queue's target message sending rate V1; if B is identifier 2, then DCQCN speed-down processing is performed on V to obtain V1.
3. The congestion control method based on DCQCN according to claim 1, characterized in that, In step S3, based on T3 and D, the number of acceleration compensation times N is obtained, including: S31. Based on T3 and D, obtain the initial compensation count E, where E satisfies the following condition: E = floor(T3 / D), where floor() is the floor function; S32. Obtain N based on E, where N meets the following conditions: N = min(F, E), where F is the preset maximum number of accelerations, and min() is the function to obtain the minimum value.
4. The congestion control method based on DCQCN according to claim 1, characterized in that, Update T2 according to the preset update method, including: Set T2 = T1 so that T2 can be updated.
5. The congestion control method based on DCQCN according to claim 3, characterized in that, In step S32, N satisfies the following condition: N = floor(log2(E+1)).
6. The congestion control method based on DCQCN according to claim 1, characterized in that, Update T2 according to the preset update method, including: Let T2 = T2 + E × D so that T2 can be updated.
7. The congestion control method based on DCQCN according to claim 1, characterized in that, In step S1, when the value of the transmit byte counter of the transmitting end network card reaches a preset number threshold, B is determined to be identifier 1.
8. The congestion control method based on DCQCN according to claim 1, characterized in that, In step S1, when the sending network card receives the CNP message, it determines that B is identifier 2.
9. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores at least one instruction or at least one program segment, which is loaded and executed by a processor to implement the DCQCN-based congestion control method as described in any one of claims 1-8.
10. An electronic device, characterized in that, Includes a processor and the non-transitory computer-readable storage medium as described in claim 9.