Method, computer device, medium, and product for dynamically balancing system load
By monitoring and dynamically adjusting the load of NUMA nodes in real time and establishing redundancy and overload tables, the problem of unbalanced node load in the NUMA architecture is solved, achieving efficient and stable load balancing and improving system performance and resource utilization.
Patent Information
- Application Number
- CN202411714805.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2044-11-27
AI Technical Summary
In NUMA architecture systems, uneven node load can cause some nodes to become overloaded, affecting business continuity and performance.
By monitoring the input capacity and maximum processing capacity of NUMA nodes in real time, task allocation is dynamically adjusted, and tasks from overloaded nodes are assigned to redundant nodes. A NUMA computing resource redundancy table and an overload table are established. The type of processing node is determined based on data packet information, and the tables are updated in real time to ensure load balancing.
It achieves dynamic load balancing of NUMA nodes, avoids system crashes caused by node overload, and improves system performance, stability and resource utilization, making it suitable for high-performance computing environments.
Smart Images

Figure CN119652893B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of network security and communication technology, in particular to a method for dynamically balancing system load, a computer device, a medium and a product. BACKGROUND
[0002] In high-performance computing platforms, the NUMA (Non-Uniform Memory Access) architecture is widely used in industrial Internet of Things and big data platforms. The NUMA architecture divides the system into multiple nodes, each node containing a processor and a local memory, aiming to reduce memory access delay and improve system performance.
[0003] However, the NUMA architecture also brings some challenges and problems. In the NUMA system, the speed of the processor accessing the local memory is much faster than accessing the memory of the remote node. If the data of the application program is distributed on multiple nodes, it will cause the memory access delay of some nodes to increase, thereby affecting the performance. In actual application, due to the different traffic or tasks received by each NUMA node, the system load is unbalanced, thereby causing some nodes to be overloaded and affecting business continuity. SUMMARY
[0004] Therefore, the embodiments of the present disclosure provide a method for dynamically balancing system load, a computer device, a medium and a product, which can solve the problems of system load imbalance, node overload and business interruption caused by the problems in the prior art.
[0005] In a first aspect, the embodiments of the present disclosure provide a method for dynamically balancing system load, which specifically includes the following contents:
[0006] Obtain the key information of all NUMA nodes in a multi- NUMA architecture; the key information includes real-time input capacity and maximum processing capacity;
[0007] If the key information meets the preset condition, store the NUMA node in a redundancy table, otherwise, store it in an overload table;
[0008] Determine the node type responsible for processing the data packet based on the received data packet;
[0009] If the node type does not exist in the redundancy table, call the corresponding NUMA node in the overload table based on the node type as a target node;
[0010] If the real-time input capacity of the target node is greater than the corresponding maximum processing capacity, execute the processing instruction of the data packet by the node with the largest difference between the maximum processing capacity and the current real-time input capacity in the redundancy table;
[0011] If the real-time input capability of the target node is not greater than the corresponding maximum processing capability, the target node executes the processing instruction of the data packet.
[0012] Optionally, if the key information meets the preset condition, the NUMA node is stored in the redundancy table, otherwise, it is stored in the overload table, and specifically includes:
[0013] The NUMA node with real-time input capability not greater than the corresponding maximum processing capability is stored in the redundancy table.
[0014] The NUMA node with real-time input capability greater than the corresponding maximum processing capability is stored in the overload table.
[0015] Optionally, the method for obtaining the maximum processing capability includes: under the condition that the target system is in an empty load, performing maximum task stress test on each NUMA node in the target system to obtain the maximum processing capability of the corresponding NUMA node.
[0016] Optionally, the method for determining the type of node responsible for processing the data packet based on the received data packet includes:
[0017] Obtaining the first information of the received data packet, the first information including the destination IP address and the port number;
[0018] Based on the first information, a preset mapping mechanism is used to determine the type of node responsible for processing.
[0019] Optionally, after determining the type of node, it further includes:
[0020] Obtaining the time interval from the determination time of the type of node to the creation time of the redundancy table and the overload table;
[0021] When the time interval is greater than a preset interval threshold, the redundancy table and the overload table are updated.
[0022] Optionally, the method for updating the redundancy table and the overload table based on the update strategy includes:
[0023] Obtaining the real-time input capability of all NUMA nodes in the redundancy table at the current time, denoted as the first input capability;
[0024] Obtaining the real-time input capability of all NUMA nodes in the NUMA computing resource overload table at the current time, denoted as the second input capability;
[0025] Moving the NUMA node with the first input capability greater than the corresponding maximum processing capability to the overload table;
[0026] The second input capability is moved to the NUMA computing redundancy table if the second input capability is not greater than the corresponding maximum processing capability of the NUMA node.
[0027] Optionally, the method for obtaining the real-time input capability comprises: monitoring the usage rate and memory usage of each NUMA node in real time based on a system monitoring tool to obtain the corresponding real-time input capability.
[0028] Optionally, if the node type exists in the redundancy table, the corresponding NUMA node of the redundancy table is invoked based on the node type to execute the processing instruction on the data packet.
[0029] In a second aspect, the embodiments of the present disclosure further provide a system for dynamically balancing system load, comprising:
[0030] The capability obtaining module is configured to obtain key information of all NUMA nodes in a multi-NUMA architecture.
[0031] The classification module is configured to store the NUMA node into a redundancy table if the key information meets a preset condition, and otherwise, store the NUMA node into an overload table.
[0032] The determination module is configured to determine a node type responsible for processing based on the received data packet.
[0033] The dynamic adjustment module is configured to invoke the corresponding NUMA node of the redundancy table based on the node type if the node type exists in the redundancy table, and execute the processing instruction on the data packet.
[0034] If the node type exists in the overload table, the corresponding NUMA node of the overload table is invoked based on the node type, and is recorded as a target node.
[0035] The real-time input capability of the target node is obtained, and it is determined whether the real-time input capability is greater than the maximum processing capability of the target node. If not, the target node executes the processing instruction on the data packet. If yes, a node with the maximum difference between the maximum processing capability and the real-time input capability in the redundancy table is obtained, and is recorded as a target node, and the target node executes the processing instruction on the data packet.
[0036] In a third aspect, the present disclosure provides a method for dynamically balancing system load, comprising:
[0037] The maximum input capability and the maximum processing capability of all NUMA nodes in a multi-NUMA architecture are obtained.
[0038] inserting the NUMA node with the maximum input capacity not greater than the corresponding maximum processing capacity into a redundancy table, and inserting the NUMA node with the maximum input capacity greater than the corresponding maximum processing capacity into an overload table;
[0039] determining a node type responsible for processing based on the received data packet;
[0040] if the node type exists in the redundancy table, invoking a corresponding NUMA node of the redundancy table based on the node type to execute a processing instruction on the data packet;
[0041] if the node type exists in the overload table, invoking a corresponding NUMA node of the overload table based on the node type, denoted as a target node;
[0042] obtaining a real-time input capacity of the target node, determining whether the real-time input capacity is greater than a maximum processing capacity of the target node, if not, executing the processing instruction on the data packet by the target node, and if yes, obtaining a node with a maximum difference between the maximum processing capacity and the maximum input capacity in the redundancy table, denoted as a target node, and executing the processing instruction on the data packet by the target node.
[0043] In a fourth aspect, the embodiments of the present disclosure further provide a computer device, adopting the following technical scheme:
[0044] The computer device comprises:
[0045] at least one processor; and
[0046] a memory in communication connection with the at least one processor; wherein
[0047] 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 dynamically balancing system load.
[0048] In a fifth aspect, the embodiments of the present disclosure further provide a computer readable storage medium storing computer instructions for causing a computer to execute the method for dynamically balancing system load.
[0049] In a sixth aspect, the embodiments of the present disclosure further provide a computer program product comprising computer program / instructions, which, when executed by a processor, implement the steps of the method according to any one of the preceding aspects.
[0050] The method for dynamically balancing system load disclosed in the application can automatically allocate tasks according to the current load condition through real-time monitoring and dynamic adjustment, ensure the load balancing of each NUMA node, avoid the situation that a certain node is overloaded while other nodes are idle, and thus improve the performance and efficiency of the overall system; by reallocating the tasks of the overloaded node to the redundant node, the system crash or performance decline caused by the overload of a single node can be avoided, the system can still operate normally during the load peak period, efficient and stable load balancing in the multi- NUMA architecture can be achieved, the performance, stability and resource utilization of the system can be effectively improved, and the method is particularly suitable for high-performance computing environments that need to process a large amount of data and complex computing tasks.
[0051] 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 contents of the specification can be implemented, and in order for the above and other purposes, features and advantages of the present disclosure to be 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
[0052] 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 other drawings can be obtained by those skilled in the art without creating laborious work.
[0053] Figure 1 The flowchart of the method for dynamically balancing system load provided by the embodiments of the present disclosure is shown.
[0054] Figure 2 The flowchart of the method for determining the type of the node provided by the embodiments of the present disclosure is shown.
[0055] Figure 3 The flowchart of the method for updating and analyzing the NUMA computing resource redundancy table and the NUMA computing overload table provided by the embodiments of the present disclosure is shown.
[0056] Figure 4 The flowchart of the method for updating the NUMA computing resource redundancy table and the NUMA computing overload table based on the update strategy provided by the embodiments of the present disclosure is shown.
[0057] Figure 5 The structural diagram of a computer device provided by the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0058] The embodiments of the present disclosure will be described in detail below with reference to the drawings.
[0059] It should be understood that the following specific examples illustrate the implementation of this disclosure, and those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. This disclosure can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0060] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.
[0061] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this disclosure. The drawings only show the components related to this disclosure and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0062] Furthermore, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.
[0063] Reference Figure 1 This application discloses a method for dynamically balancing system load in a single task within a multi-NUMA architecture, specifically including:
[0064] S100 acquires the real-time input capability and maximum processing capability of all NUMA nodes in a multi-NUMA architecture.
[0065] The method for obtaining the real-time input capacity comprises: based on a system monitoring tool, monitoring the usage rate and memory usage of each NUMA node in real time to obtain the corresponding real-time input capacity.
[0066] The method for obtaining the maximum processing capacity comprises: under the condition that the target system is in an empty load state, performing maximum task stress testing on each NUMA node in the target system to obtain the maximum processing capacity of the corresponding NUMA node.
[0067] S200, inserting the NUMA node whose real-time input capacity is less than the corresponding maximum processing capacity into a NUMA computing resource redundancy table;
[0068] Inserting the NUMA node whose real-time input capacity is greater than the corresponding maximum processing capacity into a NUMA computing overload table.
[0069] Specifically, two tables are established: a NUMA computing resource redundancy table and a NUMA computing overload table; according to the comparison result of the real-time input capacity and the maximum processing capacity, the NUMA node is inserted into the corresponding table, so that the normal node and the overload node can be quickly distinguished, and the subsequent task allocation and processing are facilitated.
[0070] S300, determining the type of the node responsible for processing based on the received data packet.
[0071] Specifically referring to Figure 2 The method for determining the type of the node comprises:
[0072] S310, obtaining first information of the received data packet, the first information comprising a destination IP address and a port number.
[0073] The data packet is a traffic data packet (such as a network data packet) or an event data packet (such as a log event).
[0074] S320, determining the type of the node responsible for processing based on the first information and a preset mapping mechanism.
[0075] Specifically, according to the destination IP address and the port number, a pre-configured mapping mechanism (such as a hash table, a routing table, etc.) can be used to determine the target NUMA node responsible for processing the traffic; this mapping mechanism is usually pre-configured to ensure that each IP address and port number corresponds to a specific NUMA node.
[0076] Through the preset mapping mechanism, the type of the processing node of the data packet can be quickly and accurately determined, and the efficiency and accuracy of task allocation are improved.
[0077] Further, the processing requirement of the data packet can also be determined through the characteristics of the data packet (such as packet size, type, priority, etc.), and the appropriate type of node is determined according to the processing requirement.
[0078] S400, if the node type exists in the NUMA computing resource redundancy table, a corresponding NUMA node of the NUMA computing resource redundancy table is invoked based on the node type to execute the processing instruction for the data packet.
[0079] Through this step, the resources of the redundant nodes can be fully utilized, the waste of idle resources can be avoided, and the overall performance of the system can be improved.
[0080] S500, if the node type exists in the NUMA computing overload table, a corresponding NUMA node of the NUMA computing overload table is invoked based on the node type, and is recorded as a target node.
[0081] S600, the real-time input capacity of the target node is obtained, and if the real-time input capacity is not greater than the maximum processing capacity of the target node, the target node executes the processing instruction for the data packet.
[0082] Specifically, the input capacity of the target node is monitored in real time, and if the real-time input capacity of the target node is within an acceptable range, the node directly processes the data packet, ensuring that the overloaded node can still process tasks when the load is controllable, avoiding unnecessary task redistribution, and improving processing efficiency.
[0083] S700, if the real-time input capacity is greater than the maximum processing capacity of the target node, a node with the maximum processing capacity in the NUMA computing resource redundancy table and the maximum difference between the real-time input capacity is obtained, and is recorded as a target node, and the target node executes the processing instruction for the data packet.
[0084] This step provides a flexible task allocation strategy, dynamically selects the most suitable node to process tasks according to the comparison result of the real-time input capacity and the maximum processing capacity, and this strategy not only considers the current load of the node, but also considers the maximum processing capacity of the node, so as to achieve the best balance between resource utilization and service quality; can respond to load changes in real time, and adjust the task allocation strategy as needed, this real-time response and adjustment capability makes the system can maintain high performance in the case of large load fluctuation, adapt to dynamic changing work load.
[0085] By dynamically querying the NUMA computing resource redundancy table, the node with the strongest processing capacity is found, which is marked as a target node, and processes the data packet, effectively relieving the load of the overloaded node, avoiding system crash caused by node overload, and improving system stability and reliability; through automatic task allocation and load balancing, manual intervention is reduced, management complexity is reduced, and management efficiency is improved.
[0086] The method for dynamically balancing system load disclosed in the application can automatically allocate tasks according to the current load condition through real-time monitoring and dynamic adjustment, ensure the load balancing of each NUMA node, avoid the situation that a certain node is overloaded while other nodes are idle, and thus improve the performance and efficiency of the overall system; by reallocating the tasks of the overloaded node to the redundant node, the system crash or performance decline caused by the overload of a single node can be avoided, the system can still operate normally during the load peak period, efficient and stable load balancing in the multi- NUMA architecture can be achieved, the performance, stability and resource utilization of the system can be effectively improved, and the method is particularly suitable for high-performance computing environments that need to process a large amount of data and complex computing tasks.
[0087] By reasonably allocating tasks, the system can fully utilize the resources of the NUMA node, can avoid resource waste, can improve the resource utilization of the overall system, and can reduce operating costs; through automatic task allocation and load balancing, the system administrator can reduce the need for manual intervention, simplify the management and maintenance complexity of the system, which not only reduces the management cost but also reduces the possibility of human error.
[0088] Reference Figure 3 The method for dynamically balancing system load disclosed in the application further comprises updating and analyzing the NUMA computing resource redundancy table and the NUMA computing overload table after determining the node type, specifically comprising:
[0089] obtaining the time interval from the determination time of the node type to the creation time of the NUMA computing resource redundancy table and the NUMA computing overload table;
[0090] determining whether the time interval is greater than a preset interval threshold, if yes, updating the NUMA computing resource redundancy table and the NUMA computing overload table based on an update strategy, and recording the updated NUMA computing resource redundancy table and the NUMA computing overload table as a target redundancy table and a target overload table;
[0091] determining whether the node type exists in the target redundancy table, if yes, calling the corresponding NUMA node of the target redundancy table based on the node type, and executing the processing instruction of the data packet;
[0092] if not, calling the corresponding NUMA node of the target overload table based on the node type, and recording the NUMA node as a target node;
[0093] obtaining the real-time input capacity of the target node, determining whether the real-time input capacity is greater than the maximum processing capacity of the target node, if not, executing the processing instruction of the data packet by the target node, if yes, obtaining the node with the maximum difference between the maximum processing capacity and the real-time input capacity in the target redundancy table, recording the node as a target node, and executing the processing instruction of the data packet by the target node;
[0094] If the time interval is not greater than the preset interval threshold, no update is performed.
[0095] In this embodiment, through analysis of the time interval, the timeliness of the NUMA computing resource redundancy table and the NUMA computing overload table can be monitored, and it is ensured that the table data used is the latest, and the inaccuracy of load distribution caused by time delay is avoided.
[0096] If the time interval is greater than the preset interval threshold, the real-time input capacity and the maximum processing capacity of each NUMA node are reacquired, the NUMA computing resource redundancy table and the NUMA computing overload table are updated based on the update strategy, and the updated tables are recorded as the target redundancy table and the target overload table, so as to ensure that the table data used is the latest, avoid the inaccuracy of load distribution caused by expired data, update the table data in time, adapt to the dynamic change of system load, and improve the accuracy and efficiency of load balancing.
[0097] If the node type exists in the target redundancy table, the corresponding NUMA node of the target redundancy table is called based on the node type, the processing instruction of the data packet is executed, the target redundancy table is queried to check whether there is a NUMA node matching the node type, if there is, the node is called to execute the processing instruction of the data packet, the resources of the redundant node are fully utilized, the waste of idle resources is avoided, the overall performance of the system is improved, the node suitable for processing is quickly found, and the efficiency of task allocation is improved.
[0098] If the node type does not exist in the target redundancy table, the corresponding NUMA node of the target overload table is called based on the node type, and is recorded as a target node, that is, if the node type does not exist in the target redundancy table, the target overload table is queried to find a matching NUMA node, and the node is marked as a target node, which can timely identify the overload node and provide a basis for subsequent load balancing and task reallocation, and when the redundant nodes are insufficient, the overload node can be flexibly selected to ensure that the task can continue to be processed.
[0099] The current real-time input capacity of the target node is obtained, it is judged whether the current real-time input capacity is greater than the maximum processing capacity of the target node, if not, the target node executes the processing instruction of the data packet; if yes, the node with the maximum processing capacity and the maximum difference value of the current real-time input capacity in the target redundancy table is obtained, which is recorded as the target node, and the target node executes the processing instruction of the data packet, that is, if the real-time input capacity of the target node is within the acceptable range, the node directly processes the data packet, if the real-time input capacity of the target node exceeds the maximum processing capacity, the node with the strongest processing capacity is found by querying the target redundancy table, and the data packet is processed by the node, so that the overload node can still process tasks when the load is controllable, unnecessary task redistribution is avoided, processing efficiency is improved, and the node with the strongest processing capacity can be quickly found in the overload condition, so that the tasks can be efficiently processed.
[0100] If the time interval is not greater than the preset threshold, the current NUMA computing resource redundancy table and the NUMA computing overload table are continuously used, system overhead caused by frequent updating is avoided, system performance and stability are improved, table data consistency is maintained in the case of small load change, and load distribution continuity and stability are ensured.
[0101] Through the embodiment, it can be ensured that the table data used is the latest, load distribution inaccuracy caused by expired data is avoided, load balancing accuracy and efficiency are improved, table data is updated in time, dynamic changes of system load are adapted, stable operation is ensured in the case of high load, resources of the redundant nodes are fully utilized, waste of idle resources is avoided, system overall performance is improved, overload nodes can be flexibly selected in the case of insufficient redundant nodes, tasks can be continuously processed, overload nodes can still process tasks when the load is controllable, unnecessary task redistribution is avoided, processing efficiency is improved, system overhead caused by frequent updating is avoided, system performance and stability are improved, table data consistency is maintained in the case of small load change, and load distribution continuity and stability are ensured.
[0102] By real-time monitoring and dynamic updating of the NUMA computing resource redundancy table and the NUMA computing overload table, the method ensures load distribution accuracy and efficiency, improves system processing capacity and resource utilization, enhances system stability and flexibility, and is suitable for various complex high-performance computing environments.
[0103] Referring to Figure 4 , the method for updating the NUMA computing resource redundancy table and the NUMA computing overload table based on the updating strategy specifically comprises the following steps.
[0104] A100, obtaining real-time input capacity of all NUMA nodes in the NUMA computing resource redundancy table at the current time, which is recorded as the first input capacity.
[0105] A200, obtaining the real-time input capacity of all NUMA nodes in the NUMA computing resource overload table at the current time, denoted as the second input capacity.
[0106] Through steps A100 and A200, it can be ensured that the obtained real-time input capacity data is the latest, providing accurate basis for subsequent node state judgment, real-time monitoring of node state, and timely discovery of node load changes.
[0107] A300, moving the NUMA node whose first input capacity is greater than the corresponding maximum processing capacity to the NUMA computing overload table;
[0108] Moving the NUMA node whose second input capacity is not greater than the corresponding maximum processing capacity to the NUMA computing redundancy table.
[0109] Specifically, for the NUMA node whose first input capacity is greater than the corresponding maximum processing capacity, it is removed from the NUMA computing resource redundancy table and added to the NUMA computing overload table, and for the NUMA node whose second input capacity is not greater than the corresponding maximum processing capacity, it is removed from the NUMA computing overload table and added to the NUMA computing redundancy table.
[0110] By dynamically adjusting the table content, it can be ensured that the nodes in the redundancy table are truly idle or low-load nodes, and the nodes in the overload table are truly overloaded nodes, so that the nodes in the redundancy table can fully utilize their processing capacity, and the nodes in the overload table can be timely redistributed tasks, and by dynamically adjusting the node state, the overall processing capacity and response speed of the system can be improved, the dynamic changes of the load can be adapted, the tasks can be allocated to the most suitable nodes, the performance bottleneck caused by uneven load can be avoided, the accuracy of the table content can be ensured, and the task allocation error caused by the confusion of overloaded nodes and redundant nodes can be avoided.
[0111] For example, a big data computing platform device has 4 NUMA nodes, each NUMA node has n cpus; the system has 32 slots, each NUMA has different number of slots, NUMA0 has 4 slots, NUMA1 has 6 slots, NUMA2 has 8 slots, and NUMA3 has 14 slots, each slot has a gigabit, gigabit or hundred G interface. The system runs a single task: data unit analysis and forwarding.
[0112] After starting the running system, if the traffic is processed by the node in the NUMA computing resource redundancy table, it is directly processed; if the node in the NUMA computing overload table is responsible for processing, it is checked whether the maximum processing capacity of the node corresponding to the NUMA computing overload table is greater than the real-time input capacity, if yes, the NUMA processes the traffic, otherwise, the NUMA node with the maximum difference between the maximum processing capacity and the real-time input capacity is found in the NUMA computing resource redundancy table, and the traffic is processed by the found node.
[0113] For example, the maximum processing capacity of NUMA0 is 70G / s, and the real-time input capacity is 80G / s (8 10G interfaces), and the NUMA0 node information is inserted into the NUMA computing overload table. The table entry information includes: name NUMA0; the difference between the maximum processing capacity and the real-time input capacity is NG; the maximum processing capacity of NUMA1 is 30G / s, and the real-time input capacity is 20G / s (2 10G interfaces), and the NUMA1 node information is inserted into the NUMA computing resource redundancy table. The table entry information includes: name NUMA1, the difference between the maximum processing capacity and the real-time input capacity is MG.
[0114] The table entry content NG (i.e. the non-positive difference between the maximum processing capacity and the real-time input capacity) and the MG value (i.e. the positive difference between the maximum processing capacity and the real-time input capacity) of the NUMA computing resource redundancy table and the NUMA computing overload table can be updated periodically by a timer.
[0115] Unlike the traditional static load balancing strategy, the scheme disclosed in the application not only performs load distribution based on the maximum processing capacity of the node, but also dynamically adjusts the processing node by monitoring the traffic and the system state in real time. This method avoids the resource waste and performance bottleneck caused by static configuration, ensures that each NUMA node can play a role within its maximum capacity, and thus improves the flexibility and reliability of the whole system.
[0116] In a second aspect, the embodiments of the present disclosure further provide a system for dynamically balancing system load, comprising:
[0117] The capability acquisition module is configured to acquire the real-time input capacity and the maximum processing capacity of all NUMA nodes in the multi- NUMA architecture.
[0118] The classification module is configured to insert the NUMA node with the real-time input capacity not greater than the corresponding maximum processing capacity into the NUMA computing resource redundancy table.
[0119] The classification module is configured to insert the NUMA node with the real-time input capacity not greater than the corresponding maximum processing capacity into the NUMA computing resource redundancy table.
[0120] The determination module is configured to determine the type of the node responsible for processing based on the received data packet.
[0121] The dynamic adjustment module is configured to, when the node type exists in the NUMA computing resource redundancy table, invoke a corresponding NUMA node of the NUMA computing resource redundancy table based on the node type to execute the processing instruction for the data packet.
[0122] If the node type exists in the NUMA computing overload table, a corresponding NUMA node of the NUMA computing overload table is invoked based on the node type, and is recorded as a target node.
[0123] The real-time input capability of the target node is obtained, and it is determined whether the real-time input capability is greater than the maximum processing capability of the target node. If not, the target node executes the processing instruction for the data packet. If yes, a node with the maximum difference between the maximum processing capability and the real-time input capability in the NUMA computing resource redundancy table is obtained, and is recorded as a target node, and the target node executes the processing instruction for the data packet.
[0124] It should be noted that the solutions in the method for dynamically balancing system load disclosed in the first aspect of the embodiments of the present disclosure are applicable to the acquisition of the solutions in the system for dynamically balancing system load provided in the second aspect of the embodiments of the present disclosure, and thus will not be described here.
[0125] In another embodiment, the present disclosure provides a method for dynamically balancing system load, comprising:
[0126] S10, obtaining the maximum input capability and the maximum processing capability of all NUMA nodes in a multi-NUMA architecture.
[0127] The method for obtaining the maximum input capability comprises: based on a performance test tool, obtaining the maximum processing capability of each NUMA node in a target system under a full load condition of the target system.
[0128] The upper limit threshold of the input capability generally refers to the maximum data flow that a node can receive, including network flow and storage I / O flow. Determining this threshold can help the system to avoid node overload when processing a large amount of data.
[0129] S20, inserting a NUMA node with a maximum input capability not greater than a corresponding maximum processing capability into a NUMA computing resource redundancy table.
[0130] Inserting a NUMA node with a maximum input capability greater than a corresponding maximum processing capability into a NUMA computing overload table.
[0131] By simple comparison, the NUMA nodes are divided into redundant nodes and overloaded nodes, providing a preliminary classification basis for subsequent task allocation, ensuring that the nodes in the redundancy table can still process tasks under low load, and the nodes in the overload table can be monitored and adjusted in time.
[0132] S30, determine the node type responsible for processing based on the received data packet.
[0133] S40, if the node type exists in the NUMA computing resource redundancy table, call the corresponding NUMA node of the NUMA computing resource redundancy table based on the node type to execute the processing instruction of the data packet.
[0134] S50, if the node type exists in the NUMA computing overload table, call the corresponding NUMA node of the NUMA computing overload table based on the node type, and mark it as a target node.
[0135] Obtain the real-time input capacity of the target node, and determine whether the real-time input capacity is greater than the maximum processing capacity of the target node. If not, the target node executes the processing instruction of the data packet; if yes, obtain the node with the largest difference between the maximum processing capacity and the maximum input capacity in the NUMA computing resource redundancy table, mark it as a target node, and execute the processing instruction of the data packet by the target node.
[0136] Quickly determine the processing requirement of the data packet, improve the efficiency of task allocation, and according to the destination IP address and port number of the data packet, the data packets of similar service types can be allocated to the same node, which is convenient for service management and optimization; the resources of redundant nodes can be fully utilized, the waste of idle resources can be avoided, the overall performance of the system can be improved, the suitable processing node can be quickly found, and the efficiency of task allocation can be improved. Query the NUMA computing overload table to check whether there is a NUMA node matching the node type. If there is, mark the node as a target node, and real-time monitor the input capacity of the target node. If the real-time input capacity of the target node is within an acceptable range, the data packet is directly processed by the node. If the real-time input capacity of the target node exceeds the maximum processing capacity, query the NUMA computing resource redundancy table to find the node with the strongest processing capacity, and process the data packet by the node.
[0137] Through steps S30-S50, the overloaded node can be identified in time to provide basis for subsequent load balancing and task redistribution. When the redundant nodes are insufficient, the overloaded node can be flexibly selected to ensure that the task can continue to be processed, ensure that the overloaded node can still process the task when the load is controllable, avoid unnecessary task redistribution, improve the processing efficiency, and quickly find the node with the strongest processing capacity in the overloaded condition to ensure efficient processing of the task.
[0138] A computer device according to an embodiment of the present disclosure includes a memory and a processor. The memory is configured to store non-transitory computer readable instructions. Specifically, the memory can include one or more computer program products, which can include various forms of computer readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM), cache memory, and / or the like. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, and / or the like.
[0139] The processor can be a central processing unit (CPU) or other form of processing unit that has data processing and / or instruction execution 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, so that the computer device performs all or part of the steps of the method of dynamically balancing system load according to the embodiments of the present disclosure.
[0140] 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 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.
[0141] As shown in Figure 5 A structural schematic diagram of a computer device according to an embodiment of the present disclosure is shown. It shows a structural schematic diagram suitable for implementing the computer device in the embodiments of the present disclosure. Figure 5 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.
[0142] As shown in Figure 5 The computer device can include a processor (such as a central processing unit, a graphics processing unit, and 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), as shown. Various programs and data required for the operation of the computer device are also stored in the RAM. 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.
[0143] 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, and the like; and communication devices. The communication devices can allow the computer device to communicate with other devices (such as edge computing devices) wirelessly or by wire to exchange data. Although Figure 5The computer device is shown with various devices, but it is understood that not all of the shown devices are required to be implemented or present. More or fewer devices can alternatively be implemented or present.
[0144] 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 methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through 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 dynamically balancing system load according to embodiments of the present disclosure are performed.
[0145] Detailed descriptions of the embodiments are described above with reference to the corresponding descriptions of the previous embodiments, and are not repeated here.
[0146] The 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 dynamically balancing system load according to embodiments of the present disclosure are performed.
[0147] 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 mobile hard disk), media with built-in rewritable non-volatile memory (e.g., memory card), and media with built-in ROM (e.g., ROM cartridge).
[0148] Detailed descriptions of the embodiments are described above with reference to the corresponding descriptions of the previous embodiments, and are not repeated here.
[0149] The basic principles of the present disclosure are described above in conjunction 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-mentioned specific details are only for the purpose of example and for the purpose of understanding, and are not limiting, and the above-mentioned details do not limit the present disclosure to the must-use of the above-mentioned specific details.
[0150] 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 manner. The words comprising, including, having and the like are to be open ended. As used in this document, the conjunction "or" is to be interpreted in the inclusive sense, i.e. as meaning one or the other, or both. As used in this document, the words "and" and "or" are to be interpreted as having the meaning indicated in the phrase "and / or". As used in this document, the word "such as" is to be interpreted as meaning "such as, but not limited to".
[0151] Also, as used in this document, the word "or" in the cases used to introduce an enumeration of several items, for example, a list of items, is to be interpreted in the inclusive sense, i.e. as meaning one or more or any single one of the items, but not the combination of more than one of the items. Additionally, the phrase "example of" as used in this document is not meant to be limiting in any way.
[0152] It is also important to note that the systems and methods of the present 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 foregoing. Furthermore, the systems and methods of the present disclosure can be used in a variety of environments and systems including, but not limited to, a data processor, a computer, a computer network, a computer software, and combinations of the foregoing.
[0153] Various changes, modifications and improvements in the technologies described herein can be made without departing from the teachings of the teachings defined by the appended claims. Moreover, the scope of the claims of this disclosure is not limited to the specific aspects described herein. The processes, machines, manufactures, compositions of matter, means, methods, or steps for accomplishing the methods and processes described herein can be practiced or carried out in various ways as can be desired or advantageous. Accordingly, the appended claims are intended to cover all such modifications and improvements as falling within the scope of this disclosure.
[0154] The above description of the disclosed aspects is meant to be illustrative only and not limiting as to the scope of the disclosure. Many variations of these aspects are possible, as will be apparent to those of ordinary skill in the art having the benefit of this disclosure without departing from the scope of the disclosure. Accordingly, the disclosure is intended to be illustrative, but not limiting, of the scope of the disclosure, as well as other aspects, as defined by the following claims, in which the scope of the following claims is intended to include all such alternatives, modifications and variations as fall within the scope of the claims.
[0155] 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 dynamically balancing system load, the method comprising: The method comprises the following steps: Obtain the key information of all NUMA nodes in a multi- NUMA architecture; The key information includes real-time input capacity and maximum processing capacity; If the key information meets the preset condition, store the NUMA node in a redundancy table, otherwise, store it in an overload table; Based on the received data packet, determine the type of node responsible for processing the data packet; If the node type does not exist in the redundancy table, call the corresponding NUMA node in the overload table based on the node type as the target node; If the real-time input capacity of the target node is greater than the corresponding maximum processing capacity, execute the processing instruction of the data packet by the node with the maximum processing capacity in the redundancy table and the current real-time input capacity difference; If the real-time input capacity of the target node is not greater than the corresponding maximum processing capacity, execute the processing instruction of the data packet by the target node; If the key information meets the preset condition, store the NUMA node in a redundancy table, otherwise, store it in an overload table, specifically comprising: Store the NUMA node with real-time input capacity not greater than the corresponding maximum processing capacity in the redundancy table; Store the NUMA node with real-time input capacity greater than the corresponding maximum processing capacity in the overload table; After determining the type of the node, further comprising: obtaining the time interval of the determination time of the node type to the creation time of the redundancy table and the overload table; When the time interval is greater than the preset interval threshold, update the redundancy table and the overload table based on the update strategy; The update of the redundancy table and the overload table based on the update strategy comprises: Obtain the real-time input capacity of all NUMA nodes in the redundancy table at the current time, denoted as the first input capacity; Obtain the real-time input capacity of all NUMA nodes in the NUMA computing resource overload table at the current time, denoted as the second input capacity; Move the NUMA node with the first input capacity greater than the corresponding maximum processing capacity to the overload table; Move the NUMA node with the second input capacity not greater than the corresponding maximum processing capacity to the NUMA computing redundancy table.
2. The method of dynamically balancing the load of a system of claim 1, wherein, The method for obtaining the maximum processing capacity comprises: performing maximum task stress test on each NUMA node in the target system under the condition of empty load of the target system, and obtaining the maximum processing capacity of the corresponding NUMA node.
3. The method of dynamically balancing the load of a system of claim 1, wherein, The method for determining the type of node responsible for processing the data packet based on the received data packet comprises: Obtain the first information of the received data packet, which includes the destination IP address and the port number; Determine the type of node responsible for processing based on the first information and the preset mapping mechanism.
4. The method of dynamically balancing the load of a system of claim 1, wherein, The method for obtaining the real-time input capacity comprises: monitoring the usage rate and memory usage of each NUMA node in real time based on a system monitoring tool, and obtaining the corresponding real-time input capacity.
5. The method for dynamically balancing the load of a system of claim 1, wherein, If the node type exists in the redundancy table, call the corresponding NUMA node in the redundancy table based on the node type to execute the processing instruction of the data packet.
6. A method of dynamically balancing system load, characterized by, The method comprises the following steps: Obtain the maximum input capacity and maximum processing capacity of all NUMA nodes in a multi- NUMA architecture; inserting the NUMA node with the maximum input capacity not greater than the corresponding maximum processing capacity into a redundancy table, and inserting the NUMA node with the maximum input capacity greater than the corresponding maximum processing capacity into an overload table; determining a node type responsible for processing based on the received data packet; if the node type exists in the redundancy table, invoking a corresponding NUMA node of the redundancy table based on the node type to execute a processing instruction on the data packet; if the node type exists in the overload table, invoking a corresponding NUMA node of the overload table based on the node type, denoted as a target node; obtaining a real-time input capacity of the target node, and determining whether the real-time input capacity is greater than a maximum processing capacity of the target node, and if not, executing the processing instruction on the data packet by the target node; if yes, obtaining a node with a maximum difference between the maximum processing capacity and the maximum input capacity in the redundancy table, denoted as a target node, and executing the processing instruction on the data packet by the target node.
7. A computer apparatus, comprising: 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 dynamically balancing system load according to any one of claims 1-5 or claim 6.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for causing a computer to perform the method for dynamically balancing system load according to any one of claims 1-5 or claim 6.
9. A computer program product comprising computer instructions, characterized in that, The computer instructions, when executed by a processor, implement the steps of the method according to any one of claims 1-5 or claim 6.
Citation Information
Patent Citations
Method for cluster load balance and system thereof
CN103327072A
Micro-service dynamic adaptive client load balancing method and system
CN117155942A