Method and device for intelligently adjusting TM resources
By dynamically adjusting SRAM and DRAM resources in optical transmission equipment, the problem of resource waste and performance degradation caused by TM resource scheduling strategies in the existing technology is solved, maximizing the utilization of TM resources and high-priority packet loss are achieved, meeting the requirements of Diverse network application requirements.
Patent Information
- Application Number
- CN202410795772.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-10-22
AI Technical Summary
In the TM resource scheduling strategy of existing optical transmission equipment, the transfer threshold and packet loss threshold of SRAM and DRAM are set too large or too small, resulting in resource waste and transmission equipment performance degradation, and TM resources cannot be effectively utilized.
By dynamically adjusting the idle resources of SRAM and DRAM based on device congestion and business traffic requirements, and linking the S2D transfer threshold and DRAM packet loss threshold, intelligent allocation and maximum utilization of resources are achieved.
It effectively solves the problem of resource waste caused by static allocation of TM resources, improves the forwarding performance of transmission equipment, ensures that high priority packets are not lost, and satisfies more network application scenarios.
Smart Images

Figure CN118819824A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method and device for intelligently adjusting TM resources. Background Art
[0002] For optical transmission equipment, there are generally two types of TM (TrafficManager) scheduling resources, namely SRAM (Static Random Access Memory) and DRAM (Dynamic Random Access Memory). SRAM is integrated inside the forwarding chip of the optical transmission equipment, and its characteristics are high price, few resources, and high forwarding efficiency; DRAM is externally mounted on the periphery of the forwarding chip of the optical transmission equipment, and its characteristic is low forwarding efficiency, and is generally used to cache messages during congestion.
[0003] The main scheduling strategies for optical transmission equipment are as follows: Figure 1 As shown, when the traffic is stable and not congested, forwarding is performed based on SRAM, that is, Figure 1 The S2F (SRAM to Forward) path forwarding; when the traffic jitter and burst are large, it may cause congestion, and the message will enter the DRAM cache and rely on DRAM for forwarding, that is, Figure 1 The D2F (DRAM to Forward) path is forwarded. Generally, optical transmission equipment uses both SRAM and DRAM for forwarding.
[0004] like Figure 2 and 3 As shown in the figure, the SRAM to DRAM transfer threshold in the current scheduling method is a fixed empirical value, and the DRAM packet loss threshold is also a fixed empirical value. The problem with this scheduling strategy is that when the S2D (SRAM to DRAM) transfer threshold is set too large, it is easy to exhaust the SRAM resources of the network processor, and the forwarding performance of the transmission equipment will drop sharply. If it is set too small, it is easy to cause important queues to lose packets. Similarly, when the DRAM packet loss threshold is set too large, the DRAM cache resources will be exhausted. If it is set too small, the DRAM cache resources will not be fully utilized, resulting in a decrease in the forwarding performance of the transmission equipment. Summary of the invention
[0005] The present application provides a method and device for intelligently adjusting TM resources, which can solve the problem of resource waste caused by static allocation of TM resources of transmission equipment, and use the overall congestion status of the transmission equipment to fairly and intelligently adjust resource allocation, thereby maximizing the utilization of TM resources of the transmission equipment, thereby meeting various application scenarios.
[0006] In a first aspect, an embodiment of the present application provides a method for intelligently adjusting TM resources, the method for intelligently adjusting TM resources comprising the following steps:
[0007] According to the equipment congestion situation, the idle resources of the static random access memory SRAM and the dynamic random access memory DRAM are linked to dynamically adjust the S2D transfer threshold and the DRAM packet loss threshold.
[0008] In combination with the first aspect, in one implementation, according to the device congestion situation, resource linkage is performed on the idle resources of the static random access memory SRAM and the dynamic random access memory DRAM, and the S2D transfer threshold and the DRAM packet loss threshold are dynamically adjusted, including:
[0009] Determine the relationship between the S2D transfer threshold and the SRAM idle resources based on device congestion, DRAM usage, and service traffic response requirements;
[0010] According to the cache depth of the queues and the resource allocation between the queues, the relationship between the DRAM packet loss threshold and the change of the DRAM idle resources is determined.
[0011] In combination with the first aspect, in one implementation, determining the relationship between the change in the S2D transfer threshold and the SRAM idle resources according to the device congestion, the DRAM usage, and the response requirements of the service traffic includes:
[0012] According to the device congestion situation, determine the Min-S2D value and Max-S2D value for scheduling without packet loss when the port traffic is full;
[0013] According to the usage of DRAM, determine the Min-S2D idle resources and Max-S2D idle resources of SRAM allocated to each queue;
[0014] According to the response requirements of business traffic, the functional relationship between the S2D transfer threshold and the SRAM free resource S-Free and the proportional factor K for adjusting the response speed is set: S2D transfer threshold = K*S-Free;
[0015] When S-Free>Max-S2D idle resources, or S2D transfer threshold>Max-S2D, set the S2D transfer threshold to Max-S2D;
[0016] When Min-S2D idle resources < S-Free < Max-S2D idle resources, and Min-S2D < S2D transfer threshold < Max-S2D, set the S2D transfer threshold to K*S-Free;
[0017] When S-Free is less than Min-S2D free resources, or the S2D transfer threshold is less than Min-S2D, the S2D transfer threshold is set to Min-S2D.
[0018] In combination with the first aspect, in one implementation, determining, according to the device congestion situation, the Min-S2D value and the Max-S2D value for scheduling without packet loss when the port traffic is full includes:
[0019] When the device is most congested, determine the Min-S2D value for scheduling without packet loss when the traffic on a single port is full: L / M, where L is the maximum message length and M is the minimum storage unit of SRAM;
[0020] When the device is least congested, perform a Fullmesh test on all ports of the device, and use the S2D value at which all port traffic is fully utilized without packet loss as the Max-S2D value.
[0021] In combination with the first aspect, in one implementation, determining the Min-S2D idle resources and the Max-S2D idle resources allocated to each queue by the SRAM according to the usage of the DRAM includes:
[0022] When DRAM is not in use, the Min-S2D idle resources allocated to each queue by SRAM are calculated according to the formula: B / (L / M*P*8);
[0023] When DRAM is fully used, the maximum idle resources of SRAM allocated to each queue are calculated according to the formula: (B+D) / (L / M*P*8);
[0024] Among them, B is the total SRAM resource of the device, D is the resource of DRAM equivalent SRAM cache capacity, and P is the total number of ports of the transmission device.
[0025] In combination with the first aspect, in one implementation, determining the relationship between the change in the DRAM packet loss threshold and the DRAM idle resources according to the cache depth of the queue and the resource allocation between the queues includes:
[0026] Set the queue's minimum and maximum packet loss thresholds, as well as the factors that influence queue resource allocation;
[0027] Set the functional relationship between the DRAM packet loss threshold, the DRAM idle resource R, and the impact factor a: DRAM packet loss threshold = 2^a×R;
[0028] When the DRAM packet loss threshold is greater than the Max packet loss threshold, the DRAM packet loss threshold is set to the Max packet loss threshold;
[0029] When Min packet loss threshold < DRAM packet loss threshold < Max packet loss threshold, set the DRAM packet loss threshold to 2^a×R;
[0030] When the DRAM packet loss threshold is less than the Min packet loss threshold, the DRAM packet loss threshold is set to the Min packet loss threshold.
[0031] In combination with the first aspect, in one implementation, setting the Min packet loss threshold and the Max packet loss threshold of the queue includes:
[0032] The Min packet loss threshold is determined based on the length of the two largest messages;
[0033] The Max packet loss threshold is determined based on the cache time corresponding to various rate ports.
[0034] In a second aspect, an embodiment of the present application provides a device for intelligently adjusting TM resources, characterized in that the device for intelligently adjusting TM resources includes:
[0035] The adjustment module links the idle resources of the static random access memory SRAM and the dynamic random access memory DRAM according to the device congestion situation, and dynamically adjusts the S2D transfer threshold and the DRAM packet loss threshold.
[0036] In conjunction with the second aspect, in one implementation, the adjustment module includes:
[0037] The SRAM adjustment submodule determines the relationship between the S2D transfer threshold and the SRAM free resources according to the device congestion, DRAM usage, and the response requirements of the business traffic;
[0038] The DRAM adjustment submodule determines the changing relationship between the DRAM packet loss threshold and the DRAM idle resources according to the cache depth of the queues and the resource allocation between the queues.
[0039] In combination with the second aspect, in one implementation, the SRAM adjustment submodule determines the change relationship between the S2D transfer threshold and the SRAM idle resources according to the device congestion, the DRAM usage, and the response requirements of the service traffic, including:
[0040] According to the device congestion situation, determine the Min-S2D value and Max-S2D value for scheduling without packet loss when the port traffic is full;
[0041] According to the usage of DRAM, determine the Min-S2D idle resources and Max-S2D idle resources of SRAM allocated to each queue;
[0042] According to the response requirements of business traffic, the functional relationship between the S2D transfer threshold and the SRAM free resource S-Free and the proportional factor K for adjusting the response speed is set: S2D transfer threshold = K*S-Free;
[0043] When S-Free>Max-S2D idle resources, or S2D transfer threshold>Max-S2D, set the S2D transfer threshold to Max-S2D;
[0044] When Min-S2D idle resources < S-Free < Max-S2D idle resources, and Min-S2D < S2D transfer threshold < Max-S2D, set the S2D transfer threshold to K*S-Free;
[0045] When S-Free is less than Min-S2D free resources, or the S2D transfer threshold is less than Min-S2D, the S2D transfer threshold is set to Min-S2D.
[0046] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0047] The method for intelligently adjusting TM resources in the present application performs resource linkage on the idle resources of the static random access memory SRAM and the dynamic random access memory DRAM according to the device congestion situation, and dynamically adjusts the S2D transfer threshold and the DRAM packet loss threshold.
[0048] That is, according to the remaining SRAM and DRAM of the equipment, the SRAM and DRAM resources are used in conjunction, and the S2D transfer threshold and the DRAM packet loss threshold are automatically adjusted. The technology of intelligently adjusting TM resources is adopted to maximize the utilization of TM resources of the transmission equipment and solve the packet loss problem caused by large traffic bursts in the network. Among them, the proposed intelligent allocation method of SRAM resources ensures that high priority packets are not lost and can meet more network application scenarios; the proposed adjustment of scheduling resources according to the congestion status greatly improves the forwarding performance of the transmission equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a schematic diagram of S2F (SRAM to Forward) path forwarding;
[0050] Figure 2 It is a curve diagram of the S2D threshold curve in the prior art changing with the SRAM idle resources and queue size;
[0051] Figure 3 This is a graph showing the variation of packet loss threshold with DRAM idle resource size in the prior art;
[0052] Figure 4A flowchart of an embodiment of a method for intelligently adjusting TM resources of the present application;
[0053] Figure 5 This is the Fullmesh test topology diagram for this application;
[0054] Figure 6 This is a graph showing the S2D threshold curve for this application as it changes with SRAM idle resources and queue size;
[0055] Figure 7 This is a graph showing the change in DRAM packet loss threshold with the size of DRAM free resources for this application;
[0056] Figure 8 Schematic diagram of functional modules of an embodiment of an apparatus for intelligently adjusting TM resources of the present application. DETAILED DESCRIPTION
[0057] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0058] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.
[0059] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.
[0060] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0061] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0062] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0063] In a first aspect, embodiments of the present application provide a method for intelligently adjusting TM resources.
[0064] The method for intelligently adjusting TM resources comprises the following steps:
[0065] According to the equipment congestion situation, the idle resources of the static random access memory SRAM and the dynamic random access memory DRAM are linked to dynamically adjust the S2D transfer threshold and the DRAM packet loss threshold.
[0066] In one embodiment, referring to Figure 4 , Figure 4 This is a flow chart of the first embodiment of the method for intelligently adjusting TM resources of this application. Figure 4 As shown, according to the device congestion situation, the idle resources of the static random access memory SRAM and the dynamic random access memory DRAM are linked, and the S2D transfer threshold and the DRAM packet loss threshold are dynamically adjusted, including:
[0067] S1. Determine the relationship between the S2D transfer threshold and the SRAM idle resources based on device congestion, DRAM usage, and business traffic response requirements.
[0068] Specifically, step S1 includes:
[0069] S11. According to the device congestion situation, determine the Min-S2D value and Max-S2D value for scheduling without packet loss when the port traffic is full;
[0070] Specifically, when the device is most congested, the Min-S2D value that satisfies no packet loss in 8-priority scheduling under the condition that the traffic of single GE, 10GE, 25GE, 50GE, and 100GE ports is full: L / M, where L is the maximum packet length and M is the minimum storage unit of SRAM;
[0071] When the device is least congested, refer to Figure 5 As shown, perform a Fullmesh test on all ports of the device, and use the S2D value with full traffic on all ports without packet loss as the Max-S2D value.
[0072] Fullmesh is a network topology structure that means establishing complete two-way connections among all members in a finite set. Specifically, in a Fullmesh network, each node is directly connected to all other nodes, which can achieve efficient communication and data transmission.
[0073] S12. Determine the Min-S2D idle resources and Max-S2D idle resources allocated to each queue by SRAM according to the usage of DRAM;
[0074] Specifically, in the case where DRAM is not used, calculate the Min-S2D idle resources allocated to each queue by SRAM according to the formula: B / (L / M*P*8).
[0075] In the case where DRAM is fully used, calculate the maximum idle resources allocated to each queue by SRAM according to the formula: (B + D) / (L / M*P*8);
[0076] where B is the total SRAM resource of the device, D is the resource of the DRAM equivalent SRAM cache capacity, and P is the total number of ports of the transmission device.
[0077] S13. Set the functional relationship between the S2D transfer threshold and the SRAM idle resource S-Free and the scaling factor K for adjusting the response speed according to the response requirements of the service traffic: S2D transfer threshold = K*S-Free;
[0078] For some service traffic that requires fast response and quickly drops packets to save resources (such as low-priority background traffic), K = 8 (1 < K < 256), and the K value is inversely proportional to the importance of the packets in this queue. The larger the k value, the faster the adjustment and the faster the response. For the requirements of some service traffic not to lose packets, absorb bursts, and forward stably, k = 0.125 (1 / 256 < k < 1), and the k value is inversely proportional to the importance of the packets in this queue. The smaller the k value, the smoother the adjustment.
[0079] S14. When S-Free>Max-S2D idle resources, or S2D transfer threshold>Max-S2D, set the S2D transfer threshold to Max-S2D; when Min-S2D idle resources<S-Free<Max-S2D idle resources, and Min-S2D<S2D transfer threshold<Max-S2D, set the S2D transfer threshold to K*S-Free; when S-Free<Min-S2D idle resources, or S2D transfer threshold<Min-S2D, set the S2D transfer threshold to Min-S2D.
[0080] See also Figure 6 As shown, it can be understood that the S2D transfer threshold is related to the size of S-Free, Min-S2D and Max-S2D, and the overall relationship is a piecewise function, that is:
[0081]
[0082] Combining the above formula and Figure 4 The threshold curve shows that:
[0083] (1) When the queue is not congested, SRAM resources are sufficient and the threshold for S2D transfer is high;
[0084] (2) When the queue is partially congested, in order to make full use of SRAM resources, the S2D transfer threshold is dynamically adjusted to take an appropriate value in the congested and non-congested queues to ensure that the congested queue does not consume too many resources and the non-congested queue can easily obtain resources. At this time, the k value indicates the responsiveness of the device's dynamic adjustment. The larger the k, the faster the response, and vice versa.
[0085] (3) When the queue is severely congested, SRAM resources are insufficient. In this case, the congested queue needs to be quickly transferred to S2D, and the remaining SRAM resources are fairly distributed to non-congested queues to prevent them from losing packets due to lack of resources, thus ensuring the overall smooth operation of the equipment.
[0086] S2. Determine the relationship between the DRAM packet loss threshold and the DRAM idle resources according to the cache depth of the queues and the resource allocation between the queues.
[0087] Specifically, step S2 includes:
[0088] S21, setting the minimum packet loss threshold and the maximum packet loss threshold of the queue, and the influencing factors that determine the queue resource allocation;
[0089] S22, setting the functional relationship between the DRAM packet loss threshold, the DRAM idle resource R, and the impact factor a: DRAM packet loss threshold = 2^a × R;
[0090] It is understandable that SRAM mainly forwards traffic, and DRAM mainly absorbs bursts. Stable system traffic is forwarded by SRAM, and burst traffic is absorbed by DRAM, which together stabilize and maintain the normal forwarding of the system.
[0091] This embodiment monitors DRAM resources to intelligently adjust the queue cache depth. A cache depth guarantee resource, a minimum packet loss threshold, a maximum packet loss threshold and an impact factor a are set for each queue. The queues compete with each other for resources allocated by the system. The system dynamically sets the tail loss threshold. The DRAM packet loss threshold = 2^a×R, where R is the DRAM idle resource.
[0092] S23. When the DRAM packet loss threshold is greater than the Max packet loss threshold, the DRAM packet loss threshold is set to the Max packet loss threshold; when the Min packet loss threshold is less than the DRAM packet loss threshold and less than the Max packet loss threshold, the DRAM packet loss threshold is set to 2^a×R; when the DRAM packet loss threshold is less than the Min packet loss threshold, the DRAM packet loss threshold is set to the Min packet loss threshold.
[0093] See also Figure 7 The DRAM packet loss threshold shown is related to the Max packet loss threshold and the Min packet loss threshold, and the overall relationship is also a piecewise function.
[0094] Among them, Min packet loss threshold: can store two maximum messages, the theoretical value is 9600B*2=19.2kB; Max packet loss threshold: required cache time of various rate interfaces, such as requiring 10G port cache 10us, the Max packet loss threshold value is 1000Mb / s / 8*10us=12.5M.
[0095] Let's take an example to illustrate:
[0096] A: In the case of mild congestion, the device still has 75% of its resources available, (R = 75% × B), a = 0;
[0097] B: In the case of severe congestion, the device still has 10% resources available, (R = 10% × B), a = 0;
[0098] In case A, 75% of the resources are still available, so the DRAM packet loss threshold is high. At this time, a single queue can absorb a large number of bursts. However, as congestion builds, the remaining buffer decreases, and the queue tail loss threshold decreases accordingly;
[0099] In case B, only 10% of the resources are available, so the DRAM packet loss threshold is very small. Even if there are idle resources, queues that occupy a large amount of cache will no longer cache data packets, and the remaining resources are provided to non-congested queues.
[0100] In summary, the method for intelligently adjusting TM resources in the present application links the idle resources of the static random access memory SRAM and the dynamic random access memory DRAM according to the device congestion situation, and dynamically adjusts the S2D transfer threshold and the DRAM packet loss threshold.
[0101] That is, according to the remaining SRAM and DRAM of the equipment, the SRAM and DRAM resources are used in conjunction, and the S2D transfer threshold and the DRAM packet loss threshold are automatically adjusted. The technology of intelligently adjusting TM resources is adopted to maximize the utilization of TM resources of the transmission equipment and solve the packet loss problem caused by large traffic bursts in the network. Among them, the proposed intelligent allocation method of SRAM resources ensures that high priority packets are not lost and can meet more network application scenarios; the proposed adjustment of scheduling resources according to the congestion status greatly improves the forwarding performance of the transmission equipment.
[0102] In a second aspect, an embodiment of the present application further provides a device for intelligently adjusting TM resources.
[0103] In one embodiment, referring to Figure 8 , Figure 8 This is a functional module diagram of an embodiment of an apparatus for intelligently adjusting TM resources of the present application. Figure 8 As shown, the device for intelligently adjusting TM resources includes:
[0104] The adjustment module links the idle resources of the static random access memory SRAM and the dynamic random access memory DRAM according to the device congestion situation, and dynamically adjusts the S2D transfer threshold and the DRAM packet loss threshold.
[0105] Furthermore, in one embodiment, the adjustment module includes:
[0106] The SRAM adjustment submodule determines the relationship between the S2D transfer threshold and the SRAM free resources according to the device congestion, DRAM usage, and the response requirements of the business traffic;
[0107] The DRAM adjustment submodule determines the changing relationship between the DRAM packet loss threshold and the DRAM idle resources according to the cache depth of the queues and the resource allocation between the queues.
[0108] Further, in one embodiment, the SRAM adjustment submodule determines the relationship between the S2D transfer threshold and the SRAM free resources according to the device congestion, DRAM usage, and the response requirements of the service traffic, including:
[0109] According to the device congestion situation, determine the Min-S2D value and Max-S2D value for scheduling without packet loss when the port traffic is full;
[0110] According to the usage of DRAM, determine the Min-S2D idle resources and Max-S2D idle resources of SRAM allocated to each queue;
[0111] According to the response requirements of business traffic, the functional relationship between the S2D transfer threshold and the SRAM free resource S-Free and the proportional factor K for adjusting the response speed is set: S2D transfer threshold = K*S-Free;
[0112] When S-Free>Max-S2D idle resources, or S2D transfer threshold>Max-S2D, set the S2D transfer threshold to Max-S2D;
[0113] When Min-S2D idle resources < S-Free < Max-S2D idle resources, and Min-S2D < S2D transfer threshold < Max-S2D, set the S2D transfer threshold to K*S-Free;
[0114] When S-Free is less than Min-S2D free resources, or the S2D transfer threshold is less than Min-S2D, the S2D transfer threshold is set to Min-S2D.
[0115] Further, in one embodiment, the SRAM adjustment submodule determines the Min-S2D value and the Max-S2D value for scheduling without packet loss when the port traffic is full according to the device congestion situation, including:
[0116] When the device is most congested, determine the Min-S2D value for scheduling without packet loss when the traffic on a single port is full: L / M, where L is the maximum message length and M is the minimum storage unit of SRAM;
[0117] When the device is least congested, perform a Fullmesh test on all ports of the device, and use the S2D value at which all port traffic is fully utilized without packet loss as the Max-S2D value.
[0118] Further, in one embodiment, the SRAM adjustment submodule determines the Min-S2D idle resources and Max-S2D idle resources allocated by the SRAM to each queue according to the usage of the DRAM, including:
[0119] When DRAM is not in use, the Min-S2D idle resources allocated to each queue by SRAM are calculated according to the formula: B / (L / M*P*8);
[0120] When DRAM is fully used, the maximum idle resources of SRAM allocated to each queue are calculated according to the formula: (B+D) / (L / M*P*8);
[0121] Among them, B is the total SRAM resource of the device, and D is the DRAM equivalent SRAM cache capacity resource.
[0122] Further, in one embodiment, the DRAM adjustment submodule determines the relationship between the DRAM packet loss threshold and the change of DRAM idle resources according to the cache depth of the queue and the resource allocation between the queues, including:
[0123] Set the queue's minimum and maximum packet loss thresholds, as well as the factors that influence queue resource allocation;
[0124] Set the functional relationship between the DRAM packet loss threshold, the DRAM idle resource R, and the impact factor a: DRAM packet loss threshold = 2^a×R;
[0125] When the DRAM packet loss threshold is greater than the Max packet loss threshold, the DRAM packet loss threshold is set to the Max packet loss threshold;
[0126] When Min packet loss threshold < DRAM packet loss threshold < Max packet loss threshold, set the DRAM packet loss threshold to 2^a×R;
[0127] When the DRAM packet loss threshold is less than the Min packet loss threshold, the DRAM packet loss threshold is set to the Min packet loss threshold.
[0128] Further, in one embodiment, the DRAM adjustment submodule sets the Min packet loss threshold and the Max packet loss threshold of the queue, including:
[0129] The Min packet loss threshold is determined based on the length of the two largest messages;
[0130] The Max packet loss threshold is determined based on the cache time corresponding to various rate ports.
[0131] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for intelligently adjusting TM resources, characterized in that: The method for intelligently adjusting TM resources comprises the following steps: According to the equipment congestion situation, the idle resources of the static random access memory SRAM and the dynamic random access memory DRAM are linked to dynamically adjust the S2D transfer threshold and the DRAM packet loss threshold.
2. A method for intelligently adjusting TM resources as claimed in claim 1, characterized in that: According to the device congestion situation, the idle resources of the static random access memory SRAM and the dynamic random access memory DRAM are linked to dynamically adjust the S2D transfer threshold and the DRAM packet loss threshold, including: Determine the relationship between the S2D transfer threshold and the SRAM idle resources based on device congestion, DRAM usage, and service traffic response requirements; According to the cache depth of the queues and the resource allocation between the queues, the relationship between the DRAM packet loss threshold and the change of the DRAM idle resources is determined.
3. A method for intelligently adjusting TM resources as claimed in claim 2, characterized in that: Determining the relationship between the S2D transfer threshold and the SRAM idle resources according to the device congestion, DRAM usage, and service traffic response requirements includes: According to the device congestion situation, determine the Min-S2D value and Max-S2D value for scheduling without packet loss when the port traffic is full; According to the usage of DRAM, determine the Min-S2D idle resources and Max-S2D idle resources of SRAM allocated to each queue; According to the response requirements of business traffic, the functional relationship between the S2D transfer threshold and the SRAM free resource S-Free and the proportional factor K for adjusting the response speed is set: S2D transfer threshold = K*S-Free; When S-Free>Max-S2D idle resources, or S2D transfer threshold>Max-S2D, set the S2D transfer threshold to Max-S2D; When Min-S2D idle resources < S-Free < Max-S2D idle resources, and Min-S2D < S2D transfer threshold < Max-S2D, set the S2D transfer threshold to K*S-Free; When S-Free is less than Min-S2D free resources, or the S2D transfer threshold is less than Min-S2D, the S2D transfer threshold is set to Min-S2D.
4. A method for intelligently adjusting TM resources as claimed in claim 3, characterized in that: Determining the Min-S2D value and the Max-S2D value for scheduling without packet loss when the port traffic is full according to the device congestion situation includes: When the device is most congested, determine the Min-S2D value for scheduling without packet loss when the traffic on a single port is full: L / M, where L is the maximum message length and M is the minimum storage unit of SRAM; When the device is least congested, perform a Fullmesh test on all ports of the device, and use the S2D value at which all port traffic is fully utilized without packet loss as the Max-S2D value.
5. The method for intelligently adjusting TM resources according to claim 3, characterized in that: The method of determining the Min-S2D idle resources and the Max-S2D idle resources allocated to each queue by the SRAM according to the usage of the DRAM includes: When DRAM is not in use, the Min-S2D idle resources allocated to each queue by SRAM are calculated according to the formula: B / (L / M*P*8); When DRAM is fully used, the maximum idle resources of SRAM allocated to each queue are calculated according to the formula: (B+D) / (L / M*P*8); Among them, B is the total SRAM resource of the device, D is the resource of DRAM equivalent SRAM cache capacity, and P is the total number of ports of the transmission device.
6. A method for intelligently adjusting TM resources as claimed in claim 2, characterized in that: Determining the relationship between the DRAM packet loss threshold and the DRAM idle resources according to the cache depth of the queue and the resource allocation between the queues includes: Set the queue's minimum and maximum packet loss thresholds, as well as the factors that influence queue resource allocation; Set the functional relationship between the DRAM packet loss threshold, the DRAM idle resource R, and the impact factor a: DRAM packet loss threshold = 2^a×R; When the DRAM packet loss threshold is greater than the Max packet loss threshold, the DRAM packet loss threshold is set to the Max packet loss threshold; When Min packet loss threshold < DRAM packet loss threshold < Max packet loss threshold, set the DRAM packet loss threshold to 2^a×R; When the DRAM packet loss threshold is less than the Min packet loss threshold, the DRAM packet loss threshold is set to the Min packet loss threshold.
7. A method for intelligently adjusting TM resources as claimed in claim 6, characterized in that: The setting of the Min packet loss threshold and the Max packet loss threshold of the queue includes: The Min packet loss threshold is determined based on the length of the two largest messages; The Max packet loss threshold is determined based on the cache time corresponding to various rate ports.
8. A device for intelligently adjusting TM resources, characterized in that: The device for intelligently adjusting TM resources comprises: The adjustment module links the idle resources of the static random access memory SRAM and the dynamic random access memory DRAM according to the device congestion situation, and dynamically adjusts the S2D transfer threshold and the DRAM packet loss threshold.
9. The device for intelligently adjusting TM resources according to claim 8, characterized in that: The adjustment module comprises: The SRAM adjustment submodule determines the relationship between the S2D transfer threshold and the SRAM free resources according to the device congestion, DRAM usage, and the response requirements of the business traffic; The DRAM adjustment submodule determines the changing relationship between the DRAM packet loss threshold and the DRAM idle resources according to the cache depth of the queues and the resource allocation between the queues.
10. The device for intelligently adjusting TM resources according to claim 9, characterized in that: The SRAM adjustment submodule determines the relationship between the S2D transfer threshold and the SRAM idle resources according to the device congestion, DRAM usage, and the response requirements of the service traffic, including: According to the device congestion situation, determine the Min-S2D value and Max-S2D value for scheduling without packet loss when the port traffic is full; According to the usage of DRAM, determine the Min-S2D idle resources and Max-S2D idle resources of SRAM allocated to each queue; According to the response requirements of business traffic, the functional relationship between the S2D transfer threshold and the SRAM free resource S-Free and the proportional factor K for adjusting the response speed is set: S2D transfer threshold = K*S-Free; When S-Free>Max-S2D idle resources, or S2D transfer threshold>Max-S2D, set the S2D transfer threshold to Max-S2D; When Min-S2D idle resources < S-Free < Max-S2D idle resources, and Min-S2D < S2D transfer threshold < Max-S2D, set the S2D transfer threshold to K*S-Free; When S-Free is less than Min-S2D free resources, or the S2D transfer threshold is less than Min-S2D, the S2D transfer threshold is set to Min-S2D.
