Hard disk test method, hard disk fault early warning method and hard disk fault early warning device

By performing steady-state processing of the hard disk and performance testing under different overwrite ratios, the shortcomings of existing hard disk performance testing in advanced format operation scenarios are solved, and more accurate performance evaluation and fault warning are achieved.

CN120407307APending Publication Date: 2025-08-01INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202510560243.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing hard disk performance testing methods ignore the impact on hard disk performance in frequent advanced formatting operation scenarios, resulting in insufficient comprehensiveness and accuracy of the test results.

Method used

By performing steady-state conditional processing on the hard disk to be tested, performing advanced formatting operations, and performing performance tests under different overwrite ratios, obtaining performance test results for performance recovery capabilities, and setting a fault warning threshold using performance test results.

Benefits of technology

It improves the comprehensiveness and accuracy of hard disk performance testing, provides performance evaluation that is closer to actual use, and enhances the effectiveness and reliability of fault warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407307A_ABST
    Figure CN120407307A_ABST
Patent Text Reader

Abstract

The invention provides a hard disk testing method, a hard disk fault early warning method and a hard disk fault early warning device, which can be applied to the technical field of storage equipment. The hard disk testing method comprises the following steps: processing a to-be-tested hard disk to enable the to-be-tested hard disk to reach a steady state condition; executing an advanced formatting operation on the to-be-tested hard disk reaching the steady state condition to obtain the to-be-tested hard disk after the advanced formatting operation is completed; based on a plurality of preset overwriting proportions, testing operation is executed on the to-be-tested hard disk after the advanced formatting operation is completed, performance testing data are obtained, and the overwriting proportions are proportions of the overwriting area space in the to-be-tested hard disk space after the advanced formatting operation is completed; according to the performance test data corresponding to the multiple preset overwriting proportions, a performance test result is obtained, and the performance test result represents the performance recovery capability of the to-be-tested hard disk after the advanced formatting operation is completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of storage devices, and more specifically, to a hard disk testing method, a hard disk fault warning method, and a device. Background Art

[0002] With the rapid development of information technology, the demand for data storage has increased explosively. As a relatively core storage device, the performance of a hard disk often directly affects the operation efficiency and data processing ability of a computer system. To ensure that the hard disk can operate efficiently and stably in various application scenarios, it is crucial to perform performance testing on the hard disk.

[0003] In the process of implementing the concept of this application, the inventor found that in some actual business scenarios, frequent high-level formatting operations are performed on the hard disk, and related hard disk performance tests often ignore the impact of high-level formatting operations on the hard disk performance in actual business scenarios, resulting in deficiencies in the comprehensiveness and accuracy of performance test results. Summary of the Invention

[0004] In view of the above problems, this application provides a hard disk testing method, a hard disk fault warning method, a device, a device, a medium, and a program product.

[0005] According to one aspect of this application, a hard disk testing method is provided, including: processing the hard disk to be tested to make the hard disk to be tested reach steady-state conditions; performing a high-level formatting operation on the hard disk to be tested that reaches steady-state conditions to obtain a hard disk to be tested after the high-level formatting operation is completed; based on multiple preset overwrite ratios, respectively performing a test operation on the hard disk to be tested after the high-level formatting operation is completed to obtain performance test data, where the overwrite ratio is the ratio of the overwrite area space to the space of the hard disk to be tested after the high-level formatting operation is completed; obtaining a performance test result according to the performance test data corresponding to each of the multiple preset overwrite ratios, and the performance test result characterizes the performance recovery ability of the hard disk to be tested after the high-level formatting operation is completed.

[0006] According to another aspect of this application, a hard disk fault warning method is provided, including at least one of the following: when the performance recovery ratio of the hard disk after standing for a preset duration is less than a first preset threshold, giving a fault warning for the hard disk; when the recovery duration of the hard disk after performing a full overwrite operation and returning to steady-state conditions is greater than a second preset threshold, giving a fault warning for the hard disk; when the performance recovery efficiency of the hard disk after performing a partial overwrite operation is less than a third preset threshold, giving a fault warning for the hard disk; where the first preset threshold, the second preset threshold, and the third preset threshold are determined based on the performance test results of the above hard disk testing method, the first preset threshold characterizes the reference performance recovery ratio of the hard disk, the second preset threshold characterizes the reference performance recovery duration of the hard disk, and the third preset threshold characterizes the reference performance recovery efficiency of the hard disk.

[0007] Another aspect of the present application provides a hard disk testing device, including: a first processing module for processing a hard disk to be tested to make the hard disk to be tested reach a steady state condition; a second processing module for performing a high-level formatting operation on the hard disk to be tested that has reached the steady state condition to obtain the hard disk to be tested on which the high-level formatting operation is completed; a testing module for performing a testing operation on the hard disk to be tested on which the high-level formatting operation is completed based on a plurality of preset overwrite ratios respectively to obtain performance test data, where the overwrite ratio is the ratio of the overwrite area space to the space of the hard disk to be tested on which the high-level formatting operation is completed; a determination module for obtaining a performance test result according to the performance test data corresponding to each of the plurality of preset overwrite ratios, and the performance test result characterizes the performance recovery ability of the hard disk to be tested on which the high-level formatting operation is completed.

[0008] Another aspect of the present application provides a hard disk fault warning device, including at least one of the following: a first warning module for warning of a hard disk fault when the performance recovery ratio after the hard disk has been stationary for a preset duration is less than a first preset threshold; a second warning module for warning of a hard disk fault when the recovery duration for the hard disk to return to the steady state condition after performing a full overwrite operation is greater than a second preset threshold; a third warning module for warning of a hard disk fault when the performance recovery efficiency after the hard disk performs a partial overwrite operation is less than a third preset threshold; where the first preset threshold, the second preset threshold, and the third preset threshold are determined based on the performance test results of the above hard disk testing method, the first preset threshold characterizes the reference performance recovery ratio of the hard disk, the second preset threshold characterizes the reference performance recovery duration of the hard disk, and the third preset threshold characterizes the reference performance recovery efficiency of the hard disk.

[0009] Another aspect of the present application provides an electronic device, including: one or more processors; a memory for storing one or more computer programs, where the above one or more processors execute the above one or more computer programs to implement the steps of the above method.

[0010] Another aspect of the present application further provides a computer-readable storage medium, on which a computer program or instruction is stored, and when the above computer program or instruction is executed by a processor, the steps of the above method are implemented.

[0011] A fifth aspect of the present application further provides a computer program product, including a computer program or instruction, and when the above computer program or instruction is executed by a processor, the steps of the above method are implemented. Description of the Drawings

[0012] Through the following description of the embodiments of the present application with reference to the drawings, the above content and other objects, features, and advantages of the present application will be clearer. In the drawings:

[0013] Figure 1 Schematically shows an application scenario diagram of a hard disk test method, a hard disk fault warning method, a device, a device, a medium, and a program product according to an embodiment of the present application;

[0014] Figure 2 Schematically shows a flowchart of a hard disk test method according to an embodiment of the present application;

[0015] Figure 3A Exemplarily shows a schematic flowchart of obtaining first performance test data in the case of a zero overwrite ratio according to an embodiment of the present application;

[0016] Figure 3B Exemplarily shows a schematic flowchart of obtaining second performance test data in the case of a full overwrite ratio according to an embodiment of the present application;

[0017] Figure 3C Exemplarily shows a schematic flowchart of obtaining third performance test data in the case of at least one overwrite ratio according to an embodiment of the present application;

[0018] Figure 4 Schematically shows a flowchart of a hard disk fault warning method according to an embodiment of the present application;

[0019] Figure 5 Schematically shows a structural block diagram of a hard disk test device according to an embodiment of the present application;

[0020] Figure 6 Schematically shows a structural block diagram of a hard disk fault warning device according to an embodiment of the present application; and

[0021] Figure 7 Schematically shows a block diagram of an electronic device suitable for implementing a hard disk test method and a hard disk fault warning method according to an embodiment of the present application. Detailed implementation manners

[0022] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary and are not intended to limit the scope of the present application. In the following detailed description, for the sake of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present application. However, obviously, one or more embodiments can also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present application.

[0023] The terms used herein are for the purpose of describing particular embodiments only and are not intended to limit the present application. The terms "comprising", "including" and the like as used herein indicate the presence of the recited features, steps, operations and / or components, but do not preclude the presence or addition of one or more other features, steps, operations or components.

[0024] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those of ordinary skill in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0025] In the case of using expressions such as "at least one of A, B, and C, etc.", generally, it should be interpreted according to the meaning commonly understood by those of ordinary skill in the art (for example, "a system having at least one of A, B, and C" should include, but not be limited to, a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).

[0026] Some block diagrams and / or flowcharts are shown in the drawings. It should be understood that some of the blocks or combinations thereof in the block diagrams and / or flowcharts can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when executed by the processor, these instructions can create a device for implementing the functions / operations illustrated in these block diagrams and / or flowcharts.

[0027] Therefore, the technology of the present application can be implemented in the form of hardware and / or software (including firmware, microcode, etc.). Additionally, the technology of the present application can take the form of a computer program product on a computer-readable medium storing instructions, which can be used by or in conjunction with an instruction execution system. In the context of the present application, a computer-readable medium can be any medium that can contain, store, transmit, propagate, or transport instructions. For example, a computer-readable medium can include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, components, or propagation media. Specific examples of computer-readable media include: magnetic storage devices such as magnetic tapes or hard disk drives (HDDs); optical storage devices such as compact discs (CD-ROMs); memories such as random access memories (RAMs) or flash memories; and / or wired / wireless communication links.

[0028] With the rapid development of information technology, the demand for data storage has increased explosively. As a relatively core storage device, the performance of a hard disk often directly affects the operating efficiency and data processing ability of a computer system. To ensure that the hard disk can operate efficiently and stably in various application scenarios, it is crucial to perform performance tests on the hard disk.

[0029] Exemplarily, hard disk performance tests can obtain key performance indicators such as the number of read and write operations per second (IOPS), data throughput, latency, bandwidth, response time, etc. of the hard disk, and the performance levels such as stability and reliability of the hard disk can be evaluated based on these key performance indicators.

[0030] In the process of implementing the concept of this application, the inventors found that in some actual business scenarios, frequent high-level formatting operations are performed on hard disks, and related hard disk performance tests often ignore the impact of high-level formatting operations on the hard disk performance in actual business scenarios, resulting in deficiencies in the comprehensiveness and accuracy of performance test results.

[0031] In view of this, embodiments of this application provide a hard disk test method, a hard disk fault warning method, a device, a device, a medium, and a program product. The hard disk test method includes: processing the hard disk to be tested to make the hard disk to be tested reach a steady state condition; performing a high-level formatting operation on the hard disk to be tested that has reached the steady state condition to obtain the hard disk to be tested after the high-level formatting operation is completed; based on multiple preset overwrite ratios, respectively performing test operations on the hard disk to be tested after the high-level formatting operation is completed to obtain performance test data, where the overwrite ratio is the ratio of the overwritten area space to the space of the hard disk to be tested after the high-level formatting operation is completed; obtaining a performance test result according to the performance test data corresponding to each of the multiple preset overwrite ratios, and the performance test result characterizes the performance recovery ability of the hard disk to be tested after the high-level formatting operation is completed.

[0032] Figure 1 A schematic diagram shows an application scenario diagram of the hard disk test method, the hard disk fault warning method, the device, the device, the medium, and the program product according to an embodiment of this application.

[0033] As Figure 1 shown, the application scenario 100 according to this embodiment may include a hard disk 101 and a terminal 102. Exemplarily, the hard disk 101 and the terminal 102 may be connected through a hardware interface (such as a SATA interface, a USB interface, an NVMe interface, etc.).

[0034] The hard disk 101 may include, for example, but not limited to, a solid state drive (SSD), a hard disk drive (HDD), a hybrid hard drive (HHD), and so on.

[0035] For example, the user can interact with the hard disk 101 using the terminal 102 to send test instructions or receive test data, etc. The terminal 102 can install various types of hard disk test tools so that the terminal 102 can use the hard disk test tools to perform various test operations and obtain the performance test data of the hard disk 101. For example, the user can interact with the hard disk 101 using the terminal 102 to perform read and write operations or receive real-time performance data, etc. The terminal 102 can install various types of hard disk performance monitoring tools so that the terminal 102 can perform fault warning based on the real-time performance data of the hard disk 101.

[0036] The terminal 102 can be, for example, various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and so on.

[0037] It should be noted that the hard disk test method and the hard disk fault warning method provided by the embodiments of the present application can generally be executed by the terminal 102. Correspondingly, the hard disk test device and the hard disk fault warning device provided by the embodiments of the present application can generally be set in the terminal 102.

[0038] It should be understood that Figure 1 the numbers of the hard disks and terminals in

[0039] Figure 2 are merely illustrative. According to the implementation requirements, there can be any number of hard disks and terminals.

[0040] As Figure 2 shown, the method 200 includes operation S210 to operation S240.

[0041] In operation S210, the hard disk to be tested is processed to make the hard disk to be tested reach a steady state condition.

[0042] In operation S220, an advanced formatting operation is performed on the hard disk to be tested that has reached the steady state condition to obtain the hard disk to be tested after the advanced formatting operation is completed.

[0043] In operation S230, based on multiple preset overwrite ratios, test operations are respectively performed on the hard disk to be tested after the advanced formatting operation is completed to obtain performance test data, where the overwrite ratio is the ratio of the overwritten area space to the space of the hard disk to be tested after the advanced formatting operation is completed.

[0044] In operation S240, according to the performance test data corresponding to each of the multiple preset overwrite ratios, a performance test result is obtained, and the performance test result characterizes the performance recovery ability of the hard disk to be tested after the advanced formatting operation is completed.

[0045] In one embodiment, the hard disk to be tested can be, for example, a Solid State Drive (SSD). The hard disk to be tested can be processed to bring it to a steady state condition.

[0046] The hard disk to be tested reaching the steady state condition can be understood as the hard disk entering a mode with relatively stable performance. The performance metrics of the hard disk to be tested that has reached the steady state condition can be maintained within a relatively stable range, avoiding performance fluctuations that may be caused by factors such as the empty disk effect, formatting operations, or different writing modes.

[0047] It can be understood that by pre-processing the hard disk to be tested to bring it to the steady state condition and then performing subsequent operations on the hard disk to be tested that has reached the steady state condition, the performance stability of the hard disk to be tested under the steady state condition can be utilized to provide a consistent and reliable test benchmark for the hard disk performance test and analysis under different subsequent test conditions, ensuring the accuracy and reliability of the test results. In addition, there are often significant differences in the performance of the hard disk in the initial stage of use and after long-term use. As the steady state is a common state of the hard disk in actual business scenarios, performing subsequent operations on the hard disk to be tested that has reached the steady state condition can also help the performance test results be closer to the true performance of the hard disk to be tested in actual use.

[0048] For example, for an SSD, the characteristic of the hard disk reaching the steady state condition is that garbage collection will be performed as long as data is written. Among them, garbage collection can be used to optimize the utilization rate of storage space and maintain the performance of the hard disk. Due to the physical characteristics of flash memory, an SSD cannot directly overwrite existing data but needs to first erase the entire block and then write new data. The garbage collection mechanism can identify and clear invalid data (i.e., data that has been deleted or is no longer used), releasing space for new data to be written.

[0049] An advanced formatting operation can be performed on the hard disk to be tested that has reached the steady state condition to obtain the hard disk to be tested after the advanced formatting operation is completed. Among them, the aforementioned advanced formatting operation is an operation performed on the entire hard disk to be tested to accurately test the performance recovery of the hard disk to be tested after the advanced formatting operation.

[0050] High-level formatting, also known as logical formatting, is an operation to initialize a hard disk at the logical level. It can be understood as writing specific data to specific areas of the disk according to the file system selected by the user (such as FAT12, FAT16, FAT32, NTFS, EXT2, EXT3, etc.) to initialize the disk or disk partition and clear all files in the original disk or disk partition. Exemplarily, the high-level formatting operation may include rewriting the corresponding area of the partition table in the master boot record, and according to the file system selected by the user, allocating a disk space in the partition for storing the file allocation table, directory table, etc. for file management so that the user can use this partition to manage files.

[0051] The high-level formatting operation can create a file system, delete directories and file allocation tables in the file system, but does not truly clear the physical data on the hard disk. In other words, the residual physical data after the high-level formatting operation still exists on the hard disk, but cannot be accessed through the normal file system. And the data residue after high-level formatting will have a negative impact on the hard disk performance. For example, the residual data may cause file fragmentation, resulting in a decrease in the hard disk read and write speed, an increase in latency, a decrease in IOPS, etc.

[0052] For example, for an SSD, the FTL table (Flash Translation Layer) inside the SSD needs to be reconstructed after the high-level formatting operation to identify and clean invalid data blocks. If there is a large amount of data residue, the garbage collection mechanism needs to process more invalid data, which will reduce the efficiency of garbage collection. And the decrease in garbage collection efficiency will lead to the SSD taking more time to process read and write requests, thus affecting the overall performance of the SSD. Among them, the FTL table can be used to manage the mapping from the logical address space of the host to the physical address space of the flash. The FTL table records the mapping relationship between the logical address (LBA, Logical Block Address) and the physical address (PBA, Physical Block Address), enabling the SSD to quickly locate the actual storage location in the flash according to the read and write requests of the host.

[0053] Test operations can be performed on the hard disk to be tested after the high-level formatting operation respectively based on multiple preset overwrite ratios to obtain performance test data. Among them, the overwrite ratio is the ratio of the overwrite area space to the space of the hard disk to be tested after the high-level formatting operation. For example, in the case where the overwrite ratio is 50%, if the space of the hard disk to be tested after the high-level formatting operation is 2TB, then data overwrite operations can be performed on 1TB of the space.

[0054] The data overwrite operation can be understood as using new data to overwrite the data originally stored on the hard disk. For example, when new data (such as all "0", all "1", or a random combination) completely covers the original data area, the original "0" and "1" states will be replaced by the new data, thereby clearing the original data. Based on this, for the hard disk to be tested after the high-level formatting operation, the overwrite operation can be used to clear the data residue caused by the high-level formatting operation. For example, for an SSD after the high-level formatting operation, its performance recovery depends on the reconstruction of the FTL table. The larger the overwrite ratio, the more data is cleared, the less residual data, and the more beneficial it is to the performance recovery of the SSD.

[0055] By performing test operations on the hard disk to be tested after the high-level formatting operation under different overwrite ratio conditions, the impact of the high-level formatting operation on the hard disk performance can be quantified according to the performance test data corresponding to each of the multiple preset overwrite ratios, thereby providing comprehensive, accurate, and reliable data support for determining the performance test results of the hard disk to be tested.

[0056] It should be noted that for the hard disk to be tested after the high-level formatting operation, the test processes under different preset overwrite ratio conditions are all executed independently to avoid interference between the test processes of different overwrite ratios, thereby ensuring the reliability and accuracy of the performance test data corresponding to each of the multiple preset overwrite ratios.

[0057] As an example, multiple identical (such as the same type, brand, model, capacity, etc.) hard disks to be tested can be used, and each hard disk to be tested is separately corresponding to a preset overwrite ratio. For example, for each hard disk to be tested, operations S210 and S220 can be uniformly executed first to obtain the hard disk to be tested after the high-level formatting operation. Then, subsequent test operations can be independently executed on the hard disk to be tested after the high-level formatting operation according to the preset overwrite ratio corresponding to each hard disk to be tested, and finally, the performance test data corresponding to each of the multiple preset overwrite ratios can be obtained.

[0058] As another example, one hard disk to be tested can also be used, and each preset overwrite ratio is separately corresponding to an independent test process. For example, for each preset overwrite ratio, operations 210 to 230 can be independently executed, and finally, the performance test data corresponding to each of the multiple preset overwrite ratios can be obtained.

[0059] The performance test results can be obtained according to the performance test data corresponding to each of the multiple preset overwrite ratios. The performance test results can characterize the performance recovery ability of the hard disk to be tested after the high-level formatting operation. This performance recovery ability can be used to characterize the stability and reliability of the hard disk to be tested in the business scenario of high-level formatting.

[0060] Exemplarily, the performance recovery ability of the hard disk to be tested may include, for example, but not limited to, performance recovery ratio, performance recovery duration, performance recovery efficiency, etc.

[0061] According to an embodiment of the present application, by processing the hard disk to be tested so that the hard disk to be tested reaches a steady state condition, the performance stability of the hard disk to be tested under the steady state condition can be utilized to provide a consistent and reliable test benchmark for subsequent hard disk performance tests and analyses under multiple preset overwrite ratios, so as to ensure the accuracy and reliability of the performance test results, and to help the performance test results be closer to the true performance of the hard disk to be tested in actual use. By testing the performance recovery ability of the hard disk under different overwrite ratio conditions after the advanced formatting operation, the comprehensiveness and accuracy of the hard disk performance test can be effectively improved. In addition, by testing the performance recovery ability of the hard disk under different overwrite ratios to quantify the impact of the advanced formatting operation on the performance of the solid state drive, the performance test results can be used to provide a reliable performance commitment to users, and to support fault warning strategies in actual business scenarios, etc.

[0062] In an alternative embodiment, the performance test results can also be used to predict the failure nodes of the hard disk to be tested in actual business. For example, according to the performance test data corresponding to different overwrite ratios, the correlation between the performance recovery ability and the overwrite ratio can be determined, so that the failure nodes of the hard disk to be tested in actual business can be predicted according to this correlation.

[0063] According to an embodiment of the present application, the multiple preset overwrite ratios include a zero overwrite ratio, a full overwrite ratio, and at least one partial overwrite ratio; the performance test data includes at least one of the following: the number of read and write operations per second, the read and write request latency, and the data transfer bandwidth.

[0064] Exemplarily, the multiple preset overwrite ratios may include a zero overwrite ratio (overwrite ratio of 0%), a full overwrite ratio (overwrite ratio of 100%), and at least one partial overwrite ratio (overwrite ratio greater than 0% and less than 100%). Among them, those skilled in the art can reasonably set at least one partial overwrite ratio according to actual needs or application scenarios, etc. For example, it can be set to 20%, 50%, 70%, etc., and no specific limitation is made here.

[0065] In one embodiment, when the overwrite ratio is 0%, no new data is written to the hard disk to be tested after the advanced formatting operation is completed, and this test condition can be used to test the native performance recovery ability of the hard disk.

[0066] In one embodiment, when the overwrite ratio is 100%, new data is written to the entire hard disk to be tested after the advanced formatting operation is completed, and this test condition can be used to test the performance recovery ability of the hard disk after completely clearing the residual data.

[0067] In one embodiment, when the overwrite ratio is greater than 0% and less than 100%, new data is overwritten into a partial space of the hard disk under test that has completed the advanced formatting operation according to the overwrite ratio. This test condition can simulate partial writing situations in actual business scenarios and can be used to test the performance recovery ability in the case of mixed residual data and new data on the hard disk.

[0068] According to the embodiments of the present application, by setting multiple different preset overwrite ratios as test conditions, the comprehensiveness and accuracy of performance test data can be effectively increased, and based on the performance test data corresponding to different preset overwrite ratios, the impact of data residuals at different ratios on the performance recovery ability of the hard disk after the advanced formatting operation can be intuitively reflected.

[0069] Exemplarily, the performance test data may include at least one of the following: the number of read and write operations per second, the latency of read and write requests, and the data transfer bandwidth. Specifically, the number of read and write operations per second (Input / Output Operations Per Second, IOPS) represents the number of input / output operations that the hard disk can complete per second. The latency of read and write requests represents the time interval from issuing a read and write request to receiving a response. The data transfer bandwidth represents the amount of data that the hard disk can transfer per unit time.

[0070] As an example, the performance test data may include the number of read and write operations per second. IOPS is a key indicator reflecting the performance of the hard disk and can be used to measure the response speed and processing ability of the hard disk.

[0071] As another example, the performance test data may include the number of read and write operations per second, the latency of read and write requests, and the data transfer bandwidth. Multiple performance test data can comprehensively reflect the performance of the hard disk under test from several different dimensions such as processing ability, response speed, and transmission efficiency, reducing the one-sidedness that may be caused by a single indicator. Thus, the performance recovery ability of the hard disk under test after the advanced formatting operation can be evaluated more comprehensively and accurately based on the performance test data.

[0072] According to the embodiments of the present application, processing the hard disk under test to make the hard disk under test reach a steady state condition includes: performing a low-level formatting operation on the hard disk under test; performing M full-disk sequential write operations on the hard disk under test that has completed the low-level formatting operation, where M is a positive integer; performing N hours of random write operations on the hard disk under test that has completed the full-disk sequential write operations to obtain the hard disk under test that has reached the steady state condition, where N is a positive integer.

[0073] The low-level formatting operation is a physical-level initialization operation for a hard disk, directly acting on the physical storage units of the hard disk. Exemplarily, the low-level formatting operation may include dividing a blank disk into cylinders and tracks, and then dividing the tracks into several sectors. Each sector is further divided into an identifier part (Identifier, ID), a gap area (Gap), and a data area (Data), etc. The low-level formatting operation can clear all data on the hard disk, including the partition table, file system, and all files, so as to provide a consistent and initial test environment for subsequent operations to ensure the accuracy and reliability of performance test results. For example, a low-level formatting operation can be performed on the hard disk to be tested. The data block size of the low-level formatting operation can be set to 512K, for example, to clear all data in the disk.

[0074] As an example, M full-disk sequential write operations can be performed on the hard disk to be tested after the low-level formatting operation is completed, where M is a positive integer. Among them, the sequential write operation can be understood as data being continuously written in the order of the logical block address (Logical Block Address, LBA). This method can be used to fill all available space of the SSD. Exemplarily, M can be set to 2, and the data block size of the sequential write operation can be set to 128K, for example. That is, two full-disk 128K sequential writes can be performed on the hard disk to be tested after the low-level formatting operation is completed.

[0075] As an example, N hours of random write operations can be performed on the hard disk to be tested after the full-disk sequential write operation is completed to obtain the hard disk to be tested that reaches the steady-state condition, where N is a positive integer. Among them, the random write operation can be understood as data being written to any position on the hard disk rather than consecutive addresses. This operation is closer to the data writing mode in the actual application scenario. Exemplarily, N can be set to 2, and the data block size of the random write operation can be set to 4K, for example. That is, 4K random writes are performed on the hard disk to be tested after the random write operation is completed for 2 hours.

[0076] For example, for an SSD after the low-level formatting operation is completed, two full-disk 128K sequential writes can be performed, and then 4K random writes can be performed for 2 hours. Through the above sequential write and complex random write operations, the SSD can enter a relatively stable performance mode, that is, reach the "steady-state condition". In this mode, as long as data is written, the garbage collection mechanism of the SSD will be triggered.

[0077] Optionally, it is also possible to determine whether the hard disk to be tested reaches the steady state condition according to the performance metrics of the hard disk to be tested completed by the random write operation. Exemplarily, reaching the steady state condition may include, for example: the difference between the maximum value and the minimum value of the performance metric (such as IOPS) does not exceed 20% of the average value of the performance metric; and the difference between the maximum value and the minimum value of the best linear regression line of the performance metric (such as IOPS) does not exceed 10% of the average value of the performance metric.

[0078] According to an embodiment of the present application, by performing a low-level formatting operation, a sequential write operation, and a random write operation on the hard disk to be tested, the hard disk to be tested can reach the steady state condition, so that the performance stability of the hard disk to be tested under the steady state condition can be utilized to provide a consistent and reliable test benchmark for the subsequent hard disk performance tests and analyses at multiple preset overwrite ratios, to ensure the accuracy and reliability of the performance test results, and to help the performance test results be closer to the true performance of the hard disk to be tested in actual use.

[0079] According to an embodiment of the present application, performing a test operation on the hard disk to be tested completed by the high-level formatting operation to obtain performance test data includes: in the case where the preset overwrite ratio is the zero overwrite ratio, using a performance test tool to perform a write operation on the hard disk to be tested completed by the high-level formatting operation after standing for a preset duration to obtain first performance test data.

[0080] In one embodiment, the performance test tool may include an I / O test tool, and the I / O test tool can be used to simulate various complex I / O workloads and collect performance data such as IOPS, bandwidth, and latency of the hard disk in real time. The collection frequency can be set to, for example, 1 second / time, which is not limited here.

[0081] Optionally, the performance test tool can be selected as Fio (Flexible I / O Tester) for example. Fio can be used to test and evaluate the I / O load and performance of the hard disk and has high configurability and flexibility. FIO can perform a multi-threaded / process I / O load mode according to the I / O operation type specified by the user. The I / O operation type can include, for example, random read / write, sequential read / write, overwrite, random and sequential mixed read / write, random and sequential deeply nested directory structures, etc. After the test is completed, Fio can display the performance test data on the terminal through the test interface. Optionally, Fio can also output the performance test data to a log file.

[0082] As an example, when the preset overwrite ratio is zero, Fio can be used to perform a write operation on the hard disk to be tested that has completed the advanced formatting operation after being left idle for a preset period of time to obtain the first performance test data. Those skilled in the art can reasonably set the preset time according to actual needs or application scenarios, for example, it can be set to 2 hours, and no specific limitation is made here. The purpose of leaving the hard disk to be tested idle for a preset period of time after the advanced formatting operation is to not clear the residual data on the hard disk through an overwrite operation, but to wait for the hard disk to clear the residual data through its own mechanism, thereby testing the hard disk's native performance recovery ability after the advanced formatting operation.

[0083] For example, after an advanced formatting operation is completed on an SSD, the hard drive can be left idle for two hours while garbage collection is performed in the background to clear some residual data. Fio can then be used to perform a write operation on the SSD after the two-hour idle period to obtain first performance test data. For example, the write operation may include a 4K random write for 10 minutes, a 128K sequential write, and so on. For example, the first performance test data may include a first number of reads and writes per second, a first read and write request latency, and a first data transmission bandwidth.

[0084] Figure 3A The flowchart of obtaining the first performance test data under the condition of zero overwrite ratio according to an embodiment of the present application is exemplified.

[0085] like Figure 3A As shown, in operation S301a, a low-level formatting operation can be performed on the hard disk under test. The data block size of the low-level formatting operation can be set to 512K, for example. In operation S302a, two full-disk sequential write operations can be performed on the hard disk under test after the low-level formatting operation has completed. The data block size of the sequential write operations can be set to 128K, for example. In operation S303a, two hours of random write operations can be performed on the hard disk under test after the full-disk sequential write operation has completed. The data block size of the random write operations can be set to 4K, for example. After operation S303a is completed, the hard disk under test can reach a steady-state condition.

[0086] In operation S304a, an advanced formatting operation can be performed on the hard disk to be tested that has reached a steady state condition. In operation S305a, a write operation can be performed using Fio on the hard disk to be tested that has completed the advanced formatting operation after being left to rest for 2 hours to obtain first performance test data.

[0087] According to an embodiment of the present application, performing a test operation on a hard disk to be tested after an advanced formatting operation has been completed to obtain performance test data includes: using a performance testing tool to perform an overwrite operation on the hard disk to be tested after the advanced formatting operation has been completed according to the full overwrite ratio when a preset overwrite ratio is a full overwrite ratio, to obtain second performance test data.

[0088] As an example, when the preset overwrite ratio is the full overwrite ratio, Fio can be used to perform a full disk overwrite operation on the hard disk to be tested after the advanced formatting operation is completed, and the first performance test data is obtained. Among them, the purpose of performing the full disk overwrite operation after the advanced formatting operation on the hard disk to be tested is to completely clear the residual data of the hard disk through the full disk overwrite operation, so as to test the theoretical maximum performance recovery ability of the hard disk after the advanced formatting operation.

[0089] For example, for an SSD after the advanced formatting operation is completed, Fio can be used to perform a full disk overwrite operation to obtain the second performance test data. Exemplarily, the full disk overwrite operation may include, for example, specifying the overwrite ratio as 100% and performing 128K sequential writes twice to ensure the residual data is cleared. For example, the second performance test data may include the second number of reads and writes per second, the second read and write request latency, the second data transfer bandwidth, and the performance recovery duration. Among them, the performance recovery duration can be understood as the duration experienced by the SSD from the start of the full disk overwrite operation to the end when the SSD reaches the steady state condition again. The second number of reads and writes per second, the second read and write request latency, and the second data transfer bandwidth can be respectively understood as the IOPS, latency, and bandwidth of the SSD after the full disk overwrite operation is completed.

[0090] Figure 3B Exemplarily shown is a schematic flow diagram of obtaining the second performance test data in the case of the full overwrite ratio according to an embodiment of the present application.

[0091] As Figure 3B shown, in operation S301b, a low-level formatting operation can be performed on the hard disk to be tested, and the data block size of the low-level formatting operation can be set to 512K, for example. In operation S302b, 2 full disk sequential write operations can be performed on the hard disk to be tested after the low-level formatting operation is completed, and the data block size of the sequential write operation can be set to 128K, for example. In operation S303b, a 2-hour random write operation can be performed on the hard disk to be tested after the full disk sequential write operation is completed, and the data block size of the random write operation can be set to 4K. After operation S303b is completed, the hard disk to be tested can reach the steady state condition.

[0092] In operation S304b, an advanced formatting operation can be performed on the hard disk to be tested that has reached the steady state condition. In operation S305b, Fio can be used to perform a full disk overwrite operation on the hard disk to be tested after the advanced formatting operation is completed, and the second performance test data is obtained.

[0093] According to an embodiment of the present application, a test operation is performed on a hard disk to be tested after the advanced formatting operation is completed, and the performance test data obtained includes: when the preset overwrite ratio is at least one partial overwrite ratio, using a performance test tool, the hard disk to be tested after the advanced formatting operation is respectively overwritten according to at least one partial overwrite ratio to obtain the third performance test data corresponding to each of the at least one partial overwrite ratio.

[0094] As an example, when the preset overwrite ratio is a partial overwrite ratio, the partial space of the hard disk to be tested after the advanced formatting operation can be respectively overwritten according to at least one partial overwrite ratio using Fio to obtain the third performance test data. Those skilled in the art can reasonably set the at least one partial overwrite ratio according to actual needs or application scenarios, etc. For example, it can be set to 20%, 50%, 70%, etc., and no specific limitation is made here. Among them, the purpose of respectively performing the overwrite operation according to at least one partial overwrite ratio after the hard disk to be tested completes the advanced formatting operation is: by performing the overwrite operation with different partial overwrite ratios, to correspondingly clear some residual data of the hard disk, so as to test the performance recovery ability of the hard disk after the advanced formatting operation under different data residual degrees.

[0095] For example, for an SSD after the advanced formatting operation is completed, Fio can be used to respectively perform the overwrite operation according to at least one partial overwrite ratio to obtain the third performance test data. Exemplarily, the at least one partial overwrite ratio can include, for example, 50% and 70%. The 50% overwrite operation can include, for example, specifying the overwrite ratio as 50% and performing 128K sequential writes twice; the 70% overwrite operation can include, for example, specifying the overwrite ratio as 70% and performing 128K sequential writes twice.

[0096] It should be noted that the test processes corresponding to each partial overwrite ratio are independent of each other, and the third performance test data can include the third performance test sub-data corresponding to each of the at least one partial overwrite ratio. For example, the third performance test sub-data can include the third number of reads and writes per second, the third read and write request latency, the third data transfer bandwidth, as well as the initial number of reads and writes per second, the initial read and write request latency, and the initial data transfer bandwidth. Among them, the initial number of reads and writes per second, the initial read and write request latency, and the initial data transfer bandwidth can be respectively understood as the IOPS, latency, and bandwidth of the SSD when starting to perform the partial ratio overwrite operation. The third number of reads and writes per second, the third read and write request latency, and the third data transfer bandwidth can be respectively understood as the IOPS, latency, and bandwidth of the SSD after the partial ratio overwrite operation is completed. In an alternative embodiment, 70% read operation and 30% write operation can be further set to simulate the service scenario of a read-write mixed load.

[0097] Figure 3CA flowchart exemplarily shows the process of obtaining third performance test data under at least one overwrite ratio according to an embodiment of the present application.

[0098] As Figure 3C shown, at least one partial overwrite ratio may include 50% and 70%. Correspondingly, the third performance test data may include third performance test sub-data corresponding to a 50% overwrite ratio and third performance test sub-data corresponding to a 70% overwrite ratio.

[0099] As Figure 3C shown, in operation S301c, a low-level formatting operation may be performed on the hard disk to be tested, and the data block size of the low-level formatting operation may be set to 512K, for example. In operation S302c, two full-disk sequential write operations may be performed on the hard disk to be tested after the low-level formatting operation is completed, and the data block size of the sequential write operation may be set to 128K, for example. In operation S303c, a 2-hour random write operation may be performed on the hard disk to be tested after the full-disk sequential write operation is completed, and the data block size of the random write operation may be set to 4K, for example. After operation S303c is completed, the hard disk to be tested may reach a steady state condition.

[0100] In operation S304c, a high-level formatting operation may be performed on the hard disk to be tested that has reached a steady state condition. In operation S305c, a 50% ratio overwrite operation may be performed on the hard disk to be tested after the high-level formatting operation is completed using Fio to obtain third performance test sub-data corresponding to a 50% overwrite ratio.

[0101] In operation S306c, a low-level formatting operation may be performed on the hard disk to be tested after the 50% ratio overwrite operation is completed, and the data block size of the low-level formatting operation may be set to 512K, for example. In operation S307c, two full-disk sequential write operations may be performed on the hard disk to be tested after the low-level formatting operation is completed, and the data block size of the sequential write operation may be set to 128K, for example. In operation S308c, a 2-hour random write operation may be performed on the hard disk to be tested after the full-disk sequential write operation is completed, and the data block size of the random write operation may be set to 4K, for example. After operation S308c is completed, the hard disk to be tested may reach a steady state condition.

[0102] In operation S309c, a high-level formatting operation may be performed on the hard disk to be tested that has reached a steady state condition. In operation S310c, a 70% ratio overwrite operation may be performed on the hard disk to be tested after the high-level formatting operation is completed using Fio to obtain third performance test sub-data corresponding to a 70% overwrite ratio.

[0103] According to an embodiment of the present application, obtaining a performance test result based on primary performance test data and performance test data corresponding to multiple preset overwrite ratios includes: determining a basic hard disk performance recovery ratio according to baseline performance data and first performance test data corresponding to a zero overwrite ratio, where the baseline performance data characterizes the baseline performance of the hard disk; determining the baseline performance recovery duration of the hard disk according to second performance test data corresponding to a full overwrite ratio; and determining the hard disk performance recovery efficiency coefficient for each of at least one partial overwrite ratio according to the baseline performance data and third performance test data for each of the at least one partial overwrite ratio.

[0104] The baseline performance data can characterize the baseline performance of the hard disk. For example, the baseline performance data can include the baseline number of read / write operations per second, the baseline read / write request latency, and the baseline data transfer bandwidth. The baseline performance data can be determined based on the baseline performance test results of the hard disk to be tested.

[0105] As an example only, the test process for the baseline performance of the hard disk can include, for example: 1. Perform low-level formatting on the hard disk and set the sector size to 512 bytes; 2. Use a block size of 128 KB, 1 thread, write 128 MB of data each time, and write sequentially 2 times to make the hard disk enter a steady state; 3. Sequential write bandwidth test, use a block size of 128k, 1 thread, write 128 MB of data each time, and continuously test for 3600 seconds (1 hour); 4. Sequential read bandwidth test, use a block size of 128 KB, 1 thread, read 128 MB of data each time, and continuously test for 1800 seconds (30 minutes); 5. Random read iops test, use a block size of 4 KB, 8 threads, read 128 MB of data each time, and continuously test for 3600 seconds (1 hour); 6. Random write pre-write, use a block size of 4 KB, 4 threads, write 32 MB of data each time, and continuously test for 7200 seconds (2 hours). This step can simulate the random write load in actual use of the hard disk and trigger the garbage collection mechanism; 7. Random write iops test, use a block size of 4 KB, 4 threads, write 32 MB of data each time, and continuously test for 3600 seconds (1 hour).

[0106] As an example, the first performance test data corresponding to a zero overwrite ratio can include, for example, the first number of read / write operations per second. The basic hard disk performance recovery ratio can be determined according to the first number of read / write operations per second and the baseline number of read / write operations per second. For example, if the baseline number of read / write operations per second is 1000 and the first number of read / write operations per second is 600, the basic hard disk performance recovery ratio can be determined to be 60%, indicating that after the high-level formatting operation of the hard disk to be tested is completed and left standing for 2 hours, the IOPS can be restored to 60% of the baseline.

[0107] As an example, the second performance test data corresponding to the full overwrite ratio may include, for example, the performance recovery duration. For example, if the performance recovery duration is 10 minutes, it indicates that the theoretical shortest performance recovery duration for the hard disk to return to a steady state after the advanced formatting operation of the hard disk under test is 10 minutes, and the hard disk performance benchmark recovery duration can be determined to be 10 minutes.

[0108] Optionally, by testing multiple different hard disks under test, it can be determined that the performance recovery duration of the hard disk is approximately inversely proportional to the daily full disk write volume (Drive writes Per Day, DWPD) of the hard disk.

[0109] In an optional embodiment, the second performance test data corresponding to the full overwrite ratio may include, for example, the performance recovery duration and the maximum data transfer bandwidth. Optionally, based on the second performance test data, the following relationship can be determined between the performance recovery duration of the hard disk under test, its capacity, and the maximum data transfer bandwidth: k = performance recovery duration * capacity / maximum data transfer bandwidth, where k is a constant related to the hard disk controller efficiency and the garbage collection algorithm.

[0110] As an example, at least one partial overwrite ratio may include 50% and 70%. The third performance test sub-data may include the third read / write operations per second and the initial read / write operations per second. The calculation formula for the hard disk performance recovery efficiency coefficient can be: K = (third read / write operations per second - initial read / write operations per second) / (baseline read / write operations per second - initial read / write operations per second) * partial overwrite ratio.

[0111] For example, the baseline read / write operations per second is 1000. In the case of a 50% overwrite ratio, the initial read / write operations per second is 500, and the third read / write operations per second is 700. It can be determined that the hard disk performance recovery efficiency coefficient K1 corresponding to the 50% overwrite ratio = (700 - 500) / (0.5 * (1000 - 500)) = 0.8, indicating that 80% of the expected effect has been restored.

[0112] For example, the baseline read / write operations per second is 1000. In the case of a 70% overwrite ratio, the initial read / write operations per second is 500, and the third read / write operations per second is 800. It can be determined that the hard disk performance recovery efficiency coefficient K1 corresponding to the 70% overwrite ratio = (800 - 500) / (0.7 * (1000 - 500)) ≈ 0.857, indicating that 85.7% of the expected effect has been restored.

[0113] Figure 4 Schematically shows a flowchart of a hard disk failure warning method according to an embodiment of the present application.

[0114] As Figure 4 shown, the hard disk is a hard disk that has completed the advanced formatting operation, and the method 400 includes at least one of the following:

[0115] In operation S410, when the performance recovery ratio after the hard disk has been stationary for a preset duration is less than the first preset threshold, a fault warning is given for the hard disk.

[0116] In operation S420, when the recovery duration for the hard disk to return to the steady-state condition after a full overwrite operation is greater than the second preset threshold, a fault warning is given for the hard disk.

[0117] In operation S430, when the performance recovery efficiency after a partial overwrite operation on the hard disk is less than the third preset threshold, a fault warning is given for the hard disk.

[0118] Among them, the first preset threshold, the second preset threshold, and the third preset threshold are determined based on the performance test results according to the above-mentioned hard disk test method. The first preset threshold represents the reference performance recovery ratio of the hard disk, the second preset threshold represents the reference performance recovery duration of the hard disk, and the third preset threshold represents the reference performance recovery efficiency of the hard disk.

[0119] Exemplarily, the first preset threshold can be determined according to the basic performance recovery ratio of the hard disk. The first preset threshold can be set to 50% for example. For instance, for an SSD that has completed advanced formatting, if the performance recovery ratio of this hard disk after being stationary for 2 hours at a 0% overwrite ratio is less than 50%, a fault warning can be given for the SSD.

[0120] Exemplarily, the second preset threshold can be determined according to the benchmark performance recovery duration of the hard disk. The second preset threshold can be set to 1 hour for example. For instance, for an SSD that has completed advanced formatting, if the recovery duration for this hard disk to return to the steady-state condition at a 100% overwrite ratio is greater than 1 hour, a fault warning can be given for the SSD.

[0121] Exemplarily, at least one third preset threshold corresponding to at least one partial overwrite ratio can be determined according to the respective hard disk performance recovery efficiency coefficients at at least one partial overwrite ratio. The third preset threshold corresponding to a 50% overwrite ratio can be set to 0.7 for example. For instance, for an SSD that has completed advanced formatting, if the performance recovery efficiency of this hard disk at a 50% overwrite ratio is less than 0.7, a fault warning can be given for the SSD.

[0122] For example, giving a fault warning for the hard disk can include sending an alarm notification to the operation and maintenance personnel by means such as email or text message. Optionally, giving a fault warning for the hard disk can include displaying an alarm pop-up window on the terminal.

[0123] According to an embodiment of the present application, the performance test results can characterize the performance recovery ability of the hard disk corresponding to different overwriting ratios after the advanced formatting operation is completed. The first preset threshold, the second preset threshold, and the third preset threshold can be determined based on the performance test results, thereby effectively improving the effectiveness and reliability of the fault warning mechanism and contributing to ensuring the stable operation of the hard disk.

[0124] Figure 5 The structural block diagram of a hard disk test device according to an embodiment of the present application is schematically shown.

[0125] As Figure 5 shown, the device 500 includes a first processing module 510, a second processing module 520, a test module 530, and a determination module 540.

[0126] The first processing module 510 is configured to process the hard disk to be tested so that the hard disk to be tested reaches a steady state condition.

[0127] The second processing module 520 is configured to perform an advanced formatting operation on the hard disk to be tested that has reached a steady state condition to obtain the hard disk to be tested after the advanced formatting operation is completed.

[0128] The test module 530 is configured to perform test operations on the hard disk to be tested after the advanced formatting operation is completed based on multiple preset overwriting ratios to obtain performance test data, where the overwriting ratio is the ratio of the overwritten area space to the space of the hard disk to be tested after the advanced formatting operation is completed.

[0129] The determination module 540 is configured to obtain performance test results based on the performance test data corresponding to multiple preset overwriting ratios, and the performance test results characterize the performance recovery ability of the hard disk to be tested after the advanced formatting operation is completed.

[0130] According to an embodiment of the present application, the multiple preset overwriting ratios include a zero overwriting ratio, a full overwriting ratio, and at least one partial overwriting ratio; the performance test data includes at least one of the following: the number of read and write operations per second, the read and write request latency, and the data transfer bandwidth.

[0131] According to an embodiment of the present application, the test module 530 may include a first test sub-module.

[0132] The first test sub-module is configured to, when the preset overwriting ratio is the zero overwriting ratio, use a performance test tool to perform a write operation on the hard disk to be tested after the advanced formatting operation is completed and left standing for a preset duration to obtain first performance test data.

[0133] According to an embodiment of the present application, the test module 530 may include a second test sub-module.

[0134] A second test sub-module, configured to, when a preset overwriting ratio is a full overwriting ratio, use a performance test tool to perform an overwriting operation on a hard disk to be tested that has completed a high-level formatting operation according to the full overwriting ratio, so as to obtain second performance test data.

[0135] According to an embodiment of the present application, the test module 530 may include a third test sub-module.

[0136] A third test sub-module, configured to, when a preset overwriting ratio is at least one partial overwriting ratio, use a performance test tool to perform an overwriting operation on a hard disk to be tested that has completed a high-level formatting operation according to at least one partial overwriting ratio respectively, so as to obtain third performance test data corresponding to each of the at least one partial overwriting ratio.

[0137] According to an embodiment of the present application, the first processing module 510 may include a first processing sub-module, a second processing sub-module, and a third processing sub-module.

[0138] The first processing sub-module is configured to perform a low-level formatting operation on the hard disk to be tested.

[0139] The second processing sub-module is configured to perform M full-disk sequential write operations on the hard disk to be tested that has completed the low-level formatting operation, where M is a positive integer.

[0140] The third processing sub-module is configured to perform N-hour random write operations on the hard disk to be tested that has completed the full-disk sequential write operations, so as to obtain a hard disk to be tested that reaches a steady state condition, where N is a positive integer.

[0141] According to an embodiment of the present application, the determination module 540 may include a first determination sub-module, a second determination sub-module, and a third determination sub-module.

[0142] The first determination sub-module is configured to determine a basic hard disk performance recovery ratio according to the baseline performance data and the first performance test data corresponding to the zero overwriting ratio, where the baseline performance data characterizes the benchmark performance of the hard disk.

[0143] The second determination sub-module is configured to determine a benchmark hard disk performance recovery duration according to the second performance test data corresponding to the full overwriting ratio.

[0144] The third determination sub-module is configured to determine a hard disk performance recovery efficiency coefficient corresponding to each of the at least one partial overwriting ratio according to the baseline performance data and the third performance test data corresponding to each of the at least one partial overwriting ratio.

[0145] According to an embodiment of the present application, any multiple of the first processing module 510, the second processing module 520, the testing module 530, and the determining module 540 may be combined and implemented in one module, or any one of them may be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present application, at least one of the first processing module 510, the second processing module 520, the testing module 530, and the determining module 540 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on a substrate, a system in a package, an application specific integrated circuit (ASIC), or any other reasonable way of integrating or packaging circuits, etc., implemented by hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or in an appropriate combination of any several of them. Alternatively, at least one of the first processing module 510, the second processing module 520, the testing module 530, and the determining module 540 may be at least partially implemented as a computer program module, which can execute corresponding functions when the computer program module is run.

[0146] Figure 6 FIG. schematically shows a structural block diagram of a hard disk failure warning device according to an embodiment of the present application.

[0147] As Figure 6 shown, the device 600 includes at least one of the following:

[0148] A first warning module 610, configured to give a failure warning for the hard disk when the performance recovery ratio after the hard disk stands still for a preset duration is less than a first preset threshold.

[0149] A second warning module 620, configured to give a failure warning for the hard disk when the recovery duration for the hard disk to return to the steady state condition after performing a full overwrite operation is greater than a second preset threshold.

[0150] A third warning module 630, configured to give a failure warning for the hard disk when the performance recovery efficiency after the hard disk performs a partial overwrite operation is less than a third preset threshold.

[0151] Wherein, the first preset threshold, the second preset threshold, and the third preset threshold are determined based on the performance test results in the hard disk test method according to an embodiment of the present application. The first preset threshold represents the reference performance recovery ratio of the hard disk, the second preset threshold represents the reference performance recovery duration of the hard disk, and the third preset threshold represents the reference performance recovery efficiency of the hard disk.

[0152] According to an embodiment of the present application, any plurality of the first warning module 610, the second warning module 620, and the third warning module 630 may be combined and implemented in one module, or any one of them may be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present application, at least one of the first warning module 610, the second warning module 620, and the third warning module 630 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or may be implemented by any other reasonable means such as hardware or firmware for integrating or packaging circuits, or may be implemented in any one of the three implementation manners of software, hardware, and firmware, or in an appropriate combination of any several of them. Alternatively, at least one of the first warning module 610, the second warning module 620, and the third warning module 630 may be at least partially implemented as a computer program module, and when the computer program module is run, corresponding functions may be executed.

[0153] Figure 7 Schematically shows a block diagram of an electronic device suitable for implementing a hard disk test method and a hard disk failure warning method according to an embodiment of the present application.

[0154] As Figure 7 shown, the electronic device 700 according to an embodiment of the present application includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read only memory (ROM) 702 or a program loaded from a storage section 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application specific integrated circuit (ASIC)), etc. The processor 701 may also include on-board memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present application.

[0155] In the RAM 703, various programs and data required for the operation of the electronic device 700 are stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other via the bus 704. The processor 701 performs various operations of the method flow according to the embodiments of the present application by executing the programs in the ROM 702 and / or the RAM 703. It should be noted that the programs may also be stored in one or more memories other than the ROM 702 and the RAM 703. The processor 701 may also perform various operations of the method flow according to the embodiments of the present application by executing the programs stored in the one or more memories.

[0156] According to an embodiment of the present application, the electronic device 700 may further include an input / output (I / O) interface 705, and the input / output (I / O) interface 705 is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the input / output (I / O) interface 705: an input part 706 including a keyboard, a mouse, etc.; an output part 707 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage part 708 including a hard disk, etc.; and a communication part 709 including a network interface card such as a LAN card, a modem, etc. The communication part 709 performs communication processing via a network such as the Internet. The drive 710 is also connected to the input / output (I / O) interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed so that a computer program read from it can be installed into the storage part 708 as needed.

[0157] The present application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist separately without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of the present application is implemented.

[0158] According to an embodiment of the present application, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present application, the computer-readable storage medium may be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, the computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than the ROM 702 and RAM 703.

[0159] An embodiment of the present application also includes a computer program product, which includes a computer program that contains program code for executing the method shown in the flowchart. When the computer program product runs in a computer system, the program code is used to enable the computer system to implement the hard disk test method and hard disk failure warning method provided by the embodiments of the present application.

[0160] When the computer program is executed by the processor 701, it executes the above functions defined in the system / apparatus of the embodiments of the present application. According to an embodiment of the present application, the above-described systems, apparatuses, modules, units, etc. can be implemented by computer program modules.

[0161] In one embodiment, the computer program can rely on tangible storage media such as optical storage devices and magnetic storage devices. In another embodiment, the computer program can also be transmitted and distributed in the form of a signal on a network medium and be downloaded and installed through the communication part 709, and / or be installed from the removable medium 711. The program code included in the computer program can be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0162] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or be installed from the removable medium 711. When the computer program is executed by the processor 701, it executes the above functions defined in the system of the embodiments of the present application. According to an embodiment of the present application, the above-described systems, devices, apparatuses, modules, units, etc. can be implemented by computer program modules.

[0163] According to embodiments of the present application, program code for executing the computer programs provided by the embodiments of the present application can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. The programming languages include, but are not limited to, programming languages such as Java, C++, Python, the "C" language, or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (for example, by using an Internet service provider to connect through the Internet).

[0164] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the above-mentioned module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks can occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, as well as the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0165] Those skilled in the art can understand that the features described in the various embodiments of the present application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present application. In particular, without departing from the spirit and teachings of the present application, the features described in the various embodiments of the present application can be combined and / or combined in various ways. All such combinations and / or combinations fall within the scope of the present application.

[0166] The above describes the embodiments of the present application. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present application. Although the embodiments are described separately above, this does not mean that the measures in each embodiment cannot be used advantageously in combination. Without departing from the scope of the present application, those skilled in the art can make various substitutions and modifications, and all such substitutions and modifications should fall within the scope of the present application.

Claims

1. A hard disk testing method, characterized in that, The method includes: Processing the hard disk to be tested to make the hard disk to be tested reach steady state conditions; Performing a high-level formatting operation on the hard disk to be tested that reaches the steady state conditions to obtain a hard disk to be tested after the high-level formatting operation is completed; Based on multiple preset overwrite ratios, respectively performing a test operation on the hard disk to be tested after the high-level formatting operation is completed to obtain performance test data, where the overwrite ratio is the ratio of the overwrite area space to the space of the hard disk to be tested after the high-level formatting operation is completed; According to the performance test data corresponding to each of the multiple preset overwrite ratios, obtaining a performance test result, where the performance test result characterizes the performance recovery ability of the hard disk to be tested after the high-level formatting operation is completed.

2. The method according to claim 1, wherein: The multiple preset overwrite ratios include a zero overwrite ratio, a full overwrite ratio, and at least one partial overwrite ratio; The performance test data includes at least one of the following: the number of read and write operations per second, the read and write request latency, and the data transfer bandwidth.

3. The method according to claim 2, wherein The performing a test operation on the hard disk to be tested after the high-level formatting operation is completed to obtain performance test data includes: when the preset overwrite ratio is the zero overwrite ratio, Performing a write operation on the hard disk to be tested after the high-level formatting operation is completed after standing for a preset duration to obtain first performance test data.

4. The method according to claim 2, characterized in that The performing a test operation on the hard disk to be tested after the high-level formatting operation is completed to obtain performance test data includes: when the preset overwrite ratio is the full overwrite ratio, Performing an overwrite operation on the hard disk to be tested after the high-level formatting operation is completed according to the full overwrite ratio to obtain second performance test data.

5. The method according to claim 2, wherein The performing a test operation on the hard disk to be tested after the high-level formatting operation is completed to obtain performance test data includes: when the preset overwrite ratio is at least one partial overwrite ratio, Respectively performing an overwrite operation on the hard disk to be tested after the high-level formatting operation is completed according to the at least one partial overwrite ratio to obtain third performance test data corresponding to each of the at least one partial overwrite ratio.

6. The method according to claim 1 or 2, characterized in that, The processing the hard disk to be tested to make the hard disk to be tested reach steady state conditions includes: Performing a low-level formatting operation on the hard disk to be tested; Performing M full-disk sequential write operations on the hard disk to be tested after the low-level formatting operation is completed, where M is a positive integer; Performing a random write operation on the hard disk to be tested after the full-disk sequential write operation is completed for N hours to obtain a hard disk to be tested that reaches steady state conditions, where N is a positive integer.

7. The method according to claim 2, wherein The obtaining a performance test result according to the primary performance test data and the performance test data corresponding to each of the multiple preset overwrite ratios includes: Determining a basic hard disk performance recovery ratio according to the baseline performance data and the first performance test data corresponding to the zero overwrite ratio, where the baseline performance data characterizes the baseline performance of the hard disk; Determining a baseline hard disk performance recovery duration according to the second performance test data corresponding to the full overwrite ratio; Determine the hard disk performance recovery efficiency coefficient for each of the at least one partial overwrite ratio based on the baseline performance data and the third performance test data for each of the at least one partial overwrite ratio.

8. A hard disk failure warning method, characterized in that, The hard disk is a hard disk that has completed an advanced formatting operation, and the method includes at least one of the following: In the case where the performance recovery ratio after the hard disk has been stationary for a preset duration is less than a first preset threshold, issue a fault warning for the hard disk; In the case where the recovery duration for the hard disk to return to a steady state condition after performing a full overwrite operation is greater than a second preset threshold, issue a fault warning for the hard disk; In the case where the performance recovery efficiency after the hard disk has performed a partial overwrite operation is less than a third preset threshold, issue a fault warning for the hard disk; Wherein, the first preset threshold, the second preset threshold, and the third preset threshold are determined based on the performance test results of the method according to any one of claims 1 to 7. The first preset threshold represents the reference performance recovery ratio of the hard disk, the second preset threshold represents the reference performance recovery duration of the hard disk, and the third preset threshold represents the reference performance recovery efficiency of the hard disk.

9. A hard disk testing device, characterized in that, The apparatus includes: A first processing module for processing the hard disk to be tested to bring the hard disk to be tested to a steady state condition; A second processing module for performing an advanced formatting operation on the hard disk to be tested that has reached the steady state condition to obtain a hard disk to be tested that has completed the advanced formatting operation; A test module for performing test operations on the hard disk to be tested that has completed the advanced formatting operation respectively based on a plurality of preset overwrite ratios to obtain performance test data, where the overwrite ratio is the ratio of the overwritten area space to the space of the hard disk to be tested that has completed the advanced formatting operation; A determination module for obtaining a performance test result based on the performance test data corresponding to each of the plurality of preset overwrite ratios, where the performance test result represents the performance recovery ability of the hard disk to be tested that has completed the advanced formatting operation.

10. A hard disk failure warning device, characterized in that, The hard disk is a hard disk that has completed an advanced formatting operation, and the apparatus includes at least one of the following: A first warning module for issuing a fault warning for the hard disk in the case where the performance recovery ratio after the hard disk has been stationary for a preset duration is less than a first preset threshold; A second warning module for issuing a fault warning for the hard disk in the case where the recovery duration for the hard disk to return to a steady state condition after performing a full overwrite operation is greater than a second preset threshold; A third warning module for issuing a fault warning for the hard disk in the case where the performance recovery efficiency after the hard disk has performed a partial overwrite operation is less than a third preset threshold; Wherein, the first preset threshold, the second preset threshold, and the third preset threshold are determined based on the performance test results of the method according to any one of claims 1 to 7. The first preset threshold represents the reference performance recovery ratio of the hard disk, the second preset threshold represents the reference performance recovery duration of the hard disk, and the third preset threshold represents the reference performance recovery efficiency of the hard disk.

Citation Information

Cited By

  • A preprocessing method and storage device under a solid state disk hybrid test scene

    CN120743204B

  • Multi-platform dirty disk performance consistency testing method for solid state disk

    CN121237176A

  • A method for testing consistency of dirty disc performance of a solid state disc on multiple platforms

    CN121237176B

  • Method, device and equipment for testing read-write response stability of flash memory and medium

    CN122290672A

  • A test method, device and equipment for stability of flash read-write response and a medium

    CN122290672B