Method, apparatus and program product for wear leveling
By detecting and identifying target disks with high wear levels and dynamically adjusting their weights, the problem of uneven disk wear in the storage array is solved, thereby optimizing storage performance and achieving balanced data distribution.
Patent Information
- Application Number
- CN202410516872.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-26
- Publication Date
- 2025-10-28
AI Technical Summary
In existing storage arrays, uneven disk wear leads to a decline in storage performance. Related technologies cannot effectively avoid the aging problem caused by multiple disks reaching the end of their service life at the same time, and assume that the wear of each disk has the same impact, resulting in an unreasonable balancing strategy.
By detecting disks in the storage array whose wear level exceeds a threshold, they are identified as target disks. The update weight of the disks is dynamically adjusted based on the wear level and the impact decay factor to achieve wear balance and avoid too many disks aging at the same time.
It effectively prevents a large number of disks in the storage array from aging simultaneously, dynamically optimizes storage performance, ensures that data is evenly distributed among multiple disks, and avoids performance degradation.
Smart Images

Figure CN120849078A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of this disclosure generally relate to the field of storage, and more specifically to methods, apparatus, and program products for wear leveling. Background Technology
[0002] A storage array is a matrix storage structure composed of multiple storage units, such as multiple disks (e.g., hard disk drives (HDDs), solid-state drives (SSDs), hybrid hard drives (SSHDs)) arranged in rows and columns. This array technology integrates multiple disks into a single storage device and distributes data across different disks through methods such as striping.
[0003] When accessing data, multiple disks in the array can work together, which not only improves storage space utilization but also significantly reduces data access latency. The storage array employs different Redundant Array of Independent Disks (RAID) levels, which are designed for different system environments and application scenarios to adapt to data security and reliability requirements. Summary of the Invention
[0004] The embodiments of this disclosure provide a scheme for wear leveling, which effectively prevents the storage performance degradation caused by the concentrated aging of a large number of disks in the array, and dynamically adjusts the data distribution according to the degree of wear, thereby achieving wear leveling in the storage array.
[0005] In a first aspect of this disclosure, a method for wear leveling is provided, the method comprising identifying a detected disk as a target disk in response to detecting a disk with a wear level greater than a first threshold among a plurality of disks in a storage array. The method further comprises determining an updated weight for disk wear based on the wear level of the target disks and an impact decay factor associated with the wear level in response to the number of target disks being greater than or equal to a second threshold. The method further comprises performing wear leveling for I / O requests on the plurality of disks in the storage array based on the updated weight for disk wear.
[0006] In another aspect of this disclosure, an apparatus for wear leveling is provided, the apparatus including a processor and a memory coupled to the processor and storing instructions thereon that, when executed by the processor, cause the apparatus to perform actions including, in response to detecting a disk among a plurality of disks in a storage array whose wear level is greater than a first threshold, identifying the detected disk as a target disk. These actions also include, in response to the number of target disks being greater than or equal to a second threshold, determining an update weight for disk wear based on the wear level of the target disks and an impact decay factor associated with the wear level. These actions further include, based on the update weight for disk wear, performing wear leveling for I / O requests across the plurality of disks in the storage array.
[0007] In another aspect of this disclosure, a computer program product is provided. This computer program product is tangibly stored on a non-transitory computer-readable storage medium and includes machine-executable instructions that, when executed, cause a machine to perform a method or process according to embodiments of this disclosure.
[0008] The wear leveling scheme according to embodiments of this disclosure provides a dynamically optimized solution mechanism that effectively avoids storage performance degradation caused by too many disks reaching the end of their lifespan at the same time or within a period. Furthermore, it can dynamically consider the impact of wear on the storage array based on the different wear levels of the disks, thereby more accurately achieving a balanced distribution of data across multiple disks.
[0009] Please note that the Summary of the Invention is provided to introduce a series of concepts in a simplified form, which will be further described below in the Detailed Description. The Summary of the Invention is not intended to identify key or essential features of this disclosure, nor is it intended to limit the scope of this disclosure. Attached Figure Description
[0010] The above and other objects, features, and advantages of this disclosure will become clearer through a more detailed description of the embodiments thereof in conjunction with the accompanying drawings, in which:
[0011] Figure 1 The illustration shows a schematic diagram of an example environment in which methods and / or processes according to embodiments of the present disclosure may be implemented;
[0012] Figure 2 A flowchart illustrating a method for loss equalization according to an embodiment of the present disclosure is shown;
[0013] Figure 3 An example of a phased disk lifeline according to an embodiment of the present disclosure is illustrated;
[0014] Figure 4 The illustration shows a process for detecting the degree of wear according to an embodiment of the present disclosure;
[0015] Figure 5 An example process of loss equalization according to an embodiment of the present disclosure is illustrated; and
[0016] Figure 6 These are schematic block diagrams that can be used to implement example devices according to embodiments of the present disclosure.
[0017] In all the accompanying drawings, the same or similar reference numerals usually indicate the same or similar elements. Specific Implementation
[0018] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0019] In the description of embodiments of this disclosure, the term "comprising" and its variations 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 "one 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 unless explicitly indicated otherwise.
[0020] As mentioned above, to improve storage space utilization while minimizing data access latency, data can be distributed across multiple disks in a storage array. For example, in fully automated tiering technology for virtual pool storage, there are two disk balancing strategies: inter-tier balancing and intra-tier balancing. Generally, disk balancing typically involves wear leveling. For instance, in inter-tier balancing, wear leveling can offload excessive I / O requests (such as write I / O) from flash tiers to non-flash tiers. In intra-tier balancing, the purpose of wear leveling is to balance write I / O among disks within the same tier.
[0021] Regarding disk balancing, some related technologies improve upon disk read / write (DE) performance; however, these technologies always attempt to extend disk lifespan, thus failing to prevent too many disks from simultaneously reaching end-of-life (EOL) and aging concurrently. Furthermore, other related technologies assume that disks have the same impact on the storage array across different wear levels, which is unreasonable. This is because, for example, when wear levels are low, such as writing to a disk at 5% of its quota, it is often treated with almost the same priority as at 10%, as the disk has sufficient potential to support upcoming I / O requests for new data. When wear levels are higher, such as exceeding 85% of the disk's write quota, different priorities are often applied, because each increase in wear level near EOL significantly increases the risk of drive failure.
[0022] To address at least some of the aforementioned and other potential problems, embodiments of this disclosure propose a scheme for wear leveling. The scheme includes identifying a detected disk as a target disk in response to detecting a disk with a wear level greater than a first threshold among a plurality of disks in a storage array. The scheme further includes determining an update weight for disk wear based on the wear level of the target disks and an impact decay factor associated with the wear level in response to the number of target disks being greater than or equal to a second threshold. The scheme also includes performing wear leveling for I / O requests across the plurality of disks in the storage array based on the updated weight for disk wear. In this manner, storage performance degradation caused by too many disks reaching the end of their lifespan at the same time or within a period can be effectively avoided. Furthermore, the impact of wear on the storage array can be dynamically considered based on the different wear levels of the disks, thereby more accurately achieving a balanced distribution of data among the plurality of disks.
[0023] The following is for reference. Figures 1 to 6 The present disclosure is provided to illustrate the basic principles and several example implementations. It should be understood that these exemplary embodiments are given only to enable those skilled in the art to better understand and implement the embodiments of the present disclosure, and are not intended to limit the scope of the disclosure in any way.
[0024] Figure 1 A schematic diagram of an example environment 100 in which methods and / or processes according to embodiments of the present disclosure may be implemented is shown. This example environment 100 exemplarily illustrates a diagram of a storage array 110 including multiple disks. Figure 1 As shown, the storage array may include multiple disks 111-114, 121-124, and 131-134.
[0025] According to embodiments of this disclosure, the multiple disks included in the storage array 110 can be arranged locally or distributed, and can be coupled together (e.g., via a network or line) to enable collaborative operation. In response to a write operation to the storage array 110, the data corresponding to the write operation can be distributed and stored across multiple disks 111-114, 121-124, and 131-134. Furthermore, in response to a read operation to the storage array 110, the data corresponding to the read operation can be accessed simultaneously. Through a reasonable balanced distribution strategy, the storage array 110 can ensure the uniformity of data access, avoiding performance bottlenecks caused by excessive load on certain disks.
[0026] By way of example, and not limitation, multiple disks 111-114, 121-124, and 131-134 can be, but are not limited to, HDDs, SSDs, SSHDs, etc. These disks can be flexibly arranged into a matrix consisting of several rows and several columns, where the number of rows and columns can be determined according to actual storage needs and device configuration. Furthermore, the design of the storage array allows for the mixed use of different disk types, enabling flexible configuration of storage solutions based on specific performance and cost requirements. For example, the high-speed performance of SSDs can be used as a caching layer for frequently accessed data, while large-capacity HDDs can be used as the primary storage layer, thereby balancing performance and storage costs.
[0027] According to embodiments of this disclosure, example environment 100 may further include, for example, a RAID controller (not shown) configured to manage the distribution of data across multiple disks, ensuring fast data access and efficient storage. Simultaneously, the RAID controller is also configured to implement redundant data storage by distributing multiple copies of the data across different disks to improve data reliability and fault tolerance. In the event of a disk failure, the RAID controller can utilize redundant data to recover lost information, ensuring data integrity and availability.
[0028] It should be understood that this is done solely for the purpose of ease of understanding and illustration. Figure 1 Only one storage array and a limited number of disks are shown. Of course, the methods and / or processes according to embodiments of this disclosure can also be applied to multiple storage arrays, which may have [specific features]. Figure 1 The illustrations show different arrangements, such as multiple disks arranged with different numbers of rows or columns.
[0029] The above combination Figure 1 A schematic diagram of an example environment 100 in which methods and / or processes according to embodiments of the present disclosure may be implemented is described. The following is in conjunction with... Figure 2 A flowchart is provided to describe a method 200 for wear leveling according to embodiments of the present disclosure. To effectively prevent storage performance degradation caused by the concentrated aging of a large number of disks in an array, and to achieve a more reasonable dynamic leveling strategy based on wear levels, a method 200 for wear leveling according to embodiments of the present disclosure is proposed.
[0030] At box 210, in response to the detection of a disk with a wear level greater than a first threshold among multiple disks in the storage array, the detected disk is identified as a target disk. As mentioned above, when the wear level of a disk is in a lower level range (hereinafter also referred to as the healthy phase), it can be treated with the same or similar priority. However, when the wear level of a disk is in a lower level range (hereinafter also referred to as the risk phase), the closer its wear level is to EOL, the higher the risk of array failure. Therefore, during the risk phase, disks with a wear level greater than the first threshold (i.e., the threshold for the degree of disk wear) need to be treated differently based on their specific wear level.
[0031] In some embodiments, wear level detection can be performed on each of the multiple disks in the storage array at a certain time frequency to determine the corresponding wear level of each disk. This time frequency can be predefined based on the actual needs of wear leveling (e.g., accuracy requirements). If it is determined that the wear level of one or more disks in the array is greater than a predefined threshold, then the one or more disks are identified as high-risk disks. The wear level detection according to embodiments of this disclosure will be further described in detail below.
[0032] At box 220, in response to the number of target disks being greater than or equal to a second threshold, the update weights for disk wear are determined based on the degree of wear of the target disks and the impact decay factor associated with the degree of wear. When the number of disks identified as high-risk is small, the system does not need to respond immediately. Instead, the wear leveling strategy is updated in response to the number of disks identified as high-risk exceeding a certain number (i.e., the second threshold, also known as the threshold for the number of disks with high wear). This avoids unnecessary resource consumption caused by frequently updating the weights for disk wear, and instead provides a fault-tolerant mechanism that updates the wear leveling strategy based on the weights for disk wear when the system's risk level exceeds the warning line. This enables optimized resource utilization and further improves the array's storage performance.
[0033] In some embodiments, the loss leveling strategy may also be updated in response to the ratio of high-risk disks to all disks exceeding a ratio threshold. According to embodiments of this disclosure, the loss leveling strategy is updated based on an impact decay factor associated with the degree of disk loss. The impact decay factor remains stable or fluctuates only slightly within a limited range during the healthy phase of a disk, reflecting that the degree of disk loss has a substantially consistent impact on the entire array during this phase. However, during the risky phase of a disk, the impact decay factor decays sharply as the disk loss approaches end-of-life (EOL), reflecting that the degree of disk loss significantly affects the entire array during this phase; that is, higher loss levels increase the likelihood of array failure. The risk warning and impact decay factor according to embodiments of this disclosure will be further described in detail below.
[0034] At box 230, wear leveling for I / O requests is performed on multiple disks of the storage array based on updated weights for disk wear. Instead of simply and unrealistically treating the impact of disk wear on the entire array as constant, embodiments of this disclosure consider the impact of disk wear on the entire array in stages during wear leveling, dynamically updating the wear leveling strategy based on the wear level at different stages, thereby ensuring that the wear leveling strategy always remains consistent with changes in disk wear.
[0035] According to embodiments of this disclosure, a dynamic optimization mechanism for wear leveling is provided, which can effectively prevent storage performance degradation caused by too many disks reaching the end of their lifespan at the same time or within a period. Furthermore, it can dynamically consider the impact of wear on the storage array based on the different wear levels of the disks, thereby more accurately achieving a balanced distribution of data among multiple disks.
[0036] Figure 3 An example 300 of a phased disk lifeline according to an embodiment of the present disclosure is illustrated. (As shown) Figure 3 As shown, the disk's lifeline can be divided into two stages: a healthy stage (310) and a risk stage (320). Point 301 on the lifeline indicates a completely undamaged new disk, while point 302 indicates a threshold value for the degree of disk damage. An example value for this threshold in the diagram is 85% of the disk's write quota, which can refer to the maximum number of writes or the maximum amount of data allowed on the disk. Furthermore, point 303 indicates that the disk has reached its end-of-life (EOL) and needs to be swapped out.
[0037] According to embodiments of this disclosure, when the wear level of a disk falls within health phase 310, it indicates that the disk's wear level is low or acceptable, and its wear state is safe and sufficient to support upcoming I / O requests. By way of example, and not limitation, within health phase 310, the impact attenuation factor associated with the disk's wear level can remain the same from points 301 to 302 on the lifeline (i.e., less than or equal to a threshold for the degree of disk wear, exemplarily ≤85% in the figure). This means that although the disk's wear level increases in health phase 310, the impact on the entire array is the same, and the impact on the array is not increased due to the increase in wear level.
[0038] According to embodiments of this disclosure, when the wear level of a disk falls within risk phase 320, it indicates that the disk's wear level is high or beyond acceptable limits, at which point its wear state is dangerous and unlikely to support upcoming I / O requests. By way of example, and not limitation, within risk phase 320, the impact attenuation factor associated with the disk's wear level can decay sharply from points 302 to 303 on the lifeline (i.e., greater than the threshold for the degree of disk wear, exemplarily >85% in the figure). This means that even a slight increase in the disk's wear level in risk phase 320 can have a significant impact on the array. The calculation process of the impact attenuation factor according to embodiments of this disclosure will be described in further detail below.
[0039] Wear leveling aims to ensure the overall storage performance of a storage array by averaging the use of multiple disks in the array when handling I / O requests (such as write I / O) or erase requests. According to embodiments of this disclosure, wear leveling for a storage array can be based on at least one of the following: the wear level of each disk in the array (its write count, erase count, etc.), the capacity of each disk, or the temperature of each disk. The following equation (1) provides a mathematical expression for the weighting criterion of wear leveling for a storage array:
[0040] V=ω1·W+ω2·T+ω3·C Formula (1)
[0041] In the weighting criterion V in Equation (1), it is based on disk wear W, temperature T and capacity C, while ω1, ω2 and ω3 indicate the weights when considering wear W, temperature T and capacity C, respectively.
[0042] Newton's law of cooling is an exponential decay model. Newton's law of cooling allows for determining the temperature of a cooled (or warmed) object based on the ambient temperature and the time it takes for the object to enter that environment. According to embodiments of this disclosure, the wear level μ of a disk also possesses the aforementioned "temperature" attribute; that is, for disks with wear level μ exceeding a threshold, the closer their wear level is to Expiration of Online Memory (EOL), the greater the risk of potential storage performance degradation. The following equation (2) gives the calculation process for the weight ω1 of wear W:
[0043] ω μ=x =ω μ=85% ×e -λ(x-85%) Formula (2)
[0044] In the weight calculation in equation (2), ω μ=x The instruction indicates that wear leveling should take into account the weight of wear W when the wear level μ of the disk is x (e.g., x = 50% could indicate that the current wear level of the disk is 50% of the quota), and λ is the influence attenuation factor associated with the wear level of the disk. Furthermore, ω μ=85%The instruction indicates that when performing wear leveling with disk wear level μ at x = 85%, the weight of wear W should be considered. Since the impact of disk wear level μ on the entire array can be consistent during the healthy phase, ω... μ=0% =ω μ=85% , is a fixed value. The calculation process of the attenuation factor λ is shown below by equation (3).
[0045] ω μ=100% =ω μ=85% ×e -λ·15% Formula (3)
[0046] According to embodiments of this disclosure, it can be based on the complete wear and tear of the disk (e.g., Figure 3 The first weight corresponding to point 303 of the lifeline shown, and the degree of disk wear less than or equal to the threshold for disk wear (e.g., from...). Figure 3 The second weight corresponding to the lifeline (between points 301 and 302) is used to calculate the influence decay factor based on Newton's law of cooling.
[0047] For example, in Figure 3 At the end of the wear leveling curve, the disk has reached its complete wear level (i.e., ωw), at which point the disk is highly susceptible to storage performance degradation. Therefore, in this case, wear leveling should assign a low (or even 0) weight to wear W, assuming ωw μ=100% =1%, of course, this is just an example and not a limitation, it can also be 0.1% or other values. As mentioned above, the degree of disk wear μ can have a consistent impact on the entire array during the healthy phase, therefore ω μ=0%至85% = Fixed value. Assume that in this stage ω1=ω2=ω3=33.33%. Substituting each value into equation (3), that is, 1%=33.33%×e -15%·λ Thus, λ = 0.2331 is derived. It should be understood that the parameter values in the above calculation process are exemplary and not restrictive, and can be adjusted according to actual needs.
[0048] Figure 4 The diagram illustrates a wear level detection process 400 according to an embodiment of the present disclosure. At 410, in response to wear leveling being triggered, the corresponding wear level for each disk can be calculated based on the write count of a slice of each disk in the plurality of disks of the storage array and its lifetime. The calculation process is illustrated by the following equation (4).
[0049]
[0050] Among them W slice The write count of the indicator disk slices, and L diskThe lifespan of the indicator disk depends on various variables such as brand, size, type, and environment. At 420, the presence of high-risk disks among multiple disks is detected by comparing the corresponding degree of wear and tear of each disk individually with a threshold for the degree of disk wear.
[0051] Figure 5 An example process 500 for loss equalization according to an embodiment of the present disclosure is illustrated. Figure 5 As shown, at 510, wear leveling for multiple disks in the storage array is triggered. At 520, the wear level of each disk in the array can be calculated. At 525, it can be determined whether the wear level of a disk is greater than a threshold for disk wear. If the wear level of one or more disks is greater than the threshold, those disks can be identified as high-risk disks. If no disk has a wear level greater than the threshold, at 545, it can be determined whether all disks have been checked.
[0052] According to embodiments of this disclosure, at 530, the count of high-risk disks can be updated, incrementing by 1 each time a disk is identified as high-risk. At 535, it can be determined whether the updated high-risk disk count is greater than or equal to a threshold number for disk wear. If the high-risk disk count is greater than or equal to the threshold number, at 540, the weights for disk wear are updated for use in a dynamic wear leveling strategy. If the high-risk disk count is less than the threshold number, at 545, it can be determined whether all disks have been checked.
[0053] According to embodiments of this disclosure, at 550, dynamic wear leveling is performed on multiple disks in the array based on updated weights for disk wear, thereby preventing excessive disk aging in the array from requiring concurrent replacement. At 545, if all disks have been checked, at 560, the weights for disk wear are not updated, and wear leveling is performed on multiple disks in the array based on the existing weights.
[0054] Figure 6 A schematic block diagram is illustrated for an example device 600 that can be used to implement some embodiments of the present disclosure. Figure 6 As shown, device 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) 602 or loaded from storage unit 608 into random access memory (RAM) 603. RAM 603 may also store various programs and data required for the operation of device 600. CPU 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0055] Multiple components in device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of monitors, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0056] The various processes and handling described above, such as method 200, can be executed by processing unit 601. For example, in some embodiments, method 200 can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by CPU 601, one or more actions of method 200 described above can be performed.
[0057] This disclosure can be a method, apparatus, system, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this disclosure.
[0058] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0059] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to computer-readable storage media within the respective computing / processing device.
[0060] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0061] Various aspects of this disclosure have been described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0062] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0063] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0064] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0065] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for loss equalization, comprising: In response to detecting a disk with a wear level greater than a first threshold among multiple disks in the storage array, the detected disk is identified as a target disk; In response to the number of target disks being greater than or equal to a second threshold, an update weight for disk wear is determined based on the degree of wear of the target disks and the influence decay factor associated with the degree of wear. as well as Based on the updated weights for disk wear, wear leveling is performed on the plurality of disks of the storage array for input / output I / O requests.
2. The method according to claim 1, further comprising: Based on a first weight corresponding to complete disk wear and a second weight corresponding to disk wear levels less than or equal to a first threshold, the influence attenuation factor based on Newton's law of cooling is calculated. The attenuation factor remains the same from the point where the disk is completely undamaged until the degree of damage equals the first threshold.
3. The method according to claim 1, further comprising: In response to the loss leveling being triggered, the corresponding degree of loss for each disk is calculated based on the write count of each slice of the plurality of disks and the lifetime of use. as well as The presence of the target disk among the plurality of disks is detected by comparing the corresponding wear level of each disk with the first threshold.
4. The method according to claim 3, further comprising: In response to the absence of a disk with a corresponding wear level greater than the first threshold, determine whether all disks among the plurality of disks have been detected; as well as After determining that all disks among the plurality of disks have been detected, wear leveling is performed on the plurality of disks for IO requests based on the unupdated weights for disk wear.
5. The method according to claim 3, further comprising: In response to the number of target disks being less than the second threshold, it is determined whether all disks among the plurality of disks have been detected; as well as After determining that all disks among the plurality of disks have been detected, wear leveling is performed on the plurality of disks for IO requests based on the unupdated weights for disk wear.
6. The method according to claim 1, wherein: The second threshold is determined based on the type of the storage array.
7. The method of claim 1, wherein the loss equalization is further based on at least one of the following: The temperature of each of the plurality of disks in the storage array; or The capacity of each of the plurality of disks in the storage array.
8. The method of claim 7, wherein the loss leveling causes the data corresponding to the IO request to be distributed in a decentralized manner across the plurality of disks of the storage array.
9. An electronic device, comprising: processor; as well as A memory coupled to the processor and storing instructions that, when executed by the processor, cause the device to perform actions, including: In response to detecting a disk with a wear level greater than a first threshold among multiple disks in the storage array, the detected disk is identified as a target disk; In response to the number of target disks being greater than or equal to a second threshold, an update weight for disk wear is determined based on the degree of wear of the target disks and an impact decay factor associated with the degree of wear; and Based on the updated weights for disk wear, wear leveling is performed on the plurality of disks of the storage array for IO requests.
10. The electronic device according to claim 9, wherein the action further includes: Based on a first weight corresponding to complete disk wear and a second weight corresponding to disk wear levels less than or equal to a first threshold, the influence attenuation factor based on Newton's law of cooling is calculated. The attenuation factor remains the same from the point where the disk is completely undamaged until the degree of damage equals the first threshold.
11. The electronic device according to claim 9, wherein the action further includes: In response to the loss leveling being triggered, the corresponding degree of loss for each disk is calculated based on the write count of each slice of the plurality of disks and the lifetime of use. as well as The presence of the target disk among the plurality of disks is detected by comparing the corresponding wear level of each disk with the first threshold.
12. The electronic device according to claim 11, wherein the action further includes: In response to the absence of a disk with a corresponding wear level greater than the first threshold, determine whether all disks among the plurality of disks have been detected; as well as After determining that all disks among the plurality of disks have been detected, wear leveling is performed on the plurality of disks for IO requests based on the unupdated weights for disk wear.
13. The electronic device according to claim 11, wherein the action further includes: In response to the number of target disks being less than the second threshold, it is determined whether all disks among the plurality of disks have been detected; as well as After determining that all disks among the plurality of disks have been detected, wear leveling is performed on the plurality of disks for IO requests based on the unupdated weights for disk wear.
14. The electronic device according to claim 9, wherein: The second threshold is determined based on the type of the storage array.
15. The electronic device of claim 9, wherein the loss equalization is further based on at least one of the following: The temperature of each of the plurality of disks in the storage array; or The capacity of each of the plurality of disks in the storage array.
16. The electronic device of claim 15, wherein the loss leveling causes data corresponding to IO requests to be distributed in a decentralized manner across the plurality of disks of the storage array.
17. A computer program product tangibly stored on a non-volatile computer-readable medium and comprising machine-executable instructions that, when executed, cause a machine to: In response to detecting a disk with a wear level greater than a first threshold among multiple disks in the storage array, the detected disk is identified as a target disk; In response to the number of target disks being greater than or equal to a second threshold, an update weight for disk wear is determined based on the degree of wear of the target disks and the influence decay factor associated with the degree of wear. as well as Based on the updated weights for disk wear, wear leveling is performed on the plurality of disks of the storage array for IO requests.
18. The computer program product of claim 17, wherein the machine-executable instructions further cause the machine to: Based on a first weight corresponding to complete disk wear and a second weight corresponding to disk wear levels less than or equal to a first threshold, the influence attenuation factor based on Newton's law of cooling is calculated. The attenuation factor remains the same from the point where the disk is completely undamaged until the degree of damage equals the first threshold.
19. The computer program product of claim 17, wherein the machine-executable instructions further cause the machine to: In response to the loss leveling being triggered, the corresponding loss level for each disk is calculated based on the write count and lifetime of each slice of the plurality of disks; and The presence of the target disk among the plurality of disks is detected by comparing the corresponding wear level of each disk with the first threshold.
20. The computer program product of claim 17, wherein the loss equalization is further based on at least one of the following: The temperature of each of the plurality of disks in the storage array; or The capacity of each of the plurality of disks in the storage array.