Congestion Identification Method and Device
By monitoring the continuous growth time of the storage volume of the network device cache queue, combined with the sampling and congestion counting mechanism, the congestion problem caused by misjudgment of traffic sudden congestion and the inability to identify long-term continuous growth in the prior art is solved, and the reliability and accuracy of congestion identification are improved.
Patent Information
- Application Number
- CN202011174189.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-28
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2040-10-28
AI Technical Summary
When the prior art determines whether the cache queue of the network device is congested, it depends on whether the storage amount reaches the threshold, and it is easy to misjudgment that the traffic bursts into congestion, and it is impossible to identify the congestion caused by the long-term continuous increase in the storage amount.
By monitoring the storage amount of the cache queue to continue to grow, if it exceeds the first threshold, it is determined to be congestion and does not depend on the storage amount size condition. At the same time, through sampling and congestion counting mechanisms, the accuracy of identification is further improved.
It improves the reliability and accuracy of cache queue congestion recognition, avoids sudden traffic misjudgment as congestion, and can identify congestion caused by long-term continuous growth of storage.
Smart Images

Figure CN114513463B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network technologies, and particularly to a congestion identification method and apparatus. Background Art
[0002] Congestion control is an important method for improving network resource utilization and optimizing network transmission quality. The congestion status of the buffer queue in a network device is an important reference basis for congestion control of the network device.
[0003] Currently, it is usually determined whether a buffer queue is congested by whether the storage amount of the buffer queue in a network device reaches a threshold. However, the storage amount of the buffer queue reaching the threshold is not necessarily caused by congestion. In addition, congestion does not necessarily cause the storage amount of the buffer queue to reach the threshold. Summary of the Invention
[0004] This application provides a congestion identification method and apparatus for realizing congestion identification of the buffer queue of a network device.
[0005] In a first aspect, a congestion identification method is provided. The method includes: when the continuous growth time of the storage amount of the buffer queue of a network device exceeds a first threshold, the network device determines that the buffer queue is congested without relying on the condition of the storage amount size of the buffer queue.
[0006] In this application, the network device determines whether the buffer queue is congested by the continuous growth time of the storage amount of the buffer queue, without relying on the condition of the storage amount size of the buffer queue, which can not only prevent misjudging the traffic burst of the buffer queue as the buffer queue being congested, but also identify the buffer queue that is congested due to the continuous growth of the storage amount over a long time, improving the reliability and accuracy of congestion identification for the buffer queue.
[0007] Optionally, when the ratio of the current storage amount of the buffer queue to the previous storage amount peak is lower than a second threshold, the continuous growth time ends. That is, when the storage amount of the buffer queue drops significantly compared to the previous storage amount peak, the network device can determine that the buffer queue is not congested currently.
[0008] Optionally, when the current storage amount of the buffer queue is lower than a third threshold, the continuous growth time ends. When the current storage amount of the buffer queue is low, the network device can determine that the buffer queue is not congested currently.
[0009] Optionally, the third threshold is the minimum reserved storage amount of the buffer queue.
[0010] In one implementation, the network device can also sample the storage capacity of the buffer queue. If, according to the sampling result, during the continuous growth period of the storage capacity of the buffer queue, the network device increases the congestion count of the buffer queue. Then when the continuous growth time of the storage capacity of the buffer queue of the network device exceeds the first threshold, the implementation process for the network device to determine that the buffer queue is congested without relying on the condition of the storage capacity size of the buffer queue includes: when the congestion count is greater than the congestion count threshold, the network device determines that the buffer queue is congested, where the first threshold is the product of the congestion count threshold and the sampling period.
[0011] In this implementation, when the current sampling result of the buffer queue by the network device is greater than the previous sampling result, the network device increases the congestion count of the buffer queue; when the current sampling result of the buffer queue by the network device is less than or equal to the previous sampling result but the continuous growth time of the storage capacity of the buffer queue has not ended, the network device also increases the congestion count of the buffer queue, that is, when the current storage capacity of the buffer queue of the network device has a relatively small decline compared to the previous storage capacity high point, and / or the current storage capacity of the buffer queue of the network device is still relatively high (not less than the third threshold), the network device also increases the congestion count of the buffer queue. That is to say, if, according to the sampling result, the continuous growth period of the storage capacity of the buffer queue of the network device has not ended, regardless of whether the storage capacity decreases, the network device increases the congestion count of the buffer queue, which can reduce the probability of misjudging the congestion of the buffer queue as non-congestion.
[0012] In another implementation, the network device can also sample the storage capacity of the buffer queue. If, according to the sampling result, the current sampling result is greater than the previous sampling result, the network device increases the congestion count of the buffer queue. Then when the continuous growth time of the storage capacity of the buffer queue of the network device exceeds the first threshold, the implementation process for the network device to determine that the buffer queue is congested without relying on the condition of the storage capacity size of the buffer queue includes: when the congestion count is greater than the congestion count threshold, the network device determines that the buffer queue is congested, where the first threshold is the product of the congestion count threshold and the sampling period.
[0013] In a second aspect, a network device is provided. The network device includes a plurality of functional modules, and the plurality of functional modules interact with each other to implement the methods in the first aspect and its various embodiments above. The plurality of functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the plurality of functional modules can be arbitrarily combined or divided based on specific implementations.
[0014] In a third aspect, a network device is provided, including: a memory and a queue manager;
[0015] The memory is used to store the buffer queue;
[0016] The queue manager is configured to determine that the cache queue is congested without depending on the storage size condition of the cache queue when the continuous growth time of the storage amount of the cache queue stored in the memory exceeds a first threshold.
[0017] Optionally, the queue manager is a network processor (NP), a traffic manager (TM), a central processing unit (CPU), or the like.
[0018] In a fourth aspect, a computer-readable storage medium is provided. Instructions are stored on the computer-readable storage medium, and when the instructions are executed by a processor of a computer device, the methods in the first aspect and its various embodiments are implemented.
[0019] In a fifth aspect, a chip is provided. The chip includes programmable logic circuits and / or program instructions, and when the chip runs, the methods in the first aspect and its various embodiments are implemented. Description of the Drawings
[0020] Figure 1 It is a schematic diagram of the change in the storage amount of a cache queue in a non-congested state provided by an embodiment of the present application;
[0021] Figure 2 It is a schematic diagram of the change in the storage amount of a cache queue in a congested state provided by an embodiment of the present application;
[0022] Figure 3 It is another schematic diagram of the change in the storage amount of a cache queue provided by an embodiment of the present application;
[0023] Figure 4 It is a schematic flowchart of a congestion identification method provided by an embodiment of the present application;
[0024] Figure 5 It is a schematic structural diagram of a network device provided by an embodiment of the present application;
[0025] Figure 6 It is a schematic structural diagram of another network device provided by an embodiment of the present application;
[0026] Figure 7 It is a block diagram of a network device provided by an embodiment of the present application;
[0027] Figure 8 It is a block diagram of another network device provided by an embodiment of the present application;
[0028] Figure 9 It is a schematic structural diagram of a communication network provided by an embodiment of the present application. Detailed implementation manners
[0029] To make the objectives, technical solutions, and advantages of this application clearer, the following will further describe the implementation manners of this application in detail with reference to the accompanying drawings.
[0030] A network device generally includes multiple buffer queues. The congestion status information of the buffer queues of the network device can be applied to multiple scenarios such as buffer optimization, congestion control, and quality of service (QoS) scheduling of the network device.
[0031] Currently, it is generally determined whether a buffer queue is congested based on whether the storage capacity of the buffer queue of the network device reaches a threshold. However, the fact that the storage capacity of the buffer queue reaches the threshold is not necessarily caused by congestion. Traffic bursts can also cause the storage capacity of the buffer queue to increase sharply and reach the threshold. Since traffic bursts occur instantaneously and usually last for less than 100 milliseconds. In the case of a traffic burst scenario, the storage capacity of the buffer queue usually increases sharply first and then quickly drops below the threshold, and this process lasts for a very short time. And congestion exists for a long time. Therefore, a traffic burst is a non-congested state. Currently, only determining whether a buffer queue is congested based on whether the storage capacity of the buffer queue of the network device reaches the threshold is likely to misjudge the traffic burst of the buffer queue as congestion of the buffer queue.
[0032] In addition, congestion does not necessarily immediately cause the storage capacity of the buffer queue to reach the threshold. For example, when the storage capacity of the buffer queue continues to grow slowly for a long time, that is, more and more packets are cached in the buffer queue, it may be caused by congestion. However, since currently only determining whether a buffer queue is congested based on whether the storage capacity of the buffer queue of the network device reaches the threshold, if the storage capacity of the buffer queue does not reach the threshold after continuously growing for a long time, it will not be determined that the buffer queue is congested.
[0033] As can be seen from the above, the reliability and accuracy of current congestion identification for buffer queues are relatively low.
[0034] Based on the fact that the storage capacity change trends of the buffer queues of the network device are different under different congestion conditions, the embodiments of this application provide a congestion identification method for the buffer queues of the network device. Optionally, Figure 1 and Figure 2 are respectively schematic diagrams of the storage capacity changes of a buffer queue in a non-congested state and a congested state provided by the embodiments of this application. Among them, the abscissa represents time, the ordinate represents the storage capacity of the buffer queue, and the storage capacities marked in the figure are only used to compare the storage capacity differences between the buffer queue in a non-congested state and a congested state, and are not used as examples of the actual storage capacity in the buffer queue. As Figure 1As shown, when the cache queue is in a non-congested state, the storage capacity of the cache queue is relatively low most of the time, and the storage capacity of the cache queue does not increase in the long run. Occasionally, there will be a sudden increase in the storage capacity during traffic bursts, but the storage capacity will also drop rapidly in a short time. As Figure 2 shown, when the cache queue is in a congested state, the storage capacity of the cache queue is relatively high most of the time, and the storage capacity of the cache queue shows a non-decreasing trend in the long run, and the storage capacity of the cache queue will continue to increase in the long run. The continuous growth period of the storage capacity of the cache queue may include a slight drop in the storage capacity.
[0035] In the congestion identification method provided in the embodiments of the present application, when the continuous growth time of the storage capacity of the cache queue of the network device exceeds the first threshold, the network device determines that the cache queue is congested without relying on the condition of the storage capacity size of the cache queue. Among them, the first threshold is the minimum congestion judgment duration, that is, the minimum continuous duration for determining that the cache queue is congested. For example, the first threshold can be set to 100 milliseconds. The network device's determination of congestion does not rely on the condition of the storage capacity size of the cache queue. Therefore, it will not determine that the cache queue is congested because the storage capacity of the cache queue is greater than the congestion threshold, nor will it not determine that the cache queue is congested because the storage capacity of the cache queue is less than the congestion threshold (although it can still determine that the congestion that has occurred in the cache queue has been relieved because the storage capacity is less than a certain storage capacity threshold, such as the minimum reserved storage capacity).
[0036] In the embodiments of the present application, the network device determines whether the cache queue is congested by the continuous growth time of the storage capacity of the cache queue, rather than relying on the condition of the storage capacity size of the cache queue. This can not only prevent misjudging the traffic burst of the cache queue as the cache queue being congested, but also identify the cache queue that is congested due to the continuous growth of the storage capacity in the long run, improving the reliability and accuracy of congestion identification for the cache queue. The continuous growth time of the storage capacity of the cache queue is an index related to the duration of the continuous growth period. The continuous growth time can be the total duration of the continuous growth period (that is, including the time of a slight drop in the storage capacity), or the sum of the times when the storage capacity increases during the continuous growth period. For example, the timing can be started at the beginning of the continuous growth period and ended at the end of the continuous growth period or when it is determined that the cache queue is congested. Another example is that the timing can be started at the beginning of the continuous growth period, paused when the storage capacity drops, resumed when the storage capacity rises, and ended at the end of the continuous growth period or when it is determined that the cache queue is congested. Among them, timing refers to measuring the continuous growth time.
[0037] Optionally, after determining that congestion occurs in the cache queue, the network device marks the status of the cache queue as congested and continues to sample the storage capacity of the cache queue of the network device, so as to realize real-time congestion identification of the cache queue.
[0038] Since the continuously increasing period may include a small drop in storage capacity, the continuously increasing period does not end merely because of a decrease in storage capacity, but only ends with a large drop in storage capacity. The end condition of the continuously increasing period may include one or more. For example, during the continuously increasing period of the storage capacity of the cache queue of the network device, when the ratio of the current storage capacity of the cache queue to the previous storage capacity peak is lower than the second threshold, the continuously increasing period ends. Or, during the continuous duration of the storage capacity of the cache queue of the network device, when the current storage capacity of the cache queue is lower than the third threshold, the continuously increasing period ends. When the continuously increasing period of the storage capacity of the cache queue ends, the continuously increasing time of the storage capacity of the cache queue is correspondingly ended, for example, the continuously increasing time is cleared.
[0039] When the ratio of the current storage capacity of the cache queue to the previous storage capacity peak is lower than the second threshold, the continuously increasing time ends, that is, when the storage capacity of the cache queue drops significantly compared to the previous storage capacity peak, the network device can determine that congestion does not occur in the current cache queue. Among them, when the continuously increasing time ends, the continuously increasing time can be cleared. In the embodiments of the present application, when the continuously increasing time of the storage capacity of the cache queue of the network device does not exceed the first threshold and the end condition of the continuously increasing time is satisfied, it can be determined that congestion does not occur in the current cache queue.
[0040] Optionally, the value range of the second threshold is [0, 1]. For example, the second threshold can be set to 0.7. The storage capacity peak of the cache queue can be the highest storage capacity during the continuously increasing period of the storage capacity, or the local peak of the storage capacity closest to the current time. For example, Figure 3 is another schematic diagram showing the change in the storage capacity of the cache queue provided by the embodiments of the present application. Wherein, the abscissa represents time and the ordinate represents the storage capacity of the cache queue. As Figure 3 shown, M represents the current storage capacity of the cache queue, and A, B, and C are all storage capacity peaks of the cache queue. The previous storage capacity peak of the cache queue used for comparison with the current storage capacity of the cache queue can be the highest storage capacity during the continuously increasing period of the storage capacity (i.e., point B), or the storage capacity peak closest to the current time (i.e., point C). Since the continuously increasing period where the storage capacity peak A is located has ended, point A does not participate in the judgment of whether the continuously increasing period where point M is located ends.
[0041] When the current storage amount of the cache queue is lower than the third threshold, the continuous growth time ends. That is, when the current storage amount of the cache queue is low, the network device can determine that congestion does not occur in the current cache queue.
[0042] Optionally, the third threshold is the minimum reserved storage amount of the cache queue of the network device. The minimum reserved storage amount of the cache queue refers to the minimum available storage space allocated to the cache queue, and this part of the storage space cannot be occupied by other cache queues. The minimum reserved storage amounts of the cache queues of network devices in different scenarios can take different values. For example, the minimum reserved storage amount of the cache queue of a network device in a campus network can be set to 8 cells (where cell is the minimum unit of the cache), and 1 cell can be equal to 288 bytes (byte) or 128 bytes, etc. The cell sizes defined by different manufacturers may be different. The minimum reserved cache amount of the cache queue of the network device can also be set to 6 cells or 10 cells, etc., and the specific value can be set according to actual requirements. Alternatively, the minimum reserved storage amount of the cache queue of the network device can also take any value close to 0. When the storage amount of the cache queue is less than the minimum reserved storage amount of the cache queue (i.e., the above-mentioned third threshold), it means that there are fewer packets cached in the cache queue, and the delay for forwarding packets by this cache queue is smaller. Therefore, it can be considered that this cache queue is in an uncongested state.
[0043] Optionally, after determining that the cache queue is not congested, the network device marks the status of the cache queue as uncongested and continues to sample the storage amount of the cache queue of the network device, which can realize real-time congestion identification of the cache queue.
[0044] In the embodiments of this application, the network device can sample the storage amount of the cache queue and determine whether the continuous growth time of the storage amount of the cache queue ends according to the sampling result. Optionally, the network device samples the storage amount of the cache queue periodically. The sampling period is less than the above-mentioned first threshold.
[0045] In the first implementation manner, if according to the sampling result, during the continuous growth period of the storage amount of the cache queue of the network device, the network device increases the congestion count of the cache queue. That is, if according to the sampling result, the continuous growth period of the storage amount of the cache queue of the network device has not ended, regardless of whether the storage amount decreases, the network device increases the congestion count of the cache queue.
[0046] When the continuous growth time of the cache queue of the network device is the total duration of the continuous growth period (i.e., including a small amount of storage amount fallback time), this implementation manner is: if according to the sampling result, during the continuous growth time of the storage amount of the cache queue of the network device, the network device increases the congestion count of the cache queue.
[0047] In this implementation, if the continuous growth period of the storage volume of the cache queue of the network device has not ended according to the sampling result, regardless of whether the storage volume increases (i.e., the current sampling result of the cache queue by the network device is greater than the previous sampling result), decreases (i.e., the current sampling result of the cache queue by the network device is less than the previous sampling result), or remains unchanged (i.e., the current sampling result of the cache queue by the network device is equal to the previous sampling result), the network device increases the congestion count of the cache queue. That is, it is considered that the situation where the continuous growth period of the storage volume of the cache queue of the network device has not ended belongs to the congestion situation, which can reduce the probability of misjudging the congestion of the cache queue as non-congestion.
[0048] In the second implementation, if the current sampling result of the cache queue by the network device is greater than the previous sampling result according to the sampling result, the network device increases the congestion count of the cache queue. That is, if the continuous growth period of the storage volume of the cache queue of the network device has not ended and the storage volume of the cache queue is increasing according to the sampling result, the network device increases the congestion count of the cache queue.
[0049] When the continuous growth time of the storage volume of the cache queue of the network device is the total duration of the continuous growth period (i.e., including the time of a small drop in the storage volume), this implementation includes: if the cache queue of the network device is in the continuous growth time of the storage volume and the current sampling result is greater than the previous sampling result according to the sampling result, the network device increases the congestion count of the cache queue. When the continuous growth time of the storage volume of the cache queue of the network device is the sum of the time when the storage volume increases during the continuous growth period, this implementation includes: if the cache queue of the network device is in the continuous growth time of the storage volume according to the sampling result, the network device increases the congestion count of the cache queue.
[0050] In this implementation, when the current sampling result of the cache queue by the network device is greater than the previous sampling result, the network device increases the congestion count of the cache queue. When the continuous growth period of the storage volume of the cache queue has not ended, but the current sampling result of the network device for the cache queue is not greater than the previous sampling result, the network device can keep the congestion count of the cache queue unchanged, that is, pause calculating the continuous growth time when the storage volume of the cache queue drops slightly or remains unchanged.
[0051] In the above two implementation manners, when the continuous growth time of the storage amount of the buffer queue of the network device exceeds the first threshold, the implementation process for the network device to determine that the buffer queue is congested without depending on the condition of the storage amount size of the buffer queue includes: when the congestion count of the buffer queue is greater than the congestion count threshold, the network device determines that the buffer queue is congested. Wherein, the first threshold may be the product of the congestion count threshold and the sampling period. That is to say, the congestion count threshold may be obtained based on the first threshold (i.e., the minimum congestion judgment duration) and the sampling period of the storage amount of the buffer queue by the network device. For example, the first threshold is 100 milliseconds. Assuming that the sampling period of the storage amount of the buffer queue by the network device is 1 millisecond, then the congestion count threshold is equal to 100; or, assuming that the sampling period of the storage amount of the buffer queue by the network device is 10 milliseconds, then the congestion count threshold is equal to 10.
[0052] In the embodiments of the present application, when the ratio of the current storage amount of the buffer queue of the network device to the previous storage amount high point is lower than the second threshold, or when the current storage amount of the buffer queue is lower than the third threshold, the continuous growth period of the storage amount of the buffer queue ends; after the network device samples the storage amount of the buffer queue, if according to the sampling result, during the continuous growth period of the storage amount, the network device increases the congestion count of the buffer queue as an example, the implementation process of congestion identification for the network device is described. Wherein, the second threshold is denoted as α, 0≤α≤1. The congestion count of the buffer queue is denoted as INC, and the initial value of INC is taken as 0. The congestion count threshold is denoted as W, and the third threshold is denoted as Tmin. Optionally, Figure 4 It is a schematic flow chart of a congestion identification method provided by an embodiment of the present application. As Figure 4 shown, the method includes:
[0053] Step 401, the network device obtains a first storage amount R1 and a second storage amount R2 of the buffer queue of the network device.
[0054] R1 is the storage amount sampled by the network device at the first sampling moment, and R2 is the storage amount sampled by the network device at the second sampling moment. The second sampling moment may be the current sampling moment. The first sampling moment is before the second sampling moment. Wherein, the first sampling moment and the second sampling moment may be consecutive sampling moments. Or, the first sampling moment and the second sampling moment may also be non-consecutive sampling moments, and the storage amount of the buffer queue sampled between the first sampling moment and the second sampling moment all satisfies: the storage amount is not greater than R1, the ratio of the storage amount to R1 is not less than α, and the storage amount is not less than Tmin. That is, R1 is the storage amount high point closest to the second sampling moment.
[0055] Step 402, if R2 > R1, execute step 405; otherwise, execute step 403.
[0056] That is, if R2 ≤ R1, step 403 is executed.
[0057] Step 403: If R2 / R1 < α || R2 < Tmin, step 404 is executed; otherwise, step 405 is executed.
[0058] That is, under the condition of R2 ≤ R1, if R2 / R1 ≥ α & R2 ≥ Tmin, step 405 is executed. Here, "R2 / R1" represents the ratio of R2 to R1, "||" represents "or", and "&" represents "and".
[0059] Step 404: The network device sets INC = 0 and marks that the buffer queue is not congested.
[0060] Optionally, when R2 / R1 < α || R2 < Tmin, the network device can also set R1 = R2, R2 = R3, that is, take R2 as the new R1, and take the third storage amount R3 sampled at the third sampling moment as the new R2, and then execute step 402 again. The third sampling moment is the next sampling moment after the second sampling moment.
[0061] Step 405: The network device sets INC = INC + 1.
[0062] In one case, when R2 > R1, the network device can also set R1 = R2, R2 = R3, that is, take R2 as the new R1, and take the third storage amount R3 sampled at the third sampling moment as the new R2. The third sampling moment is the next sampling moment after the second sampling moment.
[0063] In another case, when R2 ≤ R1 & R2 / R1 ≥ α & R2 ≥ Tmin, the network device can also set R2 = R3, that is, keep R1 unchanged, and take the third storage amount R3 sampled at the third sampling moment as the new R2. The third sampling moment is the next sampling moment after the second sampling moment. In this case, R1 is the storage amount high point closest to the third sampling moment, so the network device keeps R1 unchanged.
[0064] Step 406: If INC = W, step 407 is executed. If INC < W, step 402 is executed again.
[0065] Step 407: The network device marks that the buffer queue is congested.
[0066] Optionally, after congestion occurs in the marking cache queue, the network device may set INC = 0 and then execute step 402 again. Alternatively, after congestion occurs in the marking cache queue, the network device stops identifying congestion for the cache queue until a target condition is met, and then uses the above process to identify congestion for the cache queue. The target condition may be that the storage capacity of the cache queue is lower than a third threshold, or it may also be receiving an externally input congestion identification instruction, etc.
[0067] Optionally, the network device may use two registers to record the sampling results at different sampling times respectively, and update the values in the registers in real time according to the sampling results, that is, the above R1 and R2 can be implemented by registers for recording and updating. The network device may also use a register to record INC. Whenever INC reaches W or the cache queue meets the condition of no congestion, the register is cleared, and the register can also play a role in controlling the judgment duration of identifying congestion for the cache queue.
[0068] Optionally, after the network device is powered on, in the initial stage when there are packets in the cache queue, it may default that the cache queue is congested, making the reliability of the network device for congestion control relatively high; or, it may also default that the cache queue is not congested, making the initial service experience better.
[0069] The sequence of steps of the congestion identification method provided in the embodiments of this application can be appropriately adjusted, and the steps can also be increased or decreased accordingly according to the situation. Any person skilled in the art within the technical scope disclosed in this application can easily think of a changed method, which should be covered by the protection scope of this application. For example, the congestion identification method provided in the embodiments of this application can be used not only to identify congestion for the cache queue, but also for port-level (for a port) or device-level (for a port group) congestion identification.
[0070] In summary, in the congestion identification method provided in the embodiments of the present application, the network device determines whether a buffer queue is congested based on the continuous growth time of the storage amount of the buffer queue, rather than depending on the condition of the storage amount of the buffer queue. This can prevent misjudging the traffic burst of the buffer queue as congestion of the buffer queue, and can also identify the buffer queue that is congested due to the continuous growth of the storage amount over a long period of time, improving the reliability and accuracy of congestion identification for the buffer queue. The network device's determination of congestion does not depend on the condition of the storage amount of the buffer queue. Therefore, it will not determine that the buffer queue is congested because the storage amount of the buffer queue is greater than the congestion threshold, nor will it not determine that the buffer queue is congested because the storage amount of the buffer queue is less than the congestion threshold (although it can still determine that the congestion that has occurred in the buffer queue has been relieved because the storage amount is less than a certain storage amount threshold, such as the minimum reserved storage amount). In a specific implementation, when the storage amount of the buffer queue continuously increases or only shows a very small decline at multiple sampling moments, the network device determines that the buffer queue is congested. Since the network device determines whether the buffer queue is congested based on the change trend of the storage amount of the buffer queue at multiple sampling moments, it can reduce the probability of misjudging the instantaneous traffic burst of the buffer queue as congestion; and since the network device does not consider the continuous growth time of the storage amount of the buffer queue to end when the storage amount of the buffer queue shows a small decline, it can also reduce the probability of misjudging the congestion of the buffer queue as non-congestion.
[0071] Figure 5 is a schematic structural diagram of a network device provided in an embodiment of the present application. As Figure 5 shown, the network device 50 includes:
[0072] A determination module 501, configured to determine that the buffer queue is congested without depending on the condition of the storage amount of the buffer queue when the continuous growth time of the storage amount of the buffer queue of the network device exceeds a first threshold.
[0073] Optionally, when the ratio of the current storage amount of the buffer queue to the previous storage amount peak is lower than a second threshold, the continuous growth time ends.
[0074] Optionally, when the current storage amount of the buffer queue is lower than a third threshold, the continuous growth time ends.
[0075] Optionally, the third threshold is the minimum reserved storage amount of the buffer queue.
[0076] Optionally, as Figure 6 shown, the network device 50 further includes: a sampling module 502 and a counting module 503.
[0077] In one implementation, a sampling module 502 is configured to sample the storage amount of the cache queue; a counting module 503 is configured to increase the congestion count of the cache queue if, according to the sampling result, the cache queue is in a period of continuous increase in storage amount. Correspondingly, a determination module 501 is configured to: when the congestion count is greater than a congestion count threshold, determine that the cache queue is congested, where the first threshold is the product of the congestion count threshold and the sampling period.
[0078] In another implementation, a sampling module 502 is configured to sample the storage amount of the cache queue; a counting module 503 is configured to increase the congestion count of the cache queue if the current sampling result is greater than the previous sampling result according to the sampling result. Correspondingly, a determination module 501 is configured to: when the congestion count is greater than a congestion count threshold, determine that the cache queue is congested, where the first threshold is the product of the congestion count threshold and the sampling period.
[0079] In summary, in the congestion identification method provided in the embodiments of the present application, the network device determines whether the cache queue is congested based on the continuous growth time of the storage amount of the cache queue, rather than relying on the condition of the storage amount of the cache queue. This can prevent misjudging the traffic burst of the cache queue as congestion of the cache queue, and can also identify the cache queue that is congested due to the continuous growth of the storage amount over a long period of time, improving the reliability and accuracy of congestion identification for the cache queue.
[0080] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.
[0081] Embodiments of the present application provide a network device, including: a memory and a queue manager;
[0082] The memory is used to store the cache queue;
[0083] The queue manager is configured to determine that the cache queue is congested without relying on the condition of the storage amount of the cache queue when the continuous growth time of the storage amount of the cache queue stored in the memory exceeds a first threshold.
[0084] In one implementation, the queue manager is further configured to sample the storage amount of the cache queue, increase the congestion count of the cache queue if, according to the sampling result, the cache queue is in a period of continuous increase in storage amount; and determine that the cache queue is congested when the congestion count is greater than a congestion count threshold.
[0085] In another implementation, the queue manager is further configured to sample the storage capacity of the cache queue. If the current sampling result is greater than the previous sampling result according to the sampling result, the congestion count of the cache queue is increased; when the congestion count is greater than the congestion count threshold, it is determined that the cache queue is congested.
[0086] Optionally, the queue manager may be a network processor, a traffic manager, a CPU, or other chips with processing capabilities or a combination thereof. The traffic manager has a buffer area for buffering and forwarding packets. The memory may be a buffer area in the traffic processor, or may be an independent memory, or may be integrated in other chips.
[0087] The embodiments of the present application will be described by taking the following two structures adopted by network devices as examples.
[0088] In the first structure, the queue manager is a network processor, and the memory is a buffer area in the traffic manager. Figure 7 is a block diagram of a network device provided by an embodiment of the present application. As Figure 7 shown, the network device 70 includes a network processor 701 and a traffic manager 702.
[0089] See Figure 7 , the traffic manager 702 includes a control area 7021 and a buffer area 7022. The buffer area 7022 stores a cache queue. The control area 7021 of the traffic manager 702 is configured to store the packets received by the traffic manager 702 into the cache queue in the buffer area 7022. The network processor 701 is configured to read the cache occupancy information of the cache queue from the buffer area 7022 of the traffic manager 702, such as the storage capacity of the cache queue, etc.; analyze the cache change trend of the cache queue according to the cache occupancy information of the cache queue to determine whether the cache queue is congested; calculate the flow control parameters according to the congestion situation of the cache queue, and send the flow control parameters to the traffic manager. The flow control parameters include a cache waterline (also referred to as a cache threshold) and / or an explicit congestion notification (ECN) waterline (also referred to as an ECN threshold); etc. The control area 7021 of the traffic manager 702 is further configured to set the corresponding cache parameters of the buffer area 7022 according to the flow control parameters from the network processor 701; perform congestion control on the packets forwarded through the cache queue according to the corresponding control mechanism according to the flow control parameters from the network processor 701; etc.
[0090] Optionally, the network device 70 further includes a CPU 703, a communication bus 704, and a communication interface 705.
[0091] The CPU 703 includes one or more processing cores, and executes various functional applications and data processing by running computer programs.
[0092] There may be one or more communication interfaces 705, which are used to communicate with other devices. For example, communicate with storage devices or other network devices.
[0093] The network processor 701, the traffic manager 702, and the communication interface 705 are respectively connected to the CPU 703 through the communication bus 704.
[0094] In the second structure, the queue manager is the CPU. Figure 8 It is a block diagram of another network device provided by an embodiment of the present application. As Figure 8 shown, the network device 80 includes a CPU 801 and a memory 802.
[0095] The memory 802 is used to store the cache queue. The memory 802 is also used to store a computer program, which includes program instructions. Optionally, the memory may store an operating system and application program units required for at least one function. The operating system may be an operating system such as Real Time eXecutive (RTX), LINUX, UNIX, WINDOWS, or OS X. In the embodiments of the present application, the cache queue and the computer program may be stored in one memory, or the cache queue and the computer program may also be stored independently in different memories respectively.
[0096] The CPU 801 is used to call the computer program stored in the memory 802, and adopt the method in the above method embodiments to implement congestion identification for the cache queue in the memory 802. The CPU 801 is usually a multi-core processor.
[0097] Optionally, the network device 80 further includes a communication bus 803 and a communication interface 804.
[0098] There may be one or more communication interfaces 804, which are used to communicate with other devices. For example, communicate with storage devices or other network devices.
[0099] The memory 802 and the communication interface 804 are respectively connected to the CPU 801 through the communication bus 803.
[0100] The network device involved in the embodiments of the present application may be any network device in a communication network. The network device may be a switch or a router, etc. The cache queue of the network device may be any queue used to cache data in the network device, for example, it may be an output port queue or an input port queue, etc. The embodiments of the present application do not limit the type of the cache queue.
[0101] Optionally, the communication network may be a data center network (DCN), a metropolitan area network, a wide area network, a campus network, etc. The embodiments of the present application do not limit the type of the communication network. The communication network may adopt a two - level network architecture or a three - level network architecture. In the two - level network architecture, the communication network includes an aggregation layer and an access layer. This communication network may also be referred to as a two - layer network. The aggregation layer is the high - speed switching backbone of the communication network, and the access layer is used to connect workstations to the communication network. In the three - level network architecture, the communication network includes a core layer, an aggregation layer, and an access layer. This communication network may also be referred to as a three - layer network. The core layer is the high - speed switching backbone of the communication network, the aggregation layer is used to provide aggregation connections (connecting the access layer and the core layer), and the access layer is used to connect workstations to the communication network. Among them, workstations may include terminals, access points (APs), servers, or virtual machines (VMs), etc. The terminal may be a mobile phone or a computer, etc. Among them, the network devices in the core layer are called core network devices. The network devices in the aggregation layer are called aggregation network devices. The network devices in the access layer are called access network devices.
[0102] Optionally, Figure 9 is a schematic structural diagram of a communication network provided by an embodiment of the present application. This communication network is a three - layer network. For example, this communication network may be a campus network. As Figure 9 shown, this communication network includes a core network device 001, aggregation network devices 002A - 002B (collectively referred to as aggregation network device 002), and access network devices 003A - 003D (collectively referred to as access network device 003). Aggregation network device 002A and aggregation network device 002B are respectively connected to core network device 001. Access network device 003A and access network device 003B are respectively connected to aggregation network device 002A. Access network device 003C and access network device 003D are respectively connected to aggregation network device 002B.
[0103] The core network device 001 generally refers to a layer - 2 switch or a layer - 3 switch with strong throughput. It bears and aggregates all the transmission traffic in the communication network and is the main guarantee for the performance of the communication network. The main function of the core network device 001 is to provide high - speed transmission and optimization for the aggregation network device 002, which is equivalent to an exit or a general summary.
[0104] The aggregation network device 002 is the aggregation point of multiple access network devices 003. It can process all the transmission traffic from the connected access network devices 003 and provide an uplink to the core layer. Compared with the access network device 003, the aggregation network device 002 requires higher performance, fewer interfaces, and a higher switching rate. The aggregation network device 002 is generally used between buildings and is equivalent to a local or important transfer station.
[0105] The access network device 003 is generally used to directly connect to workstations and has characteristics such as low cost and high interface density.
[0106] The network device involved in the embodiments of this application can be, for example, Figure 9 the core network device 001, the aggregation network device 002, or the access network device 003 in the communication network as shown.
[0107] The embodiments of this application also provide a computer-readable storage medium. Instructions are stored on the computer-readable storage medium, and when the instructions are executed by the processor of a computer device, the congestion identification method involved in the above method embodiments is implemented.
[0108] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk, an optical disc, etc.
[0109] In the embodiments of this application, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.
[0110] The term "and / or" in this application is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after.
[0111] The above are only optional embodiments of this application and are not intended to limit this application. Any modifications, equivalent replacements, improvements, etc. made within the concept and principles of this application shall be included within the protection scope of this application.
Claims
1. A congestion identification method, characterized in that, the method includes: When the continuous growth time of the storage amount of the cache queue of the network device exceeds a first threshold, the network device determines that the cache queue is congested without relying on the condition of the storage amount size of the cache queue.
2. The method according to claim 1, characterized in that, When the ratio of the current storage amount of the cache queue to the previous storage amount peak is lower than a second threshold, the continuous growth time ends.
3. The method according to claim 1 or 2, characterized in that, When the current storage amount of the cache queue is lower than a third threshold, the continuous growth time ends.
4. The method according to claim 3, characterized in that, The third threshold is the minimum reserved storage amount of the cache queue.
5. The method according to claim 1 or 2, characterized in that, the method further includes: The network device samples the storage amount of the cache queue. If, according to the sampling result, during the continuous growth time of the storage amount, the network device increases the congestion count of the cache queue; When the continuous growth time of the storage amount of the cache queue of the network device exceeds a first threshold, the network device determines that the cache queue is congested without relying on the condition of the storage amount size of the cache queue, including: When the congestion count is greater than the congestion count threshold, the network device determines that the cache queue is congested, where the first threshold is the product of the congestion count threshold and the sampling period.
6. The method according to claim 1 or 2, characterized in that, the method further includes: The network device samples the storage amount of the cache queue. If, according to the sampling result, the current sampling result is greater than the previous sampling result, the network device increases the congestion count of the cache queue; When the continuous growth time of the storage amount of the cache queue of the network device exceeds a first threshold, the network device determines that the cache queue is congested without relying on the condition of the storage amount size of the cache queue, including: When the congestion count is greater than the congestion count threshold, the network device determines that the cache queue is congested, where the first threshold is the product of the congestion count threshold and the sampling period.
7. A network device, characterized in that, includes: A determination module, configured to determine that the cache queue is congested without relying on the condition of the storage amount size of the cache queue when the continuous growth time of the storage amount of the cache queue of the network device exceeds a first threshold.
8. The network device according to claim 7, characterized in that, When the ratio of the current storage amount of the cache queue to the previous storage amount peak is lower than a second threshold, the continuous growth time ends.
9. The network device according to claim 7 or 8, characterized in that, When the current storage amount of the cache queue is lower than a third threshold, the continuous growth time ends.
10. The network device according to claim 9, characterized in that, The third threshold is the minimum reserved storage amount of the cache queue.
11. The network device according to claim 7 or 8, characterized in that, The network device further includes: a sampling module, configured to sample the storage amount of the buffer queue; a counting module, configured to increase the congestion count of the buffer queue if, according to the sampling result, the buffer queue is in a period of continuous increase in the storage amount; the determining module, configured to: when the congestion count is greater than a congestion count threshold, determine that the buffer queue is congested, where the first threshold is the product of the congestion count threshold and the sampling period.
12. The network device according to claim 7 or 8, wherein, the network device further includes: a sampling module, configured to sample the storage amount of the buffer queue; a counting module, configured to increase the congestion count of the buffer queue if the current sampling result is greater than the previous sampling result according to the sampling result; the determining module, configured to: when the congestion count is greater than a congestion count threshold, determine that the buffer queue is congested, where the first threshold is the product of the congestion count threshold and the sampling period.
13. A network device, wherein, it includes: a memory and a queue manager; the memory is configured to store a buffer queue; the queue manager is configured to, when the continuous increase time of the storage amount of the buffer queue stored in the memory exceeds a first threshold, determine that the buffer queue is congested without depending on the condition of the storage amount of the buffer queue.
Citation Information
Patent Citations
Method and device for realizing load sharing in multiple spanning tree protocol (MSTP) networking environment
CN102055676A
Queue management method and device
CN105099940A