A processing method for alleviating the excessively high local space load of the performance layer in hierarchical distributed block storage

In the hierarchical distributed block storage system, the space allocation service is used to select nodes with lower load to allocate performance layer copies for small data blocks, and combined with the LRU mechanism to sink high load data to the capacity layer, solving the problem of locally high load on the performance layer space, and achieving efficient utilization of system resources and load balancing.

CN119781676BActive Publication Date: 2025-07-22北京志凌海纳科技股份有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411842750.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-07-22
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

In the existing hierarchical distributed block storage system, the problem of locally high performance layer space load has led to unbalanced system resource utilization.

Method used

Through the space allocation service, select nodes with lower load to allocate performance layer replicas to small data blocks, and combine the LRU mechanism to sink the data of high-load nodes to the capacity layer to achieve load balancing.

Benefits of technology

It effectively alleviates the problem of locally overloaded space in the performance layer, ensures efficient utilization of system resources and load balancing, prevents excessive local load, and improves system performance and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119781676B_ABST
    Figure CN119781676B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for alleviating the problem of excessive local space load in the performance layer of hierarchical distributed block storage. First, the user's IO requests are written into small data blocks, and then the space allocation service allocates replicas for these data blocks, providing a basis for subsequent data storage and access. Further, the space allocation service selects nodes with lower load according to the space load rate of each performance layer replica to allocate the performance layer replicas for storing small data blocks, ensuring the efficient utilization of system resources. Further, through the LRU mechanism, the system manages the transfer of data from the performance layer to the capacity layer. The system determines which data is in a colder state and transfers them from the performance layer to the capacity layer to release the space in the performance layer, ensuring that frequently accessed data can continue to be retained in the performance layer, preventing local load from being too high while ensuring the reasonable use of performance layer resources, thereby achieving the effect of load balancing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed storage, and in particular to a method for processing the problem of excessive local load in the performance layer space of hierarchical distributed block storage. Background Art

[0002] In the context of the wide application of the big data era and cloud computing, storage technology is facing unprecedented challenges. Users hope that the storage system can provide high-speed read and write performance, high availability, and low cost, while also meeting the requirements of elastic expansion and intelligent management. Against this background, hierarchical distributed block storage has become an ideal solution. It combines the advantages of distributed storage and hierarchical storage, providing a storage architecture that balances performance, reliability, and cost. Hierarchical distributed block storage is a technical architecture that distributes data across multiple storage nodes and stores data on different levels of storage media according to the access frequency and performance requirements of the data. The performance layer uses high-speed storage media (such as NVMe SSD or DRAM) to provide low latency and high throughput. The capacity layer uses lower-cost media (such as SATA HDD or tape) to reduce storage costs.

[0003] The space allocator of hierarchical distributed block storage manages the storage spaces of the performance layer and the capacity layer. The space allocator uniformly manages the high-speed storage media spaces of multiple nodes, regarded as the performance layer space. The space allocator uniformly manages the media spaces with low cost of multiple nodes, regarded as the capacity layer space.

[0004] Generally, the virtual volume provided by hierarchical distributed block storage for users to store data consists of multiple small data blocks. The common sizes of small data blocks are 4 KiB / 256 KiB / 2 GiB or an elastic size container. The data of small data blocks is hierarchically distributed in the performance layer and the capacity layer. Small data blocks are usually stored in multiple copies in the performance layer. Small data blocks use multiple copies or EC storage in the capacity layer.

[0005] Data within a small data block is organized in smaller granularities, such as 4 KiB / 16 KiB / 256 KiB, etc., which are called sub-data blocks. The sub-data blocks within the same small data block are allocated by the storage service where the copies of the performance layer / capacity layer of the small data block are located.

[0006] Hierarchical distributed block storage generally uses the LRU mechanism to perceive the data cold and hot conditions of small data blocks (taking the sub-data blocks of the performance layer copies as the granularity). The sub-data blocks with high access frequency in the small data block are stored in the performance layer. The sub-data blocks with low access frequency in the small data block are stored in the capacity layer.

[0007] Due to the high space cost of the performance layer, the space of the performance layer may be much smaller than that of the capacity layer. To avoid the exhaustion of the performance layer space, the hierarchical distributed block storage periodically reads the cold data sub-blocks from the performance layer space of the small data blocks according to the hot and cold conditions of the sub-blocks of the small data blocks, and writes them into the capacity layer to release the performance layer space. As Figure 1 shown, generally, the sub-blocks of the newly written small data blocks are hot data and are allocated in the performance layer. If there is no IO access to the sub-blocks of the small data block for a period of time after writing, the sub-blocks will become cold. After becoming cold, they will sink to the capacity layer after a certain period of time, and the space occupied by the sub-blocks in the performance layer will be released when the sinking ends.

[0008] The prior art reduces the space utilization rate of the performance layer by sinking the performance layer data of small data blocks from hot to cold to the capacity layer, as Figure 2 shown. However, small data blocks can be thinly provisioned. Thin provisioning means that the space allocator can allocate copies of multiple small data blocks to the same node without immediately occupying the performance layer space of that node. When a write IO writes to the performance layer copy of a small data block, the performance layer copy will actually occupy space. When a large number of thinly provisioned small data block copies are concentrated on a certain node, with the writing of small data blocks, the space utilization rate of the performance layer of this node will keep rising, and the pressure on the performance layer space will become greater. Since the LRU mechanism sinks cold data periodically, and in the above write scenario, the space load of the performance layer of a local node increases, and the written data is hot, so the hot and cold sinking cannot alleviate the problem of excessive local space load (the used space of the node performance layer / the total space of the node performance layer) of the performance layer in this scenario. Summary of the Invention

[0009] The object of the present invention is to provide a processing method for alleviating the local excessive space load of the performance layer in hierarchical distributed block storage, and solve the above-mentioned technical problems pointed out in the prior art.

[0010] The present invention provides a processing method for alleviating the local excessive space load of the performance layer in hierarchical distributed block storage, including the following operation steps:

[0011] Obtain the IO request of the user; write the IO request into a small data block; the storage service sends a performance layer copy allocation request to the space allocation service based on the small data block written with the IO request;

[0012] The space allocation service selects multiple low-load nodes as target performance layer copies based on the performance layer copy allocation request in combination with the space load rate of each performance layer copy; and writes the small data block into the target performance layer copies;

[0013] The storage service is based on the LRU mechanism and combines the load status information of each storage service in the current cluster for linkage acceleration to sink the small data blocks corresponding to the high-load nodes in the target performance layer copy into the capacity layer.

[0014] Preferably, when a small data block is written into the performance layer copy, the corresponding data in the small data block will occupy the space of the performance layer copy.

[0015] Preferably, the LRU mechanism includes the following operating steps:

[0016] Mark the cold and hot data of each small data block based on the access time of the sub-data blocks of each small data block within a continuous time period; wherein, the closer the access time of the sub-data block is to the current time point, the hotter the cold and hot data of the small data block corresponding to the sub-data block.

[0017] Arrange each small data block from hot to cold based on the cold and hot data to obtain a linked list sequence set.

[0018] Sink the small data blocks at the tail of the linked list sequence set that are less than or equal to the preset maximum cold and hot data threshold of the cold and hot data into the capacity layer at a preset time period.

[0019] Preferably, the space allocation service selects multiple low-load nodes as the target performance layer copies based on the performance layer copy allocation request and combines the space load rates of each performance layer copy, including the following operating steps:

[0020] Obtain the node performance layer space capacity of each of the performance layer copies in real time.

[0021] Calculate the space load rate corresponding to the performance layer copy based on the node performance layer space capacity and the total space capacity of the node performance layer corresponding to the performance layer copy.

[0022] Select multiple target performance layer copies based on the space load rate and the pre-set highest space load rate threshold.

[0023] Preferably, the calculation method of the space load rate is: space load rate = node performance layer space capacity / node performance layer total space capacity.

[0024] Preferably, after the space allocation service selects multiple low-load nodes as the performance layer copies based on the performance layer copy allocation request, the following operating steps are further included:

[0025] Screen for high-load nodes and low-load nodes by periodically scanning the space load rate of the target performance layer copy at a preset interval time; migrate the small data blocks corresponding to the target performance layer copy in the high-load nodes to the low-load nodes.

[0026] Preferably, the storage service is based on the LRU mechanism and combines the load status information of each storage service in the current cluster to perform linkage acceleration to sink the small data blocks corresponding to the high-load nodes in the target performance layer replicas into the capacity layer, including the following operation steps: establishing a performance layer space load perception mechanism for the current storage service;

[0027] The space allocation service senses whether the current storage service is a high-load node; if so, it triggers the sinking mechanism and the performance layer space load perception mechanism, controls the current storage service and all storage services in the current cluster except the current storage service to jointly scan the tail of the LRU list corresponding to the LRU mechanism in the current storage service, and sequentially scans in the order from cold to hot to obtain the sinking small data blocks; and sinks the sinking small data blocks into the capacity layer until the space allocation service senses that the current storage service is not a high-load node.

[0028] Preferably, the performance layer space load perception mechanism refers to a mechanism by which the current storage service can sense the load status of all storage services in the current cluster except the current storage service.

[0029] Preferably, controlling the current storage service and all storage services in the current cluster except the current storage service to jointly scan the tail of the LRU list corresponding to the LRU mechanism in the current storage service, and sequentially scanning in the order from cold to hot to obtain the sinking small data blocks, including the following operation steps: obtaining the access frequency Ti of the i-th small data block in the current storage service within a preset access time period; calculating the access priority Pi of the i-th small data block based on the access frequency and the cold and hot data Wi of the i-th small data block;

[0030] Sorting each small data block from high to low based on the access priority Pi to obtain a first LRU list sequence set;

[0031] Obtaining the space load rates of each storage service in the current cluster except the current storage service; sorting based on the space load rates from low to high to obtain a linkage service priority sequence set;

[0032] Calculating the maximum data volume of the current storage service based on the highest space load rate threshold; calculating the reserved data volume by cumulative calculation of the data volumes of the small data blocks from high to low in the first LRU list sequence set; calculating the maximum number of small data blocks when the reserved data volume is less than or equal to the maximum data volume of the current storage service; calculating the total number of sinking small data blocks based on the maximum number of small data blocks and the total number of small data blocks of the current storage service;

[0033] Select the small data blocks with the smallest total number of sinking small data blocks from the lowest to the highest in the first LRU linked list sequence set according to the ranking of each storage service in the linked service priority sequence set from high to low for scanning. sinking small data blocks.

[0034] Preferably, the calculation method of the access priority Pi is: Pi = Ti × α + Wi × β;

[0035] In the formula, α and β are weight coefficients respectively, and β > α;

[0036] The calculation method of the small data blocks is: ;

[0037] In the formula, k is the kth storage service ranked from high to low in the linked service priority sequence set; N is the total number of sinking small data blocks; is the floor function.

[0038] Compared with the prior art, the embodiments of the present invention have at least the following technical advantages:

[0039] Analyzing the above-mentioned method for alleviating the excessive local space load of the performance layer of a hierarchical distributed block storage provided by the present invention, it can be seen that in specific applications, first write the user's IO requests into small data blocks, and then the space allocation service allocates replicas for these data blocks, providing a basis for subsequent data storage and access; further, the space allocation service selects nodes with lower load according to the space load rate of each performance layer replica to allocate the performance layer replicas for storing small data blocks, ensuring the efficient use of system resources; further, through the LRU mechanism, manage the transfer of data from the performance layer to the capacity layer. The system judges which data is in a colder state and transfers them from the performance layer to the capacity layer to release the space of the performance layer, ensuring that frequently accessed data can continue to be retained in the performance layer, ensuring the reasonable use of performance layer resources while preventing excessive local load, thereby achieving the effect of load balancing. Description of the Drawings

[0040] Figure 1 is a schematic diagram of simulating sinking small data blocks in hierarchical distributed block storage in the prior art;

[0041] Figure 2 is a schematic diagram of simulating sinking small data blocks in hierarchical distributed block storage in the prior art;

[0042] Figure 3 is a schematic diagram of the overall operation steps of a method for alleviating the excessive local space load of the performance layer of a hierarchical distributed block storage;

[0043] Figure 4Schematic diagram of the sorting operation for a method of alleviating excessive local space load in the performance layer of a hierarchical distributed block storage;

[0044] Figure 5 Schematic diagram of the operation steps for selecting a target performance layer replica in a method of alleviating excessive local space load in the performance layer of a hierarchical distributed block storage;

[0045] Figure 6 Schematic diagram of the simulation of the operation process for jointly accelerating the sinking of small data blocks in a method of alleviating excessive local space load in the performance layer of a hierarchical distributed block storage;

[0046] Figure 7 Schematic diagram of the operation steps for scanning and obtaining small data blocks to be sunk in a method of alleviating excessive local space load in the performance layer of a hierarchical distributed block storage. Detailed implementation manners

[0047] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments of the present invention belong to the scope of protection of the present invention.

[0048] The present invention will be further described in detail below through specific embodiments in conjunction with the accompanying drawings.

[0049] Embodiment 1

[0050] As Figure 3 or Figure 4 shown, Embodiment 1 of the present invention provides a method for alleviating excessive local space load in the performance layer of a hierarchical distributed block storage, including the following operation steps:

[0051] Step S10: Obtain the IO request of the user; write the IO request into a small data block; the storage service sends a performance layer replica allocation request to the space allocation service based on the small data block written with the IO request;

[0052] It should be noted that in the above embodiments of the present application, the space allocation service is responsible for allocating replicas in the performance layer and the capacity layer for small data blocks (i.e., small data blocks written with user IO requests), and managing the replica allocation of small data blocks; the storage service processes external IO requests and completes the allocation of performance layer replicas and capacity layer replicas of small data blocks through the space allocation service. The storage service is responsible for the user IO request to access the small data block and is responsible for the sinking of the small data block;

[0053] When a user's I / O request writes a small data block to an unallocated copy, the storage service requests the space allocation service to allocate a performance layer copy for the small data block, that is, selects several nodes as the performance layer copies of the small data block; the write of the small data block will be forwarded to several performance layer copies, and the write will occupy the performance layer space of the nodes where the performance layer copies are located.

[0054] The common sizes of data blocks as allocation units are 4MiB / 256MiB / 2GiB / or an elastic size container; when small data blocks are actually stored in the performance layer, usually the storage engine organizes data in smaller granularities, such as 4KiB / 16KiB / 256KiB, etc.; assuming 256KiB is used as the small management granularity, for a never-written small data block, when initially writing 0 - 256KiB, it will occupy 256KiB of the performance layer copy; the initial space occupancy of the performance layer copy of a thin-provisioned small data block on a node is 0MiB, and it gradually increases with writing, and occupies the full size of the small data block when written full.

[0055] Step S20: The space allocation service selects multiple low-load nodes as target performance layer copies based on the performance layer copy allocation request and the space load rate of each performance layer copy; and writes the small data block into the target performance layer copies.

[0056] It should be noted that when a small data block is written to a performance layer copy, the corresponding data in the small data block will occupy the space of the performance layer copy.

[0057] Step S30: The storage service performs linkage acceleration based on the LRU mechanism and in combination with the load status information of each storage service in the current cluster, and sinks the small data blocks corresponding to the high-load nodes in the target performance layer copies into the capacity layer.

[0058] The LRU mechanism includes the following operation steps: Mark the hot and cold data of each small data block based on the access time of the sub-data blocks of each small data block within a continuous time period; among them, the closer the access time of the sub-data block is to the current time point, the hotter the hot and cold data of the small data block corresponding to the sub-data block.

[0059] Arrange all small data blocks in order from hot to cold based on the hot and cold data to obtain a linked list sequence set.

[0060] Sink the small data blocks at the tail of the linked list sequence set that are less than or equal to the preset maximum hot and cold data threshold of the hot and cold data into the capacity layer at a preset time period.

[0061] It should be noted that the above embodiments of the present application use the LRU mechanism to perceive the hot and cold conditions of sub-data blocks of small data blocks (the size of sub-data blocks is usually 4KiB / 16KiB / 256KiB); the LRU mechanism is essentially a linked list, and each small data block is a member of the linked list. Each time a sub-data block of a small data block is accessed, the small data block is inserted into the head of the linked list. That is, the sub-data block closer to the head of the linked list (the closer to the head of the linked list means that the access time point of the small data block is closer to the current time point) is hotter, while the small data block at the tail of the linked list is relatively colder; the storage service will periodically sink the small data blocks at the tail of the linked list to release the performance layer space occupied by each small data block (that is, the performance layer space occupied by the small data block);

[0062] The above embodiments of the present application alleviate the high load of the local performance layer space by adjusting the space allocation and migration of the hierarchical distributed block storage, and the strategy of sinking the performance layer to the capacity layer;

[0063] In the case of a large number of writes of thin-provisioned small data blocks in the hierarchical distributed block storage based on hot and cold sinking, because the small data block replicas may be concentrated on some written nodes, when a large number of writes occur, the performance layer space load of these nodes will be too high, and the performance layer space pressure of these nodes will become larger; by avoiding allocating the performance layer replicas of small data blocks to the nodes with too high performance layer space load and actively migrating the performance layer replicas with high performance layer space load to the nodes with lower performance layer space, the performance layer space of each node is balanced as much as possible; by actively scanning the sub-data blocks related to the nodes with too high performance layer space of the replicas in the LRU and sinking them, the performance layer space of the nodes with too high performance layer space load is actively released;

[0064] In the above embodiments of the present application, first, the user's IO requests are written into small data blocks, and then the space allocation service allocates replicas for these data blocks, providing a basis for subsequent data storage and access; further, the space allocation service selects nodes with lower load based on the space load rate of each performance layer replica to allocate the performance layer replicas for storing small data blocks, ensuring the efficient use of system resources; further, through the LRU mechanism, the transfer of data from the performance layer to the capacity layer is managed. The system judges which data is in a colder state and transfers them from the performance layer to the capacity layer to release the performance layer space, ensuring that frequently accessed data can continue to be retained in the performance layer, ensuring the reasonable use of performance layer resources while preventing local overloading, so as to achieve the effect of load balancing.

[0065] Specifically, as Figure 5 shown, in step S20, the space allocation service selects multiple low-load nodes as target performance layer replicas based on the performance layer replica allocation request in combination with the space load rate of each performance layer replica, including the following operation steps:

[0066] Step S21: Obtain the node performance layer space capacity of each of the performance layer replicas in real time;

[0067] Step S22: Calculate the space load ratio corresponding to the performance layer replica based on the node performance layer space capacity and the total node performance layer space capacity corresponding to the performance layer replica;

[0068] The calculation method of the space load ratio is: space load ratio = node performance layer space capacity / total node performance layer space capacity;

[0069] It should be noted that the above node performance layer space capacity refers to the storage space that has already accommodated the data volume corresponding to the current performance layer replica node, and the above total node performance layer space capacity refers to the total storage space that can accommodate the data volume corresponding to the current performance layer replica node (or the storage space capacity of the node corresponding to the current performance layer replica); based on the calculation of the embodiments of the present application, the load ratio of the node corresponding to the current performance layer replica can be obtained, which can provide an effective data basis for the selection of subsequent performance layer replicas.

[0070] Step S23: Select multiple target performance layer replicas based on the space load ratio and a preset highest space load ratio threshold.

[0071] It should be noted that usually, the highest space load ratio threshold is set to 85%. When the space load ratio is higher than (i.e., greater than) 85%, that is, the node corresponding to the space load ratio is a high-load node. In the embodiments of the present application, when selecting performance layer replicas, nodes with high space load in the performance layer are avoided, and nodes with a space load ratio less than or equal to 85% are selected as performance layer replicas, which can improve the usage efficiency of the nodes while avoiding overloading of local nodes.

[0072] Specifically, in step S20, after the space allocation service selects multiple low-load nodes as performance layer replicas based on the performance layer replica allocation request, the following operation steps are further included:

[0073] Step S21: Screen for high-load nodes and low-load nodes by periodically scanning the space load ratio of the target performance layer replicas at preset intervals; migrate the small data blocks corresponding to the target performance layer replicas in the high-load nodes to the low-load nodes.

[0074] It should be noted that in the above embodiments of the present application, first, the space allocation service periodically scans the performance layer space load of each storage service in the cluster at a preset interval. After detecting a high-load node during the scan, the space allocation service issues a migration command to the storage service. Subsequently, the storage service migrates the corresponding small data blocks on the node with a high performance layer space load to a low-load node, achieving load balancing and avoiding excessive local load.

[0075] During the specific implementation process of the above embodiments of the present application, the technical personnel found that during the initial configuration, since the small data blocks prepared by thin provisioning may be written less, the space occupied by the performance layer replicas on each node is not large at the beginning. However, with the write operations of user I / O, the nodes with overly concentrated performance layer replicas of small data blocks will face a rapidly increasing occupancy of the performance layer space. The strategies of trying to avoid nodes with high performance layer space load when allocating performance layer replicas for small data blocks and actively migrating the performance layer replicas on nodes with high performance layer space load to nodes with low performance layer space load are not in time to take effect. Therefore, a more dynamically perceiving mechanism for reducing the performance layer space load is needed. This strategy is called accelerated sinking, and the specific operations are described in detail in the following steps S31 - step S3*.

[0076] Specifically, as Figure 6 shown, in step S30, the storage service, based on the LRU mechanism and in combination with the load status information of each storage service in the current cluster, performs linkage acceleration to sink the small data blocks corresponding to the high-load nodes in the target performance layer replicas into the capacity layer, including the following operation steps:

[0077] Step S31: Establish a performance layer space load perception mechanism for the current storage service; the performance layer space load perception mechanism refers to a mechanism by which the current storage service can perceive the load status of all storage services in the current cluster except the current storage service.

[0078] Step S32: The space allocation service perceives whether the current storage service is a high-load node; if so (if not, continuous periodic monitoring is performed), then the sinking mechanism and the performance layer space load perception mechanism are triggered to control the current storage service and all storage services in the current cluster except the current storage service to jointly scan the tail of the LRU list corresponding to the LRU mechanism in the current storage service, and sequentially scan to obtain the sinking small data blocks (the small data blocks in the sinking performance layer replicas) in the order from cold to hot; and sink the sinking small data blocks into the capacity layer until the space allocation service perceives that the current storage service is not a high-load node.

[0079] It should be noted that, in the above-mentioned embodiment of the present application, each storage service in the current cluster has its own LRU mechanism (i.e., LRU linked list) and performance layer space load perception mechanism; when the space allocation service periodically perceives that the current storage service is a high-load node, the LRU mechanism and the performance layer space load perception mechanism are triggered at the same time, and the current storage service and all storage services except the current storage service in the current cluster are linked together to scan the LRU linked list from cold to hot to obtain the sinking performance layer copy, and sink the small data blocks in the sinking performance layer copy into the capacity layer until the space allocation service perceives that the space load rate of the current storage service is less than or equal to the maximum threshold of the space load rate, and then stops sinking;

[0080] In the above embodiment of the present application, the access right to a small data block is only granted to one storage service in the cluster at the same time. The storage service with the access right to the small data block manages the sub-data blocks of the performance layer replica of the small data block, and adds the storage service's own LRU to sense hot and cold. For example, the performance layer replica of the small data block is [storage service-node (node refers to the performance layer replica node) 1, storage service-node 2], and the one with the access right to the small data block is storage service-node 3. Then the user IO can only access the data of the small data block through storage service-node 3, and only storage service-node 3 can sink the small data block, releasing the performance layer space of storage service-node 1 and storage service node-2. The accelerated sinking mechanism involves the linkage of multiple storage services:

[0081] Each storage service in the cluster establishes a performance layer space load perception mechanism with other storages. Each storage service perceives its own performance layer space load. When the local performance layer space load is high, it notifies all storage services to enable accelerated sinking for it. All storage services scan the hot and cold data of the sub-data blocks of the small data blocks to be sunk for the nodes that enable accelerated sinking: from the end of the LRU linked list, in the order from cold to hot, scan out the small data blocks related to the accelerated sinking node. In order to reduce the impact of accelerated sinking on user IO, hot small data blocks are stored in the high-speed performance layer as much as possible, and accelerated sinking sinks small data blocks from cold to hot, sinking cold small data blocks to the capacity layer as much as possible. If the sinking of cold small data blocks can reduce the performance layer space load of related storage services, the impact on user IO is relatively low.

[0082] All storage services sink these small data blocks at the fastest speed to release the performance layer space load of the accelerated sinking nodes;

[0083] When the accelerated sinking storage service senses that the local performance storage space load has decreased (less than or equal to the threshold for high load determination, that is, the above-mentioned maximum threshold for space load rate), it notifies all storage services to stop accelerating their own sinking.

[0084] Specifically, ifFigure 7 As shown, in step S32, control the current storage service and all storage services in the current cluster except the current storage service to jointly scan the tail of the LRU list corresponding to the LRU mechanism in the current storage service, and sequentially scan in the order from cold to hot to obtain the sinking small data blocks, including the following operation steps:

[0085] Step S321: Obtain the access frequency Ti of the i-th small data block in the current storage service within the preset access time period; calculate the access priority Pi of the i-th small data block based on the access frequency combined with the cold and hot data Wi of the i-th small data block;

[0086] The calculation method of the access priority Pi is: Pi = Ti × α + Wi × β;

[0087] In the formula, α and β are weight coefficients respectively, and β > α (because the hotter the cold and hot data of the small data block, the higher it is in the LRU list, and it should not be sunk into the capacity layer more);

[0088] It should be noted that in the above embodiments of the present application, by comprehensively considering the access frequency of the small data block and the cold and hot data of the small data block, the small data block with a low access rate and cold cold and hot data sinks quickly, reducing the load pressure on the server, and enabling the small data block with a high access rate and hot cold and hot data to be retained in the performance layer replica, so that the small data block with a high access frequency and relatively hot cold and hot data (that is, it may still be accessed in the subsequent time period) can efficiently respond to IO requests in the performance layer replica.

[0089] Step S322: Sort each small data block from high to low based on the access priority Pi to obtain the first LRU list sequence set;

[0090] Step S323: Obtain the space load rate of each storage service in the current cluster except the current storage service; sort based on the space load rate from low to high to obtain the linked service priority sequence set;

[0091] The linked service priority sequence set is because the storage service with a lower space load rate can assist the current storage service to scan the sinking small data blocks more quickly, so that the load balance can be achieved more quickly.

[0092] Step S324: Calculate the maximum data volume of the current storage service based on the highest threshold of the space load rate; calculate the retained data volume by cumulative calculation of the data volumes of the small data blocks from high to low in the first LRU list sequence set; calculate the number of the largest small data blocks when the retained data volume is less than or equal to the maximum data volume of the current storage service; calculate the total number of sinking small data blocks based on the number of the largest small data blocks and the total number of small data blocks of the current storage service;

[0093] Step S325: Select, in descending order based on the ranking of each storage service in the linked service priority sequence set, small data blocks with the total number of sinking small data blocks from low to high in the first LRU linked list sequence set for scanning to obtain a total of sinking small data blocks;

[0094] The calculation method for the total number of small data blocks is: ;

[0095] In the formula, k is the k-th storage service ranked from high to low in the linked service priority sequence set; N is the total number of sinking small data blocks; is the floor function;

[0096] It should be noted that the total number of small data blocks in the above embodiments of the present application refers to the number of sinking small data blocks scanned and processed by the k-th storage service ranked from high to low in the linked service priority sequence set; in the above analysis process, since the storage service with a lower space load ratio can scan and sink the sinking small data blocks into the capacity layer more quickly, in order to ensure that the linked service can complete the operation of small data blocks most quickly and efficiently after being started, therefore, based on the ranking of the storage services in the linked service priority sequence set from high to low, the storage service with a higher ranking should scan more small data blocks, and the storage service with a lower ranking scans fewer small data blocks, so that while ensuring the normal operation of other storage services, the scanning and sinking operations of small data blocks can be completed more quickly and efficiently, and all storage services except the current storage service participate in the linked processing, so as to ensure the effective utilization of resources in the cluster, and thus more efficiently achieve load balancing.

[0097] In summary, a method for processing the excessive local space load of the performance layer in a hierarchical distributed block storage proposed in the embodiments of the present invention first writes the user's IO requests into small data blocks, and then allocates replicas for these data blocks through the space allocation service, providing a basis for subsequent data storage and access; further, the space allocation service selects nodes with a lower load according to the space load ratio of each performance layer replica to allocate the performance layer replicas used to store small data blocks, ensuring the efficient utilization of system resources; further, through the LRU mechanism, the system manages the transfer of data from the performance layer to the capacity layer. The system judges which data is in a colder state and transfers it from the performance layer to the capacity layer to release the space of the performance layer, ensuring that the frequently accessed data can continue to be retained in the performance layer, preventing local load from being too high while ensuring the reasonable use of performance layer resources, so as to achieve the effect of load balancing;

[0098] Moreover, in the specific implementation process, based on the load conditions of each node, the performance layer replicas of the nodes with high load in the performance layer space will be actively migrated to other nodes with low load in the performance layer space;

[0099] Meanwhile, all storage services in the current cluster are called to improve the efficiency of load balancing through the way of linkage acceleration and sinking.

[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; those of ordinary skill in the art can modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A processing method for alleviating the excessively high local load of the space in the performance layer of a hierarchical distributed block storage, characterized in that It includes the following operation steps: Obtain the user's IO request; write the IO request into a small data block; the storage service sends a performance layer replica allocation request to the space allocation service based on the small data block with the IO request written in it; The space allocation service selects multiple low-load nodes as target performance layer replicas based on the performance layer replica allocation request and the space load rate of each performance layer replica; And write the small data block into the target performance layer replica; The storage service performs linkage acceleration based on the LRU mechanism and in combination with the load status information of each storage service in the current cluster, and sinks the small data block corresponding to the high-load node in the target performance layer replica into the capacity layer; The storage service performs linkage acceleration based on the LRU mechanism and in combination with the load status information of each storage service in the current cluster, and sinks the small data block corresponding to the high-load node in the target performance layer replica into the capacity layer, including the following operation steps: Establish a performance layer space load perception mechanism for the current storage service; The space allocation service perceives whether the current storage service is a high-load node; if so, trigger the sinking mechanism and the performance layer space load perception mechanism, and control the current storage service and all storage services in the current cluster except the current storage service to jointly scan the tail of the LRU linked list corresponding to the LRU mechanism in the current storage service, and sequentially scan from cold to hot to obtain the sinking small data blocks; and sink the sinking small data blocks into the capacity layer until the space allocation service perceives that the current storage service is not a high-load node; the performance layer space load perception mechanism refers to the mechanism by which the current storage service can perceive the load status of all storage services in the current cluster except the current storage service; Controlling the current storage service and all storage services in the current cluster except the current storage service to jointly scan the tail of the LRU linked list corresponding to the LRU mechanism in the current storage service, and sequentially scan from cold to hot to obtain the sinking small data blocks, including the following operation steps: Obtain the access frequency Ti of the i-th small data block in the current storage service within a preset access time period; calculate the access priority Pi of the i-th small data block based on the access frequency and the cold and hot data Wi of the i-th small data block; Sort each small data block from high to low based on the access priority Pi to obtain the first LRU linked list sequence set; Obtain the space load rate of each storage service in the current cluster except the current storage service; Sort from low to high based on the space load rate to obtain the linked service priority sequence set; Calculate the maximum data volume of the current storage service based on the highest threshold of the space load rate; Calculate the reserved data volume based on the cumulative calculation of the data volumes of the small data blocks from high to low in the first LRU linked list sequence set; Calculate the maximum number of small data blocks when the reserved data volume is less than or equal to the maximum data volume of the current storage service; Calculate the total number of sinking small data blocks based on the maximum number of small data blocks and the total number of small data blocks of the current storage service; Select the small data blocks with the total number of sinking small data blocks from low to high in the first LRU linked list sequence set according to the ranking of each storage service in the linked service priority sequence set from high to low for scanning. sinking small data blocks.

2. The processing method for alleviating the excessively high local load of the performance layer space in a hierarchical distributed block storage according to claim 1, wherein When a small data block is written into the performance layer replica, the corresponding data in the small data block will occupy the space of the performance layer replica.

3. The processing method for alleviating the excessively high local load of the performance layer space in a hierarchical distributed block storage according to claim 2, characterized in that, The LRU mechanism includes the following operating steps: Mark the hot and cold data of each small data block based on the access time of the sub-data blocks of each small data block within a continuous time period; wherein, the closer the access time of the sub-data block is to the current time point, the hotter the hot and cold data of the small data block corresponding to the sub-data block is; Arrange each small data block from hot to cold based on the hot and cold data to obtain a linked list sequence set; Sink the small data blocks with a hot and cold data less than or equal to the preset maximum hot and cold data threshold at the tail of the linked list sequence set to the capacity layer at a preset time period.

4. The processing method for alleviating the excessively high local load of the performance layer space in a hierarchical distributed block storage according to claim 3, characterized in that, The space allocation service selects multiple low-load nodes as target performance layer replicas based on the performance layer replica allocation request in combination with the space load ratio of each performance layer replica, including the following operating steps: Obtain the node performance layer space capacity of each of the performance layer replicas in real time; Calculate the space load ratio corresponding to the performance layer replica based on the node performance layer space capacity and the total node performance layer space capacity corresponding to the performance layer replica; Select multiple target performance layer replicas based on the space load ratio and a preset highest space load ratio threshold.

5. The processing method for alleviating the excessively high local load of the performance layer space in a hierarchical distributed block storage according to claim 4, characterized in that, The calculation method of the space load ratio is: Space load ratio = Node performance layer space capacity / Total node performance layer space capacity.

6. The processing method for alleviating the excessive local load of the performance layer space in a hierarchical distributed block storage according to claim 5, characterized in that After the space allocation service selects multiple low-load nodes as performance layer replicas based on the performance layer replica allocation request, it further includes the following operating steps: Screen for high-load nodes and low-load nodes by periodically scanning the space load ratio of the target performance layer replicas at a preset interval time; Migrate the small data blocks corresponding to the target performance layer replicas in the high-load nodes to the low-load nodes.

7. The processing method for alleviating the excessive local load of the performance layer space in a hierarchical distributed block storage according to claim 1, characterized in that, The calculation method of the access priority Pi is: Pi = Ti × α + Wi × β; In the formula, α and β are weight coefficients respectively, and β > α; The calculation method of the small data blocks is as follows: ; where k is the k-th storage service ranked from high to low in the linkage service priority sequence set; N is the total number of sinking small data blocks; is the floor function.

Citation Information

Patent Citations

  • Data scheduling method based on gradation storage medium

    CN103106152A

  • Data storage system, data processing method, terminal and storage medium

    CN114063888A