Method, electronic device and computer program product for storage management

CN115220647BActive Publication Date: 2026-09-22EMC IP HLDG CO LLC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110433325.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-21
Publication Date
2026-09-22
Estimated Expiration
2041-04-21

AI Technical Summary

Technical Problem

[0004]因此,在全闪存重复数据删除系统中,更有可能在SSD块中导致无效的漏洞页面,而这些无效的漏洞将增加SSD的WAF

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115220647B_ABST
    Figure CN115220647B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to a method, an electronic device and a computer program product for storage management. The method for managing storage includes determining a data amount of corresponding failed data in a plurality of candidate sub-storage spaces of a disk, the plurality of candidate sub-storage spaces being divided from an original storage space of the disk and having continuous physical addresses, a size of a candidate sub-storage space being associated with a size of a storage space of at least one disk block constituting the disk; and selecting a target sub-storage space to be released from the plurality of candidate sub-storage spaces based at least on the data amount of the corresponding failed data. In this way, the WAF of a storage system, in particular, an SSD, can be effectively reduced while the service life of the SSD is prolonged, since the operation of moving valid data in an SSD disk block to a new SSD disk block is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of this disclosure generally relate to data processing systems, and more particularly, to a method of storage management, electronic devices, and computer program products. Background Technology

[0002] One crucial aspect of all-flash systems is reducing the write amplification factor (WAF) of solid-state drives (SSDs). A higher WAF will slow down the SSD's input / output (I / O) and affect its lifespan.

[0003] Especially in deduplication systems, where complex chunk data reference relationships exist, reducing the overall WAF (Web Application Firewall) of an all-flash deduplication system becomes even more crucial. This is because when an expired backup is to be deleted, the complex reference relationships mean that only a portion of the chunk data within an SSD block can be deleted, while the chunk data still referenced by other valid backups will be retained.

[0004] Therefore, in all-flash deduplication systems, there is a greater chance of invalid, vulnerable pages in SSD blocks, and these invalid vulnerabilities will increase the SSD's WAF (Web Application Firewall). Summary of the Invention

[0005] The embodiments of this disclosure relate to an improvement in storage management.

[0006] In a first aspect of this disclosure, a method for data processing is provided. The method includes determining the amount of corresponding expired data in a plurality of candidate sub-storage spaces of a disk, the plurality of candidate sub-storage spaces being partitioned from the disk's original storage space and having contiguous physical addresses, the size of a candidate sub-storage space being associated with the size of the storage space of at least one disk block comprising the disk; and selecting a target sub-storage space to be released from the plurality of candidate sub-storage spaces, at least based on the amount of the corresponding expired data.

[0007] In a second aspect of this disclosure, an electronic device is provided. The electronic device includes at least one processor; and at least one memory storing computer program instructions, the at least one memory and the computer program instructions being configured, together with the at least one processor, to cause the electronic device to perform actions. The actions include determining the amount of corresponding expired data in a plurality of candidate sub-storage spaces of a disk, the plurality of candidate sub-storage spaces being partitioned from the disk's original storage space and having contiguous physical addresses, the size of a candidate sub-storage space being associated with the size of the storage space of at least one disk block comprising the disk; and selecting a target sub-storage space to be released from the plurality of candidate sub-storage spaces, at least based on the amount of the corresponding expired data.

[0008] In a third aspect of this disclosure, a computer program product is provided. The computer program product is tangibly stored on a non-volatile computer-readable medium and includes machine-executable instructions. When executed, the machine-executable instructions cause a device to perform the method of the first aspect.

[0009] It should be understood that the description in the Summary of the Invention section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0010] The above and other objects, features, and advantages of embodiments of the present disclosure will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of the present disclosure are illustrated in the drawings by way of example and not limitation, in which:

[0011] Figure 1 A block diagram of an example storage system in which embodiments of the present disclosure may be implemented is shown;

[0012] Figure 2 A schematic diagram of a waste recycling process according to an embodiment of the present disclosure is shown;

[0013] Figure 3 A schematic diagram of a waste recycling process according to an embodiment of the present disclosure is shown;

[0014] Figure 4 A schematic diagram of multiple sub-storage spaces according to embodiments of the present disclosure is shown;

[0015] Figure 5 A schematic diagram illustrating the selection of sub-storage spaces to be freed according to an embodiment of the present disclosure is shown;

[0016] Figure 6 A flowchart of a method for storage management according to an embodiment of the present disclosure is shown;

[0017] Figure 7 A schematic block diagram of an apparatus that can be used to implement embodiments of the present disclosure is shown.

[0018] Throughout all the accompanying drawings, the same or similar reference numerals are used to denote the same or similar components. Detailed Implementation

[0019] The principles and spirit of this disclosure will now be described with reference to several exemplary embodiments illustrated in the accompanying drawings. It should be understood that these specific embodiments are described only to enable those skilled in the art to better understand and implement this disclosure, and are not intended to limit the scope of this disclosure in any way.

[0020] Figure 1 A schematic diagram of an example storage system 100 in which embodiments of the present disclosure may be implemented is shown. (See diagram for reference.) Figure 1 As shown, the storage system 100 may include an SSD 102. The SSD 102 may consist of multiple SSD blocks, such as SSD blocks 110, 111, 112 and 113.

[0021] Each SSD block can include multiple sub-blocks (chunks). For example, SSD block 110 includes sub-blocks 120-0 to 120-9. SSD block 111 includes sub-blocks 121-0 to 121-9. SSD block 112 includes sub-blocks 122-0 to 122-9. SSD block 113 includes sub-blocks 123-0 to 123-9.

[0022] The storage system 100 may also include a computing device 101. The computing device 101 can be used to manage operations such as reading, writing, deleting, and releasing storage space of the SSD 102.

[0023] It should be understood that Figure 1 The structure of SSD 102 is shown merely as an example. However, SSD 102 can include any number of SSD blocks, and is not limited to this. Figure 1 The example shown is shown in the image.

[0024] As mentioned above, a crucial aspect of all-flash systems is reducing the WAF (Web Application Firewall) of the SSD. A higher WAF will slow down the SSD's I / O and affect its lifespan.

[0025] exist Figure 1 The storage system 100 shown can be, for example, a deduplication system. In this deduplication system, each SSD block contains sub-blocks with complex reference relationships. Therefore, reducing the overall system's WAF (Web Application Firewall) is particularly important.

[0026] When an expired backup is to be deleted, the complex reference relationships of sub-blocks will mean that only part of the sub-block data can be deleted from an SSD block, while the sub-block data that is still referenced by other valid backups will be retained.

[0027] In this situation, invalid vulnerable pages are often created in the SSD disk blocks, and these invalid vulnerabilities will increase the SSD's WAF.

[0028] For backup systems, it is always necessary to delete old, expired backup data and free up storage space to store new backup data. The deleted data storage space is released during garbage collection.

[0029] In traditional garbage collection schemes, storage space is freed up as much as possible during a garbage collection process. Furthermore, traditional garbage collection schemes typically randomly select storage spaces to release. However, while traditional garbage collection schemes work well for traditional HDD (hard drive) backup systems, they are less effective for SSD (solid-state drive) backup systems.

[0030] In a backup system, data can be referenced by multiple backups during deduplication. Therefore, after some backups are deleted, some sub-block data may still be valid because they are still referenced by other valid backups. These deleted backups will result in invalid holes being created in the SSD block.

[0031] These invalid holes will increase WAF because the SSD will move valid sub-block data to the new SSD block and erase the old SSD block.

[0032] Valid sub-block data in a new SSD block may become invalid during the next garbage collection. The still valid sub-block data will be moved to another new SSD block, and the old SSD block will be erased again.

[0033] Figure 2 A schematic diagram of a waste recycling process according to an embodiment of the present disclosure is shown. Figure 2 As shown, SSD block 110 includes sub-blocks 120-0 to 120-9. SSD block 111 includes sub-blocks 121-0 to 121-9. SSD block 112 includes sub-blocks 122-0 to 122-9. SSD block 113 includes sub-blocks 123-0 to 123-9.

[0034] As the system is used, data in some sub-blocks of the SSD becomes invalid. For example, data in sub-blocks 120-3 and 120-6 to 120-9 of SSD block 110 becomes invalid. As another example, data in sub-blocks 121-2, 121-3, 121-6, 121-7, and 120-9 of SSD block 111 becomes invalid.

[0035] During a garbage collection process, the remaining valid sub-blocks in SSD blocks 110, 111, 112, and 113 are moved to new SSD blocks. For example, sub-blocks 120-0 to 120-2, 120-4, and 120-5 in SSD block 110 are moved to SSD block 114. Sub-blocks 122-0, 122-1, 122-3, 122-5, and 122-7 in SSD block 112 are moved to SSD block 115.

[0036] Valid child blocks that were moved to the new SSD blocks 114 and 115 during this garbage collection process may continue to become invalid child blocks. For example, the data in child blocks 120-2, 120-4, 121-1, 121-4, and 121-5 in SSD block 114 will become invalid child blocks.

[0037] During the next garbage collection process, the still-valid sub-blocks that were moved to the new SSD blocks 114 and 115 will be moved to the new SSD blocks again. For example, as Figure 2 As shown, valid sub-blocks 120-0, 120-1, 120-5, 121-0, and 121-8 in SSD block 114 are moved to the new SSD block 116.

[0038] This shows that, Figure 2 In the example of the garbage collection process shown, all invalid storage space is released as much as possible in each garbage collection, which is not conducive to saving system overhead.

[0039] To address this issue, the desired approach is to delay the release process for portions of the storage space. This allows for the release of the corresponding storage space only after more sub-blocks have become invalid. This avoids writing data to some sub-blocks, which are then subsequently deleted from the SSD.

[0040] Figure 3 A schematic diagram of a waste recycling process according to an embodiment of the present disclosure is shown. Figure 3 As shown, data in some SSD blocks becomes invalid. For example, data in sub-blocks 120-3 and 120-6 to 120-9 in SSD block 110 becomes invalid. Another example is data in sub-blocks 121-2, 121-3, 121-6, 121-7, and 120-9 in SSD block 111.

[0041] However, the storage space corresponding to invalidated sub-block data is not immediately released. It can wait for more sub-block data in the SSD block to become invalid. For example, as the system is used, the data in sub-block 120-4 in SSD block 110 becomes further invalid, while the data in sub-blocks 121-0 and 121-1 in SSD block 111 becomes further invalid.

[0042] Next, during a garbage collection process, the remaining valid sub-blocks in SSD blocks 110, 111, 112, and 113 are moved to new SSD blocks. For example, sub-blocks 120-0 to 120-1 and 120-5 in SSD block 110, sub-blocks 121-4 to 121-5 and 121-8 in SSD block 111, sub-blocks 122-0 and 125-5 in SSD block 112, and sub-blocks 123-1 and 123-5 in SSD block 113 are moved to SSD block 114.

[0043] To further optimize the storage space release process, embodiments of this disclosure propose a storage management method. In this scheme, the amount of corresponding expired data in multiple sub-storage spaces of a disk can be determined separately, and the sub-storage spaces to be released are selected based at least on the amount of expired data in each of these sub-storage spaces. This effectively reduces the WAF (Web Application Firewall) of the storage system, especially the SSD, while extending the lifespan of the SSD.

[0044] Figure 4 A schematic diagram of multiple sub-storage spaces according to embodiments of the present disclosure is shown. For example... Figure 4 As shown, the storage space of SSD 102 can be divided into multiple sub-storage spaces 401 to 405. Each of these sub-storage spaces can have contiguous physical addresses. The size of a sub-storage space can be associated with the storage space size of one of the multiple SSD blocks that make up SSD 102. For example, if the storage space size of the SSD block is M, then the size of the sub-storage space can be N×M.

[0045] In some embodiments, the storage system may periodically obtain the size of the remaining free storage space of the SSD disk. If the storage system determines that the size of the remaining free storage space of the SSD disk is lower than a threshold space size, it may trigger the determination of the amount of corresponding expired data for each sub-storage space of the SSD disk.

[0046] In some embodiments, the determination of the amount of expired data in each sub-storage space of the SSD can also be triggered by a new read / write request. For example, if the storage system receives a write request for target data, the storage system can determine whether the remaining free storage space of the current SSD is sufficient to accommodate the amount of target data. If it is determined that the remaining free storage space of the current SSD is less than the amount of target data, the determination of the amount of expired data in each sub-storage space of the SSD can be triggered.

[0047] By determining the amount of invalid data in each sub-storage space of the SSD, the target storage space to be released can be selected from these sub-storage spaces.

[0048] Figure 5 A schematic diagram illustrating the selection of sub-storage spaces to be freed according to an embodiment of this disclosure is shown. (To be combined with...) Figure 4 and Figure 5 This describes the process of selecting the sub-storage space to be freed.

[0049] like Figure 5 As shown, sub-storage space 401 may include multiple valid data 511 to 513, and multiple deleted data 521 to 523, which can be considered as expired data. Similarly, for Figure 4 The other sub-storage spaces 402 to 405 can also include their own valid data and deleted data, respectively.

[0050] In some embodiments, the amount of deleted data in each sub-storage space can be determined. For example, in Figure 5 In the shown sub-storage space 401, assuming the amount of deleted data 521 is S1, the amount of deleted data 522 is S2, and the amount of deleted data 523 is S3, then the total amount of deleted data in sub-storage space 401 is St = S1 + S2 + S3. Assuming the total storage space of sub-storage space 401 is S, the ratio (Rd) of the amount of expired data to the total storage space in sub-storage space 401 can be determined as St / S. In this way, the corresponding Rd values ​​in each sub-storage space 401 to 405 can be determined.

[0051] In the process of selecting the sub-storage space to be released, the sub-storage spaces 401 to 405 that have an Rd value exceeding the threshold Rd can be identified. For example, if it is determined that the Rd value of sub-storage space 401 exceeds the threshold Rd, then sub-storage space 401 is identified as the target sub-storage space to be released.

[0052] In some embodiments, if it is determined that the Rd values ​​of two or more sub-storage spaces exceed the threshold Rd, then the target sub-storage space to be released can be further selected.

[0053] For example, if the Rd values ​​of both sub-storage space 401 and sub-storage space 402 exceed the Rd value, then a first sub-data quantity within the amount of expired data in sub-storage space 401 and a second sub-data quantity within the amount of expired data in sub-storage space 402 can be determined. The first sub-data quantity may correspond to a group of storage spaces with contiguous physical addresses in sub-storage space 401, while the second data quantity may correspond to a group of storage spaces with contiguous physical addresses in sub-storage space 402.

[0054] In some embodiments, if a set of data quantities in the data quantity of invalid data in sub-storage space 401 corresponds to a set of storage spaces with consecutive physical addresses and their total consecutive size exceeds a threshold data quantity, then the set of data quantities is determined as the first data quantity.

[0055] Similarly, if a set of data in the invalid data of sub-storage space 402 corresponds to a set of storage spaces with consecutive physical addresses and a total consecutive size exceeding the threshold data size, then that set of data is determined as the second set of data.

[0056] In one embodiment, the threshold data size can be defined based on the storage space size of an SSD block. For example, the threshold data size can be determined to be three times the storage space size of an SSD block. Therefore, this threshold data size ensures that expired data will overwrite one or more SSD blocks. If this expired data is deleted, no data will be rewritten to other SSD blocks because there is no valid data that needs to be moved to other SSD blocks, and the entire SSD block can be directly erased because all data in that SSD block is expired.

[0057] Still refer to Figure 5 For example, if the storage spaces corresponding to the data volumes of deleted data 521, 522, and 523 all have consecutive physical addresses, then determine whether the data volume of each of the deleted data 521, 522, and 523 exceeds the threshold data volume Sn.

[0058] If the total amount of deleted data in deleted data 521 and 523 exceeds the threshold data amount Sn, then the first sub-data amount in the amount of invalid data in sub-storage space 401 can be Sc = S1 + S3. Assuming the total storage space of sub-storage space 401 is S, the ratio (Rcd) of the first sub-data amount in the amount of invalid data in sub-storage space 401 to the total storage space can be determined as Sc / S. In this way, the corresponding Rcd value in sub-storage space 402 can also be determined.

[0059] If the ratio of the first data quantity of expired data in sub-storage space 401 to the total storage space of sub-storage space 401, i.e., the first Rcd value, exceeds the ratio of the second data quantity of expired data in sub-storage space 402 to the total storage space of sub-storage space 402, i.e., the second Rcd value, then sub-storage space 401 is determined as the target sub-storage space to be released.

[0060] In one embodiment, if it is determined that the first Rcd value is equal to the second Rcd value, the target sub-storage space to be released can be further selected based on the trend of data invalidation in sub-storage spaces 401 and 402 over a certain time interval. This trend can also be referred to as the temperature below. The more data (invalidated data) that will be deleted in the most recent predetermined number of garbage collections, the higher the temperature of the sub-storage space.

[0061] The temperature T of the sub-storage space can be determined using the following formula:

[0062]

[0063] Where Sgm is the amount of data to be deleted in the most recent scheduled garbage collection, S is the total space of the sub-storage space, and N is the temperature coefficient.

[0064] In one embodiment, if it is determined that the temperature T1 of sub-storage space 401 is higher than the temperature T2 of sub-storage space 402, then sub-storage space 401 is determined as the target sub-storage space to be released.

[0065] In some embodiments, after the selected target sub-storage space is released, it can be determined whether the current free storage space of the SSD disk can meet the data volume requirements of the target data to be written. If the current free storage space cannot meet the data volume requirements of the target data to be written, another sub-storage space to be released can be further determined.

[0066] In this way, by reducing the operation of moving valid data from one SSD block to another, the WAF of the storage system, especially the SSD, can be effectively reduced, while extending the lifespan of the SSD.

[0067] Figure 6 A flowchart of a method 600 for storage management according to some embodiments of the present disclosure is shown. Method 600 can be implemented in... Figure 1 In the system 100 shown. Method 600 can, for example, be set by... Figure 1 The system 100 shown is implemented using a computing device 101. It can be combined with... Figure 1 Let's describe method 600.

[0068] In block 610, computing device 101 determines the amount of corresponding invalid data in a plurality of candidate sub-storage spaces of a disk, the plurality of candidate sub-storage spaces being divided from the original storage space of the disk and having contiguous physical addresses, the size of a candidate sub-storage space being associated with the size of the storage space of at least one disk block comprising the disk.

[0069] In box 620, computing device 101 selects a target sub-storage space to be released from the plurality of candidate sub-storage spaces based at least on the amount of data of the corresponding expired data.

[0070] In some embodiments, computing device 101 may determine a first ratio between the amount of invalid first data in a first candidate sub-storage space and the size of the first candidate sub-storage space among a plurality of candidate sub-storage spaces. If computing device 101 determines that the first ratio exceeds a threshold ratio, the first candidate sub-storage space is selected as the target sub-storage space.

[0071] In some embodiments, computing device 101 may determine a first ratio between the first amount of expired data in a first candidate sub-storage space and the size of the first candidate sub-storage space, and a second ratio between the second amount of expired data in a second candidate sub-storage space and the size of the second candidate sub-storage space. If computing device 101 determines that both the first ratio and the second ratio exceed a threshold ratio, computing device 101 may determine a third ratio between the first amount of data in the first data volume and the size of the first candidate sub-storage space, and a fourth ratio between the second amount of data in the second data volume and the size of the second candidate sub-storage space, wherein the first amount of data corresponds to a group of storage spaces with contiguous physical addresses in the first candidate sub-storage space, and the second amount of data corresponds to another group of storage spaces with contiguous physical addresses in the second candidate sub-storage space. If computing device 101 determines that the third ratio is greater than the fourth ratio, then the first candidate sub-storage space is selected as the target sub-storage space.

[0072] In some embodiments, if it is determined that the third ratio is equal to the fourth ratio, the computing device 101 determines a third amount of data that has failed in the first candidate sub-storage space and a fourth amount of data that has failed in the second candidate sub-storage space within a predetermined time interval. If it is determined that the third amount of data exceeds the fourth amount of data, the computing device 101 selects the first candidate sub-storage space as the target sub-storage space.

[0073] In some embodiments, computing device 101 may determine a first ratio between the first amount of expired data in a first candidate sub-storage space and the size of the first candidate sub-storage space, and a second ratio between the second amount of expired data in a second candidate sub-storage space and the size of the second candidate sub-storage space. If computing device 101 determines that both the first ratio and the second ratio exceed a threshold ratio, computing device 101 may determine a third amount of expired data in the first candidate sub-storage space and a fourth amount of expired data in the second candidate sub-storage space within a predetermined time interval. If it is determined that the third amount of data exceeds the fourth amount of data, computing device 101 selects the first candidate sub-storage space as the target sub-storage space.

[0074] In some embodiments, computing device 101 may determine whether the amount of target data to be written to the disk exceeds the size of the disk's free storage space. If it is determined that the amount of target data exceeds the size of the free storage space, computing device 101 may determine the amount of the corresponding expired data.

[0075] In some embodiments, computing device 101 may determine whether the size of the free storage space of the disk is lower than a threshold space size. If it is determined that the free storage space is lower than the threshold space size, computing device 101 determines the amount of the corresponding expired data.

[0076] In some embodiments, computing device 101 determines whether the free storage space in the released target sub-storage space exceeds the amount of target data to be written to the disk. If it is determined that the free storage space in the released target sub-storage space exceeds the amount of target data to be written to the disk, computing device 101 writes the target data into the released target sub-storage space.

[0077] In some embodiments, if it is determined that the free storage space in the target sub-storage space after release is less than the amount of target data to be written to the disk, the computing device 101 selects another target sub-storage space to be released from a plurality of candidate sub-storage spaces, in addition to the target sub-storage space.

[0078] Figure 7 A block diagram schematically illustrates a device 700 that can be used to implement embodiments of the present disclosure. Device 700 may be implemented as or included in... Figure 1 The storage system 100 or the computing device 101 of the storage system 100.

[0079] like Figure 7As shown, device 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to computer program instructions stored in read-only storage device (ROM) 702 or loaded from storage unit 708 into random access storage device (RAM) 703. The RAM 703 may also store various programs and data required for the operation of device 700. CPU 701, ROM 702, and RAM 703 are interconnected via bus 704. Input / output (I / O) interface 705 is also connected to bus 704.

[0080] Multiple components in device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of monitors, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0081] The various processes and procedures described above, such as process 600, may be executed by processing unit 701. For example, in some embodiments, process 600 may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by CPU 701, one or more steps of process 600 described above may be performed.

[0082] As used herein, the term "comprising" and similar expressions should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "an embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects. This document may also include other explicit and implicit definitions.

[0083] As used herein, the term "determine" encompasses a wide variety of actions. For example, "determine" can include calculation, computation, processing, derivation, investigation, searching (e.g., looking in a table, database, or other data structure), ascertainment, etc. Furthermore, "determine" can include receiving (e.g., receiving information), accessing (e.g., accessing data in memory), etc. Additionally, "determine" can include parsing, selecting, choosing, building, etc.

[0084] It should be noted that the embodiments of this disclosure can be implemented using hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated-design hardware. Those skilled in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, for example, code provided on programmable memory or a data carrier such as an optical or electronic signal carrier.

[0085] Furthermore, although the operation of the methods of this disclosure is described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the operations shown must be performed to achieve the desired result. Rather, the steps depicted in the flowcharts may be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps. It should also be noted that the features and functions of two or more devices according to this disclosure may be embodied in one device. Conversely, the features and functions of one device described above may be further divided and embodied by multiple devices.

[0086] While this disclosure has been described with reference to several specific embodiments, it should be understood that this disclosure is not limited to the specific embodiments disclosed. This disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims

1. A storage management method, comprising: The amount of corresponding invalid data in multiple candidate sub-storage spaces of a disk is determined. The multiple candidate sub-storage spaces are divided from the original storage space of the disk and have contiguous physical addresses. The size of a candidate sub-storage space is associated with the size of the storage space of at least one disk block that makes up the disk. as well as The target sub-storage space to be released is selected from the plurality of candidate sub-storage spaces based at least on the amount of the corresponding invalid data, wherein selecting the target sub-storage space to be released includes: Determine a first ratio between the first amount of invalid data in a first candidate sub-storage space and the size of the first candidate sub-storage space, and a second ratio between the second amount of invalid data in a second candidate sub-storage space and the size of the second candidate sub-storage space; If both the first ratio and the second ratio exceed the threshold ratio, a third ratio is determined between the size of the first sub-data volume and the size of the first candidate sub-storage space in the first data volume, and a fourth ratio is determined between the size of the second sub-data volume and the size of the second candidate sub-storage space in the second data volume. The first sub-data volume corresponds to a group of storage spaces with contiguous physical addresses in the first candidate sub-storage space, and the second sub-data volume corresponds to another group of storage spaces with contiguous physical addresses in the second candidate storage space; and If it is determined that the third ratio is greater than the fourth ratio, the first candidate sub-storage space is selected as the target sub-storage space.

2. The method of claim 1, wherein selecting the target sub-storage space to be released further comprises: If it is determined that the first ratio exceeds the threshold ratio, the first candidate sub-storage space is selected as the target sub-storage space.

3. The method according to claim 1, further comprising: If the third ratio is determined to be equal to the fourth ratio, the third data quantity of data that failed in the first candidate sub-storage space and the fourth data quantity of data that failed in the second candidate sub-storage space within the predetermined time interval are determined. as well as If it is determined that the third data volume exceeds the fourth data volume, then the first candidate sub-storage space is selected as the target sub-storage space.

4. The method of claim 1, wherein determining the amount of the corresponding expired data comprises: Determine whether the amount of target data to be written to the disk exceeds the size of the disk's free storage space; as well as If it is determined that the amount of the target data exceeds the size of the free storage space, the amount of the corresponding expired data is determined.

5. The method of claim 1, wherein determining the amount of the corresponding expired data comprises: Determine whether the size of the free storage space of the disk is lower than the threshold space size; as well as If it is determined that the free storage space is lower than the threshold space size, the amount of the corresponding expired data is determined.

6. The method according to claim 1, further comprising: Determine whether the free storage space in the target sub-storage space after release exceeds the amount of target data to be written to the disk; as well as If it is determined that the free storage space in the released target sub-storage space exceeds the amount of target data to be written to the disk, the target data is written to the released target sub-storage space.

7. The method according to claim 6, further comprising: If it is determined that the free storage space in the target sub-storage space after release is less than the amount of target data to be written to the disk, another target sub-storage space to be released, other than the target sub-storage space, is selected from multiple candidate sub-storage spaces.

8. An electronic device, comprising: processor; as well as A memory coupled to the processor stores instructions to be executed, which, when executed by the processor, cause the electronic device to perform actions, including: The amount of corresponding invalid data in multiple candidate sub-storage spaces of a disk is determined. These candidate sub-storage spaces are partitioned from the disk's original storage space and have contiguous physical addresses. The size of each candidate sub-storage space is associated with the size of the storage space of at least one disk block comprising the disk. The target sub-storage space to be released is selected from the plurality of candidate sub-storage spaces based at least on the amount of the corresponding invalid data, wherein selecting the target sub-storage space to be released includes: Determine a first ratio between the first amount of invalid data in a first candidate sub-storage space and the size of the first candidate sub-storage space, and a second ratio between the second amount of invalid data in a second candidate sub-storage space and the size of the second candidate sub-storage space; If both the first ratio and the second ratio exceed the threshold ratio, a third ratio is determined between the size of the first sub-data volume and the size of the first candidate sub-storage space in the first data volume, and a fourth ratio is determined between the size of the second sub-data volume and the size of the second candidate sub-storage space in the second data volume. The first sub-data volume corresponds to a group of storage spaces with contiguous physical addresses in the first candidate sub-storage space, and the second sub-data volume corresponds to another group of storage spaces with contiguous physical addresses in the second candidate storage space; and If it is determined that the third ratio is greater than the fourth ratio, the first candidate sub-storage space is selected as the target sub-storage space.

9. The device of claim 8, wherein selecting the target sub-storage space to be released further comprises: If it is determined that the first ratio exceeds the threshold ratio, the first candidate sub-storage space is selected as the target sub-storage space.

10. The device according to claim 8, wherein the action further comprises: If the third ratio is determined to be equal to the fourth ratio, the third data quantity of data that failed in the first candidate sub-storage space and the fourth data quantity of data that failed in the second candidate sub-storage space within the predetermined time interval are determined. as well as If it is determined that the third data volume exceeds the fourth data volume, then the first candidate sub-storage space is selected as the target sub-storage space.

11. The device of claim 8, wherein the amount of data used to determine the corresponding expired data includes: Determine whether the amount of target data to be written to the disk exceeds the size of the disk's free storage space; as well as If it is determined that the amount of the target data exceeds the size of the free storage space, the amount of the corresponding expired data is determined.

12. The device of claim 8, wherein the amount of data used to determine the corresponding expired data includes: Determine whether the size of the free storage space of the disk is lower than the threshold space size; as well as If it is determined that the free storage space is lower than the threshold space size, the amount of the corresponding expired data is determined.

13. The device according to claim 8, wherein the action further comprises: Determine whether the free storage space in the target sub-storage space after release exceeds the amount of target data to be written to the disk; as well as If it is determined that the free storage space in the released target sub-storage space exceeds the amount of target data to be written to the disk, the target data is written to the released target sub-storage space.

14. The device according to claim 13, wherein the action further includes: If it is determined that the free storage space in the target sub-storage space after release is less than the amount of target data to be written to the disk, another target sub-storage space to be released, other than the target sub-storage space, is selected from multiple candidate sub-storage spaces.

15. A computer program product tangibly stored on a non-transitory computer-readable medium and comprising machine-executable instructions that, when executed, cause a machine to perform actions, the actions comprising: The amount of corresponding invalid data in multiple candidate sub-storage spaces of a disk is determined. The multiple candidate sub-storage spaces are divided from the original storage space of the disk and have contiguous physical addresses. The size of a candidate sub-storage space is associated with the size of the storage space of at least one disk block that makes up the disk. as well as The target sub-storage space to be released is selected from the plurality of candidate sub-storage spaces based at least on the amount of the corresponding invalid data, wherein selecting the target sub-storage space to be released includes: Determine a first ratio between the first amount of invalid data in a first candidate sub-storage space and the size of the first candidate sub-storage space, and a second ratio between the second amount of invalid data in a second candidate sub-storage space and the size of the second candidate sub-storage space; If both the first ratio and the second ratio exceed the threshold ratio, a third ratio is determined between the size of the first sub-data volume and the size of the first candidate sub-storage space in the first data volume, and a fourth ratio is determined between the size of the second sub-data volume and the size of the second candidate sub-storage space in the second data volume. The first sub-data volume corresponds to a group of storage spaces with contiguous physical addresses in the first candidate sub-storage space, and the second sub-data volume corresponds to another group of storage spaces with contiguous physical addresses in the second candidate storage space; and If it is determined that the third ratio is greater than the fourth ratio, the first candidate sub-storage space is selected as the target sub-storage space.

16. The computer program product of claim 15, wherein selecting the target sub-memory space to be released further comprises: If it is determined that the first ratio exceeds the threshold ratio, the first candidate sub-storage space is selected as the target sub-storage space.

17. A storage management method, comprising: The amount of corresponding invalid data in multiple candidate sub-storage spaces of a disk is determined. The multiple candidate sub-storage spaces are divided from the original storage space of the disk and have contiguous physical addresses. The size of a candidate sub-storage space is associated with the size of the storage space of at least one disk block that makes up the disk. as well as The target sub-storage space to be released is selected from the plurality of candidate sub-storage spaces based at least on the amount of the corresponding invalid data, wherein selecting the target sub-storage space to be released includes: Determine a first ratio between the first amount of invalid data in a first candidate sub-storage space and the size of the first candidate sub-storage space, and a second ratio between the second amount of invalid data in a second candidate sub-storage space and the size of the second candidate sub-storage space; If both the first ratio and the second ratio exceed the threshold ratio, determine the third data volume of data that failed in the first candidate sub-storage space and the fourth data volume of data that failed in the second candidate sub-storage space within the predetermined time interval; and If it is determined that the third data volume exceeds the fourth data volume, then the first candidate sub-storage space is selected as the target sub-storage space.

18. The method of claim 17, wherein selecting the target sub-storage space to be released further comprises: If it is determined that the first ratio exceeds the threshold ratio, the first candidate sub-storage space is selected as the target sub-storage space.

19. The method of claim 17, wherein determining the amount of data for the corresponding expired data comprises: Determine whether the amount of target data to be written to the disk exceeds the size of the disk's free storage space; as well as If it is determined that the amount of the target data exceeds the size of the free storage space, the amount of the corresponding expired data is determined.

20. The method of claim 17, wherein determining the amount of data for the corresponding expired data comprises: Determine whether the size of the free storage space of the disk is lower than the threshold space size; as well as If it is determined that the free storage space is lower than the threshold space size, the amount of the corresponding expired data is determined.

21. The method of claim 17, further comprising: Determine whether the free storage space in the target sub-storage space after release exceeds the amount of target data to be written to the disk; as well as If it is determined that the free storage space in the released target sub-storage space exceeds the amount of target data to be written to the disk, the target data is written to the released target sub-storage space.

22. The method of claim 21, further comprising: If it is determined that the free storage space in the target sub-storage space after release is less than the amount of target data to be written to the disk, another target sub-storage space to be released, other than the target sub-storage space, is selected from multiple candidate sub-storage spaces.

23. An electronic device, comprising: processor; as well as A memory coupled to the processor stores instructions to be executed, which, when executed by the processor, cause the electronic device to perform actions, including: The amount of corresponding invalid data in multiple candidate sub-storage spaces of a disk is determined. These candidate sub-storage spaces are partitioned from the disk's original storage space and have contiguous physical addresses. The size of each candidate sub-storage space is associated with the size of the storage space of at least one disk block comprising the disk. The target sub-storage space to be released is selected from the plurality of candidate sub-storage spaces based at least on the amount of the corresponding invalid data, wherein selecting the target sub-storage space to be released includes: Determine a first ratio between the first amount of invalid data in a first candidate sub-storage space and the size of the first candidate sub-storage space, and a second ratio between the second amount of invalid data in a second candidate sub-storage space and the size of the second candidate sub-storage space; If both the first ratio and the second ratio exceed the threshold ratio, determine the third data volume of data that failed in the first candidate sub-storage space and the fourth data volume of data that failed in the second candidate sub-storage space within the predetermined time interval; and If it is determined that the third data volume exceeds the fourth data volume, then the first candidate sub-storage space is selected as the target sub-storage space.

24. The device of claim 23, wherein selecting the target sub-storage space to be released further comprises: If it is determined that the first ratio exceeds the threshold ratio, the first candidate sub-storage space is selected as the target sub-storage space.

25. The device of claim 23, wherein the amount of data used to determine the corresponding expired data includes: Determine whether the amount of target data to be written to the disk exceeds the size of the disk's free storage space; as well as If it is determined that the amount of the target data exceeds the size of the free storage space, the amount of the corresponding expired data is determined.

26. The device of claim 23, wherein the amount of data used to determine the corresponding expired data includes: Determine whether the size of the free storage space of the disk is lower than the threshold space size; as well as If it is determined that the free storage space is lower than the threshold space size, the amount of the corresponding expired data is determined.

27. The device according to claim 23, wherein the action further comprises: Determine whether the free storage space in the target sub-storage space after release exceeds the amount of target data to be written to the disk; as well as If it is determined that the free storage space in the released target sub-storage space exceeds the amount of target data to be written to the disk, the target data is written to the released target sub-storage space.

28. The device according to claim 27, wherein the action further includes: If it is determined that the free storage space in the target sub-storage space after release is less than the amount of target data to be written to the disk, another target sub-storage space to be released, other than the target sub-storage space, is selected from multiple candidate sub-storage spaces.

29. A computer program product tangibly stored on a non-transitory computer-readable medium and comprising machine-executable instructions that, when executed, cause a machine to perform actions, the actions comprising: The amount of corresponding invalid data in multiple candidate sub-storage spaces of a disk is determined. The multiple candidate sub-storage spaces are divided from the original storage space of the disk and have contiguous physical addresses. The size of a candidate sub-storage space is associated with the size of the storage space of at least one disk block that makes up the disk. as well as The target sub-storage space to be released is selected from the plurality of candidate sub-storage spaces based at least on the amount of the corresponding invalid data, wherein selecting the target sub-storage space to be released includes: Determine a first ratio between the first amount of invalid data in a first candidate sub-storage space and the size of the first candidate sub-storage space, and a second ratio between the second amount of invalid data in a second candidate sub-storage space and the size of the second candidate sub-storage space; If both the first ratio and the second ratio exceed the threshold ratio, determine the third data volume of data that failed in the first candidate sub-storage space and the fourth data volume of data that failed in the second candidate sub-storage space within the predetermined time interval; and If it is determined that the third data volume exceeds the fourth data volume, then the first candidate sub-storage space is selected as the target sub-storage space.

30. The computer program product of claim 29, wherein selecting the target sub-memory space to be released further comprises: If it is determined that the first ratio exceeds the threshold ratio, the first candidate sub-storage space is selected as the target sub-storage space.

Citation Information

Patent Citations

  • Garbage collection method and device, storage system and readable storage medium

    CN110018794A