An SSD alarm method and device
By periodically acquiring the SMART information of the SSD, calculating the write amplification factor, and outputting alarm information, the problem of not being able to detect SSD write amplification anomalies in existing technologies is solved, thus protecting the lifespan of the SSD.
Patent Information
- Application Number
- CN202211497344.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-25
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2042-11-25
AI Technical Summary
Current technology cannot directly detect write amplification anomalies in solid-state drives (SSDs), which affects their lifespan.
By periodically acquiring the SSD's SMART information, calculating the write amplification factor (WAF), and outputting an alarm message when the WAF exceeds the threshold, the user is alerted to the impact of write operations on the SSD's lifespan.
It can promptly detect and alert to SSD write amplification anomalies, avoiding irreversible impacts on the lifespan of SSDs, and achieve real-time monitoring of SSD operating status.
Smart Images

Figure CN116069587B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data storage technology, and in particular to a method and apparatus for alarming solid state drives (SSDs). Background Technology
[0002] Solid-state drives (SSDs) are hard drives made using arrays of solid-state electronic storage chips. Compared to traditional hard disk drives (HDDs), SSDs have a significant advantage in transfer speeds, reaching up to 500 MB / s. However, SSDs have an inherent limitation in their operating mechanism: write amplification (WA). Write amplification occurs when the amount of data actually written to the SSD is much larger than the amount of data written by the user. For example, for an SSD that already contains data, a single data write operation involves two actions: 1. erasing the existing data on the SSD; 2. writing the new data. The write amplification problem arises because the smallest unit of writing and the smallest unit of erasing are different. The smallest unit of writing is a page, with each page being 4KB in size. The smallest unit of erasing is a block, typically composed of 64 or 128 pages. This means that if there are no free pages within a single block, writing one page of data requires erasing 64 or 128 pages first. Thus, the user writes 4KB of data, but the actual data written to the SSD is 256KB or 512KB, resulting in write amplification. It can be seen that a write operation causing write amplification involves at least one more data erasure operation than a normal write operation (including overwriting valid data if it still exists within the block). Since the lifespan of an SSD depends on the number of write / erase cycles, write amplification affects its lifespan. Furthermore, the larger the amount of data erased or overwritten, the greater the write amplification and the greater the impact on the SSD's lifespan.
[0003] In related technologies, SSDs can record the amount of data written by the host device (i.e., the amount of data written by the user) and the amount of data actually written to the SSD throughout its entire lifecycle. However, this cannot intuitively detect whether there is a situation that causes write amplification anomalies. Summary of the Invention
[0004] This application provides an SSD alarm method and device for timely detection of abnormal problems causing SSD write amplification, thereby avoiding abnormal situations that lead to a sharp decline in SSD lifespan.
[0005] Firstly, this application provides an SSD alarm method, comprising: periodically acquiring SSD self-monitoring analysis and reporting technology (SMART) information; wherein the SSD's SMART information includes the SSD's write amplification factor (WAF) within a cycle; and outputting first alarm information when the WAF is greater than a first threshold; wherein the first alarm information is used to indicate that the write amplification generated by the write operation performed by the SSD within a cycle has a greater impact on the lifespan of the SSD than a preset impact level.
[0006] It is understood that the method provided in this application embodiment can periodically acquire the SMART information of the SSD. The SMART information of the SSD includes the WAF (Write-Ahead Facility) of the SSD within a period. Thus, it is possible to determine whether to issue an alarm message based on the WAF. For example, if the WAF is greater than a first threshold, a first alarm message is output to alert the user that write amplification caused by write operations performed by the SSD within a period affects the lifespan of the SSD. Therefore, the method provided in this application embodiment can periodically determine the write amplification factor of the SSD and determine whether there is an abnormal write amplification condition based on the write amplification factor. When an abnormal write amplification condition is found, an alarm message is promptly output to alert the user. This solves the problem in related technologies where write amplification abnormalities caused by SSD write operations cannot be intuitively detected, and can avoid irreversible or unexpected impacts on the lifespan of the SSD due to write amplification abnormalities in some business scenarios.
[0007] In one possible implementation, the method further includes: outputting a second alarm message when the WAF is less than or equal to a first threshold and greater than a second threshold; wherein the second threshold is less than the first threshold; and the impact of the write amplification anomaly indicated by the second alarm message is less than the impact of the write amplification anomaly indicated by the first alarm message.
[0008] It is understood that the method provided in this application can also determine and output alarm information representing different levels of impact based on the relationship between the WAF (Write Amplification) of the SSD within a cycle and different preset thresholds. Here, the level of impact refers to the degree to which write amplification generated by the write operation performed by the SSD within a cycle affects the lifespan of the SSD. For example, if the WAF is greater than a first threshold (the WAF corresponding to the SSD in an abnormal operating state), a first alarm message is output; if the WAF is less than or equal to the first threshold and greater than a second threshold (the WAF corresponding to the SSD in a normal operating state), a second alarm message is output; wherein the level of impact represented by the second alarm message is lower than that represented by the first alarm message. Thus, based on the method provided in this application, alarm information representing different levels of impact can be output, allowing users to take corresponding maintenance measures based on different alarm messages.
[0009] In another possible implementation, the first threshold is the WAF corresponding to the SSD in an abnormal operating state; the second threshold is the maximum WAF corresponding to the SSD in a normal operating state; wherein, the normal operating state refers to the degree of impact of write amplification generated by the SSD performing write operations on the lifespan of the SSD being less than or equal to the preset impact level; the abnormal operating state refers to the degree of impact of write amplification generated by the SSD performing write operations on the lifespan of the SSD being greater than the preset impact level.
[0010] It is understood that this application determines the preset threshold based on the SSD's operating status and the corresponding WAF under different operating statuses. Thus, during actual operation, alarm information representing different levels of impact can be determined based on the relationship between the SSD's WAF and the preset threshold within a cycle.
[0011] In another possible implementation, the first threshold is the WAF obtained by testing the SSD according to the 4K random write test method; the second threshold is the WAF obtained by testing the SSD according to the JEDEC standard test method.
[0012] The aforementioned 4K random write test method refers to randomly writing files smaller than 4KB to the SSD to test its write capability. The 4K random write test is a commonly used method in SSD testing to assess its basic performance. For example, assuming the amount of data written by the host device is less than or equal to the smallest storage unit (4KB) in the SSD's flash memory, and there are no free blocks in the SSD's flash memory, the data on the blocks must first be erased before new data (i.e., the data written by the host device) is written. Understandably, in this process, because the amount of data written by the host device is small, but the amount of data written to the SSD's flash memory is large, the WAF (Write-Ahead Failure) value is large, affecting the SSD's lifespan. Therefore, the WAF obtained using the 4K random write test method is a WAF in an abnormal operating state and requires an alert.
[0013] The aforementioned JEDEC standard testing method refers to writing a standard amount of data (i.e., the amount of data that meets the SSD data requirements defined in the JESD219 standard, for example, the amount of data that best maximizes the SSD's durability) into the SSD to test its write capability. The JEDEC standard testing method is a test method defined in the SSD hard drive standard specification to test the SSD's durability (i.e., lifespan). It can be understood that since the JEDEC standard testing method writes a standard amount of data into the SSD, the WAF value generated during this process is the WAF value corresponding to the SSD under normal operating conditions.
[0014] In another possible implementation, the WAF of the SSD in a cycle is determined based on the amount of data written by the host device and the amount of data written by the flash memory cells of the SSD in that cycle.
[0015] It is understandable that, due to the inherent operating mechanism of SSDs, the actual amount of data written to an SSD is much greater than the amount of data written by the user. Therefore, the write amplification factor of an SSD can be determined by the quotient between the amount of data written to the flash memory cells of the SSD and the amount of data written to the host device within a cycle.
[0016] In another possible implementation, the above method further includes: receiving a first query instruction, the first query instruction being used to query the WAF of the SSD within a cycle; and outputting the WAF in response to the first query instruction.
[0017] Understandably, compared to related technologies that can only obtain the amount of data written by the host device and the amount of data written by the flash memory cells of the SSD throughout its entire lifecycle, the method provided in this application allows the SSD to calculate and record the WAF within a cycle. In this way, the user can obtain the WAF without calculation and then determine whether there are any abnormalities in the write operations performed by the SSD in a cycle based on the WAF.
[0018] In another possible implementation, the above method also includes: determining that the SSD is in an abnormal operating state when the WAF is greater than the second threshold.
[0019] It is understood that the method provided in this application can determine the operating status of the SSD based on the difference between the WAF and a preset threshold. Since the aforementioned second threshold is the maximum WAF corresponding to the SSD being in normal operating condition, it can be determined that the SSD is in an abnormal operating state when the WAF is greater than the second threshold.
[0020] In another possible implementation, the method further includes: receiving a second query instruction, the second query instruction being used to query the operating status of the SSD within a cycle; and in response to the second query instruction, outputting the operating status of the SSD as an abnormal operating status.
[0021] It is understood that the method provided in this application can determine the operating status of the SSD within a cycle based on the WAF and a preset threshold, and record the operating status. In this way, users can monitor the operating status of the SSD in real time, which solves the problem in related technologies that users cannot know the operating status of the SSD.
[0022] Secondly, this application provides an SSD query method, including: determining and recording the WAF of the SSD in one cycle; receiving a first query instruction; and outputting the WAF in response to the first query instruction.
[0023] Understandably, compared to related technologies that can only obtain the amount of data written by the host device and the amount of data written by the flash memory cells of the SSD throughout its entire lifecycle, the method provided in this application allows the SSD to calculate and record the WAF within a cycle. In this way, the user can obtain the WAF without calculation and then determine whether there are any abnormalities in the write operations performed by the SSD in a cycle based on the WAF.
[0024] Thirdly, this application provides an SSD query method, including: determining and recording the operating state of the SSD in one cycle; wherein, the operating state of the SSD refers to the impact of write amplification generated by the SSD performing a write operation on the lifespan of the SSD; receiving a second query instruction; and responding to the second query instruction by outputting the operating state of the SSD.
[0025] It is understood that the method provided in this application can determine the operating status of the SSD within a cycle based on the WAF and a preset threshold, and record the operating status. In this way, users can monitor the operating status of the SSD in real time, which solves the problem in related technologies that users cannot know the operating status of the SSD.
[0026] In one possible implementation, determining the operating state of the SSD in one cycle includes: determining that the SSD is in a first abnormal operating state when the WAF is greater than a first threshold; determining that the SSD is in a second abnormal operating state when the WAF is less than or equal to the first threshold and greater than a second threshold; wherein, the abnormal operating state refers to the fact that the write amplification generated by the SSD performing a write operation has a greater impact on the lifespan of the SSD than a preset impact level; the impact level represented by the first abnormal operating state is higher than the impact level represented by the second abnormal operating state.
[0027] It is understood that the method provided in this application can determine the operating state of the SSD based on the difference between the WAF and a preset threshold. Since the first threshold is the WAF corresponding to the SSD being in an abnormal operating state, and the second threshold is the maximum WAF corresponding to the SSD being in a normal operating state, it can be determined that the SSD is in a first abnormal operating state when the WAF is greater than the first threshold; and it can be determined that the SSD is in a second abnormal operating state when the WAF is less than or equal to the first threshold and greater than the second threshold.
[0028] Fourthly, this application provides an SSD alarm device, comprising: an acquisition module for periodically acquiring SMART information of the SSD; wherein the SMART information of the SSD includes WAF of the SSD within one cycle; and an output module for outputting first alarm information when the WAF is greater than a first threshold; wherein the first alarm information is used to indicate that the write amplification caused by the write operation performed by the SSD within one cycle has a greater impact on the lifespan of the SSD than a preset impact level.
[0029] In one possible implementation, the output module is further configured to output a second alarm message when the WAF is less than or equal to a first threshold and greater than a second threshold; wherein the second threshold is less than the first threshold; and the impact of the write amplification anomaly indicated by the second alarm message is less than the impact of the write amplification anomaly indicated by the first alarm message.
[0030] In another possible implementation, the first threshold is the WAF corresponding to the SSD in an abnormal operating state; the second threshold is the maximum WAF corresponding to the SSD in a normal operating state; wherein, the normal operating state refers to the degree of impact of write amplification generated by the SSD performing write operations on the lifespan of the SSD being less than or equal to the preset impact level; the abnormal operating state refers to the degree of impact of write amplification generated by the SSD performing write operations on the lifespan of the SSD being greater than the preset impact level.
[0031] In another possible implementation, the first threshold is the WAF obtained by testing the SSD according to the 4K random write test method; the second threshold is the WAF obtained by testing the SSD according to the JEDEC standard test method.
[0032] In another possible implementation, the WAF is determined based on the amount of data written by the host device and the amount of data written by the SSD's flash memory cells within a cycle.
[0033] In another possible implementation, the SSD alarm device further includes: a receiving module for receiving a first query command, the first query command being used to query the WAF of the SSD within a cycle; and the output module for outputting the WAF in response to the first query command.
[0034] In another possible implementation, the aforementioned determining module is also used to determine that the SSD is in an abnormal operating state when the WAF is greater than the second threshold.
[0035] In another possible implementation, the receiving module is further configured to receive a second query instruction, which is used to query the operating status of the SSD within a cycle; the output module is further configured to respond to the second query instruction by outputting that the operating status of the SSD is an abnormal operating status.
[0036] Fifthly, this application provides an SSD query device, comprising: a first determining module for determining and recording the operating state of an SSD in one cycle; a first query module for receiving a second query instruction; and outputting the operating state of the SSD in response to the second query instruction.
[0037] Sixthly, this application provides an SSD query device, comprising: a second determining module, configured to determine and record the operating state of an SSD in one cycle; wherein the operating state of the SSD refers to the impact of write amplification generated by the SSD performing a write operation on the lifespan of the SSD; and a second query module, configured to receive a second query instruction and, in response to the second query instruction, output the operating state of the SSD.
[0038] In one possible implementation, the second determining module is specifically used to determine that the SSD is in a first abnormal operating state when the WAF is greater than a first threshold; and to determine that the SSD is in a second abnormal operating state when the WAF is less than or equal to the first threshold and greater than a second threshold. The abnormal operating state refers to the fact that the write amplification generated by the SSD performing a write operation has a greater impact on the lifespan of the SSD than a preset impact level. The impact level represented by the first abnormal operating state is higher than the impact level represented by the second abnormal operating state.
[0039] In a seventh aspect, this application provides an SSD alarm device, the device comprising: an interface and logic circuitry, the logic circuitry being configured to execute any of the SSD alarm methods provided in the first aspect above.
[0040] Eighthly, this application provides an SSD query apparatus, the apparatus comprising: an interface and logic circuitry, the logic circuitry being configured to execute any of the SSD query methods provided in the second and third aspects above.
[0041] Ninthly, this application provides a computer device including a processor and a memory; the processor is coupled to the memory; the memory is used to store computer instructions, which are loaded and executed by the processor to enable the computer device to implement any of the methods provided in the first, second and third aspects above.
[0042] In a tenth aspect, this application provides a computer-readable storage medium storing computer-executable instructions that, when executed on a computer, cause the computer to perform any of the methods provided in the first, second, and third aspects described above.
[0043] In one aspect, this application provides a computer program product including computer instructions that, when executed on a computer, cause the computer to perform any of the methods provided in the first, second, and third aspects described above.
[0044] For a detailed description of aspects four through eleven and their various implementations in this application, please refer to the detailed descriptions in aspects one, two, and three and their various implementations; and for a detailed analysis of the beneficial effects of aspects four through eleven and their various implementations in aspects one, two, and three and their various implementations, please refer to the beneficial effect analyses in aspects one, two, and three and their various implementations, which will not be repeated here.
[0045] These or other aspects of this application will become more readily apparent in the following description. Attached Figure Description
[0046] Figure 1A schematic diagram of a hardware operating environment provided in an embodiment of this application;
[0047] Figure 2 A flowchart illustrating an SSD alarm method provided in this application embodiment;
[0048] Figure 3 This is a schematic diagram illustrating the writing of data according to an embodiment of this application;
[0049] Figure 4 The flowchart of a solid-state drive (SSD) query method provided in this application embodiment Figure 1 ;
[0050] Figure 5 The flowchart of a solid-state drive (SSD) query method provided in this application embodiment Figure 2 ;
[0051] Figure 6 This is a schematic diagram of the structure of a solid-state drive (SSD) alarm device provided in an embodiment of this application;
[0052] Figure 7 A schematic diagram of the structure of a solid-state drive (SSD) query device provided in this application embodiment. Figure 1 ;
[0053] Figure 8 A schematic diagram of the structure of a solid-state drive (SSD) query device provided in this application embodiment. Figure 2 . Detailed Implementation
[0054] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0055] The terms "first" and "second," etc., used in the specification and drawings of this application are used to distinguish different objects or to distinguish different treatments of the same object, rather than to describe a specific order of objects.
[0056] Furthermore, the terms "comprising" and "having," and any variations thereof, used in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus.
[0057] It should be noted that in the embodiments of this application, the words "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0058] In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0059] As described in the background section, SSDs inherently exhibit write amplification in their operating mechanism. Since the lifespan of an SSD depends on the number of erase cycles, a write operation that causes write amplification involves at least one more data erase operation than a normal write operation (including overwriting the valid data if it still exists in the block). Therefore, write amplification affects the lifespan of the SSD, and the larger the amount of data erased and overwritten, the greater the write amplification value and the more significant the impact on the SSD's lifespan.
[0060] In related technologies, SSDs can be used to record the amount of data written by the host device (i.e., the amount of data written by the user) and the amount of data actually written to the SSD throughout its entire lifecycle. However, this cannot intuitively detect whether there is a situation that causes write amplification anomalies.
[0061] To address the aforementioned technical problems, this application provides a solid-state drive (SSD) alarm method. The method involves periodically acquiring the SSD's SMART information, which includes the SSD's WAF (Write-Ahead Facility) within a given period. The WAF can then be used to determine whether to issue an alarm. For example, if the WAF exceeds a first threshold, a first alarm is output to alert the user that write amplification caused by write operations performed on the SSD within a given period impacts the SSD's lifespan. Thus, the method provided in this application can periodically determine the SSD's write amplification factor and, based on this factor, determine whether an abnormal write amplification occurs. When an abnormal write amplification occurs, an alarm is promptly output to alert the user. This solves the problem in related technologies where write amplification anomalies caused by SSD write operations cannot be directly detected, and can prevent irreversible or unexpected impacts on the SSD's lifespan due to write amplification anomalies in certain business scenarios.
[0062] The embodiments provided in this application will now be described in detail with reference to the accompanying drawings.
[0063] See Figure 1 This is a schematic diagram of the hardware operating environment involved in the embodiments of this application. Figure 1 As shown, the method provided in this application embodiment is applied to an electronic device, which may be a personal computer (PC), smartphone, tablet computer, e-book reader, portable computer, or other terminal device with data processing and data storage functions.
[0064] like Figure 1 As shown, the electronic device 100 includes a host device 110 and a solid-state drive 120.
[0065] The host device 110 includes a processor, which can be based on x86 architecture or ARM (advanced RISC machines) architecture. The processor can run an operating system (such as Linux or Windows) and run various application software based on the operating system.
[0066] In this embodiment, the host device 110 is used to store data into the solid-state drive 120. For example, the host device 110 can write data generated by application software running on the processor into the solid-state drive 120; or, the host device 110 can write data written by the user into the solid-state drive 120.
[0067] In some embodiments, when a user needs to write data to the solid-state drive 120, a write operation to the solid-state drive 120 can be initiated by the host device 110; the host device 110 can write data to the solid-state drive 120 in response to the write operation to the solid-state drive 120.
[0068] In some embodiments, the host device 110 is further configured to issue a detection command to the solid-state drive 120, so that the solid-state drive 120 responds to the detection command and detects its own operating status; the operating status refers to the impact of write amplification generated by the solid-state drive 120 performing write operations on the lifespan of the solid-state drive 120. In this embodiment, the operating status of the solid-state drive 120 can be determined based on the ratio between the amount of data written by the solid-state drive 120 and the amount of data written by the host device 110 (i.e., the write amplification factor). Correspondingly, the host device 110 is also configured to receive the detection results fed back by the solid-state drive 120.
[0069] Solid-state drive 120GB, used for data storage.
[0070] In some embodiments, the solid-state drive 120 comprises a controller and NAND flash memory cells (NAND). The controller is used to control storage resources and schedule stored data. NAND is the storage medium of an SSD; it is a type of chip, and a solid-state drive typically contains multiple NAND chips. NAND read and write operations are performed in units of pages (each page is 4KB in size), while delete operations are performed in units of blocks. Each block contains multiple pages; a page is a unit of composition for a block. For example, a block may include 64 pages or 128 pages.
[0071] In some embodiments, when the solid-state drive 120 receives data written by the host device 110, it first reads the data to be moved from the target block of the flash memory cell, moves the data to be moved to another block, then erases the data in the target block, and finally writes the data written by the host device 110 into the target block. It can be seen that throughout the entire process, the amount of data actually written by the solid-state drive 200 is greater than the amount of data written by the host device 110.
[0072] In this embodiment, the solid-state drive 120 determines the write amplification factor based on the amount of data written by the host device 110 and the actual amount of data written by the solid-state drive 120. Then, based on the write amplification factor, it determines whether the solid-state drive 120 has a write amplification anomaly. If the solid-state drive 120 has a write amplification anomaly, it issues an alarm message to the host device 110 in a timely manner. Here, write amplification anomaly refers to the write amplification caused by the solid-state drive 120 performing write operations, which affects the lifespan of the solid-state drive 120.
[0073] In some embodiments, the solid-state drive 120 is also used to determine its own operating state based on the write amplification factor (i.e., the impact of write amplification generated by the solid-state drive 120 performing write operations on the lifespan of the solid-state drive 120).
[0074] In this application embodiment, the solid-state drive 120 is not limited in any way, and refers to any hard drive made using a solid-state electronic storage chip array.
[0075] In this embodiment, the solid-state drive 120 is connected to the host device 110, but the connection method between the solid-state drive 120 and the host device 110 is not limited. For example, the host device 110 and the solid-state drive 120 can be connected via a Serial Advanced Technology Attachment (SATA) bus or a Peripheral Component Interconnect Express (PCIe) bus. Optionally, the solid-state drive 120 can be fixedly installed in a hard drive bay on the electronic device 100, or it can be plugged into the electronic device 100, or it can be externally connected to the electronic device 100. The solid-state drive 120 can be used as a cache for low-speed storage media on the electronic device 100, or it can be used as the final storage space of the electronic device 100.
[0076] It should be noted that the executing entity of the SSD alarm method provided in this application embodiment is not limited. For example, the method can be executed by the electronic device itself or by the host device in the electronic device. For the sake of subsequent explanation, the following embodiments will be described using the method being executed by an electronic device as an example.
[0077] The following is a detailed description of an SSD alarm method provided in an embodiment of this application.
[0078] The method provided in the embodiments of this application can be derived from... Figure 1 The electronic device 100 shown performs this action. Specifically, as... Figure 2 As shown, the method includes the following steps:
[0079] S201: Periodically retrieve SMART information from the SSD.
[0080] The aforementioned SMART information refers to the operational status information of various components within the SSD, such as SSD temperature information, SSD internal circuit operation information, and SSD flash memory cell storage status information. In this embodiment, the SMART information further includes: the SSD's WAF (Web Application Firewall) within one cycle. One cycle refers to any one of multiple cycles in which the electronic device periodically acquires the SSD's SMART information.
[0081] It is understandable that the SMART information of the SSD in related technologies only includes the amount of data written by the host device and the amount of data written by the flash memory cells of the SSD throughout its entire lifecycle. It can be seen that related technologies cannot know the WAF of the SSD at any given time during its lifecycle, and therefore cannot intuitively detect whether there is a situation that causes write amplification anomalies during that time period. Therefore, in the method provided in this application embodiment, the SMART information of the SSD can record the WAF of the SSD in one cycle. Therefore, the electronic device can obtain the WAF of the SSD in each cycle by periodically acquiring the SMART information of the SSD, and then determine whether there is a situation that causes write amplification anomalies in each cycle according to the following step S202.
[0082] WAF (Write Amplification Factor) reflects the write amplification of an SSD. Generally, a higher WAF value indicates greater write amplification, while a lower WAF value indicates less write amplification. WAF is determined based on the amount of data written by the host device and the amount of data written to the SSD's flash memory cells within a certain time period. For example, the WAF mentioned above is determined based on the amount of data written by the host device and the amount of data written to the SSD's flash memory cells within a single period.
[0083] In some embodiments, the WAF in the SMART information of the SSD can be determined according to the following steps:
[0084] Step a1: Query the amount of data written by the host device and the amount of data written by the SSD's flash memory cells within a period.
[0085] The amount of data written by the host device refers to the storage space required for the data written by the host device (data sent by the host device to the SSD and that needs to be written to the SSD). For example, if the data sent by the host device to the SSD and that needs to be written to the SSD is string 1, and string 1 requires 4KB of storage space, then the amount of data written by the host device is 4KB.
[0086] The amount of data written to an SSD's flash memory cell refers to the actual amount of data written to the flash memory cell during the process of the SSD writing the data written by the host device to the flash memory cell.
[0087] For example, such as Figure 3 As shown, assuming the host device writes 4KB of data (i.e., the data size of one page), the SSD needs to write the data written by the host device into Block 1. Assuming there are no free pages left in Block 1 (i.e., ... Figure 3As shown, Block 1 contains 5 pages of valid data and 4 pages of invalid data. Therefore, the valid data in Block 1 needs to be moved to the free Block 2, which requires moving 5 pages of data. Then, the data in Block 1 is erased, resulting in a free Block 1. Finally, the data written by the host device is written to Block 1. It can be seen that during the process of the SSD writing the data written by the host device to the flash memory cell, the actual amount of data written to the flash memory cell is 6 pages (including the 5 pages written to Block 2 and the 1 page newly written to Block 1). Therefore, the amount of data written to the SSD's flash memory cell is 24KB.
[0088] Step a2: Calculate the WAF based on the amount of data written by the host device and the amount of data written by the SSD's flash memory cells within a cycle.
[0089] In some embodiments, the ratio of the amount of data written by the host device to the amount of data written by the flash memory cells of the SSD within a cycle is used as the WAF. For example, the WAF satisfies the following formula (1):
[0090] WAF = ΔNAND write volume / ΔHOST write volume formula (1)
[0091] Here, ΔNAND write volume is the amount of data written to the flash memory cells of the SSD within one cycle, and ΔHOST write volume is the amount of data written to the host device within one cycle.
[0092] For example, assuming the amount of data written by the host device in one cycle is 4KB and the amount of data written by the flash memory cell of the SSD is 24KB, according to the above formula (1), the WAF is 6.
[0093] It is understandable that, due to the inherent operating mechanism of SSDs, the actual amount of data written to an SSD is much greater than the amount of data written to a host device. Therefore, the write amplification factor of an SSD can be determined by the quotient between the amount of data written to the flash memory cells of the SSD and the amount of data written to the host device within a cycle.
[0094] In some embodiments, after determining the WAF of the SSD in one cycle, the method further includes recording the WAF for subsequent user queries. For example, an electronic device receives a first query instruction and, in response to the first query instruction, outputs the WAF; wherein the first query instruction is used to query the WAF of the SSD in one cycle.
[0095] S202. If the WAF is greater than the first threshold, output the first alarm message.
[0096] The first alarm message indicates that the write amplification caused by write operations performed by the SSD within a cycle exceeds a preset impact level on the SSD's lifespan. Optionally, the preset impact level is determined by the user based on actual usage; for example, the preset impact level could be set to have no impact on the SSD's lifespan.
[0097] The first threshold mentioned above refers to the WAF (Web Application Firewall) when the SSD is in an abnormal operating state. It should be noted that "operating state" refers to the impact of write amplification caused by SSD write operations on the SSD's lifespan. An abnormal operating state means that the write amplification caused by SSD write operations has a greater impact on the SSD's lifespan than a preset impact level. For example, assuming the preset impact level is no impact on the SSD's lifespan, then an abnormal operating state means that the write amplification caused by SSD write operations does affect the SSD's lifespan.
[0098] As one possible implementation, the first threshold is the WAF obtained by testing the SSD according to the 4K random write test method.
[0099] The 4K random write test involves randomly writing files smaller than 4KB to the SSD to assess its write performance. This test is a common method in SSD testing to evaluate its fundamental performance.
[0100] For example, assuming the amount of data written by the host device is less than or equal to the smallest storage unit (4KB) in the SSD's flash memory, and there are no free blocks in the SSD's flash memory, then the data on the blocks needs to be erased first, and then the new data (i.e., the data written by the host device) needs to be written. Understandably, in this process, because the amount of data written by the host device is small, but the amount of data written by the SSD's flash memory is large, the WAF value is large (a larger WAF value indicates greater write amplification from the write operation, and a greater impact on the SSD's lifespan), thus affecting the SSD's lifespan. Therefore, the WAF obtained using the 4K random write test method is a WAF in an abnormal operating state and requires an alarm.
[0101] It is understood that the method provided in this application embodiment can periodically acquire the SMART information of the SSD. The SMART information of the SSD includes the WAF (Write-Ahead Facility) of the SSD within a period. Thus, it is possible to determine whether to issue an alarm message based on the WAF. For example, if the WAF is greater than a first threshold, a first alarm message is output to alert the user that write amplification caused by write operations performed by the SSD within a period affects the lifespan of the SSD. Therefore, the method provided in this application embodiment can periodically determine the write amplification factor of the SSD and determine whether there is an abnormal write amplification situation based on the write amplification factor. When an abnormal write amplification situation exists, an alarm message is promptly output to alert the user. This solves the problem in related technologies where write amplification anomalies caused by SSD write operations cannot be intuitively detected, and can avoid irreversible or unexpected impacts on the lifespan of the SSD due to write amplification anomalies in some business scenarios.
[0102] In some embodiments, the above method further includes the following step S203:
[0103] S203. If the WAF is less than or equal to the first threshold and greater than the second threshold, output the second alarm information.
[0104] The impact of the write amplification anomaly indicated by the second alarm message is less than that indicated by the first alarm message. In other words, the impact of the write amplification anomaly indicated by the second alarm message on the lifespan of the SSD is less than that indicated by the first alarm message.
[0105] The second threshold mentioned above represents the maximum WAF (WaaF) when the SSD is in normal operating condition. The second threshold is less than the first threshold. It should be noted that "SSD in normal operating condition" means that the write amplification generated by the SSD's write operations has a greater impact on the SSD's lifespan than a preset impact level. For example, assuming the preset impact level is that it has no impact on the SSD's lifespan, then "SSD in normal operating condition" means that the write amplification generated by the SSD's write operations has no impact on the SSD's lifespan.
[0106] As one possible implementation, the second threshold is the WAF obtained by testing the SSD according to the JEDEC standard testing method.
[0107] The JEDEC standard test method refers to writing a standard amount of data (i.e., the amount of data that meets the SSD's performance requirements as defined in the JESD 219 standard, for example, the amount of data that best maximizes the SSD's durability) to test its write capability. The JEDEC standard test method is a test method defined in the SSD hard drive standard specification for testing the SSD's durability (i.e., lifespan). It can be understood that because the JEDEC standard test method writes a standard amount of data to the SSD, the WAF value generated during this process is the WAF value corresponding to the SSD under normal operating conditions.
[0108] In some embodiments, no alarm information needs to be output when the WAF is less than or equal to the second threshold. It is understood that since the second threshold is the maximum WAF corresponding to the SSD being in normal operating condition, a WAF less than or equal to the second threshold indicates that the SSD is in normal operating condition, and no alarm information needs to be output.
[0109] It is understood that the method provided in this application embodiment can also determine and output alarm information representing different levels of impact based on the relationship between WAF and different preset thresholds; where the level of impact refers to the degree of impact of write amplification generated by the write operation performed by the SSD within a cycle on the lifespan of the SSD. For example, if the WAF is greater than a first threshold (the WAF corresponding to the SSD in an abnormal operating state), a first alarm message is output; if the WAF is less than or equal to the first threshold and greater than a second threshold (the WAF corresponding to the SSD in a normal operating state), a second alarm message is output; where the level of impact represented by the second alarm message is lower than the level of impact represented by the first alarm message. Thus, based on the method provided in this application embodiment, alarm information representing different levels of impact can be output, so that users can take corresponding maintenance measures according to different alarm messages.
[0110] In some embodiments, step S202 can also be implemented as follows: when the WAF is greater than or equal to the first threshold and less than the third preset threshold, output the first alarm information.
[0111] The above method also includes: outputting a third alarm message when the WAF is greater than a third preset threshold.
[0112] Among them, the impact of the write amplification anomaly indicated by the third alarm message is greater than the impact of the write amplification anomaly indicated by the second alarm message.
[0113] The third preset threshold mentioned above is the maximum WAF corresponding to the SSD being in an abnormal operating state. The third preset threshold is greater than the first threshold.
[0114] As one possible implementation, the worst-case write scenario for an SSD is simulated, and the WAF corresponding to the SSD under the worst-case write scenario is used as the third preset threshold.
[0115] Among them, the worst write scenario mentioned above refers to a situation where the amount of data written by the host device is small, while the amount of data written by the SSD's flash memory cells is large (for example, there are no free blocks in the SSD's flash memory cells, so valid data needs to be moved first, then the data on the block needs to be erased, and finally the new data needs to be written), which results in a large WAF of the SSD and affects the lifespan of the SSD.
[0116] For example, the worst-case write scenario described above could be the scenario where the SSD is in Force Unit Access (FUA) mode (i.e., when FUA=1). FUA mode forces access to the storage chip, also known as write-through mode. For write operations, FUA mode requires transmitting a write completion response to the host device only after the data writing to the SSD's flash memory cell is complete.
[0117] Understandably, for SSDs without FUA mode enabled, writing data only requires writing the data to the SSD's cache before a successful write response is sent to the host device. However, for SSDs with FUA mode enabled, writing data requires waiting for the data to be written to the SSD's flash memory before a successful write response is sent to the host device. Therefore, when FUA=1, it's equivalent to enabling a speed-up feature that doesn't use caching. This results in more write operations being performed by the SSD within the same time interval. If the amount of data written to the host device is small while the amount of data written to the SSD's flash memory is large in each write operation, the write amplification factor increases during that period, impacting the SSD's lifespan.
[0118] As can be seen from the above embodiments, different SSDs have different worst-case write scenarios. Generally speaking, the worst-case write scenario is a 4K random write scenario; however, for some high-performance SSDs, the worst-case write scenario is a scenario with FUA mode enabled. Therefore, if the worst-case write scenario for the SSD is a 4K random write scenario, then the first threshold is the maximum WAF corresponding to the SSD in an abnormal operating state, and the alarm information determined based on the WAF and the preset threshold includes the first alarm information and the second alarm information; if the worst-case write scenario for the SSD is a scenario with FUA mode enabled, then the third preset threshold is the maximum WAF corresponding to the SSD in an abnormal operating state, and the alarm information determined based on the WAF and the preset threshold includes the first alarm information, the second alarm information, and the third alarm information.
[0119] It is understood that the number of preset thresholds is determined based on the performance of the SSD. The first, second, and third preset thresholds mentioned above are merely examples, and the embodiments of this application do not limit the number of preset thresholds. In other embodiments, a fifth preset threshold and a sixth preset threshold may also be included, etc.
[0120] In summary, the method provided in this application periodically acquires the SMART information of the SSD, extracts the WAF (Write Amplification Factor) of the SSD within a period from the SMART information, and then determines and outputs alarm information representing different levels of impact based on the relationship between the WAF and different preset thresholds. It can be seen that the method provided in this application can periodically determine the write amplification factor of the SSD, determine whether there is write amplification anomaly in the SSD based on the write amplification factor, and promptly output alarm information to notify the user when write amplification anomaly is found. This solves the problem in related technologies where write amplification anomalies caused by SSD write operations cannot be intuitively detected, and can avoid irreversible or unexpected impacts on the lifespan of the SSD due to write amplification anomalies in some business scenarios.
[0121] This application also provides an SSD query method, which can be used by... Figure 1 The electronic device shown is used to perform this operation. Optionally, the SSD query method can be used to query the WAF; or, the SSD query method can also be used to query the SSD's operating status (operating status refers to the impact of write amplification caused by the SSD performing write operations on the SSD's lifespan).
[0122] In some embodiments, such as Figure 4 As shown, querying a WAF can be achieved through the following steps:
[0123] S301. Identify and record the WAF of the SSD within one cycle.
[0124] In some embodiments, the specific implementation of step S301 can be found in the specific implementation of step S201 in the above embodiments, and will not be repeated here.
[0125] S302, Receive the first query command.
[0126] The first query command is used to query the WAF (Web Application Firewall) of the SSD within a certain period. For example, the first query command can be initiated by the user. Accordingly, after receiving the first query command, the interaction within the electronic device is as follows: the host device of the electronic device forwards the first query command to the SSD, and after receiving the first query command, the SSD returns the WAF to the host device.
[0127] S303, in response to the first query command, output WAF.
[0128] For example, the first query instruction can be an instruction to query the SMART information of the SSD, outputting the WAF. The SMART information includes: VALUE for recording the WAF, WORST for recording the maximum SSD size during the SSD's lifecycle, and THRESH for a preset threshold (e.g., a first preset threshold, a second preset threshold, or a third preset threshold). When VALUE > THRESH, the TYPE field will be updated to an abnormal running (Failing) state.
[0129] It is understandable that, compared to related technologies that can only obtain the amount of data written by the host device and the amount of data written by the flash memory cells of the SSD throughout its entire lifecycle, the method provided in this application embodiment can calculate and record the WAF within a cycle. In this way, the user can obtain the WAF without calculation and then determine whether there is any abnormality in the write operation performed by the SSD in a cycle based on the WAF.
[0130] In other embodiments, such as Figure 5 As shown, querying the running status of an SSD can be achieved through the following steps:
[0131] S401. Determine and record the operating status of the SSD in one cycle.
[0132] In some embodiments, determining the operating state of the SSD over a cycle includes: determining the operating state of the SSD based on the WAF (Web Application Firewall). For example, if the WAF is greater than a second threshold, the SSD is determined to be in an abnormal operating state.
[0133] Specifically, it can be achieved through the following steps:
[0134] Step b1: When the WAF is greater than the first threshold, determine that the SSD is in the first abnormal operating state.
[0135] Step b2: When the WAF is less than or equal to the first threshold and greater than the second threshold, the SSD is determined to be in the second abnormal operating state.
[0136] The impact represented by the first abnormal operating state is greater than that represented by the second abnormal operating state.
[0137] S402, Receive the second query command.
[0138] The second query command is used to query the SSD's operating status within a cycle.
[0139] S403, in response to the second query command, outputs the operating status of the SSD.
[0140] For example, if the WAF is greater than the second threshold, the output SSD's operating status is an abnormal operating status. For instance, if the WAF is greater than the first threshold, the output SSD's operating status is a first abnormal operating status; if the WAF is less than or equal to the first threshold and greater than the second threshold, the output SSD's operating status is a second abnormal operating status.
[0141] It is understood that the method provided in this application embodiment can determine the operating status of the SSD within a cycle based on the WAF and a preset threshold, and record the operating status. In this way, users can monitor the operating status of the SSD in real time, which solves the problem in related technologies that users cannot know the operating status of the SSD.
[0142] The foregoing mainly describes the solutions of the embodiments of this application from a methodological perspective. It is understood that, in order to achieve the above functions, the SSD alarm device and the SSD query device include at least one of the hardware structures and software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0143] This application embodiment can divide the SSD alarm device and SSD query device into functional units according to the above method example. For example, each function can be divided into a separate functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0144] like Figure 6 As shown in the figure, this application embodiment provides an SSD alarm device for performing, as follows: Figure 2 The SSD alarm method is shown. Optionally, the above SSD alarm device can be... Figure 1 The electronic device shown; or, the SSD alarm device can be Figure 1 The host device in the electronic device shown.
[0145] In some embodiments, the SSD alarm device 300 includes an acquisition module 301 and an output module 302. In other embodiments, the SSD alarm device 300 further includes a receiving module 303.
[0146] The acquisition module 301 is used to periodically acquire the SMART information of the SSD; wherein the SMART information of the SSD includes the WAF of the SSD in one cycle.
[0147] The output module 302 is used to output a first alarm message when the WAF is greater than a first threshold; wherein the first alarm message is used to indicate that the write amplification caused by the write operation performed by the SSD in one cycle has a greater impact on the lifespan of the SSD than a preset impact level.
[0148] In one possible implementation, the output module 302 is further configured to output a second alarm message when the WAF is less than or equal to a first threshold and greater than a second threshold; wherein the second threshold is less than the first threshold; and the impact of the write amplification anomaly indicated by the second alarm message is less than the impact of the write amplification anomaly indicated by the first alarm message.
[0149] In another possible implementation, the first threshold is the WAF corresponding to the SSD in an abnormal operating state; the second threshold is the maximum WAF corresponding to the SSD in a normal operating state; wherein, the normal operating state refers to the degree of impact of write amplification generated by the SSD performing write operations on the lifespan of the SSD being less than or equal to the preset impact level; the abnormal operating state refers to the degree of impact of write amplification generated by the SSD performing write operations on the lifespan of the SSD being greater than the preset impact level.
[0150] In another possible implementation, the first threshold is the WAF obtained by testing the SSD according to the 4K random write test method; the second threshold is the WAF obtained by testing the SSD according to the JEDEC standard test method.
[0151] In another possible implementation, the WAF of the SSD in one cycle is determined based on the amount of data written by the host device and the amount of data written by the flash memory cells of the SSD in one cycle.
[0152] In another possible implementation, the receiving module 303 is used to receive a first query instruction, which is used to query the WAF of the SSD in one cycle; the output module is also used to output the WAF in response to the first query instruction.
[0153] In another possible implementation, the aforementioned determining module 301 is also used to determine that the SSD is in an abnormal operating state when the WAF is greater than the second threshold.
[0154] In another possible implementation, the receiving module 303 is further configured to receive a second query instruction, which is used to query the operating status of the SSD within a cycle; the output module is further configured to respond to the second query instruction by outputting that the operating status of the SSD is an abnormal operating status.
[0155] like Figure 7 As shown, this application embodiment provides an SSD query device for performing, as Figure 4 The SSD query method is shown. Optionally, the above SSD query device can be... Figure 1 The electronic device shown; or, the SSD query device can be Figure 1 The host device in the electronic device shown.
[0156] In some embodiments, the SSD query device 400 includes a first determination module 401 and a first query module 402.
[0157] The first determining module 401 is used to determine and record the operating status of the SSD in one cycle.
[0158] The first query module 402 is used to receive the second query command and, in response to the second query command, output the operating status of the SSD.
[0159] like Figure 8 As shown, this application embodiment provides an SSD query device for performing, as Figure 5 The SSD query method is shown. Optionally, the above SSD query device can be... Figure 1 The electronic device shown; or, the SSD query device can be Figure 1 The host device in the electronic device shown.
[0160] In some embodiments, the SSD query device 500 includes: a second determination module 501 and a second query module 502.
[0161] The second determining module 501 is used to determine and record the operating status of the SSD in one cycle; wherein, the operating status of the SSD refers to the impact of write amplification generated by the SSD performing write operations on the lifespan of the SSD.
[0162] The second query module 502 is used to receive a second query command and, in response to the second query command, output the operating status of the SSD.
[0163] In one possible implementation, the second determining module 501 is specifically used to determine that the SSD is in a first abnormal operating state when the WAF is greater than a first threshold; and to determine that the SSD is in a second abnormal operating state when the WAF is less than or equal to the first threshold and greater than a second threshold. The abnormal operating state refers to the fact that the write amplification generated by the SSD performing a write operation has a greater impact on the lifespan of the SSD than a preset impact level. The impact level represented by the first abnormal operating state is higher than the impact level represented by the second abnormal operating state.
[0164] Through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the SSD alarm device and the SSD query device can be divided into different functional modules to complete all or part of the functions described above.
[0165] This application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be executed by computer instructions instructing related hardware. The program can be stored in the computer-readable storage medium, and when executed, it can include the processes of the above method embodiments. The computer-readable storage medium can be any of the foregoing embodiments or memory. The computer-readable storage medium can also be an external storage device for the SSD alarm device and SSD query device, such as a pluggable hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the SSD alarm device and SSD query device. Further, the computer-readable storage medium can include both internal storage units of the SSD alarm device and SSD query device and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the SSD alarm device and SSD query device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0166] This application also provides a computer device, which includes a processor and a memory; the processor is coupled to the memory; the memory is used to store computer instructions, which are loaded and executed by the processor to enable the computer device to implement any of the methods provided in the above embodiments.
[0167] This application also provides a computer program product comprising a computer program that, when run on a computer, causes the computer to perform any of the methods provided in the above embodiments.
[0168] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, disclosure, and appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple components. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.
[0169] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from the spirit and scope of this application. Thus, if such modifications and modifications of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and modifications.
[0170] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for issuing alarms in a solid-state drive (SSD), characterized in that, The method includes: The SSD's Self-Monitoring Analysis and Reporting Technology (SMART) information is periodically acquired; wherein, the SSD's SMART information includes the SSD's Write Amplification Factor (WAF) within one cycle; If the worst-case write scenario for the SSD is a 4K random write scenario, then if the WAF is greater than the first threshold, a first alarm message is output; wherein, the first alarm message is used to indicate that the write amplification caused by the write operation performed by the SSD in the cycle has a greater impact on the lifespan of the SSD than a preset impact level. If the WAF is less than or equal to the first threshold and greater than the second threshold, a second alarm message is output; wherein the second threshold is less than the first threshold; and the impact of the write amplification anomaly indicated by the second alarm message is less than the impact of the write amplification anomaly indicated by the first alarm message. Wherein, the first threshold is the maximum WAF corresponding to the SSD being in an abnormal operating state, and the second threshold is the maximum WAF corresponding to the SSD being in a normal operating state; If the worst-case write scenario corresponding to the SSD is a scenario with FUA mode enabled, then if the WAF is greater than the third preset threshold, a third alarm message will be output. The impact of the write amplification anomaly indicated by the first alarm message is lower than the impact of the write amplification anomaly indicated by the third alarm message. Wherein, the first threshold is the WAF corresponding to the SSD in an abnormal operating state, and the third preset threshold is the maximum WAF corresponding to the SSD in an abnormal operating state; the third preset threshold is greater than the first threshold.
2. The method of claim 1, wherein, The normal operating state refers to the fact that the write amplification generated by the SSD performing a write operation has a less than or equal to a preset impact level on the lifespan of the SSD; the abnormal operating state refers to the fact that the write amplification generated by the SSD performing a write operation has a greater than the preset impact level on the lifespan of the SSD.
3. The method according to claim 1 or 2, characterized in that, The second threshold is the WAF obtained by testing the SSD according to the JEDEC standard testing method.
4. The method according to claim 1, characterized in that, The WAF of the SSD in a cycle is determined based on the amount of data written by the host device and the amount of data written by the flash memory cells of the SSD in that cycle.
5. The method according to claim 1, characterized in that, The method further includes: Receive a first query instruction, the first query instruction being used to query the WAF of the SSD within the one period; In response to the first query command, the WAF is output.
6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: When the WAF is greater than the second threshold, the SSD is determined to be in the abnormal operating state.
7. The method according to claim 6, characterized in that, The method further includes: Receive a second query instruction, the second query instruction being used to query the operating status of the SSD within the one cycle; In response to the second query command, the operating status of the SSD is output as the abnormal operating status.
8. An SSD alarm device, characterized in that, The device includes an interface and logic circuitry, the logic circuitry being configured to perform the SSD alarm method as described in any one of claims 1 to 7.
9. A computer device, characterized in that, The computer device includes a processor and a memory; the processor is coupled to the memory; the memory is used to store computer instructions, which are loaded and executed by the processor to enable the computer device to implement the SSD alarm method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Hard disk monitoring method, system, equipment and medium
CN114116374A
Notification of storage device performance to host
US20140359198A1
