Method, device and equipment for using solid state disk
By mapping the namespace of large-capacity solid-state drives with SSD channels and reconstructing data, the problem of slow reconstruction of large-capacity solid-state drives is solved, improving system performance and reliability, and extending service life.
Patent Information
- Application Number
- CN202411307403.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2024-12-31
AI Technical Summary
The slow reconstruction speed of large-capacity solid-state drives in the event of failure affects system performance and data security, especially in the fields of high-performance computing, artificial intelligence training and big data analysis, resulting in reduced system reliability and increased risk of data loss.
By mapping the namespace of the solid-state drive with the SSD channel, each namespace is divided into independent logical SSD disks, and when it fails, the data is reconstructed into the target namespace on different physical hard disks, using balanced or unbalanced Wear strategies allocate OP space to extend service life.
It effectively reduces the reconstruction time of large-capacity solid-state drives, improves system performance and reliability, reduces the risk of data loss, and extends the service life of solid-state drives.
Smart Images

Figure CN119225651A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of storage technology, and in particular to a method, device and equipment for using a solid state hard disk. Background Art
[0002] SSD (Solid State Drive) is a high-speed storage device that uses flash memory chips to store data. It has no mechanical parts and has faster read and write speeds, higher reliability and lower power consumption than traditional mechanical hard disks (HDDs).
[0003] The application scenarios of large-capacity solid-state drives (SSDs) (such as 32TB, 60TB, or even higher) are becoming more and more extensive. Typical examples include high-performance computing (HPC) storage (usually requires a large amount of data to be processed in parallel, requiring storage devices to have high throughput, low latency, and large capacity. Large-capacity SSDs can provide the required fast data reading and writing capabilities, significantly improving the overall performance of HPC), artificial intelligence (AI) training and reasoning (AI model training usually requires processing a large amount of training data, requiring storage devices to have sufficient capacity to store data and quickly access data to improve training efficiency. Large-capacity SSDs provide efficient data access guarantees when training complex deep learning models), big data analysis (big data analysis requires processing, storage, and fast access to massive amounts of data to support real-time analysis and decision-making. Large-capacity SSDs provide high-performance data reading and writing operations, which can effectively support big data analysis platforms), cloud computing and data centers (cloud computing and data centers require high-density storage solutions to support tasks such as virtual desktop infrastructure (VDI), databases, and high-performance file systems. Large-capacity SSDs, with their high density and high performance, can provide larger storage capacity and better performance in a smaller space).
[0004] At the same time, large-capacity SSDs also face major challenges. The main problem faced by large-capacity SSD failure is the reconstruction speed, which directly affects system performance, data security and business continuity.
[0005] Reconstruction speed issue: When a large-capacity SSD disk fails partially or completely, data reconstruction is required. For large-capacity disks (such as 32TB or 60TB, or even higher capacity), the amount of data to be reconstructed is 4-8 times or even more than that of a small-capacity disk, so the reconstruction time increases significantly. For example, the amount of data required to reconstruct a 32TB SSD disk is 8 times that of a 4TB SSD disk, and the reconstruction time will increase in proportion to the capacity.
[0006] · Impact on system performance and bandwidth: During the reconstruction process, the storage system requires a large amount of bandwidth for data reading and writing. This results in the storage bandwidth required for normal business being squeezed out, affecting the performance of the system (including the decrease in user read and write bandwidth, increase in read and write latency, etc.).
[0007] System reliability and data risk: During the reconstruction process, the reliability of the storage system will be significantly reduced, mainly due to the reduction of redundant data protection mechanisms. For example, in a RAID or EC configuration, if a disk failure occurs again during the reconstruction period, the risk of data loss will increase significantly. The longer it takes to rebuild a large-capacity disk, the greater the possibility that the system will encounter additional failures during this vulnerable period.
[0008] In short, large-capacity SSDs have important applications in HPC, efficient AI training and reasoning, big data analysis, cloud computing, and data centers. These application scenarios can greatly benefit from the excellent performance and large-capacity storage characteristics of SSDs. However, as capacity increases, it also brings huge challenges in reliability and maintenance, especially in the case of full disk failure and data reconstruction. Summary of the invention
[0009] In view of this, the present invention provides a method, apparatus and device for using a solid-state hard disk, which are used to improve the reliability and reconstruction performance of a large-capacity solid-state hard disk in a storage system.
[0010] Based on one aspect of the present invention, the present invention provides a method for using a solid state drive, the method being applied to a storage system using an SSD solid state drive supporting multi-channel and multi-namespace, the method comprising:
[0011] Map the namespace in the SSD to the SSD channel, divide each namespace into a logical SSD disk with an independent fault domain, and allocate an independent additional OP space to each namespace;
[0012] When a namespace in the solid state drive fails, the stripe data in the failed namespace is reconstructed into a selected valid target namespace; any two namespaces in the target namespace and the namespace where the valid data blocks in the stripe are located are not in the same physical solid state drive.
[0013] Furthermore, when mapping the namespace in the solid state drive to the SSD channel, the mapping is performed based on the following mapping conditions:
[0014] Different namespaces have different channel mappings.
[0015] Each namespace must be mapped to at least one Channel.
[0016] The total number of channels mapped by all namespaces is equal to the number of channels owned by the SSD.
[0017] Furthermore, the method for mapping the namespace in the solid state drive to the SSD channel is any one of the following methods:
[0018] Namespaces and channels are mapped one to one, and the number of namespaces is the same as the number of channels;
[0019] One namespace is mapped to two channels, and the number of channels is twice the number of namespaces;
[0020] Different namespaces map different numbers of channels.
[0021] Furthermore, the method for reconstructing the stripe data in the invalid namespace into the selected valid target namespace is:
[0022] Use the disk selection algorithm of the storage system to select a valid target namespace for the failed data blocks in the data stripe that are located in N failed namespaces;
[0023] Determine whether there is a fault domain conflict between the selected target namespace and the original namespace that carries the valid data blocks in the stripe, that is, determine whether the condition that any two namespaces in the stripe are not on the same physical SSD is met;
[0024] If there is no fault domain conflict, the selected target namespace is determined as the final selected target namespace, otherwise the step of selecting a valid target namespace is re-executed until a target namespace without a fault domain conflict is selected;
[0025] Reconstruct the stripe data in the invalid namespace into the finally selected valid target namespace.
[0026] Further, a wear-balanced strategy or a non-balanced wear-balanced strategy is adopted for all namespaces in the solid-state drive;
[0027] Under the wear balance strategy, OP space is evenly allocated to all namespaces;
[0028] Under the non-balanced wear strategy, the method further includes:
[0029] Determine whether the ratio of the overall current written data volume of the solid state drive to the total number of bytes written TBW exceeds a preset benchmark ratio;
[0030] When it is determined that the ratio of the current amount of written data to the total number of bytes written TBW exceeds a preset benchmark ratio, the OP space of the solid state drive is allocated to each namespace according to a preset non-balanced allocation method.
[0031] Based on another aspect of the present invention, the present invention further provides a solid state hard disk using device, the device is applied to a storage system using an SSD solid state hard disk supporting multi-channel and multi-namespace, the device comprising:
[0032] The namespace mapping module is used to map the namespace Namespace in the solid-state drive with the SSD channel Channel, divide each namespace into a logical SSD disk with an independent fault domain, and allocate an independent additional OP space to each namespace;
[0033] A data reconstruction module is used to reconstruct the stripe data in the failed namespace into a selected valid target namespace when a namespace in the solid state drive fails; any two namespaces in the target namespace and the namespace where the valid data blocks in the stripe are located are not in the same physical solid state drive.
[0034] Furthermore, the namespace mapping module maps the namespace in the solid state drive to the SSD channel based on the following mapping conditions:
[0035] Different namespaces have different channel mappings.
[0036] Each namespace must be mapped to at least one Channel.
[0037] The total number of channels mapped by all namespaces is equal to the number of channels owned by the SSD.
[0038] Furthermore, the namespace mapping module maps the namespace in the solid state drive to the SSD channel using any one of the following methods:
[0039] Namespaces and channels are mapped one to one, and the number of namespaces is the same as the number of channels;
[0040] One namespace is mapped to two channels, and the number of channels is twice the number of namespaces;
[0041] Different namespaces map different numbers of channels.
[0042] Furthermore, the data reconstruction module includes:
[0043] A selection unit, configured to select a valid target namespace for a failed data block in the data stripe and located in the N failed namespaces, using a disk selection algorithm of the storage system;
[0044] A judging unit, used to judge whether there is a fault domain conflict between the selected target namespace and the original namespace carrying the valid data blocks in the stripe, that is, to judge whether the condition that any two namespaces in the stripe are not on the same physical solid-state drive is satisfied;
[0045] A determination unit, configured to determine the selected target namespace as the final selected target namespace if there is no fault domain conflict, and otherwise instruct the selection unit to re-execute the selection of a valid target namespace until a target namespace without a fault domain conflict is selected;
[0046] The reconstruction unit is used to reconstruct the stripe data in the failed namespace into the valid target namespace finally selected.
[0047] The device provided by the present invention can be implemented in software, hardware or a combination of software and hardware. When implemented in a software module, the program code of the software module is loaded into the storage medium of the device, and the processor reads the program code in the storage medium and executes it. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments of the present invention or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings of the embodiments of the present invention.
[0049] Figure 1 This is a schematic diagram of the internal structure of an SSD disk in one embodiment of the present invention;
[0050] Figure 2 A schematic flow chart of the steps of a method for using an SSD solid state drive is provided for one embodiment of the present invention;
[0051] Figure 3 It is a schematic diagram of mapping the namespace of a large-capacity solid-state hard disk and the channel Channel in the solid-state hard disk in one embodiment of the present invention;
[0052] Figure 4 A schematic diagram of the structure of an electronic device provided in accordance with an embodiment of the present invention for implementing the method for using a solid state drive provided in accordance with the present invention. DETAILED DESCRIPTION
[0053] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, rather than limiting the embodiments of the present invention. The singular forms of "a", "said" and "the" used in the embodiments of the present invention are also intended to include plural forms, unless the context clearly indicates other meanings. Although the embodiments of the present invention may be described in a first, second, or third manner, this description is only used to distinguish similar information, entities, or steps, rather than to describe a specific order or sequence. For example, without departing from the scope of the embodiments of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. For another example, in some scenarios, the first information may refer to one information or to multiple information of the same type. In addition, the word "if" used may be interpreted as "at..." or "when..." or "in response to determination". The "and / or" in the present invention is only a kind of association relationship describing the associated objects, indicating that there may be three relationships, for example, A and / or B, which may represent: A exists alone, A and B exist at the same time, and B exists alone, wherein A and B may be singular or plural. In addition, in the description of the present invention, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural.
[0054] To address the problem of long reconstruction time for large-capacity SSD disks, some manufacturers have adopted customized SSD measures and adopted a method of cooperating deep disk control (SSD disk and storage system controller) to isolate local failures of SSD disks and avoid large-scale reconstruction of the entire disk as much as possible.
[0055] Figure 1 FIG. 1 is a schematic diagram of the internal structure of an SSD disk in an embodiment of the present invention. The SSD disk mainly includes components such as a host interface logic (Host Interface Logic), an SSD controller (SSD Controller), flash memory particles (Flash Memory Package), and DDR memory (RAM Buffer).
[0056] Flash memory particles: Flash memory particles can be understood as physical modules that encapsulate one or more flash memory chips. These particles usually appear on the SSD circuit board in a packaged form, and each particle contains multiple flash memory chips. This packaging method helps to better manage and protect flash memory chips, while facilitating integration into SSDs.
[0057] Flash memory chip, or Die, is a single independent chip cut from a semiconductor wafer during the manufacturing process. Sometimes it is also called a "bare die". In SSD flash memory technology, Die is the most basic storage unit in NAND flash memory. Each Die consists of multiple memory cells and related circuits for data storage, reading and erasing.
[0058] SSD Channel: SSD channel refers to the data channel between the SSD controller and the NAND flash chip Die. Each channel can connect to one or more NAND flash chips, and data is transmitted through these channels. The SSD controller can access the flash chip in parallel through multiple channels, thereby improving the read and write performance and overall throughput of the SSD.
[0059] SSD's OP space (Over-Provisioning space, referred to as additional space) refers to a part of the undisclosed storage area reserved in the SSD disk, which is used to optimize performance, extend life and improve data reliability. It improves the overall performance and durability of the SSD by supporting functions such as garbage collection, wear leveling and bad block management.
[0060] SSD namespace: Similar to traditional disk partitions, it refers to a group of logical blocks within the SSD. They exist as an independent storage area and can be assigned to different users or applications for independent management and operation, thereby achieving more flexible and efficient storage resource management.
[0061] The SSD controller is the core component of the SSD disk. It controls the data reading and writing, execution management and other functions of the SSD disk. The data on the SSD disk is stored in the flash memory particles (Flash Memory Package), and each flash memory particle generally contains one or more flash memory chips (Die). The SSD controller generally connects the flash memory chips through multiple channels, and uses the method of parallel access to multiple channels to improve the overall read and write access performance of the SSD disk. In general, different channels are connected to different flash memory chips.
[0062] SSD manufacturers often reserve a certain amount of OP space (typically 7% to 10% of the full disk capacity, and the OP space is invisible to the user). One of the functions of the SSD OP space (Over-Provisioning space) is to improve data reliability. A common failure of SSDs is local data failure (bad blocks appear in the DIE, or the entire DIE fails). In order to avoid data loss in this situation, SSD manufacturers generally use RAID algorithms (typically RAID 5) between DIEs to improve data reliability. When local data failure occurs on an SSD, the OP space and RAID algorithm can be used to reconstruct the data. If the failed physical space exceeds the capacity value that the OP can provide, a full disk failure will occur.
[0063] To this end, some manufacturers use a method of deep cooperation between SSD disks (usually self-developed SSD disks, not commercial SSD disks) and storage system controllers. Even if the failed physical space exceeds the OP space provided by the SSD disk, the SSD disk actively notifies the storage system controller to reduce the capacity (for example, reduce the capacity of a 60TB SSD to 50TB) and adjust the data distribution on each SSD disk, so that the SSD disk continues to be available after the reduction, avoiding the overall reconstruction of the entire large-capacity SSD disk.
[0064] However, the above-mentioned method of deeply cooperating non-commercial SSD disks with storage system controllers to improve the service life of SSD disks requires deep coupling of the SSD disks and storage system controllers, and customized development on the SSD disks and the storage system, respectively, and therefore is not universal.
[0065] The purpose of the present invention is to provide an SSD hard disk and a usage scheme of the SSD hard disk. The scheme provided by the present invention is applied to an SSD disk supporting multiple channels and multiple namespaces. The basic idea of the present invention is to utilize the characteristic of SSD supporting multiple Namespaces to divide the SSD disk into multiple logical disks, and these logical disks have relatively independent fault domains. When the OP space is insufficient due to bad blocks or DIE failure, the overall failure of the large-capacity SSD can be avoided, thereby avoiding the long-term performance degradation of the storage system caused by the overall failure of the SSD. The data reliability of the storage system is improved by reducing the data reconstruction time, the service life of the large-capacity SSD is extended, and the user's total cost of ownership TCO is improved.
[0066] The specific implementation process of the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the step processes shown in the accompanying drawings and embodiments can be executed in a computer system such as a set of computer executable instructions, and one or more of the exemplified method steps can be single or multiple or aggregated together and run in the computer system in the form of a software module or a virtual device. Moreover, although the exemplified step processes have time and sequential logic, the present invention is not limited to these steps in certain cases. They can be executed in an order different from that here. Under the guidance of the purpose of the present invention, simple changes or combinations of the execution order of these steps should also fall within the scope of the disclosure of the embodiments of the present invention.
[0067] Figure 2 A schematic flow chart of the steps of a method for using an SSD solid state hard disk is provided for one embodiment of the present invention. The method is applied to a large-capacity SSD solid state hard disk with multiple channels and supporting multiple namespaces. The method comprises:
[0068] S201, mapping the namespace in the solid state drive to the SSD channel, dividing each namespace into a logical solid state drive with an independent fault domain, and allocating an independent additional OP space to each namespace;
[0069] The present invention utilizes the characteristic that SSD supports multiple namespaces and maps Namespace to SSDChannel, thereby dividing a large-capacity SSD solid-state hard disk into multiple logical spaces, i.e., logical SSD disks, with relatively independent fault domains. In this way, for the upper layer storage system using the large-capacity SSD solid-state hard disk, a large-capacity SSD disk becomes multiple relatively small-capacity logical SSD disks, thereby isolating the impact of insufficient OP space caused by bad blocks or DIE failure in the large-capacity SSD solid-state hard disk into a smaller storage space, and trying to avoid the overall failure of the large-capacity SSD.
[0070] S202, when a namespace in the solid state drive fails, reconstructing the stripe data in the failed namespace into a selected valid target namespace; the target namespace and any two namespaces in the namespace where the valid data blocks in the stripe are located are not in the same physical solid state drive.
[0071] When a namespace in a large-capacity SSD fails (for example, too much failed physical space in the namespace causes insufficient OP space, which leads to the failure of the namespace), the storage system will be triggered to perform data reconstruction. During data reconstruction, the upper-layer storage system needs to select a valid target namespace based on the fault domain isolation policy of the namespace, and reconstruct the data in the data stripes in the failed namespace into the target namespace.
[0072] The storage system reconstructs data based on the fault domain isolation strategy of the namespace. For large-capacity SSD disks, the scope of data reconstruction is relatively reduced, thereby avoiding the impact of the overall reconstruction of the large-capacity SSD disk.
[0073] Figure 3 This is a schematic diagram of mapping the namespace of a large-capacity solid-state hard disk to the channels in the solid-state hard disk in one embodiment of the present invention. In the SSD disk, the SSD controller is connected to the flash chip unit DIE through multiple channels (Channel#0~Channel#K), and the DIEs connected to different channels do not overlap.
[0074] In one embodiment of the present invention, mapping of the namespace Namespace in the large-capacity solid-state hard disk to the SSD channel Channel is performed based on the following mapping conditions:
[0075] Condition 1. Different namespaces have different channel mappings;
[0076] The channels included in a namespace are mutually exclusive and cannot overlap, that is, different namespaces cannot be mapped to the same channel.
[0077] Condition 2. Each namespace must be mapped to at least one channel;
[0078] The number of channels mapped to a namespace must be at least 1 and cannot be less than 1.
[0079] Condition 3. The total number of channels mapped by all namespaces is equal to the number of channels owned by the SSD;
[0080] Based on the above mapping conditions, several typical methods for mapping Namespace to different Channels are introduced as follows:
[0081] Assume that a large-capacity SSD disk contains K+1 channels (Channel#0, Channel#1, ..., Channel#K). Divide this large-capacity SSD disk into S+1 logical SSD disks named after the namespace (Namespace 0, Namespace 1, ..., Namespace S), where S≤K.
[0082] Method 1: Namespaces and channels are mapped one by one. The number of namespaces is the same as the number of channels, that is, S = K.
[0083] Figure 3 The mapping method illustrated in the example is a one-to-one mapping method. The number of channels (K+1) and the number of namespaces (S+1) included in the large-capacity SSD disk are the same. The namespace is mapped one-to-one to each channel. For example, Namespace 0 is mapped to Channel#0, Namespace 1 is mapped to Channel#1, ..., Namespace K is mapped to Channel#K.
[0084] Method 2: When the number of channels is twice the number of namespaces, one namespace is mapped to two channels; that is, (K+1) / 2=(S+1).
[0085] Method 3: Different namespaces map different numbers of channels. This solution is configured according to the actual needs of the user. The mapping of namespaces to several channels is configured by the user according to the needs. For example, Namespace 0 is mapped to Channel#0 in a one-to-one mapping manner; Namespace 1 is mapped to Channel#1 and Channel#2 in a one-to-two mapping manner, and so on.
[0086] It should be noted that the three mapping methods in the above examples all need to comply with the three aforementioned mapping conditions.
[0087] In one embodiment of the present invention, when a namespace in a solid state drive fails (due to insufficient OP space or other failures), it is necessary to reconstruct the stripe data in the failed namespace into a selected valid target namespace. When selecting a valid target namespace, the storage system selects a valid target namespace based on the fault domain isolation strategy of the namespace, thereby ensuring that in all namespaces where redundant array of independent disks (RAID) or erasure coding (EC) data stripes are located in the storage system, any two namespaces are not on the same physical SSD solid state drive.
[0088] Assume that a data stripe contains M data blocks (including original data blocks and check blocks), among which the namespaces where N (N<M, generally N=1) data blocks are located fail at the same time. At this time, it is necessary to reselect a valid target namespace that carries the N failed data blocks in the storage system to reconstruct the N failed data in this stripe.
[0089] The method for selecting a valid target namespace based on the namespace-based fault domain isolation policy is as follows:
[0090] S2021, using a disk selection algorithm of the storage system to select a valid target namespace for the failed data blocks in the data stripe that are located in the N failed namespaces;
[0091] Typical disk selection algorithms include a Distributed Hash Table (DHT) algorithm or a Controlled Replication Under Scalable Hashing (CRUSH) algorithm.
[0092] S2022, determining whether there is a fault domain conflict between the selected target command space and the original namespace carrying the valid data blocks in the stripe, that is, determining whether the condition that any two namespaces in the stripe are not on the same physical solid-state drive is satisfied;
[0093] S2023, if there is no fault domain conflict, determine the selected target namespace as the final selected target namespace, otherwise continue to execute S2021 to reselect until a target namespace without fault domain conflict is selected;
[0094] In one embodiment of the present invention, in order to meet the needs of different business application scenarios, the method for using a solid state drive provided by the present invention further includes a step of configuring an additional OP space of the namespace based on a preset wear strategy.
[0095] In some business scenarios, storage system users hope that multiple namespaces on a large-capacity solid-state drive, namely logical SSD disks, will fail one after another within a similar period of use. The advantage of this is that the physical SSD disk can be replaced as a whole, and after the replacement, the entire storage system will recover its original capacity and performance.
[0096] In some other business scenarios, storage system users hope that multiple namespaces on a large-capacity solid-state drive will fail one by one over a long period of time. The advantage of this is that all physical SSDs in the storage system can provide online services for a long time (but the SSD capacity will be reduced due to the failure of the namespace), and data reliability will not be affected.
[0097] Based on the above different business scenarios, the present invention provides two different wear strategies for the solid state drive, namely, a balanced wear strategy and an unbalanced wear strategy:
[0098] Wear leveling strategy: This strategy ensures that all namespaces on a physical SSD have similar service lives and expire at similar times. The wear leveling strategy can be configured as the default wear strategy for physical SSDs.
[0099] The flash memory particles of an SSD disk usually contain many data blocks. For example, a flash memory particle with a capacity of GB or TB level contains many MB-level data blocks. SSD solid-state hard drives usually control the reading and writing of data at the granularity of data blocks to ensure that each "block" has a similar number of erase and write times at the same time, so that the blocks on the entire SSD disk can reach their life cycle in a similar time.
[0100] Under the wear leveling strategy, when mapping the namespace in the SSD to the SSD channel, the OP space of the physical SSD is evenly allocated to each namespace.
[0101] Unbalanced wear strategy: This strategy makes multiple namespaces on a physical SSD have different service lives and fail one by one over a long period of time, thereby extending the service life of the entire physical SSD as much as possible.
[0102] Generally, SSD manufacturers will mark the total bytes written (TBW) value of the SSD disk. The TBW value is one of the important indicators to measure the durability and life of the SSD. TBW represents the total amount of data that can be written during the service life of the SSD. This indicator is usually provided by the manufacturer to predict the cumulative amount of writes that the SSD can withstand based on laboratory tests and estimates.
[0103] The present invention implements a non-balanced wear strategy based on the TBW value of the SSD disk. The implementation process is exemplified as follows:
[0104] Assume that the TBW value of a physical SSD is Tssd, and the physical SSD contains m namespaces, abbreviated as N1, N2, ..., Nm. Then the TBW value corresponding to Namespace Ni should be Tssd × the capacity ratio of the SSD in the Namespace, that is:
[0105]
[0106] Among them, T Ni Represents the TBW value corresponding to the i-th namespace, Tssd is the TBW value of the entire physical SSD specified by the SSD manufacturer, Capacity of Namespace(i) represents the capacity of the i-th namespace, and Capacity ofSSD represents the capacity of the entire physical SSD.
[0107] The method for implementing the non-balanced wear strategy of solid-state drives based on the TBW value of the SSD disk is:
[0108] S2031. Determine whether the ratio of the overall current amount of data written to the solid state drive to the total number of bytes written TBW exceeds a preset reference ratio;
[0109] The user can set a benchmark ratio p between the current total write amount and the manufacturer's specified TBW value for the SSD, and 0<p<1. For example, if the p value is set to 80%, it means that when the current write data volume of the SSD disk as a whole does not exceed 80%, the wear degree of the blocks contained in each Namespace in the SSD is similar (the SSD disk adopts a balanced wear strategy at this time). The purpose of setting the p value is to ensure that each Namespace in the SSD disk has a basic amount of write data (which means the guarantee of write duration).
[0110] S2032. When it is determined that the ratio of the current amount of written data to the total number of bytes written TBW exceeds a preset reference ratio, the OP space of the solid state drive is allocated to each namespace according to a preset non-balanced allocation method;
[0111] When the current total amount of written data of the SSD disk as a whole exceeds the set benchmark ratio p value, an unbalanced wear strategy is adopted for each namespace in the solid-state drive. The specific method to achieve this goal is to allocate the OP space of the SSD disk to each namespace unbalancedly. Since the OP space has an important impact on the wear leveling of the block, the service life of each namespace can be extended by allocating the OP space of the solid-state drive to each namespace unbalancedly. The more OP space is allocated to the namespace, the longer the service life will be, and vice versa.
[0112] There are many methods for presetting the non-balanced allocation of OP space, such as an arithmetic progression allocation method, so that the OP space allocated to each Namespace is in the form of an arithmetic progression. Of course, other non-balanced allocation methods can also be used, and the present invention does not make specific limitations.
[0113] It should be noted that the OP space changes dynamically. For example, when a Namespace fails, it does not mean that all the blocks on the Namespace have failed. At this time, the blocks that have not failed can be dynamically added to the overall OP space of the SSD disk to maximize the OP space provided for the remaining Namespaces and extend their service life.
[0114] Figure 4The electronic device structure diagram for implementing the method for using a solid-state hard disk provided by the present invention is provided in one embodiment of the present invention. The device 400 includes: a processor 410 such as a central processing unit (CPU), a communication bus 420, a communication interface 440, and a memory 430. The processor 410 and the memory 430 can communicate with each other through the communication bus 420. The memory 430 stores a computer program, and when the computer program is executed by the processor 410, the function of one or more steps in the method for using a solid-state hard disk provided by the present invention can be implemented.
[0115] Memory refers to a device based on a certain storage medium for storing computer programs and / or data. It can be a volatile memory (VM, often called memory) or a non-volatile memory (NVM). Memory refers to an internal memory that directly exchanges data with the processor. It can read and write data at any time and at a very fast speed. It is used as a storage medium for temporary data of the operating system and other running programs. Memory can be synchronous dynamic random access memory (SDRAM), dynamic random access memory (DRAM), etc. Non-volatile memory refers to a memory that uses a persistent storage medium. It has the characteristics of large capacity and persistent data storage. It can be a storage class memory (SCM), a solid state disk (SSD), a NAND flash memory, a disk, etc. SCM is the industry's general term for new storage media between memory and flash memory. It is a composite storage technology that combines persistent storage characteristics and memory characteristics. Its access speed is slower than DRAM and faster than SSD hard disks.
[0116] The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0117] It should be appreciated that embodiments of the present invention may be implemented or implemented by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory (or non-persistent) memory. The method may be implemented in a computer program using standard programming techniques, including a non-transitory storage medium configured with a computer program, wherein the storage medium configured in this way causes the computer to operate in a specific and predefined manner. Each program may be implemented in a high-level procedural or object-oriented programming language to communicate with a computer system. However, if necessary, the program may be implemented in an assembly or machine language. In any case, the language may be a compiled or interpreted language. In addition, the program may be run on a programmed ASIC for this purpose. In addition, the operation of the process described in the present invention may be performed in any suitable order, unless the present invention otherwise indicates or otherwise clearly contradicts the context. The process described in the present invention (or variations and / or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as a code (e.g., executable instructions, one or more computer programs, or one or more applications) executed on one or more processors in common, by hardware or a combination thereof. The computer program includes a plurality of instructions that may be executed by one or more processors.
[0118] Further, the method can be implemented in any type of computing platform that is operably connected to a suitable computer, including but not limited to a personal computer, a minicomputer, a mainframe, a workstation, a network or distributed computing environment, a separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, etc. Various aspects of the present invention can be implemented in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, an optical read and / or write storage medium, a RAM, a ROM, etc., so that it can be read by a programmable computer, and when the storage medium or device is read by the computer, it can be used to configure and operate the computer to perform the process described herein. In addition, the machine-readable code, or portions thereof, can be transmitted via a wired or wireless network. When such media includes instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor, the invention described in the present invention includes these and other different types of non-transitory computer-readable storage media. When programmed according to the methods and techniques of the present invention, the present invention also includes the computer itself.
[0119] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for using a solid state hard disk, characterized in that: The method is applied to a storage system using a solid state drive (SSD) supporting multi-channel and multi-namespace, and the method includes: Map the namespace in the SSD to the SSD channel, divide each namespace into a logical SSD disk with an independent fault domain, and allocate an independent additional OP space to each namespace; When a namespace in the solid state drive fails, the stripe data in the failed namespace is reconstructed into a selected valid target namespace; any two namespaces in the target namespace and the namespace where the valid data blocks in the stripe are located are not in the same physical solid state drive.
2. The method according to claim 1, characterized in that The mapping between the namespace in the SSD and the SSD channel is based on the following mapping conditions: Different namespaces have different channel mappings. Each namespace must be mapped to at least one Channel. The total number of channels mapped by all namespaces is equal to the number of channels owned by the SSD.
3. The method according to claim 2, characterized in that The method for mapping the namespace in the SSD to the SSD channel is any of the following methods: Namespaces and channels are mapped one to one, and the number of namespaces is the same as the number of channels; One namespace is mapped to two channels, and the number of channels is twice the number of namespaces; Different namespaces map different numbers of channels.
4. The method according to claim 1, characterized in that The method for reconstructing the stripe data in the invalid namespace into the selected valid target namespace is: Use the disk selection algorithm of the storage system to select a valid target namespace for the failed data blocks in the data stripe that are located in N failed namespaces; Determine whether there is a fault domain conflict between the selected target namespace and the original namespace that carries the valid data blocks in the stripe, that is, determine whether the condition that any two namespaces in the stripe are not on the same physical SSD is met; If there is no fault domain conflict, the selected target namespace is determined as the final selected target namespace, otherwise the step of selecting a valid target namespace is re-executed until a target namespace without a fault domain conflict is selected; Reconstruct the stripe data in the invalid namespace into the finally selected valid target namespace.
5. The method according to claim 1, characterized in that: A wear-balanced strategy or a non-balanced wear strategy is adopted for all namespaces in the solid-state drive; Under the wear balance strategy, OP space is evenly allocated to all namespaces; Under the non-balanced wear strategy, the method further includes: Determine whether the ratio of the overall current written data volume of the solid state drive to the total number of bytes written TBW exceeds a preset benchmark ratio; When it is determined that the ratio of the current amount of written data to the total number of bytes written TBW exceeds a preset benchmark ratio, the OP space of the solid state drive is allocated to each namespace according to a preset non-balanced allocation method.
6. A device for using a solid state hard disk, characterized in that: The device is applied to a storage system using an SSD solid state drive supporting multi-channel and multi-namespace, and the device includes: The namespace mapping module is used to map the namespace Namespace in the solid-state drive with the SSD channel Channel, divide each namespace into a logical SSD disk with an independent fault domain, and allocate an independent additional OP space to each namespace; A data reconstruction module is used to reconstruct the stripe data in the failed namespace into a selected valid target namespace when a namespace in the solid state drive fails; any two namespaces in the target namespace and the namespace where the valid data blocks in the stripe are located are not in the same physical solid state drive.
7. The device according to claim 6, characterized in that The namespace mapping module maps the namespace in the solid state drive to the SSD channel based on the following mapping conditions: Different namespaces have different channel mappings. Each namespace must be mapped to at least one Channel. The total number of channels mapped by all namespaces is equal to the number of channels owned by the SSD.
8. The device according to claim 7, characterized in that The namespace mapping module maps the namespace in the solid state drive to the SSD channel using any one of the following methods: Namespaces and channels are mapped one to one, and the number of namespaces is the same as the number of channels; One namespace is mapped to two channels, and the number of channels is twice the number of namespaces; Different namespaces map different numbers of channels.
9. The device according to claim 6, characterized in that The data reconstruction module comprises: A selection unit, configured to select a valid target namespace for a failed data block in the data stripe and located in the N failed namespaces, using a disk selection algorithm of the storage system; A judging unit, used to judge whether there is a fault domain conflict between the selected target namespace and the original namespace carrying the valid data blocks in the stripe, that is, to judge whether the condition that any two namespaces in the stripe are not on the same physical solid-state drive is satisfied; A determination unit, configured to determine the selected target namespace as the final selected target namespace if there is no fault domain conflict, and otherwise instruct the selection unit to re-execute the selection of a valid target namespace until a target namespace without a fault domain conflict is selected; The reconstruction unit is used to reconstruct the stripe data in the failed namespace into the finally selected valid target namespace.
10. An electronic device, characterized in that: It includes a processor, a communication interface, a storage medium and a communication bus, wherein the processor, the communication interface and the storage medium communicate with each other via the communication bus; Storage medium for storing computer programs; A processor, for implementing the method according to any one of claims 1 to 5 when executing a computer program stored on a storage medium.
