Method, computer device, medium, product for statically balancing system load

By acquiring and classifying the processing and input capabilities of NUMA nodes, and dynamically adjusting task allocation, the problem of load imbalance in multi-NUMA computing platforms is solved, load balancing and resource optimization among nodes are achieved, and the stability and performance of the system are improved.

CN119697187BActive Publication Date: 2025-12-26BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411765001.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-12-26
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

In high-performance multi-NUMA computing platforms, unbalanced system load can cause a NUMA node to become overloaded, or even lead to service interruption.

Method used

By obtaining the maximum processing capacity and maximum input capacity of all NUMA nodes in a multi-NUMA architecture, storing them in different linked lists, and dynamically adjusting the task allocation ratio according to the source of data packets and node type, the load is ensured to be evenly distributed among different NUMA nodes.

Benefits of technology

It enables the system to operate efficiently under different load conditions, avoids node overload, improves overall processing capacity, optimizes resource utilization, and ensures that the system maintains stability and efficiency under various conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697187B_ABST
    Figure CN119697187B_ABST
Patent Text Reader

Abstract

The application discloses a method for statically balancing system load, a computer device, a medium and a product. The method comprises the following steps: acquiring the maximum processing capacity and the maximum input capacity of all NUMA nodes in a multi- NUMA architecture; storing the NUMA nodes with the maximum processing capacity greater than the maximum input capacity into a first linked list, and storing the NUMA nodes with the maximum processing capacity not greater than the maximum input capacity into a second linked list; determining the node type responsible for processing data packets; if the second linked list contains the node type, determining the difference between the maximum processing capacity and the maximum input capacity of the corresponding node; and distributing the data packet processing task corresponding to the difference to the target NUMA node in the first linked list according to a preset ratio. The method can realize stable and efficient load balancing, does not need dynamic adjustment, effectively avoids the need for real-time calculation resource allocation of the system, is very suitable for the multi- NUMA architecture NUMA system with a fixed load mode, and solves the load balancing problem of a high-flow system at the initial design.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the field of network security and communication technology, and particularly relates to a method for statically balancing system load, a computer device, a medium and a product. BACKGROUND

[0002] In current industrial control Internet of Things and big data platforms, high-performance multi- NUMA computing platforms are increasingly widely used as industrial control core devices, Internet of Things centers and big data computing platforms. In use, they are usually used to process network traffic or big data tasks. However, due to the different traffic or tasks accepted by each NUMA node, the entire system load is unbalanced, resulting in overload of a certain NUMA node and even business interruption. SUMMARY

[0003] Therefore, the embodiments of the present disclosure provide a method for statically balancing system load, a computer device, a medium and a product, which can effectively solve the problems of node overload and business interruption caused by unbalanced system load in the prior art.

[0004] In a first aspect, the embodiments of the present disclosure provide a method for statically balancing system load, which specifically comprises:

[0005] obtaining maximum processing capacity and maximum input capacity of all NUMA nodes in a multi- NUMA architecture;

[0006] storing a NUMA node with maximum processing capacity greater than maximum input capacity to a first linked list, and storing a NUMA node with maximum processing capacity not greater than maximum input capacity to a second linked list;

[0007] determining a node type responsible for processing the data packet based on the received data packet;

[0008] if the second linked list contains the node type, determining a difference between the maximum processing capacity and the maximum input capacity of the node corresponding to the node type;

[0009] determining a preset ratio based on the difference;

[0010] allocating data packet processing tasks corresponding to the difference to target NUMA nodes in the first linked list according to the preset ratio.

[0011] Optionally, the allocation of data packet processing tasks corresponding to the difference to target NUMA nodes in the first linked list according to the preset ratio comprises:

[0012] determining a difference between the maximum input capacity and the maximum processing capacity of the node responsible for processing the data packet;

[0013] obtaining a difference between the maximum processing capacity and the maximum input capacity of each NUMA node in the first linked list, denoted as a target difference;

[0014] determining a NUMA node corresponding to the target difference that is greater than the difference and has the smallest difference from the difference, denoted as a target node;

[0015] executing a processing instruction of a data packet processing task corresponding to the difference by the target node.

[0016] Optionally, the data packet processing task corresponding to the difference is Q:

[0017] Q = Q1 * K;

[0018] K = T1 / T2;

[0019] wherein Q1 is the amount of received data packets, K is the preset ratio, T1 is the difference between the maximum processing capacity and the maximum input capacity of a node responsible for processing the data packets, and T2 is the maximum input capacity of the node responsible for processing the data packets.

[0020] Optionally, the determining of the type of the node responsible for processing the data packets based on the received data packets comprises:

[0021] obtaining first information of the received data packets, the first information comprising a destination IP address and a port number;

[0022] determining the type of the node responsible for processing based on the first information and a preset mapping mechanism.

[0023] Optionally, the method for obtaining the maximum processing capacity comprises: performing maximum task stress testing on each NUMA node in a target multi- NUMA architecture under an empty load condition of the target multi- NUMA architecture to obtain the maximum processing capacity of the corresponding NUMA node.

[0024] Optionally, after determining the type of the node, the method further comprises:

[0025] obtaining a time interval from the time of determining the type of the node to the creation time of the first linked list and the second linked list;

[0026] updating the first linked list and the second linked list when the time interval is greater than a preset interval threshold.

[0027] Optionally, if the first linked list contains the type of the node, the corresponding NUMA node in the first linked list is invoked based on the type of the node to execute the processing instruction on the data packet.

[0028] In a second aspect, the embodiments of the present disclosure further provide a system for statically balancing system load, comprising:

[0029] a capability obtaining module, configured to obtain maximum processing capability and maximum input capability of all NUMA nodes in a multi- NUMA architecture;

[0030] a classification module, configured to store a NUMA node with the maximum processing capability greater than the maximum input capability to a first linked list, and store a NUMA node with the maximum processing capability not greater than the maximum input capability to a second linked list;

[0031] a node type determining module, configured to determine a node type responsible for processing a data packet based on the data packet;

[0032] a difference determining module, configured to determine a difference between the maximum processing capability and the maximum input capability of a node corresponding to the node type in the second linked list;

[0033] a preset ratio determining module, configured to determine a preset ratio based on the difference;

[0034] a shunting module, configured to allocate a data packet processing task corresponding to the difference to a target NUMA node in the first linked list according to the preset ratio.

[0035] In a third aspect, an embodiment of the present disclosure further provides a computer device, which adopts the following technical scheme:

[0036] The computer device comprises:

[0037] at least one processor; and

[0038] a memory in communication connection with the at least one processor; wherein

[0039] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method for statically balancing system load.

[0040] In a fourth aspect, an embodiment of the present disclosure further provides a computer readable storage medium, which stores computer instructions for enabling a computer to execute the method for statically balancing system load.

[0041] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, which comprises computer programs / instructions, and the computer programs / instructions are executed by a processor to implement the steps of the method.

[0042] The static load balancing system disclosed in the application obtains the maximum processing and input capacity of each node, ensures that the system has accurate knowledge of the resource status of each node, classifies the nodes, can clearly determine the processing capacity of all nodes, provides a clear basis for subsequent data packet processing task allocation, ensures that the task can be preferentially allocated to the node with sufficient processing capacity, quickly determines the type of node responsible for processing according to the source of the data packet, reduces the delay of task allocation, can obtain the actual processing capacity of the node responsible for processing the data packet in real time through difference calculation, dynamically adjusts the task allocation ratio according to the difference, ensures that the system can flexibly cope with different load conditions, and allocates the data packet processing task corresponding to the difference to the target NUMA node in the first linked list according to the preset ratio, that is, through dynamic adjustment of task allocation, the load is evenly distributed among different NUMA nodes, avoiding overload of some nodes and idling of other nodes, fully utilizing the nodes with excess processing capacity, and improving the overall processing capacity. The method disclosed in the application can flexibly cope with different load conditions and ensure that the system can maintain high efficiency under various conditions.

[0043] The above description is only a summary of the technical solutions of the present disclosure. In order to more clearly understand the technical means of the present disclosure, the content of the specification can be implemented, and in order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the following preferred embodiments are described in detail below, and the accompanying drawings are described as follows. BRIEF DESCRIPTION OF DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and those skilled in the art can obtain other drawings according to these drawings without creating any creative labor.

[0045] Figure 1 The flowchart of the method for statically balancing the load of the system provided by the embodiments of the present disclosure is shown.

[0046] Figure 2 The flowchart of the method for determining the type of node responsible for processing data packets provided by the embodiments of the present disclosure is shown.

[0047] Figure 3 The flowchart of the method for distributing the data packet processing task corresponding to the difference to the target NUMA node in the first linked list according to the preset ratio provided by the embodiments of the present disclosure is shown.

[0048] Figure 4 The flowchart of the method for updating and analyzing the first linked list and the second linked list provided by the embodiments of the present disclosure is shown.

[0049] Figure 5 A flowchart of a method for updating a first linked list and a second linked list is provided for an embodiment of the present disclosure.

[0050] Figure 6 A structural diagram of a computer device is provided for an embodiment of the present disclosure. DETAILED DESCRIPTION

[0051] Embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0052] It should be apparent that the following describes embodiments of this disclosure by way of specific examples, and that one of ordinary skill in the art will readily understand from the disclosure herein other advantages and benefits of the present disclosure. It is expressly intended that such embodiments merely be illustrative of the disclosure, and that they are not to take the full scope of the disclosure. The disclosure can be practiced in alternative and equivalent embodiments and that many modifications can be made thereto without departing from the spirit and scope of the disclosure. It is also expressly intended that all combinations of those elements that are described herein, including with respect to the various embodiments, are fully encompassed by the disclosure.

[0053] It should be apparent that the following describes embodiments of this disclosure by way of specific examples, and that one of ordinary skill in the art will readily understand from the disclosure herein other advantages and benefits of the present disclosure. It is expressly intended that such embodiments merely be illustrative of the disclosure, and that they are not to take the full scope of the disclosure. The disclosure can be practiced in alternative and equivalent embodiments and that many modifications can be made thereto without departing from the spirit and scope of the disclosure. It is also expressly intended that all combinations of those elements that are described herein, including with respect to the various embodiments, are fully encompassed by the disclosure.

[0054] It should also be noted that the drawings included in the following description are included for illustrative purposes only and are not intended to limit the scope of the disclosure. The drawings are provided to illustrate various aspects of the disclosure and to provide a description of the disclosure, and are not intended to limit the scope of the disclosure. The drawings are provided to illustrate various aspects of the disclosure and to provide a description of the disclosure, and are not intended to limit the scope of the disclosure.

[0055] In addition, in the following description, specific details are provided to thoroughly understand the examples. However, one of ordinary skill in the art will understand that the described aspects can be practiced without these specific details.

[0056] Reference Figure 1The application discloses a method for statically balancing system load, and specifically comprises the following steps:

[0057] S100, acquiring maximum processing capacity and maximum input capacity of all NUMA nodes in a multi- NUMA architecture.

[0058] The method for acquiring the maximum processing capacity comprises the following steps: performing maximum task stress testing on each NUMA node in the target multi- NUMA architecture under an empty load condition of the target multi- NUMA architecture, and obtaining the maximum processing capacity of the corresponding NUMA node.

[0059] The method for acquiring the maximum input capacity comprises the following steps: calculating the maximum input capacity of each NUMA node by monitoring the bandwidth utilization, queue length and other indicators of a network interface card (NIC); and the upper limit threshold of the input capacity generally refers to the maximum data flow that can be received by the node, including network flow and storage I / O flow, and determining the threshold can help the system to avoid node overload when processing a large amount of data.

[0060] S200, storing the NUMA node with the maximum processing capacity greater than the maximum input capacity to a first linked list, and storing the NUMA node with the maximum processing capacity not greater than the maximum input capacity to a second linked list.

[0061] For example, if the maximum processing capacity of a node is 1000 data packets per second and the maximum input capacity is 800 data packets per second, the node is stored in the first linked list; if the maximum processing capacity of a node is 700 data packets per second and the maximum input capacity is 800 data packets per second, the node is stored in the second linked list.

[0062] By classifying the nodes, it is clear which nodes have excess processing capacity (the first linked list) and which nodes have insufficient processing capacity (the second linked list), thereby providing a clear basis for subsequent data packet processing task allocation and ensuring that the task can be preferentially allocated to the node with sufficient processing capacity.

[0063] Specifically, the NUMA node with the input capacity exceeding the maximum processing capacity can be classified into the second linked list according to the size of the input flow, and the node capable of completely coping with the flow is stored in the first linked list; for each NUMA node, the maximum processing capacity and the input capacity are compared first, and the node is inserted into the corresponding linked list according to the result, and this process is performed through a pre-set comparison logic without additional calculation resources; and the segmentation of the linked list makes the respective load allocation process clear and controllable.

[0064] S300, determining the type of the node responsible for processing the data packet based on the received data packet.

[0065] In this step, the type of node responsible for processing is quickly determined according to the source of the data packet, reducing the delay of task allocation.

[0066] Referring to Figure 2 , the method for determining the type of node responsible for processing data packets specifically includes:

[0067] S310, obtaining first information of the received data packet, the first information including a destination IP address and a port number.

[0068] Wherein, the data packet is a traffic data packet (such as a network data packet) or an event data packet (such as a log event).

[0069] By obtaining the destination IP address and port number of the data packet, the final target position of the data packet can be accurately located.

[0070] S320, determining the type of node responsible for processing based on the first information and a preset mapping mechanism.

[0071] Specifically, a preset mapping mechanism can be set in advance to map the destination IP address and port number to a specific NUMA node. For example, IP address 192.168.1.1 and port number 8080 are one-to-one mapped to NUMA node Node 2.

[0072] Through the preset mapping mechanism, the type of node responsible for processing the data packet can be quickly determined, reducing the delay of task allocation; ensuring that the same node type is mapped when processing data packets with the same destination IP address and port number each time, maintaining the consistency of processing; providing a clear basis for subsequent task allocation and load balancing, ensuring that the system can efficiently process tasks.

[0073] Wherein, the preset mapping mechanism can be adjusted according to specific needs, adapting to different network environments and application scenarios, and having good flexibility.

[0074] Further, the processing requirements of the data packet can also be determined by its characteristics (such as packet size, type, priority, etc.), and the appropriate node type can be determined according to the processing requirements.

[0075] S400, if the second linked list contains a node type, determining the difference between the maximum processing capacity and the maximum input capacity of the node corresponding to the node type.

[0076] By obtaining the difference between the maximum processing capacity and the maximum input capacity of the node responsible for processing the data packet, the actual processing capacity of the node can be obtained.

[0077] S500, determining a preset ratio based on the difference.

[0078] The preset ratio is K:K=T1 / T2; wherein, T1 is the difference between the maximum processing capacity and the maximum input capacity of the node responsible for processing the data packet, and T2 is the maximum input capacity of the node responsible for processing the data packet.

[0079] The task allocation ratio is dynamically adjusted according to the difference of the nodes, ensuring that the system can flexibly cope with different load conditions; through the preset ratio, the load is evenly distributed among different nodes, avoiding overload of some nodes and idling of other nodes.

[0080] S600, the data packet processing task corresponding to the difference is allocated to the target NUMA node in the first linked list according to the preset ratio.

[0081] Specifically, for the NUMA node with load exceeding limit in the second linked list, find the appropriate node in the first linked list for shunting; the system shunts tasks to available nodes in a certain ratio through the preset shunting scheme.

[0082] Specific reference Figure 3 The method for allocating the data packet processing task corresponding to the difference to the target NUMA node in the first linked list according to the preset ratio comprises the following steps:

[0083] S610, determine the difference between the maximum input capacity and the maximum processing capacity of the node responsible for processing the data packet;

[0084] S620, obtain the difference between the maximum processing capacity and the maximum input capacity of each NUMA node in the first linked list, denoted as target difference.

[0085] Through target difference calculation, evaluate the remaining processing capacity of the processing capacity surplus node, and provide basis for task reallocation.

[0086] S630, determine the NUMA node corresponding to the target difference greater than the difference and closest to the difference, denoted as target node.

[0087] By selecting the node corresponding to the target difference closest to the difference, the task is reallocated to the most suitable node, which can avoid resource waste and at the same time does not affect the processing capacity of the selected node; according to the actual difference of the node, the system can flexibly cope with different load conditions.

[0088] The task is allocated according to the difference of the nodes in the process of traversing the first linked list, and the node closest to the difference and meeting the conditions is selected for shunting processing, which significantly improves the efficiency of linked list traversal and reduces unnecessary shunting and task reallocation.

[0089] For example, in the first chain table, the target difference of NUMA node A is 200 packets / second, the target difference of NUMA node B is 150 packets / second, the target difference of NUMA node C is 80 packets / second, and the difference between the maximum input capacity and the maximum processing capacity of the node responsible for processing the data packets is 100 packets / second, then NUMA node B is selected as the target node.

[0090] S640, executing the processing instruction of the data packet processing task corresponding to the difference by the target node.

[0091] Wherein, the data packet processing task corresponding to the difference is Q, Q = Q1 x K, wherein Q1 is the amount of received data packets (i.e. traffic or task quantity), and K is a preset proportion; at the same time, the processing task corresponding to the node responsible for processing the data packets is Q1-Q.

[0092] For example, the maximum processing capacity of the NUMA node responsible for processing the data packets is 70G / second, the maximum input capacity is 80G / second (8 10G interfaces), then the difference is 10G, and the corresponding preset proportion is 12.5% (i.e. 10 / 80); if the received data packets correspond to a task of 10G traffic, then the local NUMA node in the second chain table processes 10G*(1-87.5%), and the rest 10G*(12.5%) is transmitted to the target node in the first chain table through QPI for processing.

[0093] By reassigning tasks to nodes with excess processing capacity, the load is evenly distributed among different nodes, avoiding overloading some nodes while others are idle; by fully utilizing nodes with excess processing capacity, system performance bottlenecks caused by insufficient processing capacity are avoided, and overall processing capacity is improved; by classifying and dynamically allocating resources, the utilization rate of system resources is optimized, and resource waste is avoided; by dynamically adjusting the task allocation proportion, the system can flexibly cope with different load situations, ensuring efficient operation of the system under various conditions.

[0094] S700, if the first chain table contains a node type, calling the corresponding NUMA node in the first chain table based on the node type, and executing the processing instruction on the data packets.

[0095] When the node type belongs to the first chain table, the processing instruction is directly executed, simplifying the task allocation process and reducing the complexity of the system.

[0096] Further, referring to Figure 4 In the static load balancing system disclosed in the present application, after determining the node type, the first chain table and the second chain table are also updated and analyzed, and the specific method includes:

[0097] A100, the time interval between the determination time of the node type and the creation time of the first linked list and the second linked list is obtained.

[0098] Through the analysis of the time interval, the timeliness of the first linked list and the second linked list can be monitored, ensuring that the table data used is the latest, and avoiding inaccurate load distribution due to time delay.

[0099] The preset interval threshold value can be a fixed time (usually 1 second to 1024 seconds) or a dynamically adjusted value.

[0100] By updating the linked list in a timely manner, it is ensured that the information in the linked list is always up-to-date, avoiding task allocation errors caused by outdated information, and ensuring that the system can perform task allocation based on the latest node type and processing capacity information at any time, improving the reliability of the system.

[0101] Through the method disclosed in this embodiment, the content of the linked list can be dynamically adjusted according to the actual situation, ensuring efficient operation at different time periods; by updating the linked list in a timely manner, unreasonable resource allocation caused by outdated node type and processing capacity information is avoided, improving resource utilization, while ensuring that the system can evaluate the timeliness of the linked list in a timely manner, avoiding lag of linked list information caused by too long time interval.

[0102] The overall scheme ensures that the system can perform task allocation based on the latest node type and processing capacity information by obtaining the time interval and updating the linked list in a timely manner, improving the overall data accuracy, reliability, dynamic adaptability and resource utilization of the system.

[0103] Further, if the time interval is not greater than the preset interval threshold value, no update is performed, avoiding system overhead caused by frequent updates, improving system performance and stability, maintaining the consistency of table data in the case of small load changes, and ensuring the continuity and stability of load distribution.

[0104] Reference Figure 5 The method for updating the first linked list and the second linked list specifically includes:

[0105] A210, the maximum processing capacity and real-time input capacity of each NUMA node are obtained.

[0106] The real-time input capacity is the number of data packets or the number of tasks actually input to the node at present. For example, the real-time input capacity of node A is 800 data packets / second.

[0107] By obtaining the maximum processing capacity and real-time input capacity of each node, the processing capacity and current load of the node can be accurately evaluated, providing a basis for subsequent linked list updating.

[0108] A220, moving the NUMA node with the maximum processing capacity not greater than the real-time input capacity in the first chain list to the second chain list;

[0109] moving the NUMA node with the maximum processing capacity not less than the real-time input capacity in the second chain list to the first chain list.

[0110] By moving the nodes with insufficient processing capacity from the first chain list to the second chain list, dynamic adjustment of load between different chain lists is realized, avoiding overloading of some nodes while others are idle, ensuring that nodes with excess processing capacity will not have performance degradation due to high load, and improving overall system performance.

[0111] By moving the nodes with excess processing capacity from the second chain list to the first chain list, it is ensured that these nodes can fully utilize their remaining processing capacity, avoiding resource waste; dynamic adjustment is made according to the actual processing capacity and real-time input capacity of the nodes, ensuring that the system can flexibly cope with different load situations.

[0112] By dynamically adjusting the contents of the chain lists, balanced distribution of load between different chain lists is realized, avoiding overloading of some nodes while others are idle; it is ensured that nodes with excess processing capacity will not have performance degradation due to high load, and overall system performance is improved; by moving the nodes with excess processing capacity from the second chain list to the first chain list, it is ensured that these nodes can fully utilize their remaining processing capacity, avoiding resource waste; dynamic adjustment is made according to the actual processing capacity and real-time input capacity of the nodes, ensuring that the system can flexibly cope with different load situations; by obtaining the maximum processing capacity and real-time input capacity of each node, the processing capacity and current load situation of the node can be accurately evaluated, providing a basis for subsequent chain list updates; it is ensured that the contents of the chain lists always reflect the latest state of the nodes, avoiding task allocation errors due to outdated information.

[0113] The overall scheme dynamically adjusts the contents of the first chain list and the second chain list, ensuring that the system can flexibly allocate tasks according to the actual processing capacity and real-time input capacity of the nodes, achieving load balancing and resource optimization, and improving overall system performance.

[0114] For example, a industrial control core device has 4 NUMA nodes, each with n cpus; the system has a total of 32 slots, with different numbers of slots handled by each NUMA, NUMA0 handles 4 slots, NUMA1 handles 6 slots, NUMA2 handles 8 slots, and NUMA3 handles 14 slots, each slot has a gigabit, gigabit or hundred G interface. The system runs a single task: forwarding.

[0115] Similarly, for example: the number of NUMA and the number of result slots on the big data platform are the same as above, the system runs a single task: event analysis and processing.

[0116] After starting the running system, if the traffic is processed by the node in the first chain table, it is directly processed; if it is processed by the node in the second chain table, the difference between the maximum processing capacity and the maximum input capacity of the NUMA node responsible for processing the data packet is obtained, the NUMA node closest to the difference and greater than the difference is found in the first chain table, and the NUMA node information is recorded in the node information of the second chain table.

[0117] The NUMA node in the first chain table processes the input traffic or task locally. The traffic or task received by the NUMA node in the second chain table is left for local NUMA processing according to the ratio (maximum processing capacity / maximum input capacity) and sent to the NUMA node recorded in the node information for processing through QPI.

[0118] The method for statically balancing the system load disclosed in the application obtains the maximum processing and input capacity of each node, ensures that the system has accurate understanding of the resource status of each node, classifies the nodes, clearly determines the processing capacity of all nodes, provides clear basis for subsequent data packet processing task allocation, ensures that the task can be preferentially allocated to the node with sufficient processing capacity, quickly determines the type of node responsible for processing according to the source of the data packet, reduces the delay of task allocation, obtains the actual processing capacity of the node responsible for processing the data packet in real time through difference calculation, dynamically adjusts the task allocation ratio according to the difference, and ensures that the system can flexibly cope with different load conditions. The data packet processing task corresponding to the difference is allocated to the target NUMA node in the first chain table according to the preset ratio, that is, the task allocation is dynamically adjusted, the load is evenly distributed among different NUMA nodes, overloading of some nodes and idling of other nodes are avoided, the overall processing capacity is improved by fully utilizing the nodes with excess processing capacity, and the method disclosed in the application can flexibly cope with different load conditions and ensure that the system can maintain high efficiency under various conditions.

[0119] The method for statically balancing the system load disclosed in the application is suitable for systems that cannot dynamically adjust resources. The method for statically balancing the system load disclosed in the application allocates computing resources according to preset rules before the system runs, does not rely on real-time monitoring and adjustment, and has the advantage of static load adjustment compared with dynamic load balancing, that is, the allocation method is set at the beginning of design, and is suitable for multi-NUMA systems with relatively stable load.

[0120] In the method for statically balancing the system load disclosed in the application, the pre-allocation scheme is designed for static systems and is suitable for environments with high traffic but stable load mode, but is not suitable for scenes with frequent load changes. Generally, dynamic load balancing does not predefine the ratio at the design time, and this innovation avoids the complexity of real-time load adjustment.

[0121] The static linked list shunting scheme realizes stable and efficient load balancing, does not need system dynamic adjustment, avoids the need of real-time calculation resource allocation of the system, is very suitable for static load shunting rules of the NUMA system of the multi- NUMA architecture, and solves the load balancing problem of a high-traffic system at the initial design.

[0122] In a second aspect, the embodiments of the present disclosure further provide a system for statically balancing system load, comprising:

[0123] a capability obtaining module, configured to obtain maximum processing capacity and maximum input capacity of all NUMA nodes in the multi- NUMA architecture;

[0124] a classification module, configured to store the NUMA node with the maximum processing capacity greater than the maximum input capacity to a first linked list, and store the NUMA node with the maximum processing capacity not greater than the maximum input capacity to a second linked list;

[0125] a node type determining module, configured to determine the type of the node responsible for processing the data packet based on the received data packet;

[0126] a difference determining module, configured to determine the difference between the maximum processing capacity and the maximum input capacity of the node corresponding to the node type in the second linked list;

[0127] a preset ratio determining module, configured to determine the preset ratio based on the difference;

[0128] a shunting module, configured to allocate the data packet processing task corresponding to the difference to the target NUMA node in the first linked list according to the preset ratio.

[0129] It should be noted that the method for statically balancing system load disclosed in the first aspect of the present application is applicable to the acquisition of the scheme of the system for statically balancing system load disclosed in the second aspect of the present application, and thus will not be described here.

[0130] The computer device according to the embodiments of the present disclosure comprises a memory and a processor. The memory is configured to store non-transitory computer readable instructions. Specifically, the memory can comprise one or more computer program products, which can comprise various forms of computer readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, comprise a random access memory (RAM) and / or a cache memory, etc. The non-volatile memory may, for example, comprise a read-only memory (ROM), a hard disk, a flash memory, etc.

[0131] The processor can be a central processing unit (CPU) or other form of processing unit that has data processing and / or instruction executing capabilities, and can control other components in the computer device to perform desired functions. In one embodiment of the present disclosure, the processor is configured to execute the computer readable instructions stored in the memory, such that the computer device performs all or part of the steps of the method of statically balancing system load according to the embodiments of the present disclosure.

[0132] Those skilled in the art will understand that, in order to solve the technical problem of how to obtain a good user experience effect, the embodiments of the present disclosure can also include well-known structures such as a communication bus, an interface, and the like, which should also be included in the protection scope of the present disclosure.

[0133] As Figure 6 A structural schematic diagram of a computer device according to an embodiment of the present disclosure is shown. The structural schematic diagram shows a structure of a computer device suitable for implementing the computer device according to the embodiments of the present disclosure. Figure 6 The computer device shown is merely an example and should not impose any limitation on the functions and use range of the embodiments of the present disclosure.

[0134] As Figure 6 As shown, the computer device can include a processor (such as a central processing unit, a graphics processing unit, or the like) that can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) or loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the computer device are also stored. The processor, the ROM, and the RAM are connected to each other through a bus. An input / output (I / O) interface is also connected to the bus.

[0135] Generally, the following devices can be connected to the I / O interface: input devices including, for example, sensors or visual information acquisition devices; output devices including, for example, display screens; storage devices including, for example, magnetic tapes, hard disks, or the like; and communication devices. The communication devices can allow the computer device to perform wireless or wired communication with other devices (such as edge computing devices) to exchange data. Although Figure 6 The computer device with various devices is shown, but it should be understood that it is not required to implement or have all the devices shown. More or fewer devices can be implemented or provided instead.

[0136] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the steps of the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processor, all or part of the steps of the method of statically balancing system load according to embodiments of the present disclosure are performed.

[0137] Detailed descriptions of the embodiments of the present disclosure can refer to the corresponding descriptions of the aforementioned embodiments, which will not be repeated here.

[0138] A computer-readable storage medium according to embodiments of the present disclosure has non-transitory computer-readable instructions stored thereon. When the non-transitory computer-readable instructions are run by a processor, all or part of the steps of the method of statically balancing system load according to embodiments of the present disclosure are performed.

[0139] The computer-readable storage medium described above includes, but is not limited to, optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or a removable hard disk), media with built-in rewritable non-volatile memory (e.g., a memory card), and media with built-in ROM (e.g., a ROM cartridge).

[0140] Detailed descriptions of the embodiments of the present disclosure can refer to the corresponding descriptions of the aforementioned embodiments, which will not be repeated here.

[0141] The basic principles of the present disclosure are described above in combination with specific embodiments, but it should be noted that the advantages, advantages, effects, etc. mentioned in the present disclosure are only examples and are not limiting, and these advantages, advantages, effects, etc. cannot be considered as the must-have of each embodiment of the present disclosure. In addition, the above specific details are only for the purpose of example and understanding, and are not limiting, and the above details do not limit the present disclosure to the must-have of the above specific details.

[0142] In this disclosure, relational terms such as first and second and the like can be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. The block diagram of the devices, apparatus, equipment, systems referred to in this disclosure is merely illustrative and not intended to imply the necessity or arrangement of the connections, arrangement, configuration as shown in the block diagram. As will be appreciated by those skilled in the art, the devices, apparatus, equipment, systems can be connected, arranged, configured in any way. The words "comprising," "containing," "including," "having," and the like, are to be construed open-ended, meaning "including but not limited to," and are to be taken in their broadest context. The words "or" and "and" as used herein, mean "and / or," and are to be taken in their broadest context, unless the context clearly indicates otherwise. The word "comprising" as used herein, means "comprising but not limited to," and is to be taken in its broadest context.

[0143] Also, as used in this disclosure, "or" as used in the context of items A and B as "at least one of A or B" indicates a disjunction, such that, for example, a disjunction of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "example" is not meant to convey that a described example is preferred or better than other examples.

[0144] It is also important to note that the systems and methods of the disclosure can be embodied in a variety of forms including, but not limited to, a data processor, a computer program product, a computer, one or more components of a computer, software, and combinations of the same. In this disclosure, the term "data processor" means any processor containing one or more processors that retrieves instructions and data from, and writes information to, a memory, whether local or remote. Also, it is understood that the systems and methods of the disclosure can be located on one computer, or can be distributed among several computers or other devices.

[0145] Various changes, modifications and improvements in the herein described technologies can be made within the teachings of the technology, which extend to any that incorporate the substance of the technology and fall within the scope of the appended claims. Also, the scope of the claims of this disclosure is not limited to the specific aspects described herein, but includes any and all aspects that are within the scope of the claims, and any applications thereof, as well as the equipment and methods specifically described herein.

[0146] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein can be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0147] The foregoing description has been presented for the purposes of illustration and description. Furthermore, the description is not intended to limit the embodiments of the disclosure to the forms disclosed herein. Although the various example aspects and embodiments have been described herein with regard to particular aspects and embodiments, those skilled in the art will recognize that certain modifications, changes, substitutions, additions and sub-combinations can be made without departing from the spirit of the disclosure.

Claims

1. A method of statically balancing system loads, characterized by, The method comprises: obtaining the maximum processing capacity and the maximum input capacity of all NUMA nodes in a multi- NUMA architecture; storing the NUMA nodes with the maximum processing capacity greater than the maximum input capacity in a first linked list, and storing the NUMA nodes with the maximum processing capacity not greater than the maximum input capacity in a second linked list; determining the type of the node responsible for processing the received data packet based on the data packet; if the second linked list contains the type of the node, determining the difference between the maximum processing capacity and the maximum input capacity of the node corresponding to the type of the node; determining a preset ratio based on the difference; allocating the data packet processing task corresponding to the difference to the target NUMA node in the first linked list according to the preset ratio; The method comprises: determining the difference between the maximum input capacity and the maximum processing capacity of the node responsible for processing the data packet; obtaining the difference between the maximum processing capacity and the maximum input capacity of each NUMA node in the first linked list, denoted as a target difference; determining the NUMA node corresponding to the target difference that is greater than the difference and has the smallest difference from the difference, denoted as a target node; executing the processing instruction of the data packet processing task corresponding to the difference through the target node; The data packet processing task corresponding to the difference is Q: Q = Q1 * K; K = T1 / T2; wherein Q1 is the amount of the received data packet, K is the preset ratio, T1 is the difference between the maximum processing capacity and the maximum input capacity of the node responsible for processing the data packet, and T2 is the maximum input capacity of the node responsible for processing the data packet.

2. The method of statically balancing a system load of claim 1, wherein, The method comprises: obtaining first information of the received data packet, the first information comprising a destination IP address and a port number; determining the type of the node responsible for processing based on the first information and a preset mapping mechanism.

3. The method for statically balancing a system load of claim 1, wherein, The method for obtaining the maximum processing capacity comprises: performing maximum task stress testing on each NUMA node in the target multi- NUMA architecture when the target multi- NUMA architecture is in an empty load condition, to obtain the maximum processing capacity of the corresponding NUMA node.

4. The method for statically balancing a system load of claim 1, wherein, After determining the type of the node, the method further comprises: obtaining the time interval between the determination time of the type of the node and the creation time of the first linked list and the second linked list; when the time interval is greater than a preset interval threshold, updating the first linked list and the second linked list.

5. The method for statically balancing a system load of claim 1, wherein, If the first linked list contains the type of the node, the method further comprises:

6. A computer apparatus, comprising: calling the corresponding NUMA node in the first linked list based on the type of the node, and executing the processing instruction of the data packet. The computer device comprises: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method for statically balancing the system load according to any one of claims 1-5.

7. A computer readable storage medium characterized by The computer readable storage medium stores computer instructions for causing a computer to perform the method of statically balancing system loads of any of claims 1-5.

8. A computer program product comprising computer instructions, characterized in that, The computer instructions, when executed by a processor, implement the steps of the method of any of claims 1-5.

Citation Information

Patent Citations

  • Dynamic flow load balancing method based on DPDK

    CN107196870A

  • Base station computing power load balancing method and device and storage medium

    CN114867065A