Node Allocation Method, Storage Medium, Electronic Device and Program Product
By dividing the storage volume into subvolumes and allocating the strategy according to the resource configuration status, the problem of low resource utilization caused by the association of the storage node and the fixed storage volume is solved, and the parallel processing of the storage volume by multiple storage nodes is realized, thereby improving the resource utilization.
Patent Information
- Application Number
- CN202510160205.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-02-13
AI Technical Summary
In the prior art, the storage node is associated with a fixed storage volume, and the physical resources of multiple storage nodes cannot be fully utilized, resulting in low resource utilization.
By dividing the storage volume into storage subvolumes, and detecting the resource configuration status of the storage node in real time, determining the allocation strategy based on the resource configuration ratio and the target division capacity, thereby allocating the target subvolume corresponding to the target node.
The parallel processing of different target subvolumes in the same storage volume by different target nodes is realized, avoiding the association of storage volumes with fixed storage nodes, and improving the resource utilization rate of target nodes.
Smart Images

Figure CN119621352B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technologies, and in particular, to a node allocation method, a storage medium, an electronic device, and a program product. Background Art
[0002] In a distributed storage system, by allocating loads among multiple storage nodes (such as nodes in a server, a storage device, or a storage cluster), the purpose of optimizing resource usage and avoiding overload is achieved.
[0003] Currently, related technologies usually associate a storage node with a fixed storage volume, and the same storage volume needs to be bound to one storage node, which cannot fully utilize the physical resources of multiple storage nodes. Summary of the Invention
[0004] The present disclosure provides a node allocation method, a storage medium, an electronic device, and a program product. Its main purpose is to solve the problem that related technologies usually associate a storage node with a fixed storage volume, and the same storage volume needs to be bound to one storage node, which cannot fully utilize the physical resources of multiple storage nodes.
[0005] In a first aspect, the present application provides a node allocation method, including:
[0006] Dividing a storage volume into storage sub-volumes;
[0007] Detecting the resource configuration status of a storage node and obtaining a resource configuration ratio corresponding to the storage node;
[0008] Determining an allocation strategy between the storage node and the storage sub-volumes according to the resource configuration ratio and a target division capacity of the storage sub-volumes;
[0009] According to the allocation strategy, obtaining a target node from the storage nodes and allocating a target sub-volume corresponding to the target node.
[0010] In a second aspect, the present application provides a node allocation device, including:
[0011] A dividing module configured to divide a storage volume into storage sub-volumes;
[0012] An obtaining module configured to detect the resource configuration status of a storage node and obtain a resource configuration ratio corresponding to the storage node;
[0013] A determining module configured to determine an allocation strategy between the storage node and the storage sub-volumes according to the resource configuration ratio and a target division capacity of the storage sub-volumes;
[0014] An acquisition module, configured to acquire a target node from the storage nodes according to the allocation policy, and allocate a target sub - volume corresponding to the target node.
[0015] In a third aspect, the present application provides a computer - readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the node allocation method described in the first aspect.
[0016] In a fourth aspect, the present application provides an electronic device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor. When the processor executes the computer program, it implements the node allocation method described in the first aspect.
[0017] In a fifth aspect, the present application provides a computer program product, on which a computer program is stored. When the computer program is executed by a processor, it implements the node allocation method described in the first aspect.
[0018] The node allocation method, storage medium, electronic device, and program product provided by the present disclosure. The method includes: first, dividing a storage volume into storage sub - volumes; then detecting the resource configuration status of storage nodes, and obtaining the resource configuration ratio corresponding to the storage nodes; then determining an allocation policy between the storage nodes and the storage sub - volumes according to the resource configuration ratio and the target division capacity of the storage sub - volumes; finally, according to the allocation policy, acquiring a target node from the storage nodes, and allocating the target sub - volume corresponding to the target node. Compared with the existing technologies, the present application can divide a storage volume into multiple storage sub - volumes, then detect the resource configuration status of each storage node in real time, determine the allocation policy by analyzing the resource configuration ratio of each storage node and the target division capacity of each storage sub - volume, select a target node from the storage nodes based on the allocation policy, and allocate the target sub - volume corresponding to the target node, realizing parallel processing of different target sub - volumes in the same storage volume by different target nodes. The storage volume does not need to be associated with a fixed storage node, thereby improving the resource utilization rate of the target nodes.
[0019] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0021] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0022] Figure 1 The figure shows a schematic diagram of an example provided by an embodiment of the present application;
[0023] Figure 2 The figure shows a schematic flowchart of a node allocation method provided by an embodiment of the present application;
[0024] Figure 3 The figure shows a schematic flowchart of another node allocation method provided by an embodiment of the present application;
[0025] Figure 4 The figure shows a schematic diagram of another example provided by an embodiment of the present application;
[0026] Figure 5 The figure shows a schematic diagram of yet another example provided by an embodiment of the present application;
[0027] Figure 6 The figure shows a schematic structural diagram of a node allocation device provided by an embodiment of the present application. Detailed implementation manners
[0028] The following will describe the embodiments of the present application in more detail with reference to the accompanying drawings. It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
[0029] Currently, in the related art, the redundant array of independent disks (RAID) layer divides the disks into strips, forms full stripes, and constitutes a RAID to be added to the pool (corresponding to the storage disks (Mdisks) in the pool); the Pool divides the Mdisk space into chunks according to extents and assembles them into Cdisk (volumes) in a striped manner; LUN (Logical Unit Number) refers to the logical unit divided by the hardware layer in the storage system, usually created by a RAID card or other storage devices, and is used to share storage resources among multiple hosts. A LUN can be regarded as an independent logical device, and each LUN has a unique identifier (LUN ID), such as Figure 1As shown, where Extent belongs to the specified node, which causes the volume to select one or more extents from the storage pool to form the volume structure, and thus the volume must also select a node. When the system processes host input / output (I / O) requests, parallel processing of multiple nodes cannot be achieved at a finer granularity level.
[0030] To address the technical problem that in the current related technologies, storage nodes are usually associated with fixed storage volumes, and the same storage volume needs to be bound to a storage node, unable to fully utilize the physical resources of multiple storage nodes. This embodiment provides a node allocation method, as Figure 2 shown, the method includes:
[0031] Step 101: Divide the storage volume into storage sub-volumes.
[0032] In a specific application scenario, the storage volume can be divided into multiple storage sub-volumes in ways such as a fixed ratio, a user-specified ratio, or a randomly set ratio, so as to obtain a finer granularity of the volume, facilitating different storage nodes to process the storage sub-volumes, achieving parallel processing of multiple storage nodes, avoiding the architectural design constraint that the storage volume must be bound to the same storage node, and thus helping to improve the load balance of the storage nodes and improve the performance of each storage node.
[0033] Step 102: Detect the resource configuration status of the storage nodes and obtain the resource configuration ratio corresponding to the storage nodes.
[0034] In some examples, the resource configuration of the storage nodes may include hardware resource configuration, such as CPU, memory, capacity, etc. The resource configuration status of each storage node can be detected in real time, such as detecting the CPU usage rate, memory usage rate, disk space utilization rate, network bandwidth usage of each storage node, and determining the resource configuration ratio corresponding to each storage node according to the real-time detected resource configuration status.
[0035] Exemplarily, the resource configuration ratio corresponding to the current storage node can be determined by comparing the resource configuration status of the current storage node with that of other storage nodes, which is used to represent the data processing capabilities of each storage node.
[0036] Step 103: Determine the allocation strategy of the storage nodes and the storage sub-volumes according to the resource configuration ratio and the target division capacity of the storage sub-volumes.
[0037] Exemplarily, the allocation strategy can be used to match the data processing volume of the storage nodes with the resource configuration capabilities of the storage nodes to achieve the best performance of the system and improve the resource utilization rate of each node.
[0038] In some examples, the data volume that a storage node can carry can be determined according to the resource configuration ratio corresponding to the storage node. By comparing the data volume that the storage node can carry with the target partition capacity of each storage sub - volume, corresponding allocation strategies can be formulated. For example, the storage nodes can be sorted according to the level of the resource configuration ratio, and the sub - volumes corresponding to the storage nodes can be allocated in sequence; or according to the resource configuration ratio, the allocation ratio, allocation quantity, etc. of the sub - volumes corresponding to each storage node can be determined, so as to allocate the corresponding sub - volume processing tasks according to the data processing capabilities of each storage node. Correspondingly, when a new task needs to be allocated, the storage node with a higher resource configuration ratio (i.e., relatively idle or with strong capabilities) can be preferentially selected to make full use of the physical resources of each storage node.
[0039] Step 104: Obtain the target node from the storage nodes according to the allocation strategy, and allocate the target sub - volume corresponding to the target node.
[0040] Among them, the target node may include at least one storage node; the target sub - volume may include at least one storage sub - volume.
[0041] In some examples, according to the allocation strategy, the target nodes that need to process tasks can be selected from the storage nodes, and the corresponding target sub - volumes can be allocated according to the resource configuration capabilities of each node, so as to disperse the sub - volumes to different nodes for processing, realize the parallel processing of the same storage volume by multiple nodes, and improve the resource utilization rate of each node under the condition of meeting the load balance.
[0042] In some examples, after allocating the target sub - volume corresponding to the target node, the resource configuration status of the target node can be continuously monitored, the resource configuration ratio of the target node can be recalculated, and the recalculated resource configuration ratio can be compared with the configuration information of the storage sub - volume, so as to evaluate whether the current configuration is reasonable, whether there are bottlenecks or waste phenomena, and re - determine the target sub - volume corresponding to the target node according to the comparison result, so as to dynamically adjust the allocation relationship between the storage node and the storage sub - volume according to the actual processing situation, balance the workloads of each storage node, avoid the situation that some nodes are overloaded while other nodes are idle, and further improve the performance of the entire system.
[0043] Compared with the prior art, in this embodiment, the storage volume can be divided into multiple storage sub - volumes, then the resource configuration status of each storage node can be detected in real time, the allocation strategy can be determined by analyzing the resource configuration ratio of each storage node and the target partition capacity of each storage sub - volume, the target node can be selected from the storage nodes based on the allocation strategy, and the target sub - volume corresponding to the target node can be allocated, realizing the parallel processing of different target sub - volumes in the same storage volume by different target nodes. The storage volume does not need to be associated with a fixed storage node, thereby improving the resource utilization rate of the target node.
[0044] To further illustrate the specific implementation process of the method in this embodiment, this embodiment provides a specific method as shown in Figure 3 which includes:
[0045] Step 201: Determine the target partition capacity corresponding to the partition mode of the storage volume.
[0046] As a possible implementation manner, the execution subject of the method in this embodiment may be a Smart Sub Volume Manage (SSVM) module, which is located on a board and mainly applies programmable logic devices such as ARM. It can dynamically manage detection modules, front-end modules, main control modules, back-end modules, and disk array modules (hard disk management). Specifically, the front-end module can be used for I / O queue management, real-time processing of I / O read and write requests, and distributing multiple sub-volume I / Os of a volume to corresponding nodes for processing according to the sub-volume node association relationship; the detection module can be used to obtain data of relevant detection objects, such as resource configuration statuses such as CPU utilization rate, memory utilization rate, CPU model, and memory model, and transmit them to the main control module. The main control module can be used for sub-volume management, and then the numerical control module processes the current environment configuration data and selects the corresponding volume to be allocated to the processing node; the back-end module can be used to execute the policies of the main control module and implement node configuration operations and read / write processing operations of the volume. In addition, the SSVM can also synchronize the current intelligent sub-volume management policy in real time through the detection module, front-end module, main control module, back-end module, and disk array module.
[0047] Exemplarily, as shown in Figure 4 if it is determined that the target nodes are Node 1, Node 2, Node 3, and Node 4 according to the matching degree between the data processing volume corresponding to the storage node and the target partition capacity of the storage sub-volume, then sub-volumes 1, 2, 3, and 4 can be allocated to Node 1 for processing, sub-volumes 5, 6, and 7 can be allocated to Node 2 for processing, sub-volumes 8 and 9 can be allocated to Node 3 for processing, and sub-volume 10 can be allocated to Node 4 for processing.
[0048] In some embodiments, step 201 may specifically include: determining the preset partition capacity corresponding to the partition mode as the target partition capacity.
[0049] Among them, the partition mode may include but is not limited to a normal mode, a custom mode, etc.
[0050] Exemplarily, when it is detected that the partition mode is the normal mode, the preset partition capacity set by the user during the creation of the storage pool can be received. For example, the size of each sub-volume is 32M, and then the capacity is partitioned according to the preset partition capacity set by the user to meet the user's partition requirements.
[0051] In some embodiments, step 201 may specifically further include: determining a partitioning gear according to a partitioning mode; and determining a target partitioning capacity as the partitioning capacity corresponding to the partitioning gear.
[0052] In a specific application scenario, the types of storage product customers are different, and the focus of requirements for services is also different. For example, financial customers pay more attention to the stability of products, and thus require that the services processed by each node be kept within a safe range; some small enterprise users pay more attention to the processing speed of products under a certain safety probability. For different customer types, different calculation coefficients K of the theoretical usage rates of CPU, memory, etc. can be used for adjustment. Correspondingly, the services stored in different customer usage scenarios are not the same. Some are mainly small-block reads and writes, some are mainly large-block reads and writes, some are mainly read services, and some are mainly write services. In different service scenarios, different sub-volume sizes can be selected in a custom manner. When creating a pool, different sub-volumes can be created according to the selection. When the sub-volume size matches the service, the system processing performance is the best, and the performance impact caused by the difference between the storage volume segmentation and the host I / O itself service segmentation can be reduced.
[0053] Exemplarily, when it is detected that the partitioning mode is the custom mode, the user can select different partitioning gears. Different gears correspond to different sub-volume sizes and different calculation coefficients of the theoretical usage rates of resources such as CPU and memory. The user can select different sub-volume sizes corresponding to different gears according to actual service requirements. When selecting a high gear, it means that the user hopes that the storage node can bear the processing capacity of more volumes, and the calculation coefficient K of the theoretical usage rates of CPU and memory increases; when selecting a high gear, it means that the user hopes that the storage node can bear the processing capacity of more volumes, and the calculation coefficient K of the theoretical usage rates of CPU and memory decreases. In this way, the volume is divided into multiple sub-volumes according to the user selection, and the size of each sub-volume is M1, which is suitable for different user requirements and improves the user experience.
[0054] In some embodiments, after receiving the target partitioning capacity, the storage volume is divided into multiple storage sub-volumes according to the target partitioning capacity, corresponding to different storage nodes. After the division is completed, each sub-volume can be marked, and configuration information of each sub-volume can be generated. As Figure 5 shown, the storage volume can be divided into multiple sub-volumes, such as sub-volume 1, sub-volume 2, sub-volume 3, sub-volume 4, sub-volume 5, etc. Each sub-volume corresponds to storage configuration information. For example, the configuration information of sub-volume 1 may include volume identity (Identity Document, ID), sub-volume ID, volume type, node identity, logical block address (Logical Block Address, LBA), host identity, etc., so as to facilitate the search for relevant information and association with the storage node.
[0055] Optionally, a table of the associations between volumes, sub-volumes, and storage nodes may also be created and maintained, and the host I / O read and write data is sent down through this relationship table.
[0056] In this way, multiple partitioning modes are provided for users, enabling users to divide a storage volume into multiple sub-volumes of specified sizes according to usage requirements, avoiding the architectural design constraint that a storage volume must be bound to a storage node, and thus multiple nodes can be allocated at a finer volume granularity, which helps with load balancing processing.
[0057] Step 203: Detect the resource configuration status of the storage node and obtain the resource configuration ratio corresponding to the storage node.
[0058] In some embodiments, step 203 may specifically include: detecting the hardware configuration resources of the storage node, obtaining the hardware resource score corresponding to the storage node; and determining the resource configuration ratio corresponding to the storage node based on the ratio of the hardware resource scores corresponding to the storage node.
[0059] In some embodiments, the configuration resources such as the CPU utilization rate, memory utilization rate, CPU model, and memory model of each storage node may be detected, the configuration resources of different models may be scored, the hardware resource score corresponding to the storage node may be obtained, and then the ratio of the hardware resource scores (hardware processing capacity scores) of each storage node may be used as the resource configuration ratio (processing capacity ratio) to represent the processing capacity of each node. Exemplarily, initially, a 10-point system may be adopted, the resource configuration ratio of each node is rounded, the sum of the ratios of each node is 10. If the processing capacity ratios of node 1, node 2, node 3, and node 4 are 4, 3, 2, and 1 respectively, it means that node 1 has the best processing capacity and is 4 times the processing capacity of node 4.
[0060] Step 204: Determine the data processing volume corresponding to the storage node according to the resource configuration ratio.
[0061] In some embodiments, the data processing volume corresponding to each storage node may be evaluated according to the monitored resource configuration ratio. For the storage node with a higher resource configuration ratio, the corresponding data processing volume is increased, that is, the number of sub-volumes corresponding to the processing is increased. For the storage node with a lower resource configuration ratio, the corresponding data processing volume is reduced.
[0062] By detecting the hardware configuration of each storage node, comparing the hardware processing capacity scores of the nodes, and allocating sub-volumes corresponding to the storage nodes, the processing capacity and data processing volume of the nodes are balanced, thereby improving the overall processing capacity and performance of the system and enhancing the system reliability.
[0063] Step 205: Determine the allocation strategy for the storage node and the storage sub - volume according to the matching degree between the data processing volume corresponding to the storage node and the target partition capacity of the storage sub - volume.
[0064] The business volume of each sub - volume can be obtained according to the target partition capacity of each storage sub - volume. Then, according to the matching degree between the data processing volume corresponding to the resource configuration ratio of each storage node and the business volume of each sub - volume, the matching degree between the storage node and the storage sub - volume can be obtained. According to the matching degree between the storage node and the storage sub - volume, the allocation strategy is continuously adjusted until the system is stable and load balancing is achieved.
[0065] Step 206: Obtain the target node from the storage nodes according to the allocation strategy, and allocate the target sub - volume corresponding to the target node.
[0066] In some embodiments, step 206 may specifically include: determining the target node and the number of storage sub - volumes corresponding to the target node according to the matching degree between the data processing volume corresponding to the storage node and the target partition capacity of the storage sub - volume; determining the target sub - volume corresponding to the target node according to the number of storage sub - volumes; monitoring the resource utilization rate when the target node processes the data request of the target sub - volume; and allocating the target sub - volume corresponding to the target node according to the resource utilization rate of the target node and the preset resource utilization rate of the target node.
[0067] Exemplarily, according to the matching degree between the data processing volume corresponding to the storage node and the target partition capacity of the storage sub - volume, the target nodes can be determined as node 1, node 2, node 3, and node 4. If the processing capacity ratios of node 1, node 2, node 3, and node 4 are 4, 3, 2, and 1 respectively, then the business volume of each sub - volume can be determined by combining the target partition capacity of each storage sub - volume. Sub - volumes 1, 2, 3, 4, 11, 12, 13, 14, etc. can be allocated to node 1 for processing, sub - volumes 5, 6, 7, 15, 16, 17, etc. are processed at node 2, sub - volumes 8, 9, 18, 19 are processed at node 3, and sub - volumes 10, 20, etc. are processed at node 4. By splitting the volume into multiple sub - volumes and then dispersing the sub - volumes to each node for processing according to the node processing capacity ratio, one volume can be processed in parallel by multiple nodes, and the processing volume matches the level of the node hardware configuration, thus achieving load balancing.
[0068] In some embodiments, monitoring the resource utilization rate when the target node processes the data request of the target sub - volume may specifically include: monitoring the resource utilization rate of the target node according to a preset detection period.
[0069] In some embodiments, according to the resource utilization rate of the target node and the preset resource utilization rate of the target node, the target sub - volume corresponding to the target node is allocated. Specifically, it may include: obtaining the comparison result between the resource utilization rate of the target node and the preset resource utilization rate within a preset detection period; determining the target sub - volume corresponding to the target node according to the comparison result.
[0070] In some embodiments, according to the preset detection period, the resource utilization rate of the target node can be continuously detected. For example, within 3 detection periods T1, the CPU and memory utilization rates A1, A2 of the target node, and the number B1 of target sub - volumes processed by the target node are detected. Then, according to the preset configuration relation table, the preset resource utilization rate of the target node when processing these numbers of target sub - volumes is obtained.
[0071] Optionally, the preset resource utilization rate can be obtained based on preset calculation coefficients (such as preset CPU coefficient, preset memory coefficient, etc.) and theoretical resource utilization rates (such as CPU utilization rate, memory utilization rate, etc.).
[0072] Exemplarily, preset calculation coefficients (such as preset CPU coefficient, preset memory coefficient, etc.) and theoretical CPU and memory utilization rates C1, C2 can be used to obtain the preset resource utilization rate. By adjusting the preset calculation coefficients, the preset resource utilization rate can be adjusted to determine the target sub - volume corresponding to the target node according to the actual operating conditions of the target node and the actual needs of the user.
[0073] Exemplarily, when the partitioning mode is the custom mode, different partitioning gears can be adjusted based on the preset calculation coefficients to meet various user needs.
[0074] Exemplarily, a theoretical matrix table for scoring the node hardware configuration capabilities can be established according to different CPU models, memory models and capacities and stored in the SSVM register. The theoretical configuration capability scores corresponding to the CPU models are shown in Table 1, and the theoretical configuration capability scores corresponding to the memory models are shown in Table 2.
[0075] Table 1
[0076]
[0077] Table 2
[0078]
[0079] Optionally, according to the comparison result, determining the target sub - volume corresponding to the target node may specifically include: if the resource utilization rate of the target node within the preset detection period is greater than the preset resource utilization rate, generating a first alarm corresponding to the target node; and re - determining the target sub - volume corresponding to the target node according to the first alarm.
[0080] Exemplarily, the preset detection period may include three periods T1. If the comparison result shows that within the three periods T1, it is detected that A1 and A2 of node 1 are continuously greater than C1*K1 and C2*K2 respectively, where K1 is the preset CPU coefficient and K2 is the preset memory coefficient, it means that the actual CPU and memory utilization rates of the target node are greater than the theoretical CPU and memory resource utilization rates inversely deduced according to the number of volumes. This represents that within the current continuous three periods T1, the volume of business of the target sub-volumes processed by node 1 is relatively large, and node 1 cannot bear the theoretical volume of business of the target sub-volumes. Then, a first alarm, such as a first-level alarm, can be generated and reported, and the processing capacity value of the target node can be reduced. For example, the resource configuration ratio of node 1 can be decreased by 1.
[0081] Optionally, according to the first alarm, the target sub-volumes corresponding to the target node are re-determined, which may specifically include: according to the first alarm, reducing the resource configuration ratio corresponding to the target node; according to the reduced resource configuration ratio of the target node and the resource configuration ratios of other storage nodes, re-determining the target sub-volumes corresponding to the target node.
[0082] In some embodiments, after reducing the resource configuration ratio of the target node, the resource configuration ratios can be re-sorted according to the reduced ratio and the resource configuration ratios of other storage nodes, and the node allocation ratios corresponding to each target node are re-determined. For example, the number of target sub-volumes corresponding to the target node is reduced, and the corresponding target sub-volumes are re-allocated to achieve load balancing.
[0083] Optionally, according to the comparison result, determining the target sub-volumes corresponding to the target node may specifically further include: if the resource utilization rate of the target node within the preset detection period is less than the preset resource utilization rate, generating a second alarm corresponding to the target node; according to the second alarm, increasing the resource configuration ratio corresponding to the target node.
[0084] Exemplarily, if the comparison result shows that within the three periods T1, it is detected that A1 and A2 of node 1 are continuously less than C1*K1 and C2*K2 respectively, where K1 is the preset CPU coefficient and K2 is the preset memory coefficient, it means that the actual CPU and memory utilization rates of the target node are less than the theoretical CPU and memory resource utilization rates inversely deduced according to the number of volumes. This represents that within the current continuous three periods T1, the volume of business of the target sub-volumes processed by node 1 is relatively small, and node 1 can bear the theoretical volume of business of the target sub-volumes. Then, a second alarm, such as a second-level alarm, can be generated and reported, and the processing capacity value of the target node can be increased. For example, the resource configuration ratio of node 1 can be increased by 1.
[0085] In this way, the resource utilization rate of the target node is continuously detected and compared with the preset resource utilization rate, so as to further adjust the allocation ratio of sub-volumes on each node according to the actual processing situation of the node, further realize load balancing adjustment, improve the overall processing capacity and performance of the system, and enhance the system reliability.
[0086] Optionally, after increasing the resource configuration ratio corresponding to the target node according to the second warning, the method of this embodiment may further include: increasing the number of target sub-volumes corresponding to the target node according to the increased resource configuration ratio of the target node and the resource configuration ratios of other storage nodes.
[0087] In some embodiments, after increasing the resource configuration ratio of the target node, the increased resource configuration ratio may be re-sorted with the resource configuration ratios of other storage nodes, the allocation ratio of the sub-volumes corresponding to the target node may be increased, the number of target sub-volumes may be increased, and the corresponding target sub-volumes may be re-allocated to achieve load balancing.
[0088] In this way, the resource configuration ratios of each target node are detected and adjusted, and the target sub-volumes are re-allocated to the target node according to the resource configuration ratios, so as to realize re-allocation according to the actual processing situation of the target node, so as to improve the matching degree between the sub-volume service volume carried by each target node and the hardware performance of the target node, and further improve the overall performance of the system and the user experience.
[0089] Compared with the current existing technologies, this embodiment can determine the target division capacity of the sub-volumes according to different division modes of the storage volume to meet different user requirements, and can also continuously monitor the resource configuration status of the target node, obtain the resource utilization rate when the target node processes the data requests of the target sub-volumes, compare it with the preset resource utilization rate of the target node, generate a warning according to the comparison result, and adjust the resource configuration ratio corresponding to the target node, and then re-allocate the target sub-volumes corresponding to each target node to further achieve load balancing of each target node and fully improve the resource utilization rate of each target node.
[0090] Further, as Figure 2 and Figure 3 a specific implementation of the method shown, this embodiment provides a node allocation device, as Figure 6 shown, the device includes: a division module 31, an acquisition module 32, and a determination module 33.
[0091] The division module 31 is configured to divide the storage volume into storage sub-volumes;
[0092] The acquisition module 32 is configured to detect the resource configuration status of the storage node and obtain the resource configuration ratio corresponding to the storage node;
[0093] A determination module 33, configured to determine an allocation policy between a storage node and a storage sub - volume according to a resource configuration ratio and a target partition capacity of the storage sub - volume;
[0094] An acquisition module 32, configured to obtain a target node from storage nodes according to the allocation policy, and allocate a target sub - volume corresponding to the target node.
[0095] In some examples of this embodiment, the determination module 33 is specifically configured to determine the data processing volume corresponding to a storage node according to the resource configuration ratio; and determine the allocation policy between the storage node and the storage sub - volume based on the matching degree between the data processing volume corresponding to the storage node and the target partition capacity of the storage sub - volume.
[0096] In some examples of this embodiment, the determination module 33 is specifically configured to determine a target node and the number of storage sub - volumes corresponding to the target node based on the matching degree between the data processing volume corresponding to the storage node and the target partition capacity of the storage sub - volume; determine the target sub - volume corresponding to the target node according to the number of storage sub - volumes; monitor the resource utilization rate when the target node processes data requests of the target sub - volume; and allocate the target sub - volume corresponding to the target node according to the resource utilization rate of the target node and the preset resource utilization rate of the target node.
[0097] In some examples of this embodiment, the determination module 33 is specifically configured to monitor the resource utilization rate of the target node according to a preset detection period; and allocate the target sub - volume corresponding to the target node according to the resource utilization rate of the target node and the preset resource utilization rate of the target node, including: obtaining a comparison result between the resource utilization rate of the target node and the preset resource utilization rate within the preset detection period; and determining the target sub - volume corresponding to the target node according to the comparison result.
[0098] In some examples of this embodiment, the determination module 33 is specifically configured to generate a first alarm corresponding to the target node if the resource utilization rate of the target node within the preset detection period is greater than the preset resource utilization rate; and re - determine the target sub - volume corresponding to the target node based on the first alarm.
[0099] In some examples of this embodiment, the determination module 33 is specifically configured to reduce the resource configuration ratio corresponding to the target node based on the first alarm; and re - determine the target sub - volume corresponding to the target node according to the reduced resource configuration ratio of the target node and the resource configuration ratios of other storage nodes.
[0100] In some examples of this embodiment, the determination module 33 is specifically configured to generate a second alarm corresponding to the target node if the resource utilization rate of the target node within the preset detection period is less than the preset resource utilization rate; and increase the resource configuration ratio corresponding to the target node based on the second alarm.
[0101] In some examples of this embodiment, the determining module 33 is further specifically configured to increase the number of target sub-volumes corresponding to the target node according to the resource configuration ratio after the increase of the target node and the resource configuration ratios of other storage nodes.
[0102] In some examples of this embodiment, the obtaining module 32 is specifically configured to detect the hardware configuration resources of the storage node, obtain the hardware resource score corresponding to the storage node; and determine the resource configuration ratio corresponding to the storage node based on the ratio of the hardware resource scores corresponding to the storage node.
[0103] In some examples of this embodiment, the obtaining module 32 is specifically configured to determine the target partition capacity corresponding to the partitioning mode of the storage volume; and partition the storage volume into storage sub-volumes according to the target partition capacity.
[0104] In some examples of this embodiment, the partitioning mode includes a first mode, and the partitioning module 31 is specifically configured to determine the preset partition capacity corresponding to the first mode as the target partition capacity.
[0105] In some examples of this embodiment, the partitioning mode includes a second mode, and the partitioning module 31 is specifically configured to use the partition capacity determined by the user as the target partition capacity.
[0106] It should be noted that for other corresponding descriptions of each functional unit involved in the voice synthesis device provided in this embodiment, reference can be made to the corresponding descriptions in Figure 2 and Figure 3 , and details are not described herein again.
[0107] Based on the methods as shown in Figure 2 and Figure 3 above, correspondingly, this embodiment further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the methods as shown in Figure 2 and Figure 3 above are implemented.
[0108] Based on the methods as shown in Figure 2 and Figure 3 above, correspondingly, this embodiment further provides a computer program product, on which a computer program is stored, and when the computer program is executed by a processor, the methods as shown in Figure 2 and Figure 3 above are implemented.
[0109] Based on such understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash drive, a portable hard drive, etc.), including several instructions for causing a computer device (such as a personal computer, a server, or a network device, etc.) to execute the methods of various implementation scenarios of the present application.
[0110] Based on the above methods as Figure 2 and Figure 3 shown, and Figure 6 the virtual device embodiments shown, in order to achieve the above object, the embodiments of the present application further provide an electronic device, such as a personal computer or a server, and the device includes a storage medium and a processor; the storage medium is used for storing a computer program; the processor is used for executing the computer program to implement the methods as Figure 2 and Figure 3 shown.
[0111] In some embodiments, the above-mentioned physical device may further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, sensors, an audio circuit, a WI-FI module, etc. The user interface may include a display screen (Display), an input unit such as a keyboard (Keyboard), etc., and the optional user interface may further include a USB interface, a card reader interface, etc. The network interface may include a standard wired interface, a wireless interface (such as a WI-FI interface), etc. in some embodiments.
[0112] Those skilled in the art can understand that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation to the physical device, and it may include more or fewer components, or combine certain components, or have different component arrangements.
[0113] The storage medium may further include an operating system and a network communication module. The operating system is a program for managing the hardware and software resources of the above-mentioned physical device, supporting the information processing program and the operation of other software and / or programs. The network communication module is used for realizing the communication between the components inside the storage medium, and the communication between the storage medium and other hardware and software in the information processing physical device.
[0114] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or can also be implemented by hardware. By applying the solution of this embodiment, compared with the current existing technologies, this embodiment can determine the target division capacity of the sub-volumes according to different division modes of the storage volume to meet the needs of different users, and can also continuously monitor the resource configuration status of the target node, obtain the resource utilization rate when the target node processes the data requests of the target sub-volumes, and compare it with the preset resource utilization rate of the target node. Generate an alarm according to the comparison result, adjust the resource configuration ratio corresponding to the target node, and then re-allocate the target sub-volumes corresponding to each target node to further achieve the load balancing of each target node and fully improve the resource utilization rate of each target node.
[0115] It should be noted that in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.
[0116] The above are only specific embodiments of the present application, enabling those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments described herein, but will conform to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A node allocation method, characterized in that: include: Divide the storage volume into storage subvolumes; Detecting the resource configuration status of the storage node and obtaining the resource configuration ratio corresponding to the storage node; Determining an allocation strategy of the storage nodes and the storage subvolumes according to the resource configuration ratio and the target partition capacity of the storage subvolumes; According to the allocation strategy, a target node is obtained from the storage node, and a target subvolume corresponding to the target node is allocated, including: Determining the target node and the number of storage subvolumes corresponding to the target node according to the matching degree between the data processing volume corresponding to the storage node and the target partition capacity of the storage subvolume; Determining the target subvolume corresponding to the target node according to the number of the storage subvolumes; Monitoring resource utilization of the target node when processing a data request for the target subvolume; According to the resource utilization of the target node and the preset resource utilization of the target node, a target subvolume corresponding to the target node is allocated.
2. The method according to claim 1, characterized in that: The determining, according to the resource configuration ratio and the target partition capacity of the storage subvolume, an allocation strategy of the storage node and the storage subvolume comprises: Determining the data processing capacity corresponding to the storage node according to the resource configuration ratio; An allocation strategy for the storage node and the storage subvolume is determined according to a matching degree between a data processing volume corresponding to the storage node and a target partition capacity of the storage subvolume.
3. The method according to claim 1, characterized in that The monitoring of resource utilization when the target node processes the data request of the target subvolume includes: Monitoring the resource utilization of the target node according to a preset detection cycle; The allocating a target subvolume corresponding to the target node according to the resource utilization of the target node and the preset resource utilization of the target node includes: Obtaining a comparison result between the resource utilization rate of the target node within the preset detection period and the preset resource utilization rate; According to the comparison result, a target subvolume corresponding to the target node is determined.
4. The method according to claim 3, characterized in that Determining the target subvolume corresponding to the target node according to the comparison result includes: If the resource utilization rate of the target node within the preset detection period is greater than the preset resource utilization rate, generating a first alarm corresponding to the target node; According to the first alarm, a target subvolume corresponding to the target node is re-determined.
5. The method according to claim 4, characterized in that The re-determining the target subvolume corresponding to the target node according to the first alarm includes: According to the first alarm, reducing the resource configuration ratio corresponding to the target node; The target subvolume corresponding to the target node is re-determined according to the reduced resource configuration ratio of the target node and the resource configuration ratios of other storage nodes.
6. The method according to claim 3, characterized in that The step of determining the target subvolume corresponding to the target node according to the comparison result further includes: If the resource utilization rate of the target node within the preset detection period is less than the preset resource utilization rate, generating a second alarm corresponding to the target node; According to the second alarm, the resource configuration ratio corresponding to the target node is increased.
7. The method according to claim 6, characterized in that After increasing the resource configuration ratio corresponding to the target node according to the second alarm, the method further includes: According to the resource configuration ratio of the target node after the increase and the resource configuration ratios of other storage nodes, the number of target subvolumes corresponding to the target node is increased.
8. The method according to claim 1, characterized in that The detecting the resource configuration state of the storage node and obtaining the resource configuration ratio corresponding to the storage node includes: Detecting the hardware configuration resources of the storage node and obtaining the hardware resource score corresponding to the storage node; Based on the ratio of the hardware resource scores corresponding to the storage nodes, a resource configuration ratio corresponding to the storage nodes is determined.
9. The method according to claim 1, characterized in that: The step of dividing the storage volume into storage sub-volumes includes: Determining a target partition capacity corresponding to the partition mode of the storage volume; The capacity is divided according to the target, and the storage volume is divided into storage sub-volumes.
10. The method according to claim 9, characterized in that The determining of the target partition capacity corresponding to the partition mode of the storage volume includes: The preset partition capacity corresponding to the partition mode is determined as the target partition capacity.
11. The method according to claim 10, characterized in that The determining of the target partition capacity corresponding to the partition mode of the storage volume further includes: According to the division mode, determining the division gear position; The division capacity corresponding to the division gear is determined as the target division capacity.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
13. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 11 is implemented.
14. A computer program product having a computer program stored thereon, characterized in that: When the computer program product is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Distributed storage method and device, electronic equipment and storage medium
CN119065844A