Distributed storage system load balancing method and device and medium

By optimizing the node allocation of the OSS service process in the distributed storage system, the load imbalance problem was solved, ensuring the shortest data transmission path and balancing the node load, thereby improving system performance and resource utilization.

CN118939430APending Publication Date: 2024-11-12ZHENGZHOU INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411151253.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

In distributed storage systems, traditional OSS service process allocation schemes lead to unbalanced loads, causing some NUMA nodes to become overloaded, thus becoming performance bottlenecks and affecting the overall system performance.

Method used

By querying the nodes bound to the business network cards or disks in the distributed storage system, sorting them, and allocating object storage service processes based on load information with load balancing as the target condition, the node allocation is optimized using load scoring and data flow to ensure the shortest data transmission path and balanced node load.

Benefits of technology

It achieves overall performance optimization of the distributed storage system, avoids a single NUMA node becoming a bottleneck, and improves CPU resource utilization and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939430A_ABST
    Figure CN118939430A_ABST
Patent Text Reader

Abstract

The invention discloses a load balancing method and device for a distributed storage system and a medium, relates to the technical field of distributed storage, is used for realizing node distribution of an OSS service process, and provides the load balancing method for the distributed storage system aiming at the problem of load imbalance existing in a traditional node distribution scheme. The shortest transmission path from the OSS service process to the disk in the traditional scheme is expanded to the shortest overall data transmission path. On the basis that good performance of the distributed storage system can be guaranteed, node resources capable of being used for achieving OSS service allocation are greatly increased, and therefore the problem of load imbalance existing in an existing node allocation scheme can be relieved. On the basis, the method further distributes the most suitable NUMA NODE for the OSS service process by acquiring the load information of each NUMA NODE and taking the load balancing as a target condition, so that the CPU load balancing of each NUMA NODE in the system is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed storage technology, and in particular to a distributed storage system load balancing method, device and medium. Background Art

[0002] Currently in distributed storage systems, the central processing unit (CPU) resource allocation of a node (NODE) ​​is usually implemented based on the NUMA (Non-Uniform Memory Access, a non-uniform memory access architecture) architecture.

[0003] Generally speaking, each CPU on a storage node can be divided into multiple NUMA NODEs. According to the physical topology link of the storage node, disks, network cards and other components are bound to different NUMA NODEs. Each NODE has its own local memory. The CPU can access local memory or the memory of other NODEs, but accessing local memory is usually faster, so related data and services should be placed on the same NUMA NODE as much as possible to reduce remote memory access.

[0004] Therefore, after the Object Storage Service (OSS) of the distributed storage cluster is deployed, the OSS service process will be assigned to the NUMA NODE bound to the corresponding disk of the OSS when it is started. This is the shortest way to transmit data from the OSS process to the disk, in order to achieve better performance.

[0005] However, in the scenario where there are a large number of disks, the above solution may result in a single NUMA NODE being bound to multiple disks. At this time, based on the above solution, the NUMA NODE also needs to run multiple OSS service processes, which will cause the NUMA NODE to be overloaded. In turn, the NUMA NODE will become the performance bottleneck of the distributed storage system, affecting the overall performance of the distributed storage system.

[0006] Therefore, technicians in this field are in urgent need of a distributed storage system load balancing method to solve the load imbalance problem existing in the traditional OSS service process allocation solution. Summary of the invention

[0007] The purpose of the present invention is to provide a distributed storage system load balancing method, device and medium to solve the load imbalance problem existing in the traditional OSS service process allocation solution.

[0008] In order to solve the above technical problems, the present invention provides a distributed storage system load balancing method, comprising:

[0009] Query the nodes in the distributed storage system that are bound to the service network card or disk, and use them as nodes to be allocated;

[0010] Sort the object storage service processes to be allocated according to a preset order, and sequentially allocate nodes to each of the object storage service processes;

[0011] When performing node allocation for any of the object storage service processes, the load information of each of the nodes to be allocated at the current moment is obtained, and based on the load information and with load balancing as the target condition, the object storage service process is allocated to the corresponding node to be allocated.

[0012] In a possible embodiment, the load information includes: the number of running object storage service processes and the average load of processor cores in the node;

[0013] Then, according to the load information, with load balancing as the target condition, allocating the object storage service process to the corresponding node to be allocated includes:

[0014] Performing a weighted calculation on the number of running object storage service processes and the average value of the processor core load in the node to determine a load score corresponding to each of the nodes to be allocated; wherein a higher load score indicates a greater load on the corresponding node to be allocated;

[0015] The object storage service process is allocated to the to-be-allocated node with the lowest load score.

[0016] In a possible embodiment, obtaining the average value of the processor core load in the node includes:

[0017] Obtaining the idle time value of each processor core in the node to be allocated at the current moment;

[0018] Determine the load value of each processor core in the node to be allocated according to the difference between the idle time full value and the idle time value at the current moment;

[0019] The average value of the core load of the processor in the node is determined according to the average value of the core load of each processor in the node to be allocated.

[0020] In a possible embodiment, allocating the object storage service process to the to-be-allocated node having the lowest load score further includes:

[0021] If there are multiple nodes to be allocated with the same and lowest load scores, determining whether there is a node to be allocated with a bound disk among the multiple nodes to be allocated with the lowest load scores;

[0022] If so, the object storage service process is preferentially allocated to the to-be-allocated node bound to the disk;

[0023] If there are multiple nodes to be allocated that are bound to the disk, the object storage service process is preferentially allocated to the node to be allocated that has the smallest occupancy rate of the bound disk.

[0024] In a possible embodiment, after determining the load score corresponding to each of the nodes to be assigned, the method further includes:

[0025] If the load score corresponding to any of the nodes to be allocated exceeds a preset first threshold, the node to be allocated is added to the set of nodes with abnormal load;

[0026] After the node to be allocated is added to the set of nodes with abnormal load, the method further includes:

[0027] Determine whether the load score corresponding to the node to be assigned drops below the first threshold within a preset first time period;

[0028] If yes, determining whether the load score corresponding to the node to be allocated exceeds the first threshold again within a preset second time period;

[0029] If not, removing the node to be assigned from the set of nodes with abnormal load;

[0030] After completing the node allocation of all the object storage service processes, the method further includes:

[0031] Export load exception logs;

[0032] The load anomaly log includes: the load anomaly node set, and the load score corresponding to each of the to-be-allocated nodes in the load anomaly node set.

[0033] In a possible embodiment, after determining the load score corresponding to each of the nodes to be assigned, the method further includes:

[0034] If the load score corresponding to any of the nodes to be allocated exceeds a preset second threshold, the node to be allocated is determined to be a faulty node, an alarm is issued, and the faulty node and the load score of the faulty node are derived;

[0035] The second threshold is greater than the first threshold.

[0036] In a possible embodiment, the method further includes:

[0037] When the object storage service process is created, setting a priority for the object storage service process;

[0038] Then, the step of sorting the object storage service processes to be allocated according to a preset order includes:

[0039] According to the priority of each object storage service process, sort the object storage service processes in descending order;

[0040] When there are multiple object storage service processes with the same priority, the object storage service processes with the same priority are sorted in order from earliest to latest according to the creation time of the object storage service process.

[0041] In order to solve the above technical problems, the present invention further provides a distributed storage system load balancing device, comprising:

[0042] The resource acquisition module is used to query the nodes in the distributed storage system that are bound to the service network card or disk and use them as nodes to be allocated;

[0043] A process sorting module is used to sort the object storage service processes to be allocated according to a preset order, and sequentially allocate nodes to each of the object storage service processes;

[0044] The node allocation module is used to obtain the load information of each of the nodes to be allocated at the current moment when performing node allocation for any of the object storage service processes, and allocate the object storage service process to the corresponding node to be allocated based on the load information and with load balancing as the target condition.

[0045] In order to solve the above technical problems, the present invention further provides a distributed storage system load balancing device, comprising:

[0046] Memory for storing computer programs;

[0047] A processor is used to implement the steps of the distributed storage system load balancing method as described above when executing the computer program.

[0048] To solve the above technical problem, the present invention further provides a non-volatile storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the distributed storage system load balancing method as described above are implemented.

[0049] The present invention provides a distributed storage system load balancing method, based on the fact that when the distributed storage system writes or reads data, its data path is mainly: business network card - OSS service - disk; and the data operations involved in the OSS service process include data writing and reading; so this solution allocates the OSS service process to the node bound to the business network card or disk, which can achieve the shortest overall path for data writing and data reading of the OSS service process, and thus can bring better performance. It can be seen that this method also uses the node bound to the network card as a node resource that can be allocated to the OSS service process. On the basis of ensuring the performance of the distributed storage system, it increases the number of node resources that can be allocated by the OSS service, thereby alleviating the load imbalance problem of node allocation to a certain extent.

[0050] In addition, this solution also determines the load information of each node to be allocated, and allocates each OSS service process to the corresponding node with load balancing as the target condition; and each OSS service process is allocated in sequence to ensure that when each OSS service process is allocated, it can be allocated to the most suitable node based on the current load balancing situation to ensure load balancing of each node and make full use of the CPU resources on each node.

[0051] The distributed storage system load balancing device and non-volatile storage medium provided by the present invention correspond to the above method and have the same effect as above. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0053] FIG1 is a flow chart of a distributed storage system load balancing method provided by the present invention;

[0054] FIG2 is a schematic diagram of a distributed storage system node allocation architecture provided by the present invention;

[0055] FIG3 is a structural diagram of a distributed storage system load balancing device provided by the present invention;

[0056] FIG. 4 is a structural diagram of another distributed storage system load balancing device provided by the present invention. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0058] The core of the present invention is to provide a distributed storage system load balancing method, device and medium.

[0059] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0060] In current distributed storage systems, the central processing unit (CPU) resource allocation of a node (NODE) ​​is usually implemented based on the NUMA (Non-Uniform Memory Access, a non-uniform memory access architecture) architecture.

[0061] NUMA configuration organizes multiple processors and memory into multiple NODEs. Each NODE has its own local memory. The processor can access the local memory as well as the memory of other NODEs. However, since the memory access time depends on the physical distance between the CPU and the memory, accessing the local memory is usually faster. Therefore, when allocating NUMA NODEs for Object Storage Service (OSS) processes, a node allocation scheme is adopted that places related data and services on the same NUMA NODE to reduce remote memory access. This ensures that the data transmission path from the OSS process to the disk is the shortest, and better performance is expected.

[0062] However, in the scenario where the amount of disk data is small, the above solution can show the advantage of the shortest data transmission path from the OSS process to the disk, and the performance is acceptable. But in the scenario where the number of disks is large, a single NUMA NODE may be bound to multiple disks. At this time, based on the above node allocation scheme, the NUMA NODE will also be allocated and run multiple OSS service processes. This will cause the NUMA NODE to be heavily loaded, and even make the NUMA NODE a performance bottleneck of the distributed storage system, affecting the overall performance of the system. At the same time, other NUMA NODEs that are bound to fewer disks or even no disks have less load, and CPU resources are not fully utilized.

[0063] Based on this, in order to solve the problem that the above node allocation scheme has load imbalance and causes the CPU resources of each node to be not fully utilized, the present invention provides a distributed storage system load balancing method, as shown in FIG1 , comprising:

[0064] S10: Query the nodes in the distributed storage system that are bound to the service network card or disk, and use them as nodes to be allocated.

[0065] S20: sorting the object storage service processes to be allocated according to a preset order, and sequentially allocating nodes to each object storage service process.

[0066] S30: When performing node allocation for any object storage service process, the load information of each node to be allocated at the current moment is obtained, and based on the load information and with load balancing as the target condition, the object storage service process is allocated to the corresponding node to be allocated.

[0067] Among them, step S10 is the step of determining the node resources that can be allocated to the OSS service process in this method. In this method, in order to ensure the expected good performance of the distributed storage system, the node resources that can be allocated include not only the NUMA NODE bound to the disk, but also the NUMA NODE bound to the network card as the node resource that can be allocated to the OSS service process.

[0068] The principle is that the data transmission path based on the distributed storage system mainly includes: business network card - OSS service - disk. Among them, the data flow direction when writing data is based on the data path from the business network card to the disk, and the data flow direction when reading data is based on the data path from the disk to the business network card. It can be seen that if the shortest data transmission path is guaranteed from the shortest disk data transmission path to the shortest overall data transmission path of the distributed storage system, the OSS service process can be assigned to the NUMA NODE bound to the business network card. At this time, regardless of whether the NUMA NODE assigned to the OSS service process is bound to the disk or the business network card, it can be guaranteed that the OSS service process has a shortest data transmission path when reading or writing data, that is, the overall path of data transmission (including reading and writing) is the shortest, which can ensure that the overall performance of the distributed storage system is better.

[0069] Furthermore, the subsequent steps S20 and S30 of the method are load balancing allocation strategies implemented on the basis of the node resources determined in the above step S10. Among them, for step S20, it is a strategy of node allocation by sorting the OSS service processes. The reason for taking the sequential allocation of OSS service process nodes is that every time the node allocation of an OSS service process is completed, the OSS service process will have an impact on the CPU load of all current NUMA NODEs. Therefore, in order to ensure load balancing, each OSS service process needs to be allocated to the NUMA NODE with the smallest current load, so the method adopts the method of sequentially allocating OSS service process nodes.

[0070] For step S30, it is a specific solution for implementing node allocation for an OSS service process. In step S30, first obtain the load information of all NUMA NODEs at the current moment to determine the load distribution of each NUMA NODE in the current distributed storage system. Based on this, with load balancing as a condition, the OSS service process is allocated to the most suitable NUMA NODE to ensure that each allocation of the OSS service process is based on load balancing. It should be noted that although this method does not restrict the solution for implementing node allocation with load balancing as the goal. But it is easy to understand that the simplest load balancing allocation solution is to allocate the OSS service process to the NUMA NODE with the lowest current load, thereby satisfying the load balancing condition.

[0071] It should also be noted that when implementing the allocation of OSS service processes in a distributed storage system, the allocation is usually performed in units of CPUs. Each CPU on a storage node in a distributed storage system can be divided into multiple NUMANODES. As shown in Figure 2, a CPU may be divided into four NUMA NODEs (nodes 1 to 4); the physical topology link of the CPU includes two network cards (network card 1 and network card 2) and a disk; there are eight OSS processes to be allocated on the CPU (processes 0 to 8). These network cards, disks, and OSS processes all need to be bound to the corresponding NUMA NODEs, and a possible binding scheme is shown in Figure 2. Based on this, when allocating OSS service processes in a distributed storage system, the allocation is mostly performed in units of CPUs. By executing the above method on each CPU in a storage node, the node allocation of the OSS service process of the storage node can be achieved.

[0072] As can be seen from the above, a distributed storage system load balancing method provided by the present invention is extended to the shortest overall data transmission path of the OSS service process by making the OSS service process in the traditional solution to the disk transmission path the shortest. On the basis of also ensuring the good performance of the distributed storage system, the node resources that can be used to implement the OSS service allocation are greatly increased, which is conducive to alleviating the load imbalance problem existing in the existing node allocation scheme. And on this basis, the method also performs node allocation for each OSS service process in sequence, and when allocating nodes for each OSS service process, the load information of each NUMA NODE at the current moment is obtained, and the load distribution of each NUMA NODE is mastered, so that the most suitable NUMA NODE can be allocated to the OSS service process with load balancing as the target condition, and the CPU load of each NUMA NODE in the system is guaranteed to be balanced. In addition, it can avoid a single NUMA NODE from being the performance bottleneck of the system, and improve the CPU resource utilization of the system.

[0073] On the other hand, the present invention does not limit the preset order of sorting the OSS service processes in the above step S20, and a suitable sorting method can be selected according to actual needs, for example, sorting according to the creation time of each OSS service process.

[0074] However, this embodiment also provides a possible OSS service process sorting solution, and the method further includes:

[0075] S40: When the object storage service process is created, a priority is set for the object storage service process.

[0076] Then the above step S20 specifically includes:

[0077] Sort the object storage service processes in descending order according to their priority.

[0078] When there are multiple object storage service processes with the same priority, the object storage service processes with the same priority are sorted in order from the earliest to the latest according to the creation time of the object storage service process.

[0079] That is, in this embodiment, the priority of each OSS service process can be set in advance according to its importance in actual application. Then, when allocating nodes to all OSS service processes, nodes can be allocated to OSS service processes with high priority first according to the priority, so that these relatively more important OSS service processes can be started early after the node allocation to start processing business and providing services.

[0080] On the other hand, in the above embodiment, the present invention does not limit how to characterize the load of each NUMA NODE. According to actual needs, one or more parameters or data that can characterize the NUMA NODE can be selected to characterize the load of each NUMA NODE. However, this embodiment provides a possible implementation scheme:

[0081] The load information includes the number of running object storage service processes and the average load of the processor cores in the node.

[0082] Then step S30: according to the load information, with load balancing as the target condition, the object storage service process is allocated to the corresponding node to be allocated, specifically including:

[0083] S31: Perform weighted calculation on the number of running object storage service processes and the average value of the processor core load in the node to determine the load score corresponding to each node to be allocated.

[0084] Among them, the higher the load score, the greater the load of the corresponding node to be allocated.

[0085] S32: Allocate the object storage service process to the to-be-allocated node with the lowest load score.

[0086] It should be noted that the number of running object storage service processes mentioned above is also the number of OSS service processes that have been running on the current NUMA NODE. It is easy to know that the greater the number of OSS service processes running on a NUMA NODE, the greater the load on the NUMA NODE.

[0087] In addition, the average load of the processor cores in the node is also the average load value of all CPU cores in the current NUMA NODE. It can be seen from the above embodiment and Figure 2 that a CPU can be divided into multiple NUMA NODEs. And a CPU may include multiple CPU cores, such as a 32-core CPU, a 64-core CPU, etc. Based on this, the process of dividing the CPU into multiple NUMA NODEs is also the process of dividing the multiple CPU cores in the CPU into each NUMA NODE. Each NUMA NODE should include one or more CPU cores, which can be bound to a network card, a disk or a process (the binding relationship between the two is represented by a solid line in Figure 2). Based on this, the CPU load of a NUMA NODE can be characterized by the load of multiple CPU cores in the NUMA NODE. In addition, it is easy to understand that the larger the average load of the processor cores in the node, the larger the CPU load of the NUMA NODE.

[0088] Therefore, it can be seen from the above that in this embodiment, the subsequent node allocation is achieved based on two parameters that can characterize the CPU load of the NUMA NODE: the number of running object storage service processes and the average value of the processor core load in the node.

[0089] Specifically, for step S31, firstly, two different parameters, namely, the number of running object storage service processes and the average value of the processor core load in the node, are integrated to obtain a parameter for finally judging the load situation. Since the number of running object storage service processes and the average value of the processor core load in the node are positively correlated with the CPU load situation, in this embodiment, the two parameters are integrated in a weighted summation manner to obtain the load score for finally judging the NUMA NODE load size. Among them, the larger the load score value, the greater the CPU load of the NUMA NODE.

[0090] For step S32, based on the load scores determined above, the OSS service process is allocated to the NUMA NODE with the lowest current load score, so as to ensure load balance of each NUMA NODE on the current CPU.

[0091] Furthermore, the load score determination scheme provided in this embodiment can be expressed by a mathematical formula as follows:

[0092] L=L oss ×a+∑L cpui / n×b;

[0093] In the above formula, L is the load rating; L oss The number of running object storage service processes; L cpui is the load value of the i-th CPU core in the current NUMANODE; n is the number of CPU cores in the current NUMA NODE; a and b are the weight coefficients of the number of running object storage service processes and the average load of the processor cores in the node, respectively.

[0094] In general, a+b=1. The specific values ​​of a and b can be adjusted according to actual test data. Generally, the corresponding weight coefficient is set according to the importance of the two parameters, the number of running object storage service processes and the average value of the core load of the processor in the node. For example, in a possible embodiment, the impact of the number of running object storage service processes on the CPU load is given more attention, so a=0.9 and b=0.1 can be taken.

[0095] Based on the setting of the above weight coefficients, this embodiment also provides an example of load score calculation: Assume that after the query in step S10, it is obtained that CPU0 has two NUMANodes, node 1 and node 2, which are bound to the business network card or disk. Among them, the number of OSS processes already running on node 1 is 3; and the average load of the processor core in the node of node 1 is 24; then the load score of node 1 is L1=3*0.9+24*0.1=5.1. Similarly, if the number of OSS processes already running on node 2 is 0; the average load of the processor core in the node of node 2 is 53; then the load score of node 2 is L2=0*0.9+53* 0.1 =5.3. Based on the above, there is: L2> L1. That is, the load score of node 1 is less than that of node 2, so this OSS process is assigned to node 1.

[0096] Furthermore, this embodiment also provides a possible implementation scheme for determining the load value of each CPU core:

[0097] Get the idle time value of each processor core in the node to be allocated at the current moment;

[0098] Determine the load value of each processor core in the node to be allocated according to the difference between the idle time full value and the idle time value at the current moment;

[0099] The average value of the core load of the processors in the node to be allocated is determined according to the average value of the core load of each processor in the node to be allocated.

[0100] Among them, the idle time (idle) value refers to the idle time of the CPU core, that is, the time when the CPU core does not perform any operation or task within a period of time, which can be used to characterize the load size of the CPU core. Furthermore, the smaller the idle value, the greater the load of the CPU core. And from the above embodiment, it can be seen that the CPU core load value required by this method is positively correlated with the load size of the CPU core. Therefore, in this embodiment, the obtained idle value is converted: the current idle value is subtracted by the idle full value to obtain the difference as the load value of the CPU core. Among them, the idle full value is generally 100 in actual applications.

[0101] Furthermore, although based on the load scoring implementation scheme provided in the above embodiment, generally there will not be multiple NUMA NODEs with the same and lowest load scores. However, in order to ensure that the distributed storage system load balancing method provided by the present invention can achieve accurate allocation of OSS service processes in such extreme scenarios, this embodiment also provides a corresponding solution. When allocating nodes, the above step S32 also includes:

[0102] If there are multiple nodes to be allocated with the same and lowest load scores, determine whether there is a node to be allocated with a bound disk among the multiple nodes to be allocated with the lowest load scores;

[0103] If it exists, the object storage service process will be preferentially allocated to the node to be allocated to the bound disk;

[0104] If there are multiple nodes to be allocated for the bound disk, the object storage service process will be preferentially allocated to the node to be allocated with the smallest occupancy of the bound disk.

[0105] That is, in this embodiment, further allocating multiple NUMA NODEs with equal and lowest load scores with priority given to the shortest disk path is a preferred solution for improving remote memory access performance. Furthermore, when there are multiple NUMA NODEs bound to disks among multiple NUMA NODEs with equal and lowest load scores, the NUMA NODE with the lowest disk utilization is allocated to the OSS service process based on the disk utilization as the evaluation criterion, so as to further improve system performance and disk resource utilization.

[0106] In addition, this embodiment also provides another possible node allocation solution:

[0107] Determine the data flow direction of the OSS service process to be allocated;

[0108] If the data flow is for data reading, the node to be allocated with the bound disk will be allocated first;

[0109] If the data flow direction is data writing, the node to be allocated that is bound to the business network card will be allocated first.

[0110] The node allocation scheme provided in this embodiment is a further allocation scheme based on the above embodiment, which can take data flow into consideration to ensure that the NUMA NODE allocated to the OSS service process satisfies the shortest path for data transmission and maximizes performance.

[0111] However, it should be noted that in actual applications, the OSS service process may write or read data at different times. Therefore, when allocating nodes to the OSS service process according to the scheme of this embodiment, dynamic adjustment is required, which will bring a certain burden to the system. Whether to implement this embodiment can be selected according to actual needs.

[0112] Furthermore, regarding how to implement the above-mentioned preferential allocation of the to-be-allocated nodes bound to the disk or bound to the service network card according to the data flow direction, this embodiment provides a possible implementation scheme, in the case where the load scores are the same:

[0113] If the data flow direction is data reading, the node to be allocated that is bound to the disk is given priority; if the data flow direction is data writing, the node to be allocated that is bound to the service network card is given priority.

[0114] In addition, this embodiment also provides another possible implementation scheme, when calculating the load score:

[0115] If the current data flow direction is data reading, the load score of the node to be allocated that is bound to the disk will be deducted for compensation; if the current data flow direction is data writing, the load score of the node to be allocated that is bound to the service network card will be deducted for compensation.

[0116] The degree of deduction correction is adjusted according to the actual situation, and this embodiment does not impose any restrictions on this.

[0117] Based on the above embodiments, a specific implementation plan is given for how to determine the load score in this method, so as to accurately grasp the CPU load distribution of each node to be allocated, allocate the OSS service process to the NUMANODE with the smallest load, ensure CPU load balancing, thereby improving CPU resource utilization and avoiding a single NUMA NODE from becoming a performance bottleneck.

[0118] On the other hand, after the load score is determined through the above embodiment, this embodiment also provides a further implementation scheme, and the method further includes:

[0119] S41: If the load score corresponding to any node to be allocated exceeds a preset first threshold, the node to be allocated is added to the set of nodes with abnormal load.

[0120] After the node to be allocated is added to the set of nodes with abnormal load, the method further includes:

[0121] S42: Determine whether the load score corresponding to the node to be allocated drops below a first threshold within a preset first time period; if so, go to step S43; if not, go to step S44.

[0122] S43: Determine whether the load score corresponding to the node to be allocated exceeds the first threshold again within a preset second time period.

[0123] S44: The node to be assigned is removed from the set of nodes with abnormal load.

[0124] After completing the node allocation of all object storage service processes, the method further includes:

[0125] S45: Export the load exception log.

[0126] The load anomaly log includes: a load anomaly node set, and a load score corresponding to each to-be-allocated node in the load anomaly node set.

[0127] That is, this embodiment provides a solution for determining nodes with abnormal loads, and uses the load score determined in the above steps that can characterize the CPU load size of each NUMA NODE to evaluate the load conditions of all NUMA NODEs. Since the larger the load score value, the larger the load of the current NUMA NODE. Therefore, this embodiment determines whether the current NUMA NODE has an abnormal situation of excessive load by judging the size relationship between the load score value and the preset first threshold. If so, the NUMA NODE is added as a load abnormal node to the load abnormal node set for subsequent export of load abnormality logs, so as to facilitate relevant personnel to know, locate, and troubleshoot load abnormality problems in the system.

[0128] On the other hand, based on the above embodiment, this embodiment also provides another further implementation scheme. After determining the load score through the above embodiment, the method further includes:

[0129] S46: If the load score corresponding to any node to be allocated exceeds a preset second threshold, the node to be allocated is determined to be a faulty node, an alarm is issued, and the faulty node and the load score of the faulty node are derived.

[0130] The second threshold is greater than the first threshold.

[0131] That is, based on the above embodiment of determining the load abnormality node, this embodiment also provides a fault alarm solution when the load abnormality is more serious. The second threshold value that is larger than the first threshold value is used to determine the fault node with more serious load abnormality. Then, when a faulty node appears, an alarm is issued to prompt relevant personnel to locate and troubleshoot the fault.

[0132] In the above embodiment, a distributed storage system load balancing method is described in detail, and the present invention also provides a corresponding embodiment of a distributed storage system load balancing device. It should be noted that the present invention describes the embodiment of the device part from two perspectives, one is based on the perspective of functional modules, and the other is based on the perspective of hardware.

[0133] From the perspective of functional modules, as shown in FIG3 , this embodiment provides a distributed storage system load balancing device, including:

[0134] The resource acquisition module 11 is used to query the nodes in the distributed storage system that are bound to the service network card or disk and use them as nodes to be allocated;

[0135] The process sorting module 12 is used to sort the object storage service processes to be allocated according to a preset order and sequentially allocate nodes to each object storage service process;

[0136] The node allocation module 13 is used to obtain the load information of each node to be allocated at the current moment when performing node allocation for any object storage service process, and allocate the object storage service process to the corresponding node to be allocated based on the load information and with load balancing as the target condition.

[0137] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.

[0138] FIG4 is a structural diagram of a distributed storage system load balancing device provided by another embodiment of the present invention. As shown in FIG4 , a distributed storage system load balancing device includes: a memory 20 for storing computer programs;

[0139] The processor 21 is used to implement the steps of a distributed storage system load balancing method as described in the above embodiment when executing a computer program.

[0140] The distributed storage system load balancing device provided in this embodiment may include but is not limited to a mobile terminal, a personal computer, a workstation, etc.

[0141] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0142] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of a distributed storage system load balancing method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. Data 203 may include, but is not limited to, a distributed storage system load balancing method, etc.

[0143] In some embodiments, a distributed storage system load balancing device may further include a display screen 22 , an input / output interface 23 , a communication interface 24 , a power supply 25 , and a communication bus 26 .

[0144] Those skilled in the art will appreciate that the structure shown in FIG. 4 does not constitute a limitation on a load balancing device for a distributed storage system, and may include more or fewer components than those shown in the figure.

[0145] An embodiment of the present invention provides a distributed storage system load balancing device, including a memory and a processor. When the processor executes a program stored in the memory, it can implement the following method: a distributed storage system load balancing method.

[0146] In addition to the embodiments of a distributed storage system load balancing method and device provided in the above embodiments, the present invention also provides an embodiment corresponding to a computer program product. A computer program product includes a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of the distributed storage system load balancing method described in any of the above embodiments can be implemented.

[0147] Since the embodiments of the computer program product part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the computer program product part, which will not be repeated here.

[0148] Finally, the present invention also provides an embodiment corresponding to a non-volatile storage medium. The non-volatile storage medium stores a computer program, and when the computer program is executed by a processor, the steps recorded in the above method embodiment are implemented.

[0149] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc. Various media that can store program codes.

[0150] The above is a detailed introduction to a distributed storage system load balancing method, device and medium provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referenced to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified in a number of ways, and these improvements and modifications also fall within the scope of protection of the present invention.

[0151] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A distributed storage system load balancing method, characterized in that: include: Query the nodes in the distributed storage system that are bound to the service network card or disk, and use them as nodes to be allocated; Sort the object storage service processes to be allocated according to a preset order, and sequentially allocate nodes to each of the object storage service processes; When performing node allocation for any of the object storage service processes, the load information of each of the nodes to be allocated at the current moment is obtained, and based on the load information and with load balancing as the target condition, the object storage service process is allocated to the corresponding node to be allocated.

2. The distributed storage system load balancing method according to claim 1, characterized in that: The load information includes: the number of running object storage service processes and the average load of the processor core in the node; Then, according to the load information, with load balancing as the target condition, allocating the object storage service process to the corresponding node to be allocated includes: Performing a weighted calculation on the number of running object storage service processes and the average value of the processor core load in the node to determine a load score corresponding to each of the nodes to be allocated; wherein a higher load score indicates a greater load on the corresponding node to be allocated; The object storage service process is allocated to the to-be-allocated node with the lowest load score.

3. The distributed storage system load balancing method according to claim 2, characterized in that: Obtaining the average value of the core load of the processor in the node includes: Obtaining the idle time value of each processor core in the node to be allocated at the current moment; Determine the load value of each processor core in the node to be allocated according to the difference between the idle time full value and the idle time value at the current moment; The average value of the core load of the processor in the node is determined according to the average value of the core load of each processor in the node to be allocated.

4. The distributed storage system load balancing method according to claim 2, characterized in that: Allocating the object storage service process to the to-be-allocated node with the lowest load score further includes: If there are multiple nodes to be allocated with the same and lowest load scores, determining whether there is a node to be allocated with a bound disk among the multiple nodes to be allocated with the lowest load scores; If so, the object storage service process is preferentially allocated to the to-be-allocated node bound to the disk; If there are multiple nodes to be allocated that are bound to the disk, the object storage service process is preferentially allocated to the node to be allocated that has the smallest occupancy rate of the bound disk.

5. The distributed storage system load balancing method according to claim 2, characterized in that: After determining the load score corresponding to each of the nodes to be allocated, the method further includes: If the load score corresponding to any of the nodes to be allocated exceeds a preset first threshold, the node to be allocated is added to the set of nodes with abnormal load; After the node to be allocated is added to the set of nodes with abnormal load, the method further includes: Determine whether the load score corresponding to the node to be assigned drops below the first threshold within a preset first time period; If yes, determining whether the load score corresponding to the node to be allocated exceeds the first threshold again within a preset second time period; If not, removing the node to be assigned from the set of nodes with abnormal load; After completing the node allocation of all the object storage service processes, the method further includes: Export load exception logs; The load anomaly log includes: the load anomaly node set, and the load score corresponding to each of the to-be-allocated nodes in the load anomaly node set.

6. The distributed storage system load balancing method according to claim 5, characterized in that: After determining the load score corresponding to each of the nodes to be allocated, the method further includes: If the load score corresponding to any of the nodes to be allocated exceeds a preset second threshold, the node to be allocated is determined to be a faulty node, an alarm is issued, and the faulty node and the load score of the faulty node are derived; The second threshold is greater than the first threshold.

7. The distributed storage system load balancing method according to any one of claims 1 to 6, characterized in that: The method further comprises: When the object storage service process is created, setting a priority for the object storage service process; Then, the step of sorting the object storage service processes to be allocated according to a preset order includes: According to the priority of each object storage service process, sort the object storage service processes in descending order; When there are multiple object storage service processes with the same priority, the object storage service processes with the same priority are sorted in order from earliest to latest according to the creation time of the object storage service process.

8. A distributed storage system load balancing device, characterized in that: include: The resource acquisition module is used to query the nodes in the distributed storage system that are bound to the service network card or disk and use them as nodes to be allocated; A process sorting module is used to sort the object storage service processes to be allocated according to a preset order, and sequentially allocate nodes to each of the object storage service processes; The node allocation module is used to obtain the load information of each of the nodes to be allocated at the current moment when performing node allocation for any of the object storage service processes, and allocate the object storage service process to the corresponding node to be allocated based on the load information and with load balancing as the target condition.

9. A distributed storage system load balancing device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the distributed storage system load balancing method as described in any one of claims 1 to 7 when executing the computer program.

10. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the distributed storage system load balancing method according to any one of claims 1 to 7 are implemented.