Distributed storage method and device, electronic equipment and storage medium
By obtaining the configuration information of each node of the distributed storage system, filtering the nodes with the strongest load capacity for data storage, it solves the performance reduction and resource waste caused by volume mapping in heterogeneous clusters, and improves the overall performance of the distributed block storage system .
Patent Information
- Application Number
- CN202411157015.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-03
AI Technical Summary
In heterogeneous clusters, the hardware configuration of distributed block storage nodes is different, resulting in traffic blocking and untimely responses when creating volume maps based on node polling and allocation, which reduces the overall performance of distributed block storage systems. And cause waste of storage resources.
Before creating a mapped volume of data to be stored, obtain the current configuration information of each node in the distributed storage system, determine the comprehensive configuration indicators of each node, filter the target node based on the node load capacity, and create the mapped volume based on the storage service information of the target node. , store the data to the target node.
By reasonably scheduling system resources, avoiding business blockage and untimely response, avoiding waste of storage resources, and improving the overall performance of distributed block storage systems.
Smart Images

Figure CN119065844A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a distributed storage method, device, electronic device and storage medium. Background Art
[0002] At present, distributed block storage systems have been widely used in fields such as data storage, virtualization and cloud computing. In order to achieve load balancing among cluster nodes in distributed block storage systems, how to allocate services for distributed block storage systems has become a key research topic.
[0003] In the related art, a node polling allocation method is usually adopted to create a volume mapping so as to evenly distribute the data to be stored to several nodes.
[0004] However, in a heterogeneous cluster, the hardware configurations of distributed block storage nodes are different. If volume mapping is created based on the above method, business blocking and untimely response may occur, which may also cause waste of storage resources and reduce the overall performance of the distributed block storage system. Summary of the invention
[0005] The present application provides a distributed storage method, device, electronic device and storage medium to solve the defects of related technologies that reduce the overall performance of distributed block storage systems.
[0006] The first aspect of the present application provides a distributed storage method, comprising:
[0007] Before creating a mapping volume for data to be stored, obtain current configuration information of each node in the distributed storage system;
[0008] Determine the comprehensive configuration index of each node based on the current configuration information of each node;
[0009] Selecting target nodes in the distributed storage system according to the node load capacity represented by the comprehensive configuration index of each of the nodes;
[0010] Creating a mapping volume for the data to be stored according to the storage service information of the target node;
[0011] According to the mapping volume, the data to be stored is stored in the target node.
[0012] In an optional implementation, determining the comprehensive configuration index of each node according to the current configuration information of each node includes:
[0013] Determine the maximum configuration information of the cluster based on the current configuration information of each node;
[0014] According to the current configuration information of each node and the configuration maximum value information, the comprehensive configuration index of each node is determined.
[0015] In an optional implementation manner, determining the comprehensive configuration index of each node according to the current configuration information of each node and the configuration maximum value information includes:
[0016] For any of the nodes, determining a processor usage evaluation index of the node according to a current processor usage of the node, a maximum processor usage value represented by the configuration maximum value information, and a minimum processor usage value;
[0017] Determine an evaluation index of the number of processor cores of the node according to the current number of processor cores of the node, the maximum number of processor cores represented by the configuration maximum value information, and the minimum number of processor cores;
[0018] Determine a memory usage evaluation index of the node according to the current memory usage of the node, the maximum memory usage value and the minimum memory usage value represented by the configuration value information;
[0019] Determine a memory capacity evaluation index of the node according to the current memory capacity of the node, the maximum memory capacity and the minimum memory capacity represented by the configuration maximum value information;
[0020] Determine a service bandwidth evaluation index of the node according to the current service bandwidth of the node, the maximum service bandwidth value and the minimum service bandwidth value represented by the configuration value information;
[0021] Determine a service load evaluation index of the node according to the current service load of the node, the maximum service load value and the minimum service load value represented by the configuration value information;
[0022] Determine the comprehensive configuration index of each node according to the processor utilization evaluation index, processor core number evaluation index, memory utilization evaluation index, memory capacity evaluation index, service bandwidth evaluation index and service load evaluation index of each node;
[0023] The current configuration information of the node includes at least the current processor usage rate, the current number of processor cores, the current memory usage rate, the current memory capacity, the current service bandwidth and the current service load of the node.
[0024] In an optional implementation, the comprehensive configuration index of each node is determined according to the processor utilization evaluation index, the processor core number evaluation index, the memory utilization evaluation index, the memory capacity evaluation index, the service bandwidth evaluation index and the service load evaluation index of each node, including:
[0025] Based on the following formula, the comprehensive configuration index of each node is determined:
[0026] S t =w1·s1+w2·s2+w3·s3+w4·s4+w5·s5+w6·s6
[0027] s1=(A1-A mix ) / (A max -A mix )
[0028] s2=(B1-B mix ) / (B max -B mix )
[0029] s3=(C1-C mix ) / (C max -C mix )
[0030] s4=(D1-D mix ) / (D max -D mix )
[0031] s5=(E1-E mix ) / (E max -E mix )
[0032] s6=(F1-F mix ) / (F max -F mix )
[0033] Among them, S t represents the comprehensive configuration index of the node, s1 represents the processor utilization evaluation index of the node, s2 represents the processor core number evaluation index of the node, s3 represents the memory utilization evaluation index of the node, s4 represents the memory capacity evaluation index of the node, s5 represents the business bandwidth evaluation index of the node, s6 represents the business load evaluation index of the node, w1, w2, w3, w4, w5 and w6 represent the weight coefficients of the processor utilization evaluation index, processor core number evaluation index, memory utilization evaluation index, memory capacity evaluation index, business bandwidth evaluation index and business load evaluation index respectively, A1 represents the current processor utilization of the node, A mix Indicates the minimum value of processor usage, A max Indicates the maximum processor usage, B1 indicates the current number of processor cores of the node, and B mix Indicates the minimum number of processor cores, B max represents the maximum number of processor cores, C1 represents the current memory usage of the node, and C mix Indicates the minimum memory usage, C maxIndicates the maximum memory usage, D1 indicates the current memory capacity of the node, and D mix Indicates the minimum memory capacity, D max Indicates the maximum memory capacity, E1 indicates the current service bandwidth of the node, and E mix Indicates the minimum service bandwidth, E max Indicates the maximum service bandwidth, F1 indicates the current service load of the node, and F mix Indicates the minimum value of business load, F max Indicates the maximum service load.
[0034] In an optional embodiment, the method further includes:
[0035] Obtaining original configuration information of the distributed storage system;
[0036] Determining a business scenario of the distributed storage system according to original configuration information of the distributed storage system;
[0037] According to the user business needs characterized by the business scenarios of the distributed storage system, the weight coefficients of the processor utilization evaluation index, processor core number evaluation index, memory utilization evaluation index, memory capacity evaluation index, business bandwidth evaluation index and business load evaluation index of the node are determined.
[0038] In an optional implementation, the step of selecting a target node in the distributed storage system according to the node load capacity represented by the comprehensive configuration index of each node includes:
[0039] According to the node load capacity represented by the comprehensive configuration index of each of the nodes, the node with the highest node load capacity is used as the target node.
[0040] In an optional implementation, creating a mapping volume for the data to be stored according to the storage service information of the target node includes:
[0041] Determine the number of mapped volumes connected to each storage service component in the target node according to the storage service information of the target node;
[0042] Selecting a target storage service component on the target node according to the number of mapped volumes connected to each storage service component;
[0043] According to the target storage service component, a mapping volume for the data to be stored is created, so as to connect the created mapping volume to the target storage service component.
[0044] A second aspect of the present application provides a distributed storage device, including:
[0045] The acquisition module is used to obtain the current configuration information of each node in the distributed storage system before creating a mapping volume for data to be stored;
[0046] A determination module, used to determine the comprehensive configuration index of each node according to the current configuration information of each node;
[0047] A screening module, used for screening target nodes in the distributed storage system according to the node load capacity represented by the comprehensive configuration index of each node;
[0048] A creation module, used to create a mapping volume for the data to be stored according to the storage service information of the target node;
[0049] A storage module is used to store the data to be stored in the target node according to the mapping volume.
[0050] A third aspect of the present application provides an electronic device, comprising: at least one processor and a memory;
[0051] The memory stores computer-executable instructions;
[0052] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method described in the first aspect and various possible designs of the first aspect.
[0053] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method described in the first aspect and various possible designs of the first aspect are implemented.
[0054] The technical solution of this application has the following advantages:
[0055] The present application provides a distributed storage method, device, electronic device and storage medium, the method comprising: before creating a mapping volume for data to be stored, obtaining the current configuration information of each node in the distributed storage system; determining the comprehensive configuration index of each node according to the current configuration information of each node; screening the target node in the distributed storage system according to the node load capacity represented by the comprehensive configuration index of each node; creating a mapping volume for data to be stored according to the storage service information of the target node; storing the data to be stored in the target node according to the mapping volume. The method provided by the above scheme selects the node with the strongest current node load capacity as the target node according to the current configuration information of each node, so as to reasonably schedule system resources when creating volume mapping, which can avoid business congestion, untimely response and other phenomena, and also avoid waste of storage resources, thereby improving the overall performance of the distributed block storage system. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technical descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.
[0057] Figure 1 A schematic diagram of the structure of a distributed storage system based on an embodiment of the present application;
[0058] Figure 2 A schematic diagram of a distributed storage method according to an embodiment of the present invention;
[0059] Figure 3 A schematic diagram of an exemplary distributed storage method provided in an embodiment of the present application;
[0060] Figure 4 A schematic diagram of the structure of a distributed storage device provided in an embodiment of the present application;
[0061] Figure 5 A schematic diagram of the structure of an exemplary distributed storage system provided in an embodiment of the present application;
[0062] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0063] The above drawings have shown clear embodiments of the present application, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0065] In addition, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following embodiments, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0066] In related technologies, distributed block storage systems that implement logical volume management based on the iSCSI protocol and Multipath have been widely used in data storage, virtualization, cloud computing, etc. At present, under the premise of giving priority to cabinet-level reliability, distributed storage systems have basically achieved load balancing between cluster nodes and load balancing between targets within a node.
[0067] However, such a situation also exists in the actual use of the storage system. For example, the hardware configuration of the distributed block storage nodes in the heterogeneous cluster is different. Some have a large number of CPU cores and a high basic frequency, while some have a small memory capacity and a low basic frequency. The iSCSI business pressure of each node is also different. At this time, if you still select the target service node according to the existing solution when creating the volume mapping, it is easy for the node with lower configuration to also bear a heavier business load. For the node with lower configuration, it is easy to have business blocking and untimely response. For the node with higher configuration, the performance advantage of the node with higher configuration cannot be brought into play, resulting in a waste of resources.
[0068] In response to the above problems, the embodiments of the present application provide a distributed storage method, device, electronic device and storage medium, the method comprising: before creating a mapping volume for data to be stored, obtaining the current configuration information of each node in the distributed storage system; determining the comprehensive configuration index of each node according to the current configuration information of each node; screening the target node in the distributed storage system according to the node load capacity represented by the comprehensive configuration index of each node; creating a mapping volume for data to be stored according to the storage service information of the target node; storing the data to be stored in the target node according to the mapping volume. The method provided by the above scheme selects the node with the strongest current node load capacity as the target node according to the current configuration information of each node, so as to reasonably schedule system resources when creating volume mapping, which can avoid business congestion, untimely response and other phenomena, and also avoid waste of storage resources, thereby improving the overall performance of the distributed block storage system.
[0069] The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0070] First, the structure of the distributed storage system on which this application is based is described:
[0071] The distributed storage method, device, electronic device and storage medium provided in the embodiments of the present application are suitable for screening target nodes for providing target services in the process of performing block storage based on a distributed storage system. Figure 1The figure is a schematic diagram of the structure of the distributed storage system based on the embodiment of the present application, which mainly includes multiple nodes, a data acquisition device and a distributed storage device. The data acquisition device is used to collect the current configuration information of each node in the distributed storage system before creating a mapping volume for the data to be stored, and send the collected data to the distributed storage device, which selects the target node based on the obtained data, and then creates a corresponding mapping volume to store the data to be stored in the target node.
[0072] The embodiment of the present application provides a distributed storage method for screening target nodes for providing target services in a process of performing block storage based on a distributed storage system. The execution subject of the embodiment of the present application is an electronic device, such as a server, a desktop computer, a laptop computer, a tablet computer, and other electronic devices that can be used for data storage.
[0073] like Figure 2 FIG. 1 is a flow chart of a distributed storage method provided in an embodiment of the present application, and the method includes:
[0074] Step 201 : before creating a mapping volume for data to be stored, obtain current configuration information of each node in the distributed storage system.
[0075] It should be noted that mapped volume refers to the process of mapping a logical volume to a specific node. Creating a mapped volume is an operation performed in a distributed storage system. Its main purpose is to associate a logical volume with a specific node or target so that data can be correctly stored and accessed. When creating a mapped volume, you first need to determine the logical volume, that is, you need to determine the logical volume to be mapped. A logical volume is a logical storage unit created in a distributed storage system and can span multiple physical storage devices. Then you need to select the target node to which the logical volume is mapped, which can be determined based on the system's load balancing strategy, availability requirements, or other factors. After determining the logical volume and target node, you need to establish a mapping relationship between them. This is usually done through the management software of the distributed storage system or related configuration operations.
[0076] Specifically, before selecting a target node, the embodiment of the present application first obtains the current configuration information of each node in the distributed storage system, so as to select the target node according to the current configuration information of each node, so as to improve the resource utilization of the distributed storage system.
[0077] Step 202: Determine the comprehensive configuration index of each node according to the current configuration information of each node.
[0078] Among them, the comprehensive configuration index is used to comprehensively evaluate the current load capacity of each node.
[0079] Step 203 , selecting target nodes in the distributed storage system according to the node load capacity represented by the comprehensive configuration index of each node.
[0080] The node load capacity represents the ability of the node to provide target services to a certain extent. The target service refers to the iSCSI target service. iSCSI is an IP network-based storage protocol used to transmit block-level data on the network. The iSCSI target service is a software component running on the storage device. It is responsible for receiving requests from the iSCSI initiator and providing access to storage resources.
[0081] Specifically, in one embodiment, according to the node load capacity represented by the comprehensive configuration index of each node, the node with the highest node load capacity can be used as the target node.
[0082] Specifically, when the comprehensive configuration index is positively correlated with the node load capacity, the node with the largest comprehensive configuration index may be directly used as the target node to provide target services based on the target node.
[0083] Step 204: Create a mapping volume for the data to be stored according to the storage service information of the target node.
[0084] Specifically, the storage service information and configuration of the target node may be used to determine the mapping volume parameters, and then the mapping volume may be created according to the mapping volume parameters.
[0085] Step 205: store the data to be stored in the target node according to the mapped volume.
[0086] Specifically, the data to be stored may be stored in the target node according to the address of the target node represented by the mapping volume, the writing position of the data and other related information.
[0087] On the basis of the above embodiments, since the determination result of the node comprehensive configuration index will directly affect the selection result of the target node, therefore, in order to further improve the reliability of the target node selection result and further improve the overall performance of the distributed storage system, as an implementable method, in one embodiment, the comprehensive configuration index of each node is determined according to the current configuration information of each node, including:
[0088] Step 2021, determining the maximum configuration information of the cluster according to the current configuration information of each node;
[0089] Step 2022: Determine the comprehensive configuration index of each node based on the current configuration information and the configuration maximum value information of each node.
[0090] The current configuration information of the node includes at least multiple configuration indicators such as the current processor usage rate, the current number of processor cores, the current memory usage rate, the current memory capacity, the current service bandwidth and the current service load of the node.
[0091] Specifically, the maximum and minimum values of each configuration indicator in the cluster can be determined based on the current configuration information of each node to obtain the maximum configuration value information of the cluster, and then the comprehensive configuration indicator of each node can be determined based on the current configuration information and the maximum configuration value information of each node.
[0092] Specifically, in one embodiment, for any node, the processor utilization evaluation index of the node can be determined according to the current processor utilization of the node, the maximum processor utilization value represented by the configuration value information, and the minimum processor utilization value; the processor core number evaluation index of the node can be determined according to the current number of processor cores of the node, the maximum number of processor cores represented by the configuration value information, and the minimum number of processor cores; the memory utilization evaluation index of the node can be determined according to the current memory utilization of the node, the maximum memory utilization value represented by the configuration value information, and the minimum memory utilization value; the memory utilization evaluation index of the node can be determined according to the current memory capacity of the node, the configuration value information table, and the maximum memory utilization value represented by the configuration value information table. The memory capacity evaluation index of the node is determined according to the maximum value and minimum value of the memory capacity characterized by the maximum value of the memory capacity; the business bandwidth evaluation index of the node is determined according to the current business bandwidth of the node and the maximum value and minimum value of the business bandwidth represented by the configuration value information; the business load evaluation index of the node is determined according to the current business load of the node and the maximum value and minimum value of the business load represented by the configuration value information; the comprehensive configuration index of each node is determined according to the processor utilization evaluation index, processor core number evaluation index, memory utilization evaluation index, memory capacity evaluation index, business bandwidth evaluation index and business load evaluation index of each node.
[0093] It should be noted that the performance of distributed block storage nodes does not only depend on a single factor, but is a comprehensive reflection of multiple factors such as CPU computing power, memory, iSCSI business pressure and target load (business load). Each dimension has a direct impact on the processing power and service quality of distributed block storage nodes. Since the measurement units and magnitudes of various performance indicators are different, they are converted to the same scale through standardization technology, so that data of different dimensions can be compared and accumulated with each other, which is the basis for realizing the calculation of comprehensive configuration indicators.
[0094] The CPU computing power is comprehensively evaluated by the processor utilization rate and the number of processor cores. The iSCSI service pressure is reflected by the iSCSI service bandwidth of the front-end network. The target load represents the usage of the node target resources.
[0095] Specifically, the embodiment of the present application collects CPU computing power data such as the CPU usage rate and core number of the node in real time, and records information such as the total memory capacity, used memory and cache usage; counts network performance indicators such as the upload and download rates of the front-end network iSCSI service bandwidth; records the target load, and counts the number of volume mappings of all target connections on the distributed block storage node.
[0096] Specifically, the calculation formulas for the node's processor utilization evaluation index, processor core number evaluation index, memory utilization evaluation index, memory capacity evaluation index, service bandwidth evaluation index, and service load evaluation index are as follows:
[0097] s1=(A1-A mix ) / (A max -A mix )
[0098] s2=(B1-B mix ) / (B max -B mix )
[0099] s3=(C1-C mix ) / (C max -C mix )
[0100] s4=(D1-D mix ) / (D max -D mix )
[0101] s5=(E1-E mix ) / (E max -E mix )
[0102] s6=(F1-F mix ) / (F max -F mix )
[0103] Among them, s1 represents the processor utilization evaluation index of the node, s2 represents the processor core number evaluation index of the node, s3 represents the memory utilization evaluation index of the node, s4 represents the memory capacity evaluation index of the node, s5 represents the business bandwidth evaluation index of the node, s6 represents the business load evaluation index of the node, A1 represents the current processor utilization of the node, A mix Indicates the minimum value of processor usage, A max Indicates the maximum processor usage, B1 indicates the current number of processor cores of the node, and B mix Indicates the minimum number of processor cores, B max represents the maximum number of processor cores, C1 represents the current memory usage of the node, and Cmix Indicates the minimum memory usage, C max Indicates the maximum memory usage, D1 indicates the current memory capacity of the node, and D mix Indicates the minimum memory capacity, D max Indicates the maximum memory capacity, E1 indicates the current service bandwidth of the node, and E mix Indicates the minimum service bandwidth, E max Indicates the maximum service bandwidth, F1 indicates the current service load of the node, and F mix Indicates the minimum value of business load, F max Indicates the maximum service load.
[0104] Specifically, due to the different dimensions and ranges of various indicators, the original data needs to be standardized first and converted into indicator scores between 0 and 1 (processor utilization evaluation index, processor core number evaluation index, memory utilization evaluation index, memory capacity evaluation index, service bandwidth evaluation index and service load evaluation index). Specifically, each configuration parameter can be mapped to between 0 and 1 through the above calculation formula to obtain the processor utilization evaluation index, processor core number evaluation index, memory utilization evaluation index, memory capacity evaluation index, service bandwidth evaluation index and service load evaluation index.
[0105] Specifically, for the processor utilization evaluation index, Min_cpu_utilization(A mix ) and Max_cpu_utilization(A max ) represent the minimum and maximum values of the parameter respectively. These values are determined by the cpu_utilization (A1) range of all nodes in the cluster during the sampling period. For the evaluation index of the number of processor cores, Min_cpu_total_cores (B mix ) and Max_cpu_total_cores(B max ) represent the minimum and maximum values of the parameter, respectively. Generally speaking, Min_cpu_total_cores = 12, Max_cpu_total_cores = 128; for the memory utilization evaluation index, Min_memory_utilization (C mix ) and Max_memory_utilization(C max ) represent the minimum and maximum values of the parameter respectively. These values are determined by the memory_utilization (C1) range of all nodes in the cluster during the sampling period. For the memory capacity evaluation index, Min_memory_total_capacity (D mix) and Max_memory_totalcapacity(D max ) represent the minimum and maximum values of the parameter, respectively. Generally speaking, Min_memory_total_capacity = 32, Max_memory_total_capacity = 256; for the service bandwidth evaluation index, Min_iSCSI_bandwidth (E mix ) and Max_iSCSI_bandwidth(E max ) represent the minimum and maximum values of the parameter respectively. These values are determined by the iSCSI_bandwidth (E1) range of all nodes in the cluster during the sampling period. For the business load evaluation index, Min_target_load (F mix ) and Max_target_load(F max ) represent the minimum and maximum values of the parameter, respectively, which are determined by the target_load (F1) range of all nodes in the cluster during the sampling period.
[0106] Accordingly, in one embodiment, the comprehensive configuration index of each node may be determined based on the following formula:
[0107] S t =w1·s1+w2·s2+w3·s3+w4·s4+w5·s5+w6·s6
[0108] Among them, S t Represents the comprehensive configuration index of the node, w1, w2, w3, w4, w5 and w6 represent the weight coefficients of the processor utilization evaluation index, the processor core number evaluation index, the memory utilization evaluation index, the memory capacity evaluation index, the business bandwidth evaluation index and the business load evaluation index respectively. The calculation formula of the comprehensive configuration index of this application is not static, but can dynamically adjust the parameter values and weights in the formula according to environmental changes (such as business load fluctuations and technological advances, etc.) to maintain the timeliness and accuracy of the evaluation results (comprehensive configuration indicators). And the final generated comprehensive score (comprehensive configuration index), as a concise and clear indicator, greatly simplifies the understanding and use of complex performance data, and provides an intuitive basis for decision-making processes such as resource planning, troubleshooting, and performance optimization.
[0109] On the basis of the above embodiment, since the user business requirements of the distributed storage system in different business scenarios are different, in order to further make the selected target node meet the user business requirements and further improve the overall performance of the distributed storage system, as an implementable manner, the method also includes:
[0110] Step 301, obtaining original configuration information of the distributed storage system;
[0111] Step 302, determining a business scenario of the distributed storage system according to original configuration information of the distributed storage system;
[0112] Step 303, according to the user business requirements represented by the business scenarios of the distributed storage system, determine the weight coefficients of the node's processor utilization evaluation index, processor core number evaluation index, memory utilization evaluation index, memory capacity evaluation index, business bandwidth evaluation index, and business load evaluation index.
[0113] Among them, the original configuration information of the distributed storage system is the configuration information of the distributed storage system development stage. The business scenario of the distributed storage system can be inferred based on the original configuration information of the distributed storage system, and then the weight coefficients of the above processor utilization evaluation index, processor core number evaluation index, memory utilization evaluation index, memory capacity evaluation index, business bandwidth evaluation index and business load evaluation index are set according to the user business needs represented by the business scenario of the distributed storage system. By assigning different weight systems to each performance indicator according to business needs and actual application scenarios, it reflects the subjective judgment of the importance of different resources or the objective analysis based on data, ensuring that the comprehensive configuration indicator calculation system is close to actual needs.
[0114] For example, the importance of each indicator is first determined according to business needs, and then the corresponding weight system is assigned. In a distributed block storage system, the network bandwidth requirement is high, and a higher weight can be given to the network bandwidth. Here, it is assumed that the weight coefficients are:
[0115] cpu_utilization_weight(w1)=0.15
[0116] cpu_totalcores_weight(w2)=0.20
[0117] memory_utilization_weight(w3)=0.15
[0118] memory_total_capacity_weight(w4)=0.20
[0119] iSCSI_bandwidth_weight(w5)=0.25
[0120] targetload_weight(w6)=0.05, and the sum of all weight coefficients is 1.
[0121] On the basis of the above embodiment, in order to balance the target load in the target node and further improve the resource utilization of the target node, as an implementable method, a mapping volume for data to be stored is created according to the storage service information of the target node, including:
[0122] Step 2051, determining the number of mapped volumes connected to each storage service component in the target node according to the storage service information of the target node;
[0123] Step 2052, selecting a target storage service component on the target node according to the number of mapped volumes connected to each storage service component;
[0124] Step 2053: Create a mapping volume for the data to be stored according to the target storage service component, so as to connect the created mapping volume to the target storage service component.
[0125] The storage service component is the target service component. Each node includes multiple storage service components, and each storage service component can be connected to multiple mapping volumes.
[0126] Specifically, the storage service information of the target node includes the number of mapped volumes connected to each storage service component in the target node. The storage service component with the least number of connected mapped volumes is used as the target storage service component, and then the target storage service component is used to create a mapped volume for the data to be stored, and the mapped volume is connected to the target storage service component so that the data to be stored is stored to the target node based on the target storage service component.
[0127] Specifically, Figure 3 As shown, it is a flow chart of an exemplary distributed storage method provided in an embodiment of the present application. The normalized score is the node's processor utilization evaluation index, processor core number evaluation index, memory utilization evaluation index, memory capacity evaluation index, service bandwidth evaluation index and service load evaluation index. The comprehensive score is the comprehensive configuration index. In the method provided in an embodiment of the present application, the node with the highest comprehensive configuration index is used as the target node (target service node).
[0128] Specifically, in one embodiment, when the node with the highest comprehensive configuration index is not unique, several nodes with the highest comprehensive configuration index can be selected as candidate nodes, and then the candidate nodes with high business load evaluation index can be selected as target nodes to further achieve node load balancing.
[0129] Specifically, the reliability factors of the candidate nodes can also be considered, such as hardware stability, network connection quality, etc. Selecting nodes with higher reliability can reduce the risk of failure during data storage. If the access requirements of stored data are related to geographical location, consider selecting nodes that are closer to the user end or application as target nodes to reduce data transmission delays.
[0130] The distributed storage method provided by the embodiment of the present application obtains the current configuration information of each node in the distributed storage system before creating the mapping volume of the data to be stored; determines the comprehensive configuration index of each node according to the current configuration information of each node; selects the target node in the distributed storage system according to the node load capacity represented by the comprehensive configuration index of each node; creates the mapping volume of the data to be stored according to the storage service information of the target node; stores the data to be stored in the target node according to the mapping volume. The method provided by the above scheme selects the node with the strongest current node load capacity as the target node according to the current configuration information of each node, so that the system resources can be reasonably scheduled when creating the volume mapping, which can avoid business blocking, untimely response and other phenomena, and also avoid waste of storage resources, thereby improving the overall performance of the distributed block storage system. In addition, it can be realized to evaluate the optimal node of storage node performance according to the actual hardware configuration of the cluster node and key system resources, and to maximize the scheduling and utilization of cluster resources to avoid resource waste, thereby improving the business balance and functional richness of the distributed block storage system, and improving the competitiveness and customer experience of distributed block storage.
[0131] An embodiment of the present application provides a distributed storage device for executing the distributed storage method provided in the above embodiment.
[0132] like Figure 4 , which is a schematic diagram of the structure of a distributed storage device provided in an embodiment of the present application. The distributed storage device 40 comprises: an acquisition module 401 , a determination module 402 , a screening module 403 , a creation module 404 and a storage module 405 .
[0133] Among them, the acquisition module is used to obtain the current configuration information of each node in the distributed storage system before creating the mapping volume of the data to be stored; the determination module is used to determine the comprehensive configuration index of each node according to the current configuration information of each node; the screening module is used to screen the target node in the distributed storage system according to the node load capacity represented by the comprehensive configuration index of each node; the creation module is used to create the mapping volume of the data to be stored according to the storage service information of the target node; the storage module is used to store the data to be stored to the target node according to the mapping volume.
[0134] For example, Figure 5As shown, it is a structural diagram of an exemplary distributed storage system provided by an embodiment of the present application, the system includes cluster nodes, a client, a management interface and a distributed storage device. As a new logical function division, the distributed storage device includes a data acquisition module, a normalized score calculation module, a weight configuration module and a comprehensive score calculation module. The main function of the data acquisition module is to filter the values of the input parameters within a specified time period in the system operation log and record them in the database; the main function of the normalized score module is to obtain the collected data from the database, count the Min and Max values of each parameter, and then perform normalization processing; the main function of the weight configuration module is to configure the weights of each parameter according to customer needs, and the main function of the comprehensive score calculation module is to calculate the comprehensive score of each distributed block storage node based on the weight configuration module and the normalized score calculation module.
[0135] Regarding the distributed storage device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0136] The distributed storage device provided in the embodiment of the present application is used to execute the distributed storage method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0137] An embodiment of the present application provides an electronic device for executing the distributed storage method provided in the above embodiment.
[0138] like Figure 6 FIG. 6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 60 includes: at least one processor 61 and a memory 62 .
[0139] The memory stores computer-executable instructions; at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the distributed storage method provided in the above embodiment.
[0140] The electronic device provided in the embodiment of the present application is used to execute the distributed storage method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0141] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the distributed storage method provided in any of the above embodiments is implemented.
[0142] The storage medium containing computer executable instructions provided in the embodiments of the present application can be used to store computer executable instructions of the distributed storage method provided in the aforementioned embodiments. The implementation method and principle are the same and will not be repeated here.
[0143] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0144] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0145] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0146] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0147] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A distributed storage method, It is characterized in that include: Before creating a mapping volume for data to be stored, obtain current configuration information of each node in the distributed storage system; Determine the comprehensive configuration index of each node based on the current configuration information of each node; Selecting target nodes in the distributed storage system according to the node load capacity represented by the comprehensive configuration index of each of the nodes; Creating a mapping volume for the data to be stored according to the storage service information of the target node; According to the mapping volume, the data to be stored is stored in the target node.
2. The method according to claim 1, It is characterized in that Determining the comprehensive configuration index of each node according to the current configuration information of each node includes: Determine the maximum configuration information of the cluster based on the current configuration information of each node; According to the current configuration information of each node and the configuration maximum value information, the comprehensive configuration index of each node is determined.
3. The method according to claim 2, It is characterized in that Determining the comprehensive configuration index of each node according to the current configuration information of each node and the configuration maximum value information includes: For any of the nodes, determining a processor usage evaluation index of the node according to a current processor usage of the node, a maximum processor usage value represented by the configuration maximum value information, and a minimum processor usage value; Determine an evaluation index of the number of processor cores of the node according to the current number of processor cores of the node, the maximum number of processor cores represented by the configuration maximum value information, and the minimum number of processor cores; Determine a memory usage evaluation index of the node according to the current memory usage of the node, the maximum memory usage value and the minimum memory usage value represented by the configuration value information; Determine a memory capacity evaluation index of the node according to the current memory capacity of the node, the maximum memory capacity and the minimum memory capacity represented by the configuration maximum value information; Determine a service bandwidth evaluation index of the node according to the current service bandwidth of the node, the maximum service bandwidth value and the minimum service bandwidth value represented by the configuration value information; Determine a service load evaluation index of the node according to the current service load of the node, the maximum service load value and the minimum service load value represented by the configuration value information; Determine the comprehensive configuration index of each node according to the processor utilization evaluation index, processor core number evaluation index, memory utilization evaluation index, memory capacity evaluation index, service bandwidth evaluation index and service load evaluation index of each node; The current configuration information of the node includes at least the current processor usage rate, the current number of processor cores, the current memory usage rate, the current memory capacity, the current service bandwidth and the current service load of the node.
4. The method according to claim 1, It is characterized in that Determining the comprehensive configuration index of each node according to the processor utilization evaluation index, processor core number evaluation index, memory utilization evaluation index, memory capacity evaluation index, service bandwidth evaluation index and service load evaluation index of each node includes: Based on the following formula, the comprehensive configuration index of each node is determined: S t =w 1 ·s 1 +w 2 ·s 2 +w 3 ·s 3 +w 4 ·s 4 +w 5 ·s 5 +w 6 ·s 6 s 1 =(A 1 -A mix ) / (A max -A mix ) s 2 =(B 1 -B mix ) / (B max -B mix ) s 3 =(C 1 -C mix ) / (C max -C mix ) s 4 =(D 1 -D mix ) / (D max -D mix ) s 5 =(And 1 -AND mix ) / (AND max -AND mix ) s 6 =(F 1 -F mix ) / (F max -F mix ) Among them, S t Represents the comprehensive configuration index of the node, s 1 Represents the node's processor utilization evaluation index, s 2 Represents the evaluation index of the number of processor cores of the node, s 3 Represents the memory usage evaluation index of the node, s 4 Represents the memory capacity evaluation index of the node, s 5 Represents the node's service bandwidth evaluation index, s 6 represents the node's business load evaluation index, w 1 、w 2 、w 3 、w 4 、w 5 and w 6 They represent the weight coefficients of the processor utilization evaluation index, the processor core number evaluation index, the memory utilization evaluation index, the memory capacity evaluation index, the service bandwidth evaluation index, and the service load evaluation index, respectively. 1 Indicates the current processor usage of the node, A mix Indicates the minimum value of processor usage, A max Indicates the maximum processor usage, B 1 Indicates the current number of processor cores of the node, B mix Indicates the minimum number of processor cores, B max Indicates the maximum number of processor cores, C 1 Indicates the current memory usage of the node, C mix Indicates the minimum memory usage, C max Indicates the maximum memory usage, D 1 Indicates the current memory capacity of the node, D mix Indicates the minimum memory capacity, D max Indicates the maximum memory capacity, E 1 Indicates the current service bandwidth of the node, E mix Indicates the minimum service bandwidth, E max Indicates the maximum service bandwidth, F 1 Indicates the current business load of the node, F mix Indicates the minimum value of business load, F max Indicates the maximum service load.
5. The method according to claim 4, It is characterized in that The method further comprises: Obtaining original configuration information of the distributed storage system; Determining a business scenario of the distributed storage system according to original configuration information of the distributed storage system; According to the user business needs characterized by the business scenarios of the distributed storage system, the weight coefficients of the processor utilization evaluation index, processor core number evaluation index, memory utilization evaluation index, memory capacity evaluation index, business bandwidth evaluation index and business load evaluation index of the node are determined.
6. The method according to claim 1, It is characterized in that The step of selecting target nodes in the distributed storage system according to the node load capacity represented by the comprehensive configuration index of each node includes: According to the node load capacity represented by the comprehensive configuration index of each of the nodes, the node with the highest node load capacity is used as the target node.
7. The method according to claim 1, It is characterized in that The step of creating a mapping volume for the data to be stored according to the storage service information of the target node includes: Determine the number of mapped volumes connected to each storage service component in the target node according to the storage service information of the target node; Selecting a target storage service component on the target node according to the number of mapped volumes connected to each storage service component; According to the target storage service component, a mapping volume for the data to be stored is created, so as to connect the created mapping volume to the target storage service component.
8. A distributed storage device, It is characterized in that include: The acquisition module is used to obtain the current configuration information of each node in the distributed storage system before creating a mapping volume for data to be stored; A determination module, used to determine the comprehensive configuration index of each node according to the current configuration information of each node; A screening module, used for screening target nodes in the distributed storage system according to the node load capacity represented by the comprehensive configuration index of each node; A creation module, used to create a mapping volume for the data to be stored according to the storage service information of the target node; A storage module is used to store the data to be stored in the target node according to the mapping volume.
9. An electronic device, It is characterized in that include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Node allocation method, storage medium, electronic equipment and program product
CN119621352A
Node Allocation Method, Storage Medium, Electronic Device and Program Product
CN119621352B
Volume mapping management method, device and equipment
CN119987677A
Volume mapping management method, apparatus and device
CN119987677B
Distributed vector data balancing method, device and equipment based on Redis and storage medium
CN120780777A
