A CSIG queue emptying time calculation method and device based on queue scheduling information, and a computer readable medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-13
- Publication Date
- 2026-08-11
AI Technical Summary
[0004]严格优先级(SP)队列会抢占带宽,导致低优先级队列的报文即使队列长度不大,也可能长时间无法发送
更精确的拥塞度量:通过考虑队列调度类型和权重,nQD能够真实反映报文经历的预期排队延迟,避免了使用简单队列长度或简单比值的不足。
Smart Images

Figure CN122554408A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, and computer-readable medium for calculating CSIG queue emptying time based on queue scheduling information. Background Technology
[0002] Existing solutions: CSIG (Congestion Signaling) is a simple in-band network telemetry method where fine-grained measurements are collected at switches as packets traverse the network path. The UEC (UltraEthernet Consortium) supports three signal types for CSIG in its base profile: min(ABW), min(ABW / C), and max(Delay), and the max(nQD) (normalized queue depth) signal type in its extended profile. In deployments with heterogeneous output port speeds, the absolute queue depth of output ports at different speeds cannot be directly compared as an indicator of congestion. For example, a 10Gbps link may have a longer queue depth than a 100Gbps link, but the 100Gbps link may have a shorter queue emptying time. In this case, a shorter absolute queue depth may indicate more severe congestion than a longer absolute queue depth. Therefore, in order to make the queue depth comparable under potentially heterogeneous port speeds, nQD normalizes the queue depth by output port speed.
[0003] The main drawback is: Currently, the queue depth, measured in bytes, is divided by the port speed, measured in bytes per second, to obtain the time unit, i.e., nQD (normalized queue depth). However, this simple metric on switching chips has the following problems: The backlog of multiple queues on the port is not taken into account. Different queues may belong to different priorities or scheduling types, which will have different impacts on the actual transmission delay.
[0004] Strict priority (SP) queues can preempt bandwidth, causing packets in low-priority queues to remain unsent for extended periods, even if the queue length is not large.
[0005] For weighted fair queues (WFQ), the scheduling weight determines the proportion of bandwidth obtained by the queue, and the queue length alone cannot accurately estimate nQD (i.e., emptying time).
[0006] The existing nQD cannot accurately reflect the time required for a packet to be sent from the current queue, resulting in insufficient congestion control. Therefore, a more accurate nQD calculation method is needed, which comprehensively considers the queues with current backlog, queue type, and scheduling weight, so as to calculate the actual emptying time of the queue where the currently sent packet is located. Summary of the Invention
[0007] According to a first aspect of the present invention, a method for calculating the emptying time of a CSIG queue based on queue scheduling information is provided, comprising the following steps: When a data packet arrives at the switch's egress port, the instantaneous status information of each queue on the egress port is collected at the current moment. The instantaneous status information includes at least the queue depth, scheduling type, and port transmission rate of each queue. The target queues with message backlogs are determined based on the queue depth, and the target queues are classified according to the scheduling type to obtain a set of strict priority queues and a set of non-strict priority queues. Based on the strict priority queue set, the non-strict priority queue set, and the port transmission rate, a time-advanced simulation of the queue scheduling process is performed to calculate the emptying time of the queue where the currently transmitted packet is located.
[0008] Furthermore, the queue depth is expressed in bytes and includes the message preamble (including SFD) and the inter-frame gap.
[0009] Furthermore, the scheduling types include at least strict priority scheduling and non-strict priority scheduling, wherein non-strict priority scheduling includes weighted fair queue scheduling and / or deficit round-robin scheduling.
[0010] Furthermore, the strict priority queue set is sorted from highest to lowest priority; the scheduling weight corresponding to each queue is recorded for the non-strict priority queue set.
[0011] Furthermore, if the queue containing the currently sent message belongs to a strict priority queue, the emptying time is determined based on the following process: After clearing all strict priority queues with a higher priority than the queue containing the currently sent message, clear the queue containing the currently sent message.
[0012] Furthermore, if the queue containing the currently transmitted message is a non-strict priority queue, the emptying time is determined based on the following process: First, calculate the time required to empty all strict priority queues; After the strict priority queue is cleared, the non-strict priority queues share the port transmission bandwidth according to the scheduling weight, and the emptying time of the queue where the currently transmitted packet is located is calculated.
[0013] Furthermore, the process of sharing port transmission bandwidth according to scheduling weights includes: In the currently active queue set, determine the queue that is expected to be emptied earliest; The time advance in this round is determined based on the earliest emptied queue; Within the time advance period, bandwidth is allocated according to weights and the remaining depth of each queue is updated.
[0014] Furthermore, after each round of time progression, the empty queues are removed from the active queue set, and the weight allocation of the remaining queues is recalculated until the queue containing the currently sent message is empty.
[0015] According to a second aspect of the present invention, a CSIG queue emptying time calculation device based on queue scheduling information is provided, comprising: The acquisition module is used to acquire the instantaneous status information of each queue on the egress port when the data packet arrives at the egress port of the switch. The instantaneous status information includes at least the queue depth, scheduling type and port transmission rate of each queue. The identification and classification module is used to determine the target queues with packet backlog based on the queue depth, and classify the target queues according to the scheduling type to obtain a set of strict priority queues and a set of non-strict priority queues. The calculation module is used to simulate the queue scheduling process in time based on the strict priority queue set, the non-strict priority queue set, and the port transmission rate, and to calculate the emptying time of the queue where the currently transmitted packet is located.
[0016] According to a third aspect of the present invention, a computer-readable medium having processor-executable non-volatile program code is provided, the program code causing the processor to perform a CSIG queue emptying time calculation method based on queue scheduling information according to the first aspect.
[0017] A method for calculating CSIG queue emptying time based on queue scheduling information according to an embodiment of the present invention has the following beneficial effects: More accurate congestion measurement: By taking into account queue scheduling type and weight, nQD can accurately reflect the expected queuing delay experienced by packets, avoiding the shortcomings of using simple queue length or simple ratio.
[0018] It is compatible with multiple scheduling strategies: it supports mixed scenarios of strict priority and weighted scheduling, and can be extended to other scheduling algorithms (such as DWRR).
[0019] Improved congestion control efficiency: The sender adjusts the sending rate based on more accurate nQD, which can respond to congestion faster, reduce packet loss and latency jitter, and improve network throughput.
[0020] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description
[0021] Figure 1 This is a flowchart of a CSIG queue emptying time calculation method based on queue scheduling information according to an embodiment of the present invention.
[0022] Figure 2 This is a structural diagram of a CSIG queue emptying time calculation device based on queue scheduling information according to an embodiment of the present invention. Detailed Implementation
[0023] The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, further illustrating the present invention.
[0024] First, combine Figure 1 This invention describes a method for calculating CSIG queue emptying time based on queue scheduling information, according to a first aspect of an embodiment of the present invention, which is used in switches and has a wide range of applications.
[0025] like Figure 1 As shown in the figure, a CSIG queue emptying time calculation method based on queue scheduling information according to an embodiment of the present invention has the following steps: like Figure 1 As shown, in S1, when a data packet arrives at the switch's egress port, the instantaneous status information of each queue on the egress port is collected at the current moment. It should be noted that the instantaneous status information includes at least: The current depth Q of each queue i (in bytes) Q i It needs to include the message preamble (including SFD, 8 bytes by default) and the inter-frame gap (12 bytes by default). Scheduling type T for each queue i This includes strict priority (SP) and non-strict priority (such as Weighted Fair Queue (WFQ) and Deficit Round Robin (DRR) scheduling; for non-strict priority queues, their scheduling weight W is recorded. i (For example, weight values in WFQ, or quantum values in DRR); Based on the configuration, obtain the current transmission rate R of the port (e.g., the transmission rate of a 10G port is 10Gbps).
[0026] like Figure 1 In step S2, the target queues with packet backlogs are determined based on the queue depth, and the target queues are classified according to the scheduling type to obtain a strict priority queue set (SP queue set S). sp ) and non-strict priority queue set (non-SP queue set S)nsp It should be noted that the queue depth Q... i Queues with a priority value greater than 0 are target queues (i.e., queues currently having messages waiting to be sent). The strict priority queue set is sorted from highest to lowest priority; the non-strict priority queue set records the scheduling weight corresponding to each queue.
[0027] like Figure 1 In step S3, based on the strict priority queue set, the non-strict priority queue set, and the port transmission rate, a time-advanced simulation of the queue scheduling process is performed to calculate the emptying time of the queue containing the currently transmitted packet. Specifically, it is assumed that the packet for which the normalized queue depth needs to be calculated belongs to queue k. The emptying time T... drain Defined as the time required from the current moment until the last packet in queue k is sent. This time is affected by all backlogged queues on the port, and the queuing process needs to be simulated according to the scheduling policy. Simulate time progression and allocate bandwidth according to the scheduling policy: First, all SP queues have absolute priority. If any SP queue has a message, the entire port bandwidth is used to send messages to these SP queues, and they are cleared in descending order of priority.
[0028] When all SP queues are empty, the port bandwidth is shared by the non-SP queues according to their weights.
[0029] Therefore, the emptying time of queue k can be divided into two cases: (1) Case 1, queue k is an SP queue The emptying time is equal to the time required to empty this queue while considering the backlog of all higher-priority SP queues. Let Q be the number of all SP queues arranged in descending order of priority. sp,1 Q sp,2 ,...,Q sp,m Let k be the p-th queue. Then the total time from the start until queue k is emptied is... .
[0030] Ignore other non-SP queues, because non-SP queues will not be served when SP queues exist.
[0031] (2) Case 2, queue k is a non-SP queue First, we need to wait for all SP queues to be cleared, which will take time. .
[0032] Afterwards, the non-SP queues share the remaining bandwidth according to their weights. Assume the set of non-SP queues is S. nsp The depth of each queue is Q. i The weight is W i Under weighted scheduling, the instantaneous bandwidth obtained by each queue is... However, the queues have different depths, and the emptying process involves multiple queues serving simultaneously. Under bandwidth sharing, all queues are served concurrently, and the time it takes for queue k to be emptied is equal to its depth divided by the bandwidth it receives. However, the bandwidth is dynamically changing (because the weights are redistributed after other queues are emptied). Let the initial time be t=0, and the remaining depth be q. i =Q i Accurate calculation can be achieved by repeatedly iterating the following process until q is reached. k =0: Find the queue j that is expected to be emptied earliest among all currently non-empty queues (i.e., (minimum) This represents the total weight of all active queues (queue depth > 0). The time required to empty this queue. .
[0033] Within ∆t, all active queues receive services according to their weights and are updated. .
[0034] Remove the emptied queues, recalculate the total weight of the active queues, and continue iterating until q. k =0. The sum of cumulative time ∆t plus the previous T sp That is, T drain .
[0035] The present invention will be further described below with reference to specific embodiments.
[0036] Example: A switch's egress port is configured with four queues: queue 0 is strict priority (SP), and queues 1-3 are weighted fair queues (WFQ) with weights of 1, 2, and 1 respectively. The port's transmission rate R = 100 Mbps. The current queue depths (in bytes) are as follows: queue 0 = 5000 bytes, queue 1 = 3000 bytes, queue 2 = 4000 bytes, and queue 3 = 2000 bytes. The time required to empty queue 2 (a non-SP queue), i.e., the normalized queue depth nQD, needs to be calculated.
[0037] Step 1: Data collection: Queue 0, type SP, depth 5000B; Queue 1, WFQ, weight 1, depth 3000B; Queue 2, WFQ, weight 2, depth 4000B; Queue 3, WFQ, weight 1, depth 2000B; R=100Mbps (i.e., 12.5MB / s).
[0038] Step 2: Given all queues in the stacking queue, the SP set S sp ={Queue0}, non-SP set S nsp ={queue1,2,3}.
[0039] Step 3: Calculate the emptying time of queue 3.
[0040] First, the time T required to clear SP queue 0. sp =5000B / 12.5MB / s=400us.
[0041] After that, the non-SP queue begins service.
[0042] The initial active queues are 1 (3000,1), 2 (4000,2), and 3 (2000,1), with a total weight of 1+2+1=4.
[0043] Theoretical scheduling rates for each queue: Queue 1: 12.5MB / s × 1 / 4 = 3.125MB / s, Queue 2: 12.5MB / s × 2 / 4 = 6.25MB / s, Queue 3: 12.5MB / s × 1 / 4 = 3.125MB / s.
[0044] Calculate the initial emptying time for each queue: Queue 1 is 3000B / 3.125MB / s = 960us, Queue 2 is 4000B / 6.25MB / s = 640us, and Queue 3 is 2000B / 3.125MB / s = 640us. Queues 2 and 3 are emptied first.
[0045] After 640us, the number of bytes sent by each queue service is as follows: Queue 1 = 3.125MB / s × 640us = 2000B, Queue 2 = 6.25MB / s × 640us = 4000B, Queue 3 = 3.125MB / s × 640us = 2000B. At this time, Queue 1 has 1000B remaining, Queue 2 has 0B remaining (exactly empty), and Queue 3 has 0B remaining (exactly empty).
[0046] The remaining non-empty queues continue to be scheduled: only queue 2 remains with a queue backlog of 1000B, so the sending rate R of the dedicated port for this queue and the emptying time is 1000B / 12.5MB / s = 80us.
[0047] Actual total time T drain =T sp +640+80=1120us.
[0048] As described above, the CSIG queue emptying time calculation method based on queue scheduling information according to an embodiment of the present invention overcomes the shortcomings of the prior art that only relies on queue length or simple ratio. By comprehensively considering all queues with accumulation on the port, queue type (SP or non-SP), queue depth and scheduling weight, the actual emptying time of the queue where the currently transmitted message is located is calculated and normalized into a congestion signal, so that the congestion feedback is more consistent with the real queuing delay and the actual emptying time of the queue where the currently transmitted message is located is accurately calculated.
[0049] The above combined with the appendix Figure 1A method for calculating CSIG queue emptying time based on queue scheduling information according to an embodiment of the present invention is described. Furthermore, the present invention can also be applied to a device for calculating CSIG queue emptying time based on queue scheduling information.
[0050] like Figure 2 As shown, according to a second aspect of the present invention, a CSIG queue emptying time calculation device based on queue scheduling information is provided, comprising: The acquisition module 100 is used to acquire the instantaneous status information of each queue on the egress port at the current moment when the data packet arrives at the egress port of the switch. The instantaneous status information includes at least the queue depth, scheduling type and port transmission rate of each queue. The identification and classification module 200 is used to determine the target queues with packet accumulation based on the queue depth, and classify the target queues according to the scheduling type to obtain a set of strict priority queues and a set of non-strict priority queues. The calculation module 300 is used to simulate the time advancement of the queue scheduling process based on the strict priority queue set, the non-strict priority queue set and the port transmission rate, and to calculate the emptying time of the queue where the currently transmitted packet is located.
[0051] The above combined with the appendix Figure 2 A CSIG queue emptying time calculation apparatus based on queue scheduling information according to an embodiment of the present invention is described. It is an apparatus representation of a CSIG queue emptying time calculation method based on queue scheduling information; therefore, the details therein are not elaborated further. Furthermore, the present invention can also be applied to a computer-readable medium having processor-executable non-volatile program code.
[0052] According to a third aspect of the present invention, a computer-readable medium having processor-executable non-volatile program code is provided, the program code causing the processor to perform a CSIG queue emptying time calculation method based on queue scheduling information according to the first aspect.
[0053] The readable storage medium can be a computer storage medium or a communication medium. A communication medium includes any medium that facilitates the transfer of a computer program from one location to another. A computer storage medium can be any available medium accessible to a general-purpose or special-purpose computer. For example, a readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the ASIC can reside within a device. Of course, the processor and the readable storage medium can also exist as discrete components in a communication device. The readable storage medium can be a read-only memory (ROM), random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc. The present invention also provides a program product comprising executable instructions stored in the readable storage medium. At least one processor of the device can read the executable instructions from the readable storage medium, and the execution of the executable instructions by the at least one processor causes the device to implement the CSIG queue emptying time calculation method based on queue scheduling information provided in the various embodiments described above. In the embodiments of the above-described device, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0054] It should be noted that, in this specification, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0055] Although the present invention has been described in detail through the preferred embodiments above, it should be understood that the above description should not be considered as a limitation of the present invention. Various modifications and substitutions to the present invention will be apparent to those skilled in the art after reading the above description. Therefore, the scope of protection of the present invention should be defined by the appended claims.
Claims
1. A CSIG queue empty time calculation method based on queue scheduling information, characterized in that, It includes the following steps: When a data packet arrives at the egress port of the switch, the instantaneous status information of each queue on the egress port at the current moment is collected. The instantaneous status information includes at least the queue depth, scheduling type and port transmission rate of each queue. The target queues with message backlogs are determined based on the queue depth, and the target queues are classified according to the scheduling type to obtain a set of strict priority queues and a set of non-strict priority queues. Based on the set of strict priority queues, the set of non-strict priority queues, and the port transmission rate, a time-advanced simulation of the queue scheduling process is performed to calculate the emptying time of the queue where the currently transmitted packet is located.
2. The CSIG queue empty time calculation method based on queue scheduling information according to claim 1, characterized in that, The queue depth is expressed in bytes and includes the message preamble and inter-frame gap.
3. The CSIG queue empty time calculation method based on queue scheduling information according to claim 1, characterized in that, The scheduling types include at least strict priority scheduling and non-strict priority scheduling, wherein the non-strict priority scheduling includes weighted fair queue scheduling and / or deficit round-robin scheduling.
4. The CSIG queue empty time calculation method based on queue scheduling information according to claim 1, characterized in that, The strict priority queue set is sorted from high to low priority; the scheduling weight corresponding to each queue is recorded for the non-strict priority queue set.
5. The CSIG queue empty time calculation method based on queue scheduling information according to claim 1, characterized in that, If the queue containing the currently transmitted message belongs to a strict priority queue, the emptying time is determined based on the following process: After clearing all strict priority queues with a higher priority than the queue containing the currently sent message, clear the queue containing the currently sent message.
6. The CSIG queue empty time calculation method based on queue scheduling information according to claim 4, characterized in that, If the queue containing the currently transmitted message is a non-strict priority queue, the emptying time is determined based on the following process: First, calculate the time required to empty all strict priority queues; After the strict priority queue is cleared, the non-strict priority queues share the port transmission bandwidth according to the scheduling weight, and the emptying time of the queue where the currently transmitted packet is located is calculated.
7. The CSIG queue empty time calculation method based on queue scheduling information according to claim 6, characterized in that, The process of sharing port transmission bandwidth according to scheduling weight includes: In the currently active queue set, determine the queue that is expected to be emptied earliest; The time advance for this round is determined based on the earliest emptied queue. Within the time advance amount, bandwidth is allocated according to weights and the remaining depth of each queue is updated.
8. The CSIG queue empty time calculation method based on queue scheduling information according to claim 7, characterized in that, After each round of time progression, the empty queues are removed from the active queue set, and the weight allocation of the remaining queues is recalculated until the queue containing the currently sent message is empty.
9. A CSIG queue empty time calculation apparatus based on queue scheduling information, characterized by, Include: The acquisition module is used to acquire the instantaneous status information of each queue on the egress port at the current moment when the data packet arrives at the egress port of the switch. The instantaneous status information includes at least the queue depth, scheduling type and port transmission rate of each queue. The identification and classification module is used to determine the target queues with packet accumulation based on the queue depth, and classify the target queues according to the scheduling type to obtain a set of strict priority queues and a set of non-strict priority queues. The calculation module is used to perform time-advanced simulation of the queue scheduling process based on the strict priority queue set, the non-strict priority queue set, and the port transmission rate, and to calculate the emptying time of the queue where the currently transmitted packet is located.
10. A computer readable medium having a non-transitory program code executable by a processor, the program code comprising instructions for: The program code causes the processor to run the CSIG queue empty time calculation method based on queue scheduling information according to any one of claims 1-8.