Distributed block storage method and device, electronic equipment and storage medium

By real-time monitoring and dynamic adjustment of multi-dimensional performance indicators of storage nodes, the problems of load balancing and low resource utilization in traditional static sharding strategies are solved, achieving efficient load balancing and resource optimization of distributed block storage systems to adapt to diverse business needs.

CN121255412APending Publication Date: 2026-01-02JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511104370.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-07
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

Traditional static sharding strategies in distributed block storage systems suffer from insufficient load balancing capabilities, low resource utilization, and the inability to achieve differentiated allocation of storage resources, leading to the emergence of 'hot nodes,' IO bottlenecks, long migration times for full data, and high storage costs.

Method used

By monitoring multi-dimensional performance metrics of storage nodes in real time, calculating load indices, and dynamically adjusting data shard storage locations, and employing hot data identification, node affinity assessment, and migration benefit calculation, adaptive multi-dimensional load perception and intelligent shard migration of data are achieved.

Benefits of technology

It achieves real-time load balancing between nodes, improves the utilization of hybrid media resources, reduces storage costs and improves data access efficiency, and adapts to the input and output characteristics of different business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121255412A_ABST
    Figure CN121255412A_ABST
Patent Text Reader

Abstract

The invention discloses a distributed block storage method and device, electronic equipment and a storage medium. The load index is calculated by collecting the multi-dimensional performance indexes of the storage nodes in real time, and the data fragment storage position is dynamically adjusted according to the load. The self-adaptive multi-dimensional load sensing model can accurately adapt to various service scenes, real-time balance of loads between nodes is achieved, hot nodes are effectively avoided, and the overall performance of the system is improved. And when the load index exceeds the preset threshold value, hot data identification, node affinity evaluation and migration income calculation modes are started to perform data fragmentation migration, so that the utilization rate of mixed medium resources is improved, a high-performance storage medium is reasonably utilized, and the data access efficiency is improved while the storage cost is reduced. Through cooperative work of load monitoring, fragmentation decision making, migration execution, metadata management and the like, a fragmentation strategy is automatically optimized according to input and output characteristics of different service types, and the overall performance under different service scenes is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, and particularly relates to a distributed block storage method and device, electronic equipment and a storage medium. BACKGROUND

[0002] Traditional distributed block storage systems generally adopt a static sharding strategy, and a typical representative is a compression space (CRUSH) algorithm of distributed storage (Ceph). The data object is mapped to a fixed storage node through a predefined hash rule. This strategy gradually exposes defects that are difficult to overcome when facing large-scale clusters and dynamic business scenarios. The core technical bottlenecks of the static sharding strategy are reflected in three aspects: first, the load balancing capability is insufficient, and it is difficult to cope with sudden changes in business traffic, and often "hot nodes" cause IO bottlenecks; second, the elastic expansion efficiency is low, and the full data migration takes too long, and the system is in an unstable state for a long time; third, there is a lack of data access feature awareness capability, and it is difficult to realize differentiated allocation of storage resources, resulting in high storage costs. Actual measurement data shows that the resource utilization rate difference between nodes of the traditional static sharding system in a mixed business scenario can reach more than 40%, and the CPU utilization rate of some nodes is always higher than 80%, while the CPU utilization rate of other nodes is less than 30%, and the resource waste phenomenon is serious. SUMMARY

[0003] The present application provides a distributed block storage method, device, electronic equipment and storage medium to at least solve the problems of insufficient load balancing capability of the static sharding strategy, low resource utilization, and inability to realize differentiated allocation of storage resources in related technologies.

[0004] The present application provides a distributed block storage method, comprising:

[0005] monitoring a storage node, collecting multi-dimensional performance indicators of the storage node in real time, and determining a load index of the storage node according to the multi-dimensional performance indicators;

[0006] in response to the load index exceeding a preset threshold, determining whether a to-be-migrated shard is a hot data shard;

[0007] in response to the to-be-migrated shard being a hot data shard, migrating the to-be-migrated shard to an idle storage node;

[0008] in response to the to-be-migrated shard not being a hot data shard, obtaining a node affinity score of the to-be-migrated shard and the idle storage node;

[0009] in response to the node affinity score being greater than a first score value, migrating the to-be-migrated shard to the corresponding idle storage node;

[0010] In response to the node affinity score being less than or equal to a first score, migration benefits of the to-be-migrated shard and each storage node are obtained, and data migration of the to-be-migrated shard is controlled according to the migration benefits.

[0011] The application further provides a distributed block storage device, comprising:

[0012] A load monitoring module is configured to monitor a storage node, collect multi-dimensional performance indexes of the storage node in real time, and determine a load index of the storage node according to the multi-dimensional performance indexes.

[0013] A shard decision module comprises a hot data identification unit, a node affinity evaluation unit, and a migration benefit calculation unit. The hot data identification unit is configured to determine whether a to-be-migrated shard is a hot data shard in response to the load index exceeding a preset threshold. The node affinity evaluation unit is configured to obtain a node affinity score of the to-be-migrated shard and an idle storage node in response to the to-be-migrated shard not being a hot data shard. The migration benefit calculation unit is configured to obtain migration benefits of the to-be-migrated shard and each storage node in response to the node affinity score being less than or equal to a first score.

[0014] A migration execution module is configured to migrate the to-be-migrated shard to an idle storage node in response to the to-be-migrated shard being a hot data shard, migrate the to-be-migrated shard to a corresponding idle storage node in response to the node affinity score being greater than the first score, and control data migration of the to-be-migrated shard according to the migration benefits.

[0015] The application further provides an electronic device, comprising a memory configured to store a computer program and a processor configured to execute the computer program to implement the steps of any of the distributed block storage methods.

[0016] A storage node is monitored, multi-dimensional performance indexes of the storage node are collected in real time, and a load index of the storage node is determined according to the multi-dimensional performance indexes.

[0017] In response to the load index exceeding a preset threshold, it is determined whether a to-be-migrated shard is a hot data shard.

[0018] In response to the to-be-migrated shard being a hot data shard, the to-be-migrated shard is migrated to an idle storage node.

[0019] In response to the to-be-migrated shard not being a hot data shard, a node affinity score of the to-be-migrated shard and an idle storage node is obtained.

[0020] In response to the node affinity score being greater than a first score, the to-be-migrated shard is migrated to a corresponding idle storage node.

[0021] In response to the node affinity score being less than or equal to the first score, obtaining a migration benefit of the to-be-migrated shard and each storage node, and controlling data migration of the to-be-migrated shard according to the migration benefit.

[0022] The application further provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of any one of the distributed block storage methods described above are implemented: monitoring a storage node, collecting multi-dimensional performance indexes of the storage node in real time, determining a load index of the storage node according to the multi-dimensional performance indexes;

[0023] In response to the load index exceeding a preset threshold, determining whether a to-be-migrated shard is a hot data shard;

[0024] In response to the to-be-migrated shard being a hot data shard, migrating the to-be-migrated shard to an idle storage node;

[0025] In response to the to-be-migrated shard not being a hot data shard, obtaining a node affinity score of the to-be-migrated shard and an idle storage node;

[0026] In response to the node affinity score being greater than a first score, migrating the to-be-migrated shard to the corresponding idle storage node;

[0027] In response to the node affinity score being less than or equal to the first score, obtaining a migration benefit of the to-be-migrated shard and each storage node, and controlling data migration of the to-be-migrated shard according to the migration benefit.

[0028] According to the application, the multi-dimensional performance indexes of the storage node are collected in real time, the load index is calculated, and the data shard storage location is dynamically adjusted according to the load. The adaptive multi-dimensional load sensing model can accurately adapt to various business scenarios, realize real-time balancing of the load between nodes, effectively avoid the occurrence of “hot nodes”, and improve the overall performance of the system. When the load index exceeds the preset threshold, the hot data recognition, node affinity evaluation, and migration benefit calculation mode are started to perform data shard migration, which improves the utilization rate of mixed media resources, reasonably utilizes high-performance storage media, reduces storage costs, and improves data access efficiency. Through the cooperative work of load monitoring, shard decision-making, migration execution, and metadata management, the shard strategy is automatically optimized according to the input and output characteristics of different business types, and the overall performance in different business scenarios is improved. BRIEF DESCRIPTION OF DRAWINGS

[0029] In order to more clearly illustrate the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.

[0030] Figure 1 The application environment diagram of the distributed block storage method in an embodiment of the present application;

[0031] Figure 2 The flowchart of the distributed block storage method in an embodiment of the present application;

[0032] Figure 3 The logic diagram of the distributed block storage method in an embodiment of the present application;

[0033] Figure 4 The three-level decision model principle diagram of the dynamic sharding process in an embodiment of the present application, which performs data sharding migration through hot data identification, node affinity evaluation and migration benefit calculation mode;

[0034] Figure 5 The flowchart of the dynamic sharding expansion in an embodiment of the present application;

[0035] Figure 6 The structural block diagram of the distributed block storage device in an embodiment of the present application;

[0036] Figure 7 The internal structure diagram of the computer device in an embodiment of the present application. DETAILED DESCRIPTION

[0037] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort fall within the protection scope of the present application.

[0038] It should be noted that, in the description of the present application, the terms “include”, “contain” or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. The terms “first”, “second” and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence.

[0039] As described in the background, in today's high-speed development of cloud computing and big data technology, distributed block storage systems, as the underlying infrastructure supporting core business of enterprises, are becoming increasingly important. According to statistics of the International Data Corporation (IDC), the total amount of global data will reach 175 ZB by 2025, of which unstructured data accounts for more than 80%. This poses unprecedented challenges to the performance, scalability and reliability of distributed storage systems.

[0040] In the prior art, Ceph abstracts storage devices as storage buckets through the CRUSH algorithm, and uses physical topology and hash functions to calculate the storage location of data shards. When a storage node changes (such as expansion or failure), the CRUSH algorithm needs to recalculate the location of all affected data shards, resulting in large-scale data migration. Experimental data shows that when 10 nodes are added to a 100-node cluster, about 30% of the data needs to be migrated, and this process can last for several hours, during which the system performance decreases significantly, seriously affecting business continuity. Another type of prior art such as GlusterFS uses a periodic global rebalancing strategy, but this strategy cannot perceive the access characteristics of data, and the same storage strategy is used for hot data (such as real-time transaction records) and cold data (such as historical logs), resulting in high-performance storage media (such as SSD) being occupied by cold data, and low resource utilization.

[0041] The core technical bottlenecks of static sharding strategy are reflected in three aspects: first, the load balancing capability is insufficient, which cannot cope with the sudden changes of business traffic, and often appears "hot node" leading to IO bottleneck; second, the elastic expansion efficiency is low, the full data migration takes too long time, and the system is in an unstable state for a long time; third, there is a lack of data access feature perception ability, which cannot realize the differentiated allocation of storage resources, resulting in high storage cost. The measured data shows that in the mixed business scenario, the resource utilization rate difference between nodes of the traditional static sharding system can reach more than 40%, the CPU utilization rate of some nodes is always higher than 80%, while that of other nodes is less than 30%, and the resource waste phenomenon is serious.

[0042] The present application aims to overcome the core technical problems of traditional distributed block storage systems in dynamic business environment, specifically including:

[0043] First, the problem of dynamic load balancing: solve the problem of node load imbalance caused by static sharding, realize real-time balancing of multi-dimensional resources such as CPU, memory, disk IO, control the load difference between nodes within 15%, and eliminate the "hot node" bottleneck.

[0044] Second, the problem of elastic expansion efficiency: break through the technical bottleneck of full data migration, realize incremental data migration when nodes are expanded or contracted, shorten the large-scale cluster expansion time from hours to minutes, and ensure business continuity.

[0045] Third, heterogeneous resource optimization problem: build data access feature perception mechanism, dynamically allocate storage resources according to data heat, make hot data preferentially stored in high-performance SSD nodes, and cold data stored in large-capacity HDD nodes, and improve the utilization rate of mixed media resources by more than 30%.

[0046] Fourth, service adaptation capability problem: design intelligent sharding strategy for different service characteristics to adapt to the IO needs of OLTP (online transaction processing), big data analysis and other diversified services, and improve the overall performance of the system.

[0047] In order to enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0048] The distributed block storage method provided by the present application can be applied to the application environment as shown in Figure 1 The distributed block storage system includes a client layer, a metadata management layer and a storage node layer. The client layer includes a plurality of application servers, which can be but are not limited to various personal computers, notebook computers, smartphones, tablet computers and portable wearable devices. The metadata management layer includes a plurality of metadata servers, which can be implemented by independent servers or a server cluster composed of multiple servers. The storage node layer includes a plurality of storage nodes, which are composed of solid state disks (SSDs) or hard disk drives (HDDs), forming solid state disk nodes or hard disk drive nodes.

[0049] The application server interacts with the storage node for data read and write, the metadata server monitors the load of the storage node to obtain the performance indicators of the storage node, the metadata server sends migration instructions to the storage node to realize data migration, and the application server sends metadata requests / responses to the metadata server.

[0050] As shown in Figure 2 The embodiment of the present application provides a distributed block storage method, which comprises the following steps:

[0051] Step S1, monitoring the storage node, collecting the multi-dimensional performance indicators of the storage node in real time, and determining the load index of the storage node according to the multi-dimensional performance indicators;

[0052] Step S2, in response to the load index exceeding the preset threshold, determining whether the to-be-migrated shard is a hot data shard;

[0053] Step S3, in response to the to-be-migrated shard being a hot data shard, migrating the to-be-migrated shard to an idle storage node;

[0054] Step S4, in response to the to-be-migrated shard not being a hot data shard, obtaining the node affinity score of the to-be-migrated shard and the idle storage node.

[0055] Step S5: In response to the node affinity score being greater than the first score, the shard to be migrated is migrated to the corresponding idle storage node;

[0056] Step S6: In response to the node affinity score being less than or equal to the first score, obtain the migration benefit between the shard to be migrated and each storage node, and control the shard to be migrated to perform data migration based on the migration benefit.

[0057] Specifically, during data fragment migration, an incremental differential migration protocol based on copy-on-write is used to transmit changed data blocks and dynamically adjust the migration bandwidth.

[0058] like Figure 3 As shown, in step S2, the preset threshold is preferably 75%. When the load index is greater than the preset threshold of 75%, the dynamic sharding process is started to perform data sharding migration through hot data identification, node affinity assessment, and migration benefit calculation. Otherwise, the storage nodes continue to be monitored.

[0059] This embodiment collects multi-dimensional performance metrics of storage nodes in real time, calculates the load index, and dynamically adjusts the data shard storage location based on the load. The adaptive multi-dimensional load awareness model can accurately adapt to various business scenarios, achieving real-time load balancing among nodes, effectively avoiding "hot nodes," and improving overall system performance. When the load index exceeds a preset threshold, it initiates hot data identification, node affinity assessment, and migration benefit calculation to perform data shard migration, improving the utilization rate of hybrid media resources, enabling the rational use of high-performance storage media, reducing storage costs, and improving data access efficiency. Through the collaborative work of load monitoring, sharding decision-making, migration execution, and metadata management, the sharding strategy is automatically optimized based on the input and output characteristics of different business types, improving overall performance in different business scenarios.

[0060] In this embodiment, the storage nodes are monitored, and multi-dimensional performance indicators of the storage nodes are collected in real time. The load index of the storage nodes is determined based on the multi-dimensional performance indicators, including:

[0061] The processor utilization, memory usage, disk input / output per second, and network throughput of storage nodes are collected in real time by monitoring tools as multi-dimensional performance indicators.

[0062] Adjust the weights of multi-dimensional performance metrics according to the service type of the storage node;

[0063] Normalize the multidimensional performance indicators;

[0064] The load index of the storage node is obtained by determining the normalized multidimensional performance indicators and their corresponding weights.

[0065] Specifically, the normalization method for the processor utilization cpu is: norm_cpu = cpu / 100.0;

[0066] The normalization method for the memory occupancy memory is: norm_memory = memory / 100.0;

[0067] The normalization method for the disk input / output per second (IOPS) is: norm_io = io / max_io_capacity, where io is the disk input / output per second, and max_io_capacity is the maximum input / output per second of the node.

[0068] The normalization method for the network throughput network is:

[0069] norm_network = network / max_network_capacity, where max_network_capacity is the maximum network throughput of the node.

[0070] The weights of the processor utilization, memory occupancy, disk input / output per second (IOPS), and network throughput are weights['cpu'], weights['memory'], weights['io'], and weights['network'], respectively. The weights of the normalized processor utilization, memory occupancy, disk input / output per second (IOPS), and network throughput remain unchanged.

[0071] The method for calculating the load index (percentage) is:

[0072] load_index = (norm_cpu * weights['cpu'] + norm_memory * weights['memory'] + norm_io * weights['io'] + norm_network * weights['network']) * 100.

[0073] Based on the load index calculation method of the four-dimensional indicators of CPU, memory, IO, and network, the load state of the storage node in different business scenarios can be accurately perceived by dynamically adjusting the weights, and the real-time and accurate evaluation of the system load can be realized, which provides a scientific basis for subsequent dynamic sharding decisions.

[0074] In this embodiment, obtaining the node affinity score of the to-be-migrated shard and the idle storage node includes:

[0075] acquire data characteristics of the to-be-migrated shard, the data characteristics including input-output intensive or capacity-intensive;

[0076] acquire node hardware configuration data of the idle storage node, the node hardware configuration data including a solid state disk node or a mechanical hard disk node;

[0077] acquire a node affinity score of the to-be-migrated shard and the idle storage node according to the data characteristics and the node hardware configuration data.

[0078] Specifically, the node affinity score of the to-be-migrated shard and the idle storage node is acquired according to the data characteristics and the node hardware configuration data, and includes:

[0079] The node affinity score formula is AffinityScore=α*IO_Score+β*Capacity_Score;

[0080] IO_Score is an input-output affinity term, Capacity_Score is a capacity affinity term, α and β are weight coefficients, α=0.7 (for input-output intensive data) or 0.3 (for capacity-intensive), and β=1-α.

[0081] The input-output affinity term formula is IO_Score=(Data_IOPS / Node_IOPS)*SSD_Bonus; Data_IOPS is the average input-output per second (IOPS) of the shard in the last 7 days; Node_IOPS is the nominal IOPS of the node (100,000 for SSD and 200 for HDD); and SSD_Bonus is an adjustment system, 1.5 for SSD nodes and 0.8 for HDD nodes.

[0082] The capacity affinity term formula is Capacity_Score=1-(Data_Size / Node_FreeSpace); Data_Size is the size of the shard after compression, and Node_FreeSpace is the remaining storage space of the node.

[0083] In the embodiment, the migration benefits of the to-be-migrated shard and each storage node are acquired, and the data migration of the to-be-migrated shard is controlled according to the migration benefits, including:

[0084] The idle storage node selected for data migration of the to-be-migrated shard is taken as a target node, and the migration benefits of the to-be-migrated shard and each target node are acquired;

[0085] The to-be-migrated shard with the highest migration benefit is selected and associated with the target node to form a data migration group, and data migration is performed according to the data migration group.

[0086] In the embodiment, the idle storage node selected to perform data migration of the to-be-migrated shard is taken as a target node, and migration benefits of the to-be-migrated shard and each target node are obtained, including:

[0087] The current storage node of the to-be-migrated shard is taken as a source node, and the load before migration of the source node and the load after migration of the source node are obtained.

[0088] The idle storage node selected to perform data migration is taken as a target node, and a load balancing gain of the target node and a data access heat coefficient are obtained.

[0089] The migration benefits of the to-be-migrated shard and the target node are calculated through the formula: migration benefits=(load before migration of the source node-load after migration of the source node)×load balancing gain of the target node×data access heat coefficient.

[0090] In the embodiment, hot data identification is performed on the to-be-migrated shard to determine whether the to-be-migrated shard is a hot data shard, including:

[0091] A recent reference set and a low-frequency reference set are maintained, and a data shard with a frequency of access greater than a preset number within a first time length before the current time is taken as a hot data shard according to the recent reference set and the low-frequency reference set, otherwise it is determined that the to-be-migrated shard is not a hot data shard.

[0092] As shown in Figure 4 , the maximum value of the node affinity score is 100, the first score is preferably 80, Figure 4 to start the dynamic shard process to perform a three-level decision model principle of data shard migration through hot data identification, node affinity evaluation, and migration benefit calculation.

[0093] Wherein, when the to-be-migrated shard is migrated to an idle storage node, it is preferentially migrated to a solid state disk (SSD) node.

[0094] Wherein, the to-be-migrated shard is migrated to an idle storage node, including:

[0095] Quantitative evaluation is performed according to the data access frequency, time dimension, or business state indicators of the to-be-migrated shard to obtain a hot data shard cold-hot score;

[0096] The type of the idle storage node is obtained, including a solid state disk (SSD) node or a mechanical hard disk (HDD) node;

[0097] When the hot data shard cold-hot score is greater than a first preset value, the to-be-migrated shard is migrated to a solid state disk (SSD) node;

[0098] When the hot data shard cold-hot score is less than or equal to the first preset value, the to-be-migrated shard is migrated to a mechanical hard disk (HDD) node.

[0099] The embodiment realizes intelligent layered storage of automatically scheduling hot data to the SSD layer and sinking cold data to the HDD layer. The heterogeneous medium cooperative scheduling strategy improves the utilization rate of mixed medium resources, enables reasonable use of high-performance storage media, reduces storage costs, and improves data access efficiency.

[0100] In the embodiment, the distributed block storage method further includes:

[0101] In response to detecting the addition of the new storage node, hardware configuration data of the new storage node is acquired;

[0102] The current storage node performance and load state are acquired, and a set of shards migrated to the new storage node is determined;

[0103] The data shards are gradually migrated to the new storage node according to a preset bandwidth;

[0104] In response to completion of the migration of the data shards, the shard mapping table is updated and the client is notified.

[0105] That is, when the new storage node is added, the system performs a dynamic shard expansion process as shown in Figure 5 The metadata server detects the addition of the new node, acquires its hardware configuration (CPU core number, memory capacity, storage medium type, etc.), acquires the current node load state, determines a set of shards (preferably cold data shards) that need to be migrated to the new node, gradually migrates the data shards to the new node according to a preset bandwidth (such as 500 MB / s), and updates the shard mapping table and notifies the client after the migration is completed.

[0106] The present application has achieved significant technical improvement in the field of distributed block storage through multi-dimensional load perception, hierarchical intelligent shard decision, incremental differential migration, and heterogeneous medium cooperative scheduling:

[0107] Load balancing capability: By collecting multi-dimensional indexes such as CPU utilization, memory occupancy, disk IOPS, and network throughput of the storage node in real time, the load index is calculated, and the data shard storage location is dynamically adjusted according to the load. The adaptive multi-dimensional load perception model can accurately adapt to various business scenarios, realize real-time balancing of node loads, effectively avoid the occurrence of "hot nodes", ensure stable IOPS, and improve the overall performance of the system.

[0108] Resource utilization optimization: A data access feature perception mechanism is constructed, hot data is identified through improved algorithms, and node affinity evaluation and migration benefit calculation are combined to realize intelligent layered storage of automatically scheduling hot data to the SSD layer and sinking cold data to the HDD layer. The heterogeneous medium cooperative scheduling strategy improves the utilization rate of mixed medium resources, enables reasonable use of high-performance storage media, reduces storage costs, and improves data access efficiency.

[0109] Business adaptability: through the coordinated work of load monitoring, sharding decision, migration execution and metadata management modules, the input and output characteristics of different business types are automatically optimized for sharding strategies. The intelligent sharding decision mechanism can flexibly respond to diversified business needs such as OLTP and big data analysis, and improve the overall performance of the system in different business scenarios.

[0110] In the above distributed block storage method, by collecting multi-dimensional performance indicators of the storage nodes in real time, calculating the load index, and dynamically adjusting the data sharding storage location according to the load, the adaptive multi-dimensional load perception model can accurately adapt to various business scenarios, realize real-time balancing of the load between nodes, effectively avoid the occurrence of "hot nodes", and improve the overall performance of the system. When the load index exceeds the preset threshold, the hot data identification, node affinity evaluation, and migration benefit calculation methods are started for data sharding migration, which improves the utilization rate of mixed media resources, makes the high-performance storage media be reasonably utilized, reduces the storage cost, and improves the data access efficiency. Through the coordinated work of load monitoring, sharding decision, migration execution and metadata management, the input and output characteristics of different business types are automatically optimized for sharding strategies, and the overall performance in different business scenarios is improved.

[0111] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases the former is a better embodiment.

[0112] In one embodiment, as shown in Figure 6 , a distributed block storage device 10 is provided, comprising a load monitoring module 1, a sharding decision module 2, and a migration execution module 3.

[0113] The load monitoring module 1 is used to monitor the storage nodes, collect multi-dimensional performance indicators of the storage nodes in real time, and determine the load index of the storage nodes according to the multi-dimensional performance indicators.

[0114] The sharding decision module 2 includes a hot data identification unit, a node affinity evaluation unit, and a migration benefit calculation unit. The hot data identification unit is used to determine whether the to-be-migrated shard is a hot data shard in response to the load index exceeding the preset threshold. The node affinity evaluation unit is used to obtain the node affinity score of the to-be-migrated shard and the idle storage node in response to the to-be-migrated shard not being a hot data shard. The migration benefit calculation unit is used to obtain the migration benefit of the to-be-migrated shard and each storage node in response to the node affinity score being less than or equal to a first value.

[0115] The migration execution module 3 is configured to implement the incremental differential migration based on the copy-on-write. The migration execution module 3 is configured to, in response to the to-be-migrated shard being a hot data shard, migrate the to-be-migrated shard to an idle storage node; in response to the node affinity score being greater than the first score, migrate the to-be-migrated shard to the corresponding idle storage node; and control the data migration of the to-be-migrated shard according to the migration benefit.

[0116] In the embodiment, the storage nodes are monitored, and multi-dimensional performance indexes of the storage nodes are collected in real time. The load index of the storage node is determined according to the multi-dimensional performance indexes, and the load index of the storage node includes:

[0117] The processor utilization, the memory occupancy, the input / output per second (IOPS) of the disk, and the network throughput of the storage node are collected in real time by the monitoring tool as the multi-dimensional performance indexes;

[0118] The weights of the multi-dimensional performance indexes are adjusted according to the business type of the storage node;

[0119] The multi-dimensional performance indexes are normalized;

[0120] The load index of the storage node is determined according to the normalized multi-dimensional performance indexes and the corresponding weights.

[0121] In the embodiment, the migration benefit of the to-be-migrated shard and each storage node is obtained, and the data migration of the to-be-migrated shard is controlled according to the migration benefit, and the method includes:

[0122] The idle storage node selected by the to-be-migrated shard for data migration is taken as a target node, and the migration benefit of the to-be-migrated shard and each target node is obtained;

[0123] The to-be-migrated shard with the highest migration benefit is selected and associated with the target node to form a data migration group, and the data migration is performed according to the data migration group.

[0124] In the embodiment, the node affinity score of the to-be-migrated shard and the idle storage node is obtained, and the method includes:

[0125] The data characteristics of the to-be-migrated shard are obtained, and the data characteristics include input / output intensive or capacity intensive;

[0126] The node hardware configuration data of the idle storage node is obtained, and the node hardware configuration data includes a solid state disk node or a mechanical hard disk node;

[0127] The node affinity score of the to-be-migrated shard and the idle storage node is obtained according to the data characteristics and the node hardware configuration data.

[0128] In the embodiment, the idle storage node selected by the to-be-migrated shard for data migration is taken as a target node, and the migration benefit of the to-be-migrated shard and each target node is obtained, and the method includes:

[0129] The storage node where the to-be-migrated shard currently resides is taken as a source node, and a pre-migration load of the source node and a post-migration load of the source node are obtained;

[0130] The idle storage node selected for data migration is taken as a target node, and a load balancing gain of the target node and a data access heat coefficient are obtained;

[0131] The migration benefit of the to-be-migrated shard and the target node is calculated through a formula: migration benefit = (pre-migration load of the source node - post-migration load of the source node) x load balancing gain of the target node x data access heat coefficient.

[0132] In this embodiment, determining whether the to-be-migrated shard is a hot data shard includes:

[0133] The recent reference set and the low-frequency reference set are maintained, and a data shard with a frequency of access greater than a preset number within a first time length before the current time is taken as a hot data shard according to the recent reference set and the low-frequency reference set, otherwise it is determined that the to-be-migrated shard is not a hot data shard.

[0134] In this embodiment, as shown in Figure 6 The distributed block storage device 10 further includes a storage node management module 4, configured to:

[0135] In response to detecting the addition of the new storage node, the hardware configuration data of the new storage node is obtained;

[0136] The current storage node performance and load state are obtained, and a shard set migrated to the new storage node is determined;

[0137] The data shards are gradually migrated to the new storage node according to a preset bandwidth;

[0138] In response to the completion of the migration of the data shards, the shard mapping table is updated and the client is notified.

[0139] As shown in Figure 6 The distributed block storage device 10 further includes a metadata management module 5, configured to maintain the shard mapping table and coordinate the work of each module.

[0140] In the distributed block storage device, the multi-dimensional performance indexes of the storage nodes are collected in real time, the load index is calculated, and the data shard storage location is dynamically adjusted according to the load. The adaptive multi-dimensional load sensing model can accurately adapt to various business scenarios, realize real-time balancing of the load between nodes, effectively avoid the occurrence of "hot nodes", and improve the overall performance of the system. When the load index exceeds the preset threshold, the data shard migration is performed in the manner of hot data identification, node affinity evaluation, and migration benefit calculation, which improves the utilization rate of mixed media resources, reasonably utilizes high-performance storage media, reduces the storage cost, and improves the data access efficiency. Through the collaborative work of load monitoring, shard decision, migration execution, and metadata management, the shard strategy is automatically optimized according to the input and output characteristics of different business types, and the overall performance in different business scenarios is improved.

[0141] The description of the features in the embodiments of the distributed block storage device can be referred to the related description of the embodiments of the distributed block storage method, which will not be repeated here.

[0142] Embodiments of the present application also provide an electronic device, comprising a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above distributed block storage method embodiments.

[0143] In one embodiment, the electronic device can be a server, and its internal structure diagram can be as shown in Figure 7 The electronic device includes a processor, a memory, a network interface and a database connected by a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium. The database of the electronic device is used to store distributed block storage data. The network interface of the electronic device is used to communicate with external terminals through network connection. The computer program is executed by the processor to implement a distributed block storage method.

[0144] Embodiments of the present application also provide a computer readable storage medium, which stores a computer program, wherein the computer program is configured to run and perform the steps in any of the above distributed block storage method embodiments.

[0145] In an example embodiment, the computer readable storage medium described above can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.

[0146] Embodiments of the present application also provide a computer program product, which comprises a computer program, and the computer program, when executed by a processor, implements the steps in any of the above-described distributed block storage method embodiments.

[0147] Embodiments of the present application also provide another computer program product, which comprises a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium stores a computer program, and the computer program, when executed by a processor, implements the steps in any of the above-described distributed block storage method embodiments.

[0148] The skilled in the art can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in the above description in general terms. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. The skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0149] The above describes in detail a distributed block storage method, device, electronic equipment and storage medium provided by the present application. The principles and implementation modes of the present application are described by applying specific examples in this paper, and the above description of the examples is only used to help understand the method and its core idea of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the principles of the present application, some improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A distributed block storage method, characterized in that, include: Monitor storage nodes, collect multi-dimensional performance indicators of the storage nodes in real time, and determine the load index of the storage nodes based on the multi-dimensional performance indicators; When the load index exceeds a preset threshold, it is determined whether the shard to be migrated is a hot data shard. If the shard to be migrated is a hot data shard, then the shard to be migrated is migrated to an idle storage node; In response to the fact that the shard to be migrated is not a hot data shard, the node affinity score between the shard to be migrated and the idle storage node is obtained; In response to the node affinity score being greater than a first score, the shard to be migrated is migrated to the corresponding idle storage node; In response to the node affinity score being less than or equal to a first score, the migration benefit between the shard to be migrated and each storage node is obtained, and the data migration of the shard to be migrated is controlled according to the migration benefit.

2. The distributed block storage method according to claim 1, characterized in that, The monitoring storage node collects multi-dimensional performance indicators of the storage node in real time, and determines the load index of the storage node based on the multi-dimensional performance indicators, including: The processor utilization, memory usage, disk input / output per second, and network throughput of storage nodes are collected in real time by monitoring tools as multi-dimensional performance indicators. The weights of the multidimensional performance metrics are adjusted according to the service type of the storage node; The multidimensional performance indicators are normalized. The load index of the storage node is obtained by determining the normalized multidimensional performance indicators and their corresponding weights.

3. The distributed block storage method according to claim 1, characterized in that, The process of obtaining the node affinity score between the shard to be migrated and the idle storage node includes: Obtain the data characteristics of the shard to be migrated, including input / output intensive or capacity intensive data characteristics; Obtain the node hardware configuration data of the idle storage node, the node hardware configuration data including solid-state drive node or mechanical hard drive node; The node affinity score between the shard to be migrated and the idle storage node is obtained based on the data characteristics and the node hardware configuration data.

4. The distributed block storage method according to claim 1, characterized in that, The step of obtaining the migration benefit of the shard to be migrated and each storage node, and controlling the shard to be migrated to perform data migration based on the migration benefit, includes: selecting idle storage nodes for data migration of the shard to be migrated as target nodes, and obtaining the migration benefit of the shard to be migrated and each target node. Select the shard to be migrated with the highest migration benefit and associate it with the target node to form a data migration group, and then perform data migration based on the data migration group.

5. The distributed block storage method according to claim 4, characterized in that, The step of selecting idle storage nodes for data migration of the shard to be migrated as target nodes and obtaining the migration benefits between the shard to be migrated and each target node includes: Take the current storage node of the shard to be migrated as the source node, and obtain the load of the source node before migration and the load of the source node after migration. Select idle storage nodes for data migration as target nodes, and obtain the target node's load balancing gain and data access heat coefficient. The migration benefit between the shard to be migrated and the target node is calculated using the formula: Migration Benefit = (Load of source node before migration - Load of source node after migration) × Load balancing gain of target node × Data access popularity coefficient.

6. The distributed block storage method according to claim 1, characterized in that, The step of determining whether the fragment to be migrated is a hot data fragment includes: Maintain a recent reference set and a low-frequency reference set. Based on the recent reference set and the low-frequency reference set, data fragments that are accessed more than a preset number of times within a first time period before the current time are designated as hot data fragments; otherwise, the fragments to be migrated are determined not to be hot data fragments.

7. The distributed block storage method according to claim 1, characterized in that, The distributed block storage method further includes: In response to the detection of a newly added storage node, the hardware configuration data of the newly added storage node is obtained; Obtain the current storage node performance and load status, and determine the set of shards to be migrated to the newly added storage node; Data fragments are gradually migrated to the newly added storage nodes according to the preset bandwidth. Once the data sharding migration is complete, update the sharding mapping table and notify the client.

8. A distributed block storage device, characterized in that, include: The load monitoring module is used to monitor storage nodes, collect multi-dimensional performance indicators of the storage nodes in real time, and determine the load index of the storage nodes based on the multi-dimensional performance indicators. The sharding decision module includes a hot data identification unit, a node affinity assessment unit, and a migration benefit calculation unit. The hot data identification unit determines whether the shard to be migrated is a hot data shard when the load index exceeds a preset threshold. The node affinity assessment unit obtains the node affinity score between the shard to be migrated and idle storage nodes when the shard to be migrated is not a hot data shard. The migration benefit calculation unit obtains the migration benefit between the shard to be migrated and each storage node when the node affinity score is less than or equal to a first score. The migration execution module is configured to migrate the shard to be migrated to an idle storage node in response to the shard being a hot data shard; and to migrate the shard to be migrated to the corresponding idle storage node in response to the node affinity score being greater than a first score. The migration benefits are used to control the data migration of the shards to be migrated.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the distributed block storage method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the distributed block storage method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Data processing method, device, equipment and program product

    CN121560996A

  • A multi-dimensional fragmentation logic organization management system for engineering cost consultation business data

    CN122364326A