Storage resource recovery method and electronic device
By creating a migration management structure in the ROW storage system, the migration management of the storage system is dynamically adjusted to match the load, solving the problems of long GC processing time and resource waste, and achieving faster and more stable storage space reclamation and disk persistence efficiency.
Patent Information
- Application Number
- CN202511409104.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-09-29
AI Technical Summary
In redirected write (ROW) storage systems, garbage collection (GC) takes a long time and wastes resources, mainly due to the low efficiency of concurrent collection caused by the timeout mechanism.
By creating a migration management structure, the physical and logical block addresses of multiple storage units that need to be migrated in the storage system are recorded. The migration management structure is dynamically adjusted to match the load of the storage system, quickly generating disk write requests, reducing waiting time and improving space utilization.
It enables faster and more stable storage space reclamation, reduces GC processing time and resource waste, and improves disk write efficiency and storage system performance.
Smart Images

Figure CN120892212B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of storage technology, and in particular to a storage resource recycling method and electronic device. Background Technology
[0002] In a Redirect On Write (ROW) storage system, each time data is written to the same Logical Block Address (LBA), a corresponding Physical Block Address (PBA) is reallocated. Data stored in the PBA allocated before the data is written becomes garbage data (i.e., expired and useless data). In this case, garbage collection (GC) is needed to reclaim the storage space corresponding to the old PBA and use it to store new data.
[0003] Garbage collection (GC) reclaims space on a per-extent basis, with each extent containing multiple grains of storage. In related technologies, storage systems typically reclaim multiple extents concurrently. Once one extent is reclaimed, the next extent is immediately selected for reclamation, and the number of concurrent reclaimers is dynamically adjusted based on space requirements.
[0004] However, this method relies on a timeout mechanism, which results in a long GC process time and waste of resources. Summary of the Invention
[0005] This application provides a storage resource reclamation method and electronic device to at least solve the problems of long processing time and resource waste in the GC process in related technologies.
[0006] This application also provides a method for reclaiming storage resources, including:
[0007] Based on the consumption rate and recycling rate of storage units in the storage system, the target migration management structure used by the storage system is determined. The target migration management structure is used to store the physical block address and logical block address of multiple migration storage units. The multiple migration storage units come from at least one first storage space to be reclaimed in the storage system.
[0008] Based on the number of concurrent requests in the storage system and the target migration management structure, at least one disk write request is generated. The sum of the number of at least one disk write requests is the same as the number of concurrent requests. The at least one disk write request is used to migrate data stored in multiple first migration storage units, and the multiple migration storage units include multiple first migration storage units.
[0009] The at least one falling disk request is processed, and the at least one first storage space is recycled after the processing is completed.
[0010] The application further provides a storage resource recycling device, which comprises:
[0011] The processing module is configured to determine a target migration management structure used by the storage system according to a consumption speed and a recycling speed of a storage unit in the storage system, and the target migration management structure is used to store physical block addresses and logical block addresses of a plurality of migration storage units, and the plurality of migration storage units are derived from at least one first storage space to be recycled in the storage system.
[0012] The processing module is further configured to generate at least one falling disk request according to the target migration management structure and a request concurrency number of the storage system, a sum of a number of the at least one falling disk request is the same as the request concurrency number, and the at least one falling disk request is used to migrate data stored in a plurality of first migration storage units, and the plurality of migration storage units comprise the plurality of first migration storage units.
[0013] The processing module is further configured to process the at least one falling disk request, and recycle the at least one first storage space after the processing is completed.
[0014] The application further provides an electronic device, which comprises:
[0015] A memory is configured to store a computer program.
[0016] A processor is configured to execute the computer program to implement the steps of any one of the storage resource recycling methods.
[0017] The application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program, wherein the computer program is executed by a processor to implement the steps of any one of the storage resource recycling methods.
[0018] The application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of any one of the storage resource recycling methods.
[0019] Through the present application, a storage resource recycling method and an electronic device are provided. The method can dynamically adjust the migration management structure used by the storage system to the target migration management structure according to the consumption speed and recycling speed of the storage unit in the storage system, so that the recycling speed of the storage unit in the GC process matches the load of the storage system; and when performing the disk writing process, at least one disk writing request is quickly generated according to the request concurrency of the storage system and the target migration management structure used by the storage system, which is beneficial to improve the disk writing efficiency, and in turn can quickly realize the recycling process of at least one first storage space, which is beneficial to reduce the processing time of the GC process and the waste of storage space. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0021] Figure 1A A storage unit allocation process schematic diagram provided for the embodiments of the present application;
[0022] Figure 1A A structure schematic diagram of a recycled storage space provided for the embodiments of the present application;
[0023] Figure 2 One of the exemplary flow schematic diagrams of the storage resource recycling method provided for the embodiments of the present application;
[0024] Figure 3 A migration management structure schematic diagram provided for the embodiments of the present application;
[0025] Figure 4 The second exemplary flow schematic diagram of the storage resource recycling method provided for the embodiments of the present application;
[0026] Figure 5 The third exemplary flow schematic diagram of the storage resource recycling method provided for the embodiments of the present application;
[0027] Figure 6 The fourth exemplary flow schematic diagram of the storage resource recycling method provided for the embodiments of the present application;
[0028] Figure 7 A storage resource recycling device schematic diagram provided for the embodiments of the present application;
[0029] Figure 8 A structure schematic diagram of an electronic device provided for the present application. DETAILED DESCRIPTION
[0030] 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 part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0031] It should be noted that, in the description of the present application, the terms "comprise", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a 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.
[0032] It should be noted that, in the embodiments of the present application, some software, components, models and the like in the industry may be mentioned, which should be considered as exemplary, and the purpose is only to illustrate the feasibility of the implementation of the technical solutions of the present application, but it does not mean that the applicant has or will necessarily use the scheme.
[0033] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards, necessary security measures are taken, do not violate public order and good customs, and provide corresponding operation portal for user to choose authorization or refusal.
[0034] In a storage system (or referred to as a "data storage system"), data can be stored in the following two modes: in-place overwrite (i.e. in-place write) and redirection write (i.e. ROW write), wherein the redirection write refers to re-designating the saving location when new data is written. In a ROW storage system, a corresponding PBA is re-allocated each time data is written for the same LBA, and the data stored in the PBA allocated before the data is written becomes garbage data (i.e. expired useless data). In this case, the garbage data needs to be processed by GC to recycle the storage space corresponding to the old PBA (i.e. recycle the space where the stored data has become invalid) for storing new data. In the storage system, the storage space is continuously recycled through GC processing, so as to continuously allocate storage space for newly written data.
[0035] In the ROW storage system, the minimum unit of storage space management is an extent, which can be used to manage the correspondence between PBA space and hard disk space (consisting of one or more hard disks) and can be mapped to a specific address of a specific hard disk. Meanwhile, the hard disk space corresponding to the extent can have specific characteristics, such as the RAID (Redundant Arrays of Independent Disks) attribute for ensuring data reliability.
[0036] The minimum unit of data storage allocation is a grain, and each extent can provide multiple grains. For example, if one extent corresponds to 1 GB of storage space, each grain can be set to 8 KB.
[0037] When data is written to a certain LBA, the ROW storage system can allocate a grain for it and generate corresponding LP (LBA to PBA mapping relationship) metadata stored in the metadata database. The LP metadata can be used to indicate the grain allocated for the LBA and the PBA mapped by the LBA. When the data corresponding to the LBA is read subsequently, the LP metadata can be queried in the metadata database through the LBA, and the address of the grain corresponding to the LBA can be determined based on the LP metadata, and then the specific hard disk address can be found through the mapping relationship of the extent, and finally the data reading is completed.
[0038] When the same LBA is re-written with data, the ROW storage system can allocate a new grain (which can be located in another extent) for it, and the data stored in the new grain is valid data. The data stored in the old grain corresponding to the LBA is invalid data, and the old grain becomes an invalid grain. Valid grains and invalid grains can exist simultaneously in a single extent.
[0039] Figure 1A A storage unit allocation process provided by an embodiment of the present application is shown in the following table. Please refer to Figure 1A When data is written for the first time, the nth-1 storage unit (grain) in the storage space 0 (i.e., extent 0) is allocated for the LBA, and the first metadata (i.e., first LP metadata) corresponding to the LBA is generated and stored in the metadata database, where n is an integer greater than 1.
[0040] When data is written to the LBA for the second time, the second storage unit (grain) in the storage space 1 (extent 1) is allocated for it, and the second metadata (i.e., second LP metadata) corresponding to the LBA is generated, and the first metadata corresponding to the LBA in the metadata database is updated to the second metadata.
[0041] In the above process, the n-1th grain in the extent0 becomes an invalid grain.
[0042] It should be noted that after the grains in the extent are allocated, even if the subsequent grain becomes an invalid grain, it cannot be directly allocated as a free grain to store new data. Only after the entire extent is recycled, all grains (including invalid grains) in the extent can be converted to free grains, and then used for storage allocation of new data.
[0043] In the ROW storage system, GC recycles space in units of extent. The grains in the extent can all be invalid, or some are valid and some are invalid. When recycling the extent, the data stored in the valid grains in the extent needs to be migrated to other extents. For example, the ROW storage system can allocate new grains for the data in other extents, read the data of the valid grains in the extent to be recycled and write them into the new grains, and update the LP metadata corresponding to the LBA in the metadata database according to the LBA. The grain corresponding to the LBA in the LP metadata is updated from the valid grain to the new grain, and the PBA mapped by the LBA is updated from the PBA corresponding to the valid grain to the PBA corresponding to the new grain. When all valid grains in the extent are migrated, the extent can be recycled, and the extent becomes a free extent and can be used for grain allocation again.
[0044] In the ROW storage system, multiple grains newly allocated in the same adjacent time (these grains can be used to store new data written by the user, or can be used to store data migrated by GC) are allocated from the same extent to form a large block of continuous space, so that they can be combined into a larger data landing request when landing, thereby improving landing efficiency.
[0045] To ensure landing efficiency, it is usually required that the landing request reaches a preset size (such as 1MB). For this purpose, the ROW storage system usually waits for a period of time to accumulate the corresponding number of grains to reach the preset size. If the waiting time is exceeded and the preset size required by the landing request is still not accumulated, the ROW storage system still allocates grains, but these grains store invalid data (such as 0). In this case, the ROW storage system actually trades off landing efficiency and performance by wasting part of the grain space (because no valid data is stored).
[0046] Figure 1B A structure diagram of a recycling storage space is provided for the embodiments of the present application. Please refer to Figure 1B In the recycling storage space (i.e., extent), some storage units (i.e., grains) store valid data, and some storage units (i.e., grains) store invalid data (e.g., 0). Among them, the grains storing valid data have corresponding metadata (i.e., LP metadata) stored in the metadata database.
[0047] In summary, how to recycle storage space faster in GC processing, and how to ensure a certain number of grains to meet the preset size of the landing request through concurrent processing in the recycling process, are problems to be solved.
[0048] In the process of recycling the extent, the validity of the grains in the extent can be determined in the following way: when a batch of grains form a large landing request, the ROW storage system will additionally allocate a special grain (referred to as "meta grain" or "meta grain") on the extent where the batch of grains are located. The meta grain is not used to store user data or GC migration data, but only stores the LBA corresponding to the batch of grains in this landing, and together with the data of the batch of grains, it constitutes a complete landing request. When recycling the extent, the ROW storage system first reads the meta grain on the extent one by one, and obtains the LBA associated with each grain in the batch of grains corresponding to the meta grain. Subsequently, the ROW storage system queries the LP metadata corresponding to the LBA associated with each grain in the metadata database to determine whether the PBA of the LBA associated with each grain in the LP metadata is the same as the real PBA of each grain. If they are the same, each grain is a valid grain, and the data stored in the valid grain needs to be migrated; if they are different, each grain is an invalid grain, and the data stored in the invalid grain does not need to be migrated.
[0049] To improve the spatial recycling speed of GC, a multi-extent concurrent recycling mode as shown below can be used: the ROW storage system concurrently recycles multiple extents, starts recycling of the next extent immediately after recycling of one extent is completed, maintains a preset number of concurrently recycled extents, and dynamically adjusts the number of concurrent recycling extents according to actual spatial conditions. However, this mode has the following problems: when the number of effective grains to be migrated of a certain extent is small, or most of the effective grains thereof have been migrated and only a small number of effective grains remain, the number of grains to be migrated is insufficient to meet the preset size of the landing request, and the ROW storage system needs to wait for a timeout and allocate grains storing invalid data (such as 0) to make up the size of the landing request, which not only increases the waiting time, but also causes spatial waste due to the occupation of grains by invalid data. That is, the storage resource recycling method in the related art will cause the processing time of the GC process to be relatively long and resource waste to exist.
[0050] In the research process, it is found that if at least one migration management structure is created in advance in a storage system (such as the above-mentioned ROW storage system) to record the PBA and corresponding LBA of multiple grains that need to be migrated in the storage system through the migration management structure, and the amount of data stored by the migration grains in the migration management structure can meet the data amount required by at least one landing request, the waiting time for generating a landing request can be reduced and the spatial utilization rate of grains during landing can be improved.
[0051] In this process, the storage system does not need to wait for a long time to accumulate at least one migration grain required by the landing request, but quickly acquires at least one migration grain required by the landing request based on the migration management structure, which is beneficial to reduce the processing time of the GC process. Moreover, since the amount of data stored by the migration grains in the migration management structure can meet the data amount required by at least one landing request, the situation of filling invalid data due to insufficient number of migration grains during landing processing can be reduced, which is beneficial to improve the spatial utilization rate of grains during landing and reduce resource waste.
[0052] The present application provides a storage resource recycling method, which can dynamically adjust the migration management structure used by the storage system to a target migration management structure according to the consumption speed and recycling speed of the storage unit (i.e. the above-mentioned grain) in the storage system, so that the grain recycling speed of GC processing matches the load of the storage system (reflected by the grain consumption speed), thereby ensuring stable GC process and avoiding performance fluctuations on the basis of reducing the processing time of the GC process and reducing resource waste.
[0053] And, when performing the destage processing, the storage system can generate at least one destage request according to the number of concurrent requests of the storage system and the target migration management structure used by the storage system, so as to facilitate improving the destage efficiency. The at least one destage request can be used to migrate the data stored in the plurality of first migration storage units, and the plurality of migration storage units include the plurality of first migration storage units. In other words, the at least one destage request can be used to perform migration processing on part or all of the migration grains (i.e., the plurality of first migration storage units) of the plurality of migration grains (i.e., the plurality of migration storage units) managed by the target migration management structure.
[0054] The target migration management structure can include the physical block addresses and the logical block addresses of the plurality of migration storage units, and the plurality of migration storage units are derived from at least one first storage space to be recycled in the storage system. After the at least one destage request is processed, the at least one first storage space can be recycled.
[0055] In order to enable those skilled in the art to better understand the technical scheme of the present application, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0056] Figure 2 An example flowchart of the storage resource recycling method provided by the embodiments of the present application is shown in FIG. 1. Figure 2 The method can include the following steps:
[0057] S201, determining a target migration management structure used by the storage system according to the consumption speed and the recycling speed of the storage unit in the storage system.
[0058] The target migration management structure can be used to store the physical block addresses (PBAs) and the logical block addresses (LBAs) of the plurality of migration storage units, and the plurality of migration storage units are derived from at least one first storage space to be recycled in the storage system.
[0059] In the target migration management structure, the amount of data stored in the plurality of migration storage units meets the amount of data required by the at least one destage request. Alternatively, the size of the plurality of migration storage units meets the preset size required by the at least one destage request.
[0060] In some embodiments, the storage system can be a ROW storage system.
[0061] It should be noted that the storage unit can be any grain in the storage system, and the migration storage unit can be a valid grain in the storage space (i.e., the extent to be recycled) to be recycled in the storage system.
[0062] The storage system can include at least one second storage space (i.e., a second extent) to be reclaimed, and the at least one second storage space can include the at least one first storage space (i.e., a first extent). In other words, the storage system can include at least one second extent, and the at least one first extent can be part of or all of the at least one second extent.
[0063] In some embodiments, the method can configure at least one candidate migration management structure for the storage system according to resource information of the storage system; obtain a first consumption speed and a reclaim speed of a storage unit in the storage system according to a first preset time length or a first preset frequency; and determine a target migration management structure from the at least one candidate migration management structure according to the first consumption speed and the reclaim speed.
[0064] The resource information includes a number of processing units corresponding to the storage system. The number of processing units can refer to a number of central processing unit (CPU) cores.
[0065] Similarly, each candidate migration management structure can be used to store PBA and LBA of a plurality of migration storage units, and the plurality of migration storage units can be from at least one third storage space to be reclaimed in the storage system. The at least one second storage space can include the at least one third storage space.
[0066] In each target migration management structure, a data amount stored by the plurality of migration storage units satisfies a data amount required by at least one destage request; or a size of the plurality of migration storage units satisfies a preset size required by the at least one destage request.
[0067] In some embodiments, there is a mapping relationship between the number of processing units and the number of candidate migration management structures. For example, each processing unit can create one or more candidate migration management structures; or a plurality of processing units can create one or more candidate migration management structures.
[0068] In some embodiments, the terms “migration management structure” and “migration grain management structure” can be replaced with each other, the terms “target migration management structure” and “target migration grain management structure” can be replaced with each other, and the terms “candidate migration management structure” and “candidate migration grain management structure” can be replaced with each other.
[0069] In actual application, according to the resource information of the storage system, a specified number of candidate migration management structures can be created in the storage system (such as memory), for example, one or more candidate migration management structures can be created for each CPU core or every 4 CPU cores. The candidate migration management structure can be used to record the PBA of the migration grain in the storage system and the LBA corresponding to the PBA.
[0070] Figure 3 A structure diagram of a migration management structure provided by an embodiment of the present application is shown in FIG. 1. Referring to FIG. 1, according to the resource information of the storage system, 2 candidate migration management structures are configured in the storage system, and each candidate migration management structure can include 16 domains, which are used to store the physical block addresses (PBAs) of 16 migration storage units (i.e. migration grains) and the logical block addresses (LBAs) corresponding to the PBAs. Figure 3
[0071] As shown in FIG. 2, the 16 domains in the candidate migration management structure 1 are filled. Among them, 8 domains are used to fill 8 migration storage units (i.e. migration grains) in the storage space 1 (extent 1) to be recycled, 4 domains are used to fill 4 migration storage units (i.e. migration grains) in the storage space 2 (extent 2) to be recycled, and 4 domains are used to fill 4 migration storage units (i.e. migration grains) in the storage space 3 (extent 3) to be recycled. Figure 3
[0072] Among the 16 domains in the candidate migration management structure 2, 6 domains are filled, and 10 domains are not filled. Among them, 4 domains are used to fill 4 migration storage units (i.e. migration grains) in the storage space 4 (extent 4) to be recycled, and 2 domains are used to fill 2 migration storage units (i.e. migration grains) in the storage space 5 (extent 5) to be recycled.
[0073] According to the consumption speed and recycling speed of the grains of the storage system, the candidate migration management structure 1 can be determined as the target migration management structure.
[0074] The migration grains in the candidate migration management structure can perform the steps of migrating data and updating LP metadata through the processing unit (i.e. CPU core) corresponding to the candidate migration management structure. Moreover, the data stored in each migration grain in the candidate migration management structure is only allocated a new grain together with the data stored in other migration grains in the candidate migration management structure to form a disk landing request, and is not allocated a new grain together with the data stored in other migration grains except the migration grains in the candidate migration management structure, nor is it allocated a new grain together with the host write data.
[0075] In this method, at least one candidate migration management structure can be configured for the storage system based on its resource information, so that the candidate migration management structure matches the load of the storage system. Furthermore, during use, the first consumption rate and reclamation rate of storage units in the storage system can be obtained periodically or at a first preset duration or frequency. Based on these first consumption and reclamation rates, the number of target migration management structures used by the storage system is dynamically adjusted, ensuring that the grain reclamation speed of GC processing matches the load of the storage system (reflected by the grain consumption rate). This reduces the processing time of the GC process and minimizes resource waste, while ensuring stable GC operation and avoiding performance fluctuations. Moreover, periodic checks can promptly trigger adjustments to the number of migration management structures used by the storage system, reducing latency or resource waste.
[0076] S202. Based on the number of concurrent requests in the storage system and the target migration management structure, generate at least one disk write request.
[0077] The sum of at least one disk write request is the same as the number of concurrent requests, which means that the number of concurrent requests is N and the sum of at least one disk write request is N, where N is a positive integer.
[0078] At least one disk write request can be used to migrate data stored in multiple first migration storage units, which may include multiple first migration storage units.
[0079] In other words, multiple first migration storage units can be partial or complete migration storage units of multiple migration storage units.
[0080] For example, if the request concurrency is 1, and the amount of data stored in the multiple migration storage units can meet the data requirements of one disk write request, then the multiple first migration storage units can be all the migration storage units in the multiple migration storage units. If the request concurrency is 2, and the amount of data stored in the multiple migration storage units can meet the data requirements of three disk write requests, then the multiple first migration storage units can be some of the migration storage units in the multiple migration storage units.
[0081] In some embodiments, at least one disk write request can be generated by performing the following steps:
[0082] Step 1: Based on the number of concurrent requests, determine the number of first migration storage units required for at least one disk write request from among the multiple migration storage units of the target migration management structure.
[0083] In the method, the amount of data required by the at least one landing request can be determined, and a plurality of migration storage units that can meet the data amount requirement among the plurality of migration storage units are determined as the plurality of first migration storage units.
[0084] Step two, reading the data stored in the plurality of first migration storage units and re-allocating a plurality of empty storage units for the data.
[0085] Optionally, the number of the plurality of first migration storage units can be the same as the number of the plurality of empty storage units.
[0086] Step three, generating at least one landing request according to the read data and the plurality of empty storage units.
[0087] The at least one landing request can be used to indicate that the data read from the plurality of first migration storage units is to be stored in the plurality of empty storage units.
[0088] In the method, when the storage system is performing landing request concurrency processing, it does not need to wait for a long time to accumulate the migration grain required by the at least one landing request, but quickly acquires the migration grain required by the at least one landing request based on the target migration management structure being used by the storage system, which is beneficial to reduce the processing time of the GC process. And when performing landing processing, it can reduce the waste of storage resources caused by filling invalid data due to the insufficient number of migration grains, which is beneficial to improve the space utilization rate of grains during landing and reduce resource waste.
[0089] In some embodiments, the second consumption speed of the storage unit in the storage system can also be acquired according to a second preset time length or a second preset frequency; and the request concurrency number of the storage system is adjusted according to the second consumption speed.
[0090] In the method, the request concurrency number of the storage system is dynamically adjusted by the storage system based on the consumption speed of the grain at a timing triggered by the second preset time length or the second preset frequency, which can ensure that the number of landing requests generated by the storage system always matches the consumption speed of the grain of the storage system, reduces invalid data filling, improves storage space utilization, and stabilizes the recovery speed during the GC processing process.
[0091] The second preset time length can be the same as the first preset time length; or the second preset time length is less than the first preset time length; or the second preset time length is greater than the first preset time length.
[0092] In some embodiments, step S202 can be executed at a timing to timely trigger the generation of landing requests and ensure the real-time performance of the landing requests.
[0093] S203, processing the at least one destage request, and recycling the at least one first storage space after the processing is completed.
[0094] In this step, processing the at least one destage request can be understood as sending the at least one destage request to the storage medium (such as a hard disk) to perform the data destage operation. "Processing is completed" can mean that the data destage operation is completed, and the data destage operation can mean storing the data stored in the plurality of first migration storage units in the at least one destage request in the storage medium.
[0095] It should be noted that the process of recycling the at least one first storage space will be described in detail in the Figure 4 embodiments.
[0096] The storage resource recycling method provided by the embodiments of the present application can dynamically adjust the migration management structure used by the storage system to the target migration management structure according to the consumption speed and the recycling speed of the storage unit (i.e. the grain mentioned above) in the storage system, so as to match the grain recycling speed of the GC process with the load of the storage system (reflected by the grain consumption speed); and when performing the destage processing, at least one destage request can be quickly generated according to the request concurrency of the storage system and the target migration management structure used by the storage system, which is beneficial to improve the destage efficiency, and thus the recycling processing of the at least one first storage space can be quickly realized, which is beneficial to reduce the processing time of the GC process and the waste of storage space, and to ensure the stability of the GC space recycling speed. The method can realize faster and more stable space recycling in the GC process, so that the storage system has better and more stable performance.
[0097] Figure 4 An example flowchart of the storage resource recycling method provided by the embodiments of the present application is shown in Figure 2. Please refer to Figure 4 , the method can include the following steps:
[0098] S401, updating the physical block address of the plurality of first migration storage units in the metadata database according to the logical block address of the plurality of first migration storage units, and clearing the logical block address and the physical block address of the plurality of first migration storage units in the target migration management structure.
[0099] The metadata database can include the mapping relationship between the physical block address and the logical block address of the plurality of storage units, and the plurality of storage units include the plurality of first migration storage units.
[0100] The metadata base can store LP metadata corresponding to a plurality of LBAs. For any LBA, the LP metadata corresponding to the LBA can be used to indicate a grain allocated by the storage system for the LBA, and a PBA mapped by the LBA, where the PBA is a PBA of the grain allocated by the storage system for the LBA.
[0101] In some embodiments, step S401 can further include the following steps:
[0102] Step one, determining first physical block addresses corresponding to the plurality of first migration storage units after the migration processing.
[0103] Optionally, the first physical block addresses (i.e., first PBAs) corresponding to the plurality of first migration storage units (i.e., first migration grains) after the migration processing can be determined according to processing results of the at least one destage request.
[0104] Step two, querying second physical block addresses of the plurality of first migration storage units in the metadata base according to logical block addresses of the plurality of first migration storage units.
[0105] For example, the LP metadata corresponding to each first migration grain can be queried in the metadata base according to the LBA of each first migration grain, and then the second physical block addresses (i.e., second PBAs) corresponding to each first migration grain can be determined according to the LP metadata.
[0106] Step three, updating the second physical block addresses of the plurality of first migration storage units to the corresponding first physical block addresses in the metadata base.
[0107] For example, the second PBA corresponding to each first migration grain can be modified to the corresponding first PBA in the LP metadata corresponding to the LBA of each first migration grain.
[0108] In the method, the physical block addresses of the plurality of first migration storage units can be updated in the metadata base after the processing of the at least one destage request is completed, so as to completely complete the destage processing of the data stored in the plurality of first migration storage units, and guarantee the consistency of the data in subsequent processing.
[0109] After the physical block addresses of the plurality of first migration storage units are updated in the metadata base, the physical block addresses and the logical block addresses of the plurality of first migration storage units can be cleared in the target migration management structure, so as to make room for storing the physical block addresses and the logical block addresses of new migration storage units, and enable the storage resources of the target migration management structure to be recycled.
[0110] It can be understood that, after the physical block addresses and the logical block addresses of the plurality of first migration storage units are cleared, there can be idle space in the target migration management structure, and the physical block addresses and the logical block addresses of the new migration storage units can be supplemented in the target migration management structure, so that the amount of data stored by the plurality of migration storage units in the target migration management structure can always meet the amount of data required by at least one landing request, and by dynamically adjusting the request concurrency number of the landing requests of the storage system, the stable and rapid generation of the landing requests of the storage system can be ensured.
[0111] It should be noted that, the process of supplementing the physical block addresses and the logical block addresses of the new migration storage units in the target migration management structure will be described in detail in the embodiments. Figure 5
[0112] S402, determining a target storage space in which the plurality of first migration storage units are located in at least one first storage space.
[0113] The mapping relationship between the storage units and the storage spaces in the storage system can include a plurality of storage spaces and a plurality of storage units corresponding to each storage space, and the plurality of storage spaces can include at least one first storage space.
[0114] Optionally, the target storage space can be determined in the at least one first storage space according to the mapping relationship and the plurality of first migration storage units.
[0115] The number of target storage spaces can be at least one. That is, the plurality of first migration storage units can all come from the same target storage space; or, the plurality of first migration storage units can come from different target storage spaces.
[0116] Optionally, the number of migration storage units completed migration in each first storage space can be stored in the target migration management structure. After the data migration of the plurality of first migration storage units is completed, the number of migration storage units completed migration in each first storage space in the target migration management structure can be updated.
[0117] Further, the number of remaining migration storage units in each first storage space can also be stored in the target migration management structure. After the data migration of the plurality of first migration storage units is completed, the number of remaining migration storage units in each first storage space in the target migration management structure can be updated.
[0118] S403, determining the number of remaining migration storage units in the target storage space other than the plurality of first migration storage units.
[0119] The number of remaining migration storage units can be zero or greater than zero.
[0120] If the number of target storage spaces is multiple, the number of remaining migration storage units in any two target storage spaces can be the same.
[0121] S404, according to the number of remaining migration storage units, the target storage space is recycled.
[0122] In some embodiments, in the case of the number of remaining migration storage units being zero, the target storage space is recycled.
[0123] It can be understood that, in the case of the number of remaining migration storage units being zero, it means that there is no valid data in the target storage space (i.e. the extent to be recycled), at this time all storage units in the target storage space are invalid storage units (i.e. invalid grains), and the target storage space can be GC processed.
[0124] That is, when the LBA and PBA of all valid storage units (i.e. valid grains) in the target storage space (i.e. the extent to be recycled) have been put into the target migration management structure, and all migration is completed, the target storage space can be GC processed, the target storage space becomes a free storage space, and can be used to allocate grains again.
[0125] In the case of the number of remaining migration storage units being greater than zero, it means that there is still valid data in the target storage space. In this case, the LBA and PBA of the remaining migration storage units in the target storage space can be stored in the target migration management structure in priority, so as to facilitate the early landing processing of the remaining migration storage units in the target storage space, thereby accelerating the recycling speed of the target storage space.
[0126] The storage resource recycling method provided by the embodiments of the present application can update the physical block addresses of the plurality of first migration storage units in the metadata database after the processing of at least one landing request is completed, so as to guarantee the consistency of the storage data in the subsequent processing process. By clearing the logical block addresses and the physical block addresses of the plurality of first migration storage units in the target migration management structure, the storage resources of the target migration management structure can be recycled. By determining the target storage space where the plurality of first migration storage units are located, and determining the number of remaining migration storage units in the target storage space, it can be ensured that the storage space meeting the recycling condition (i.e. the number of remaining migration storage units being zero) is recycled quickly, which is beneficial to improve the recycling speed of the storage resources.
[0127] Figure 5 An example flowchart of the storage resource recycling method provided by the embodiments of the present application is shown in Figure 3. Please refer to Figure 5The method can comprise the following steps:
[0128] S501, determining a first data amount stored in the migration storage unit in the target migration management structure.
[0129] If the target migration management structure stores LBA and PBA of M migration storage units, the first data amount can be the sum of data amounts of the M migration storage units, wherein M is an integer greater than 1.
[0130] S502, determining a second data amount required by at least one destage request.
[0131] If the data amount required by a single destage request is a preset data amount (such as 1 MB), the number of at least one destage request is N, and the second data amount is N x the preset data amount, wherein N is an integer greater than 1.
[0132] Optionally, the request concurrency of the storage system can be determined at a time, so as to adjust the second data amount in time according to the request concurrency. Through the timing check, the second data amount can be accurately determined, so as to adjust the concurrency of the migration storage unit in the target migration management structure in time according to the comparison between the second data amount and the first data amount.
[0133] S503, in the case where the first data amount is less than the second data amount, determining a difference amount between the second data amount and the first data amount.
[0134] Optionally, the difference amount = the second data amount - the first data amount.
[0135] It can be understood that in the case where the first data amount is greater than or equal to the second data amount, at least one destage request can be directly generated based on the first data amount stored in the migration storage unit in the target migration management structure.
[0136] In the case where the first data amount is less than the second data amount, the first data amount stored in the migration storage unit in the target migration management structure does not meet the data requirement of the at least one destage request. In this case, step S504 and step S505 can be continuously executed to perform expansion processing on the migration storage unit in the target migration management structure, so that the first data amount stored in the migration storage unit in the expanded target migration management structure meets the data requirement of the at least one destage request.
[0137] S504, determining a second migration storage unit from at least one second storage space to be recycled in the storage system according to the difference amount.
[0138] The at least one second storage space comprises at least one first storage space, and the data amount stored in the second migration storage unit is the same as the difference amount.
[0139] The second storage space (i.e., the second extent described above) includes meta storage units (i.e., the meta grains or meta grains described above) and non-meta storage units (i.e., grains other than the meta grains in the second extent), and the meta storage units can be used to store logical block addresses (LBAs) corresponding to the non-meta storage units.
[0140] It can be understood that the number of meta storage units can be at least one, and the number of non-meta storage units can also be at least one.
[0141] Optionally, the number of non-meta storage units can be greater than the number of meta storage units.
[0142] Optionally, if the second storage space includes a plurality of non-meta storage units, the plurality of non-meta storage units can include part of invalid storage units (i.e., the invalid grains described above) and part of valid storage units (i.e., the valid grains described above).
[0143] It should be noted that, according to the difference amount, the specific process of determining the second migration storage unit from the at least one second storage space to be recycled in the storage system will be described in detail in Figure 6 Embodiments.
[0144] S505, the physical block address and the logical block address of the second migration storage unit are stored in the target migration management structure.
[0145] If there is a free domain in the target migration management structure, the physical block address and the logical block address of the second migration storage unit can be filled into the free domain. For example, Figure 3 In the embodiment, if the selected migration management structure 2 is the target migration management structure, and there are 10 free domains in the target migration management structure, the physical block address and the logical block address of 10 second migration storage units can be filled.
[0146] If there is no free domain in the target migration management structure, the size of the target migration management structure can be dynamically adjusted, for example, a domain can be added in the target migration management structure, so as to store the physical block address and the logical block address of the second migration storage unit through the added domain.
[0147] In actual application process, steps S501~S505 can be executed at regular intervals to trigger the supplement of the migration storage unit in the target migration management structure in time, reduce the waiting time, and improve the GC response speed.
[0148] The storage resource recycling method provided by the embodiments of the present application can supplement the migration storage unit in the target migration management structure when the first data amount stored in the migration storage unit in the target migration management structure is less than the second data amount required by at least one landing request, so that the data amount stored in the migration storage unit in the target migration management structure always meets the second data amount required by at least one landing request, and the landing request of the storage system is stably generated.
[0149] It can be understood that when the data amount stored in the migration storage unit in the target migration management structure meets the data amount required by the current landing request concurrent processing of the storage system, the filling of the migration storage unit in the target migration management structure can be stopped. When the data stored in the migration storage unit in the target migration management structure is processed by migration, the space occupied by the migration storage unit in the target migration management structure can be cleared, and the migration storage unit can be continued to be supplemented in the target migration management structure. Through the above dynamic flow, the data amount stored in the target migration management structure always meets the second data amount required by at least one landing request.
[0150] Figure 6 An example flowchart of the storage resource recycling method provided by the embodiments of the present application is shown in Figure 4. Figure 6 The method can include the following steps:
[0151] S601, in the meta storage unit of each second storage space, the logical block address of the non-meta storage unit of each second storage space is obtained.
[0152] The meta storage unit of each second storage space can be used to store the logical block address (LBA) corresponding to the non-meta storage unit, and the logical block address corresponding to each non-meta storage unit in at least one non-meta storage unit can be obtained in the meta storage unit.
[0153] S602, according to the logical block address of the non-meta storage unit of each second storage space and the meta database, the migration storage unit of each second storage space is determined in the non-meta storage unit of each second storage space.
[0154] The meta database can include the mapping relationship between the physical block address and the logical block address of a plurality of storage units, and the plurality of storage units include the non-meta storage unit of each second storage space.
[0155] The corresponding physical block address of the migration storage unit in the meta database is the same as the physical block address of the migration storage unit in the corresponding second storage space.
[0156] In some embodiments, the third physical block addresses of the non-meta storage units of each second storage space can be queried in the meta database according to the logical block addresses of the non-meta storage units of each second storage space; and the migration storage units of each second storage space can be determined in the non-meta storage units of each second storage space according to the corresponding fourth physical block addresses and the corresponding third physical block addresses of the non-meta storage units of each second storage space, and the fourth physical block addresses of the migration storage units are the same as the corresponding third physical block addresses.
[0157] S603, determining a second migration storage unit in the migration storage units of at least one second storage space according to the difference amount.
[0158] Optionally, the at least one second storage space can be prioritized according to the order of the number of migration storage units in each second storage space from small to large; and the second migration storage unit can be determined in the migration storage units of at least one second storage space according to the priority and the difference amount.
[0159] The smaller the number of migration storage units in a second storage space, the easier the second storage space is to be recycled. In this application, the LBAs and PBAs of the migration storage units in the second storage space with a smaller number of migration storage units can be added to the target migration management structure first, so that the migration storage units can be written to disk as soon as possible, thereby speeding up the recycling speed of the second storage space.
[0160] For example, there are four second storage spaces, and the priority ranking (from front to back) is: second storage space 1, second storage space 2, second storage space 3, and second storage space 4.
[0161] First, the data amount of the migration storage units in the second storage space 1 is determined, and if the data amount of the migration storage units in the second storage space 1 is equal to the difference amount, the migration storage units in the second storage space 1 are determined as the second migration storage units.
[0162] If the data amount of the migration storage units in the second storage space 1 is greater than the difference amount, the part of the migration storage units in the second storage space 1 that meets the difference amount is determined as the second migration storage units.
[0163] If the data amount of the migration storage units in the second storage space 1 is less than the difference amount, the migration storage units in the second storage space 1 can be determined as the second migration storage units, and an updated difference amount can be determined according to the difference amount and the data amount of the migration storage units in the second storage space 1. In addition, according to the updated difference amount, the remaining second migration storage units can be selected in the remaining three second storage spaces in turn according to the priority ranking.
[0164] The storage resource recycling method provided by the embodiments of the present application can quickly determine the migration storage units in each second storage space according to the meta storage units and the meta database of the second storage space, and perform matching processing according to the difference amount and the data amount of the migration storage units in at least one second storage space, so as to quickly and accurately find the second migration storage unit meeting the requirement.
[0165] Figure 7 A structural schematic diagram of a storage resource recycling device provided by the embodiments of the present application is provided. Please refer to Figure 7 The storage resource recycling device 700 can include a processing module 701 and an obtaining module 702, wherein
[0166] The processing module 701 is configured to determine a target migration management structure used by a storage system according to the consumption speed and the recycling speed of the storage units in the storage system, the target migration management structure being used to store the physical block addresses and the logical block addresses of a plurality of migration storage units, the plurality of migration storage units being derived from at least one first storage space to be recycled in the storage system.
[0167] The processing module 701 is further configured to generate at least one landing request according to the request concurrency of the storage system and the target migration management structure, the sum of the number of the at least one landing request being the same as the request concurrency, the at least one landing request being used to migrate the data stored in a plurality of first migration storage units, the plurality of migration storage units including the plurality of first migration storage units.
[0168] The processing module 701 is further configured to process the at least one landing request, and recycle the at least one first storage space after the processing is completed.
[0169] In a possible implementation, the processing module 701 is specifically configured to:
[0170] update the physical block addresses of the plurality of first migration storage units in the meta database according to the logical block addresses of the plurality of first migration storage units, and clear the logical block addresses and the physical block addresses of the plurality of first migration storage units in the target migration management structure, the meta database including the mapping relationship between the physical block addresses and the logical block addresses of a plurality of storage units, the plurality of storage units including the plurality of first migration storage units;
[0171] determine the target storage space in which the plurality of first migration storage units are located in the at least one first storage space;
[0172] determine the number of the remaining migration storage units in the target storage space except the plurality of first migration storage units;
[0173] recycle the target storage space according to the number of the remaining migration storage units.
[0174] In a possible implementation, the processing module 701 is further configured to:
[0175] determine the first physical block addresses corresponding to the plurality of first migration storage units after the migration processing;
[0176] query, according to the logical block addresses of the plurality of first migration storage units, the second physical block addresses of the plurality of first migration storage units in the metadata database;
[0177] update, in the metadata database, the second physical block addresses of the plurality of first migration storage units to the corresponding first physical block addresses.
[0178] In a possible implementation, the processing module 701 is further configured to:
[0179] in a case where the number of the remaining migration storage units is zero, perform the recycling processing on the target storage space.
[0180] In a possible implementation, the processing module 701 is further configured to:
[0181] determine, according to the request concurrency number, the plurality of first migration storage units required by the at least one write-to-disk request from the plurality of migration storage units of the target migration management structure;
[0182] read the data stored in the plurality of first migration storage units, and re-allocate the plurality of empty storage units for the data;
[0183] generate the at least one write-to-disk request according to the read data and the plurality of empty storage units.
[0184] In a possible implementation, the processing module 701 is further configured to:
[0185] determine a first data amount stored in the migration storage units in the target migration management structure;
[0186] determine a second data amount required by the at least one write-to-disk request;
[0187] in a case where the first data amount is less than the second data amount, determine a difference amount between the second data amount and the first data amount;
[0188] determine, according to the difference amount, the second migration storage units from at least one second storage space to be recycled in the storage system, the at least one second storage space including at least one first storage space, and a data amount stored in the second migration storage units being the same as the difference amount;
[0189] store the physical block addresses and the logical block addresses of the second migration storage units in the target migration management structure.
[0190] In a possible implementation, the second storage space includes meta storage units and non-meta storage units, and the meta storage units are used to store logical block addresses corresponding to the non-meta storage units; the processing module 701 is specifically further configured to:
[0191] In the meta storage units of each second storage space, the logical block addresses of the non-meta storage units of each second storage space are obtained;
[0192] According to the logical block addresses of the non-meta storage units of each second storage space and a meta database, the migration storage units of each second storage space are determined in the non-meta storage units of each second storage space, the meta database includes mapping relationships between physical block addresses and logical block addresses of a plurality of storage units, the plurality of storage units include the non-meta storage units of each second storage space, and a corresponding physical block address of the migration storage unit in the meta database is the same as a physical block address of the migration storage unit in the corresponding second storage space;
[0193] According to the difference, the second migration storage unit is determined in the migration storage units of at least one second storage space.
[0194] In a possible implementation, the obtaining module 702 is configured to obtain the first consumption speed and the recovery speed of the storage unit in the storage system according to a first preset time length or a first preset frequency;
[0195] The processing module 701 is specifically configured to: according to resource information of the storage system, configure at least one candidate migration management structure for the storage system, the resource information including a number of processing units corresponding to the storage system; and according to the first consumption speed and the recovery speed, determine a target migration management structure in the at least one candidate migration management structure.
[0196] In a possible implementation, the obtaining module 702 is further configured to obtain the second consumption speed of the storage unit in the storage system according to a second preset time length or a second preset frequency; and the processing module 701 is further configured to adjust the concurrent quantity of requests of the storage system according to the second consumption speed.
[0197] The features of the embodiments of the storage resource recycling device can be referred to the related descriptions of the embodiments of the storage resource recycling method, which will not be repeated here.
[0198] Figure 8 The structural schematic diagram of the electronic device provided in the present application is shown in FIG. 8. Figure 8 As shown in FIG. 8, the electronic device 800 provided in the present embodiment includes at least one processor 801 and a memory 802. Optionally, the electronic device 800 further includes a communication component 803. The processor 801, the memory 802 and the communication component 803 are connected through a bus.
[0199] In the implementation process, the at least one processor 801 executes the computer-executable instructions stored in the memory 802, so that the at least one processor 801 performs the storage resource recycling method described above.
[0200] The specific implementation process of the processor 801 can refer to the method embodiments described above, which have similar implementation principles and technical effects, and will not be described here in detail.
[0201] In the above embodiments, it should be understood that the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the application can be directly embodied as hardware processor execution, or executed by a combination of hardware and software modules in the processor.
[0202] The memory can include a random access memory (RAM), and can also include a non-volatile memory (NVM), such as at least one disk memory.
[0203] Embodiments of the present application also provide a computer readable storage medium, which stores a computer program, wherein the computer program is configured to execute the steps in any of the above storage resource recycling method embodiments when running.
[0204] In an example embodiment, the above computer readable storage medium 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 computer program storage media.
[0205] Embodiments of the present application also provide a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the steps in any of the above storage resource recycling method embodiments.
[0206] The embodiment of the present application further provides another computer program product, comprising a nonvolatile computer readable storage medium, the nonvolatile computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the steps in any of the above storage resource recycling method embodiments.
[0207] Those skilled in the art will further appreciate that the functions of the examples described herein-based units and algorithm steps can be implemented using electronic hardware, computer software, or any combination thereof. When the functions are implemented in software, the functions can be stored on or transmitted over a computer-readable medium, such as an optical, magnetic or semiconductor storage medium. The order of execution or the arrangement of code or steps can be changed, or individual code or steps can be combined or broken apart, or additional code or steps can be added, without departing from the scope of the application. Thus, the functions described herein can be embodied in a variety of other ways, not just the specific examples described.
[0208] The above describes the storage resource recycling method and the electronic device provided by the present application in detail. The principles and implementation manners of the present application are described by applying specific examples in the present application. The above description of the embodiments is only applicable to help understand the method of the present application and its core idea. It should be pointed out that, for those 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 storage resource recovery method characterized by comprising: The method comprises the following steps: determining a target migration management structure used by the storage system according to the consumption speed and the recovery speed of the storage units in the storage system, the target migration management structure being used to store the physical block addresses and the logical block addresses of a plurality of migration storage units, the plurality of migration storage units being derived from at least one first storage space to be recovered in the storage system; generating at least one landing request according to the request concurrency number of the storage system and the target migration management structure, the sum of the number of the at least one landing request being the same as the request concurrency number, the at least one landing request being used to migrate the data stored in a plurality of first migration storage units, the plurality of migration storage units including the plurality of first migration storage units; processing the at least one landing request and performing recovery processing on the at least one first storage space after the processing is completed; the recovery processing on the at least one first storage space after the processing is completed comprises the following steps: updating the physical block addresses of the plurality of first migration storage units in a metadata database according to the logical block addresses of the plurality of first migration storage units, and clearing the logical block addresses and the physical block addresses of the plurality of first migration storage units in the target migration management structure, the metadata database comprising the mapping relationship between the physical block addresses and the logical block addresses of a plurality of storage units, the plurality of storage units including the plurality of first migration storage units; determining target storage spaces in which the plurality of first migration storage units are located in the at least one first storage space; determining the number of remaining migration storage units in the target storage spaces except the plurality of first migration storage units; performing recovery processing on the target storage spaces according to the number of the remaining migration storage units.
2. The method of claim 1, wherein, The updating of the physical block addresses of the plurality of first migration storage units in the metadata database according to the logical block addresses of the plurality of first migration storage units comprises the following steps: determining first physical block addresses corresponding to the plurality of first migration storage units after the migration processing; querying second physical block addresses of the plurality of first migration storage units in the metadata database according to the logical block addresses of the plurality of first migration storage units; updating the second physical block addresses of the plurality of first migration storage units to the corresponding first physical block addresses in the metadata database.
3. The method of claim 1, wherein, The recovery processing on the target storage spaces according to the number of the remaining migration storage units comprises the following steps: in the case that the number of the remaining migration storage units is zero, performing recovery processing on the target storage spaces.
4. The method according to any one of claims 1 to 3, characterized in that, The generation of the at least one landing request according to the request concurrency number of the storage system and the target migration management structure comprises the following steps: determining the plurality of first migration storage units required by the at least one landing request in the plurality of migration storage units of the target migration management structure according to the request concurrency number; reading the data stored in the plurality of first migration storage units and reallocating a plurality of empty storage units for the data; generating the at least one landing request according to the read data and the plurality of empty storage units.
5. The method according to any one of claims 1-3, characterized in that, The method further comprises: determining a first data amount stored in a migration storage unit in the target migration management structure; determining a second data amount required by at least one destage request; in a case where the first data amount is less than the second data amount, determining a difference amount between the second data amount and the first data amount; determining a second migration storage unit from at least one second storage space to be recycled in the storage system according to the difference amount, the at least one second storage space comprising the at least one first storage space, and a data amount stored in the second migration storage unit being the same as the difference amount; storing a physical block address and a logical block address of the second migration storage unit in the target migration management structure.
6. The method of claim 5, wherein, The second storage space comprises meta storage units and non-meta storage units, and the meta storage units are used to store logical block addresses corresponding to the non-meta storage units; determining a second migration storage unit from at least one second storage space to be recycled in the storage system according to the difference amount, comprises: obtaining logical block addresses of non-meta storage units of each second storage space in meta storage units of the each second storage space; determining migration storage units of the each second storage space in non-meta storage units of the each second storage space according to the logical block addresses of the non-meta storage units of the each second storage space and a meta database, the meta database comprising mapping relationships between physical block addresses and logical block addresses of a plurality of storage units, the plurality of storage units comprising the non-meta storage units of the each second storage space, and a physical block address corresponding to the migration storage unit in the meta database being the same as a physical block address of the migration storage unit in the corresponding second storage space; determining the second migration storage unit in the migration storage units of the at least one second storage space according to the difference amount.
7. The method according to any one of claims 1-3, characterized in that, The method further comprises: obtaining a first consumption speed and a recycling speed of a storage unit in the storage system according to a first preset time length or a first preset frequency; determining a target migration management structure used by the storage system according to the consumption speed and the recycling speed of the storage unit in the storage system, comprising: configuring at least one candidate migration management structure for the storage system according to resource information of the storage system, the resource information comprising a number of processing units corresponding to the storage system; determining the target migration management structure in the at least one candidate migration management structure according to the first consumption speed and the recycling speed.
8. The method of any one of claims 1-3, wherein, The method further comprises: obtaining a second consumption speed of a storage unit in the storage system according to a second preset time length or a second preset frequency; adjusting a request concurrency number of the storage system according to the second consumption speed.
9. An electronic device, comprising: comprise: a memory for storing a computer program; a processor for executing the computer program to implement the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Dummy storage system and method
CN101241476A
Computer system and load distribution method
US20220107747A1