Method for evaluating service life of storage device and electronic device
By building a target test environment, simulating the data writing method of the storage device, combining sequential write operations and random write operations, calculating the write amplification coefficient and test volatility, the problem of the existing technology failing to fully consider the impact of complex input/output modes is solved, and the accuracy and stability of the storage device life assessment are achieved.
Patent Information
- Application Number
- CN202511178517.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-08-21
AI Technical Summary
Existing technologies fail to fully consider the impact of complex input/output patterns in actual usage scenarios, especially the write amplification effect, when evaluating the lifespan of storage devices, resulting in inaccurate and non-repeatable evaluation results.
By building a target test environment, simulating the data writing method of the storage device, combining sequential write operations and random write operations, obtaining the host write volume and the target storage device write volume, calculating the write amplification coefficient and test volatility, and performing multiple rounds of evaluation.
It achieves a more comprehensive and accurate reflection of the actual life of storage devices, improves the stability and repeatability of evaluation results, and reduces accidental errors.
Smart Images

Figure CN120670189A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of storage devices, and in particular to a life assessment method for storage devices and electronic equipment. Background Art
[0002] In the current storage device sector, particularly in system drives like solid-state drives (SSDs), lifespan assessment is a critical step in ensuring data storage reliability and system stability. Traditional storage device lifespan assessment methods primarily rely on metrics such as total bytes written or endurance ratings. However, these methods often fail to fully account for the impact of complex read and write operations in real-world scenarios, as well as the additional writes generated by internal operations (such as garbage collection and wear leveling) during data writes. This accelerates wear of the NAND (non-volatile storage technology) flash memory, shortening the storage device's lifespan. Consequently, these issues prevent a comprehensive and accurate reflection of the actual lifespan of storage devices. Summary of the Invention
[0003] This application provides a storage device lifespan assessment method and electronic device to at least address the problem that related technologies fail to fully consider the impact of complex read and write operations in actual usage scenarios, as well as the additional write volume generated by internal operations (such as garbage collection, wear leveling, etc.) when the storage device writes data. This can more comprehensively and accurately reflect the actual lifespan of the storage device.
[0004] This application provides a method for evaluating the lifespan of a storage device, comprising: Build the target test environment and determine the target storage device; Simulating a data writing mode of the target storage device based on sequential write operations and random write operations; After simulating the data writing mode of the target storage device, performing a random write operation and obtaining the host write amount and the target storage device write amount during each data writing; Determining a target write amplification factor and a test volatility based on the host write amount and the target storage device write amount; The target storage device is evaluated based on the target write amplification factor and the test volatility.
[0005] The present application also provides an electronic device, comprising a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the above-mentioned method for evaluating the life of the storage device is implemented.
[0006] This application constructs a target test environment and identifies a target storage device. Data writes to the target storage device are simulated based on sequential and random write operations. After simulating the data writes to the target storage device, random write operations are performed, and the host write amount and the target storage device write amount are obtained for each data write. A target write amplification factor and test volatility are determined based on the host write amount and the target storage device write amount. The target storage device is then evaluated based on the target write amplification factor and test volatility. This method can therefore more comprehensively and accurately reflect the actual lifespan of a storage device. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0008] Figure 1 is a flow chart of a method for evaluating the life of a storage device according to an embodiment of the present application; Figure 2 A flowchart of a method for evaluating the life of a storage device according to a specific example of the present application; Figure 3 Schematic diagram of a block diagram of an electronic device according to an embodiment of the present application.
[0009] Reference numerals: 200 - electronic device, 210 - memory, 220 - processor. DETAILED DESCRIPTION
[0010] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0011] Currently, there are some methods for evaluating the lifespan of storage devices in the relevant technology, but most of these methods have limitations and cannot fully and accurately reflect the actual lifespan of storage devices. For example, in the evaluation method based on the total number of written bytes, the lifespan of the storage device is evaluated by counting the total number of written bytes that the storage device can withstand throughout its entire life cycle. However, this method does not take into account the write amplification effect and the impact of complex input / output in actual usage scenarios, so the evaluation results may not be accurate. Among them, in computer and storage systems, input / output refers to the method and characteristics of data transmission between devices, including the type, size, frequency, and sequence of data read and write operations. Common input / output includes sequential read and write, random read and write, etc.
[0012] For example, in the evaluation method based on endurance level, the lifespan of the storage device is evaluated based on its endurance level, which is usually related to the NAND flash memory type and manufacturing process of the storage device. This method also does not take into account the write amplification effect and the influence of complex input / output patterns in actual usage scenarios. In addition, the endurance level is usually a relatively fixed value and cannot reflect the changes in the lifespan of the storage device in actual use. For another example, in the evaluation method based on a single write amplification test, the lifespan of the storage device is evaluated through a single write amplification test. This method has accidental errors and cannot fully reflect the lifespan performance of the storage device in actual use. In addition, this method also does not take into account the influence of complex input / output patterns in actual usage scenarios.
[0013] In summary, traditional methods rely on a single metric, primarily total bytes written or endurance rating, to assess storage device lifespan. These metrics fail to fully account for the nonlinear impact of complex input / output patterns on NAND flash memory lifespan in real-world usage scenarios, resulting in potentially inaccurate assessment results. They also ignore the write amplification effect, a key factor contributing to premature SSD failure. This effect reflects the additional writes generated by internal operations (such as garbage collection and wear leveling) when writing data to the storage device. However, existing technologies often ignore this effect, failing to quantify the actual wear and tear of the storage device. Furthermore, test results are not reproducible, potentially due to differences in initial device conditions, non-standard testing procedures, or random errors. This reduces the credibility of the test results and makes them difficult to use as a basis for engineering decisions. The lack of a standardized testing process also makes it difficult to directly compare results between different tests, reducing the practical value of the tests.
[0014] To this end, this application proposes a storage device lifespan assessment method. By combining multiple rounds of stress testing with dynamic WAF (Write Amplification Factor) analysis, this method more comprehensively considers the impact of complex input / output patterns in actual usage scenarios on storage device lifespan. Furthermore, multiple rounds of testing eliminate accidental errors, improving the accuracy of assessment results.
[0015] The following describes a storage device lifespan assessment method and an electronic device proposed in embodiments of the present application with reference to the accompanying drawings.
[0016] Figure 1 Flowchart of a method for evaluating the life of a storage device according to an embodiment of the present application.
[0017] like Figure 1 As shown, the lifespan assessment method of a storage device according to an embodiment of the present application may include the following steps: S1, build the target test environment and determine the target storage device.
[0018] S2, simulating the data writing mode of the target storage device based on sequential write operations and random write operations.
[0019] S3, after simulating the data writing mode of the target storage device, a random write operation is performed, and the host write amount and the target storage device write amount are obtained each time data is written.
[0020] S4: Determine a target write amplification factor and a test volatility based on the host write volume and the target storage device write volume.
[0021] S5, evaluating the target storage device based on the target write amplification factor and the test volatility.
[0022] Specifically, first build the target test environment. Within this environment, select a stable test host and ensure its CPU (Central Processing Unit), memory, and I / O (Input / Output) interfaces meet test requirements. Install an operating system suitable for storage device testing, such as Linux. Install and configure testing tools, such as the Flexible I / O Tester (FIO), to generate standardized I / O loads. Install monitoring tools, such as smartmontools, to monitor the health and performance of storage devices in real time. Finally, identify the target storage device. This device is the primary target of the test, distinct from other devices in the test environment (such as system drives). It can be a solid-state drive (SSD), non-volatile memory express (NVMe), or other device. The appropriate storage device should be selected based on the specific test requirements. For example, if the test objective is to evaluate the device's performance under high I / O loads, a high-performance SSD or NVMe device can be selected.
[0023] Next, you can simulate data writes to the target storage device using sequential and random write operations. For example, you can run the test tool to perform sequential writes on the target storage device. This step aims to eliminate differences in the initial state of the storage device, such as the presence of free blocks and the impact of garbage collection policies. You can also run the test tool to perform random writes on the target storage device. This step aims to establish a steady-state wear environment and achieve wear leveling on the storage device.
[0024] After simulating the data write behavior of the target storage device, perform another random write operation and obtain the host write volume and target storage device write volume for each data write. This means that after the first random write operation, the storage device may have reached a steady-state wear environment. Using the test tool, perform another random write operation to further verify the device's performance and wear in this steady-state environment, ensuring that the device maintains stable performance after long-term operation. The primary purpose of the previous random write operation is to simulate the complex I / O patterns found in real-world scenarios and establish a steady-state wear environment. The primary purpose of this random write operation is to verify the device's performance and stability in a steady-state wear environment, reducing accidental errors and providing more reliable evaluation results. After each random write operation, use a test tool or monitoring tool (such as smartctl) to obtain the host write volume (the amount of data sent by the host to the storage device) and the target storage device write volume (the actual amount of data written to the storage device, including the host write volume and additional write volume generated by internal operations). Obtaining the host and target storage device write volumes provides data support for subsequent calculations of the write amplification factor and test volatility.
[0025] After determining the host write volume and the target storage device, a target write amplification factor and test volatility can be determined based on the host and target storage device write volumes. The target write amplification factor measures the additional write volume generated by internal operations (such as garbage collection and wear leveling) when writing data to the storage device. It reflects the actual wear and tear of the storage device during data writing. The test volatility measures the degree of fluctuation in the write amplification factor across multiple tests and is used to assess the stability and repeatability of test results. For example, the target write amplification factor and test volatility can be determined using pre-defined relationships. For example, a first relationship between the host write volume, the target storage device write volume, and the target write amplification factor is pre-defined, and a second relationship between the host write volume, the target storage device write volume, and the test volatility is pre-defined. Once the host write volume and target storage device write volume are determined, the target write amplification factor and test volatility can be directly obtained by directly applying the first and second relationships. By calculating the target write amplification factor and test volatility, the wear and tear of the storage device and the stability of the test results can be quantitatively assessed.
[0026] After determining the target write amplification factor and test volatility, the target storage device can be evaluated based on these factors. For example, a performance model can be constructed using the target write amplification factor and test volatility as input parameters, combined with other performance metrics (such as latency and bandwidth) to evaluate the overall performance of the storage device. Alternatively, the target write amplification factor and test volatility of the current test can be compared with the device's historical data to assess performance trends. Alternatively, the target write amplification factor and test volatility can be compared with industry standards or best practices to assess whether the device meets the industry average. Different target write amplification factor and test volatility thresholds can also be set based on actual business needs. For example, for applications with high performance requirements (such as database services), stricter thresholds can be set, and the target storage device is considered normal only when the required thresholds are met.
[0027] In this way, the actual life of the storage device can be reflected more comprehensively and accurately.
[0028] According to one embodiment of the present application, building a target test environment includes: deploying a target operating system and using a test tool with a version number greater than a preset version number, wherein the test tool is used to simulate read and write operations of the target storage device in actual usage scenarios. The preset version number can be determined based on actual conditions.
[0029] Specifically, when building the target test environment, you need to deploy the target operating system and use test tools with a version greater than the preset version. The operating system is the foundation of the test environment. It not only provides the required runtime environment for testing but also influences the underlying I / O scheduling strategy, thus affecting the accuracy and repeatability of test results. For example, to meet specific cloud environment requirements, you can deploy the Alibaba Cloud customized operating system. This operating system is optimized for specific cloud environments, providing additional security features and stability optimizations. It is suitable for data centers and cloud computing environments, and its underlying I / O scheduling is optimized to better support high-performance storage devices such as solid-state drives (SSDs). Furthermore, you can select the appropriate Alibaba Cloud customized operating system version based on your testing requirements. Alibaba Cloud offers multiple operating system versions, such as: Alibaba Cloud Linux 2: Based on CentOS 7, suitable for scenarios requiring long-term support and stability; Alibaba Cloud Linux 3: Based on CentOS 8, offering more new features and performance optimizations; and Alibaba Cloud Linux 4: An independently evolved operating system with the latest kernel and security features. The target operating system can be installed on the test host, such as by installing it through an ISO image file or using an automated deployment tool.
[0030] Testing tools simulate the read and write operations of the target storage device in real-world usage scenarios. Therefore, selecting the right testing tool and ensuring its version number is higher than the preset version number is crucial. The testing tool should be able to simulate various I / O patterns, including sequential and random reads and writes, to comprehensively evaluate the performance and lifespan of the storage device. Ensure that the testing tool version number is higher than the preset version number. Higher versions include more features and improvements, more accurately simulating real-world usage scenarios. For example, the testing tool might be FIO, which supports multiple I / O modes and parameter configurations, generating standardized I / O loads. The preset version number is 3.13, so version 3.13 or higher is recommended. This allows you to create an FIO configuration file (such as test.FIO) that specifies parameters such as the tested I / O mode, block size, and queue depth. Additionally, you can use the hdparm command-line tool to view drive parameters, test drive performance, and control drive cache.
[0031] Therefore, through the above steps, a standardized target test environment can be constructed to ensure the accuracy and repeatability of test results, thereby providing a reliable basis for performance and life evaluation of storage devices.
[0032] According to one embodiment of the present application, determining the target storage device includes: using a storage device other than a storage device equipped with an operating system as the target storage device.
[0033] Specifically, when determining the target storage device, storage devices other than storage devices equipped with an operating system can be used as target storage devices. That is, to use storage devices other than storage devices equipped with an operating system as target storage devices, for example, first identify all available storage devices. This can be done, for example, through system management tools or hardware detection tools. The system disk is the storage device on which the operating system is installed, while other storage devices that do not have an operating system installed can be used as target storage devices. That is, the system disk is the storage device on which the operating system is installed and is typically used to boot and run the operating system. It may contain important system files and data and is therefore not suitable for testing. Other storage devices that do not have an operating system installed are selected as target storage devices. These devices can be additional hard drives, solid-state drives, or NVMe devices. For example, among the acquired storage devices, determine which one is the system based on whether it is mounted in the root directory. After determining the system disk, exclude the system disk and select other unmounted storage devices as target storage devices.
[0034] After determining the target storage device, you can also confirm the type of the target storage device and check its health to ensure that it is not faulty. If the target storage device is not formatted, you can also format it with the appropriate file system. Formatting clears old data on the device and creates a clean environment for testing. Furthermore, you can mount the target storage device to a temporary directory for testing purposes. Mounting connects the storage device's file system to the operating system's file system, making it accessible and usable.
[0035] Separating the target storage device from the system disk ensures that the test will not interfere with the normal operation of the operating system or be affected by the system disk's performance. Independent storage devices can provide more accurate test results because they are unaffected by factors such as the system disk's cache and scheduling policies. This ensures that the selection and preparation of the target storage device meet testing requirements, providing a reliable test environment for evaluating the storage device's performance and lifespan.
[0036] According to one embodiment of the present application, simulating a data write mode of a target storage device based on sequential write operations and random write operations includes: executing a first preset number of sequential write operations by a test tool; and after completing the sequential write operations, executing a first preset duration of random write operations by the test tool. The first preset number of times and the first preset duration can be determined based on actual conditions.
[0037] Specifically, when simulating data writes to a target storage device using sequential and random write operations, the test tool can first execute a first preset number of sequential write operations. Sequential write operations refer to writes performed sequentially according to the physical address order of the storage device. This method is often used to simulate writing large files, such as video files or database backups. A test tool that supports sequential write operations (such as FIO) can be used, and the following parameters can be specified: block size: The size of each data block written, typically a large value (such as 128KB or 1MB); write count: The number of sequential write operations to be performed, i.e., the first preset number (such as 3); and write range: The range of the write operation, typically the entire storage device. After launching the test tool, sequential write operations are executed according to the configuration. The test tool will write data to the target storage device sequentially according to the specified block size and count. This allows sequential write operations to simulate writing large files, such as video files or database backups. This method helps evaluate the performance of storage devices when processing large blocks of data. Through sequential write operations, the sequential write speed of the storage device can be measured, which is very important for evaluating the throughput of the storage device. In addition, sequential write operations can eliminate the initial state differences of the storage device, such as the existence of free blocks and the impact of garbage collection policies.
[0038] After the sequential write operation completes, the test tool can perform a random write operation for a first preset duration. A random write operation involves writing to random locations on the storage device. This method is commonly used to simulate data write scenarios in multi-user or multi-task environments, such as database transactions and file system fragmentation. After the sequential write operation completes, configure the test tool to perform a random write operation. The following parameters can be specified: block size, which is the size of each data block to be written, typically a small value (such as 4KB); write duration, which is the duration of the random write operation, which is the first preset duration (such as 1 hour); and write range, which specifies the range of the write operation, typically the entire storage device. After starting the test tool, perform a random write operation according to the configuration. The test tool will write to random locations on the storage device within the specified duration. Random write operations can simulate data write scenarios in multi-user or multi-task environments, such as database transactions and file system fragmentation. This method helps evaluate the performance of storage devices under complex I / O patterns. Furthermore, random write operations can measure the random write latency of the storage device, which is important for evaluating the performance of storage devices when processing small blocks of data. In addition, random write operations can help establish a steady-state wear environment, allowing storage devices to reach a wear-leveling state, thereby more accurately assessing their lifespan.
[0039] Thus, sequential write operations can eliminate differences in the initial state of the storage device, while random write operations can help establish a steady-state wear environment, allowing the storage device to achieve wear-leveling. This helps more accurately assess the lifespan of the storage device. The combination of sequential and random write operations can simulate various I / O patterns in real-world usage scenarios, such as large file writes and data writes in a multi-user environment. By combining sequential and random write operations, we can fully simulate the data write methods of the target storage device in real-world usage scenarios.
[0040] According to one embodiment of the present application, performing a random write operation includes: performing a second preset number of random write operations based on the test tool, and each random write operation lasts for a second preset duration, wherein the second preset duration is greater than the first preset duration. The second preset number of times can be determined based on actual conditions.
[0041] Specifically, when performing random write operations, a second preset number of random write operations can be performed based on the test tool, and each random write operation lasts for a second preset duration. That is to say, first select a test tool that supports random write operations, such as FIO. FIO can simulate various complex I / O modes, including random write operations. And configure the random write operation, the second preset number of times: determine the number of times the random write operation is performed. For example, it can be set to 5 rounds of random write operations. The second preset duration: determines the duration of each round of random write operations. For example, each round of random write operations lasts 4 hours. Block size: Set the data block size for each write, usually a smaller value (such as 4KB) to simulate the writing of small blocks of data in actual usage scenarios. Write range: specifies the range of the write operation, usually the entire storage device.
[0042] Based on the random write configuration, after starting the test tool, you can perform random write operations according to the configuration. Within the specified duration of each round, the test tool randomly selects a storage device location for write operations. After each round, the test tool records relevant parameters (such as host write volume and NAND write volume) for subsequent write amplification factor calculations.
[0043] That is, random write operations can simulate data writing scenarios in multi-user or multi-tasking environments, such as database transactions, file system fragmentation, etc. This method helps to evaluate the performance of storage devices under complex I / O modes. Through random write operations, the random write latency of the storage device can be measured, which is very important for evaluating the performance of the storage device when processing small blocks of data. In addition, the second preset duration is greater than the first preset duration, which means that each round of random write operations lasts longer, which can more comprehensively simulate the long-term random write load in actual usage scenarios, thereby more accurately evaluating the performance and life of the storage device under long-term high load, reducing accidental errors in the test results, and making the test results more stable and repeatable.
[0044] Therefore, by performing multiple rounds of random write operations with each round lasting longer, the impact of these accidental errors can be reduced. Multiple random write operations can provide more data points, thereby more accurately quantifying the performance indicators of storage devices, such as write speed, latency, number of input / output operations per second, etc., making the test results more stable and reliable, and closer to the long-term high-load conditions in actual usage scenarios, ensuring that the test environment of the target storage device can fully simulate the actual usage scenario, thereby providing a reliable basis for the performance and life evaluation of the storage device.
[0045] According to one embodiment of the present application, a target write amplification coefficient is determined based on the host write amount and the target storage device write amount, including: determining the write amplification coefficient based on the ratio of the target storage device write amount to the host write amount each time the test tool completes a random write operation; and determining the target write amplification coefficient based on a second preset number of times and the average value of multiple write amplification coefficients.
[0046] Specifically, when determining the target write amplification factor based on the host write volume and the target storage device write volume, the write amplification factor can be determined based on the ratio of the target storage device write volume to the host write volume each time the test tool completes a random write operation. The write amplification factor (WAF) is a metric that measures the additional write volume generated by internal operations (such as garbage collection and wear leveling) when writing data to a storage device. The write amplification factor is determined by dividing the target storage device write volume by the host write volume. The host write volume is the amount of write data sent by the host to the storage device, and the target storage device write volume is the actual amount of data written to the storage device, including the amount of data written by the host and the additional write volume generated by internal operations.
[0047] After determining multiple write amplification times, a target write amplification factor can be determined based on a second preset number of times and the average of the multiple write amplification factors. That is, a test tool (such as FIO) is used to perform a second preset number of random write operations. The duration of each random write operation is the second preset duration. For example, assuming the second preset number of times is 5, each random write operation lasts 4 hours. After each random write operation is completed, the host write amount and the target storage device write amount are obtained through a test tool or a storage device monitoring tool (such as smartctl). For each random write operation, the corresponding write amplification factor is calculated, and then the target write amplification factor can be determined based on the second preset number of times and the average of the multiple write amplification factors.
[0048] For example, assuming the second preset number of times is 5 and the duration of each random write operation is 4 hours, the first random write operation: host write amount: 100 GB, target storage device write amount: 200 GB, second random write operation: host write amount: 100 GB, target storage device write amount: 210 GB, third random write operation: host write amount: 100 GB, target storage device write amount: 205 GB, fourth random write operation: host write amount: 100 GB, target storage device write amount: 215 GB, fifth random write operation: host write amount: 100 GB, target storage device write amount: 200 GB. From this, we can calculate the write amplification factor for each operation: 1st random write operation: WAF1 = 200 / 100 = 2.0, 2nd random write operation: WAF1 = 210 / 100 = 2.1, 3rd random write operation: WAF1 = 205 / 100 = 2.05, 4th random write operation: WAF1 = 215 / 100 = 2.15, 5th random write operation: WAF1 = 200 / 100 = 2.0. From this, we can determine the target write amplification factor: WAF target = (2.0 + 2.1 + 2.05 + 2.15 + 2.0) / 5 = 2.06.
[0049] Therefore, through multiple random write operations, accidental errors caused by the initial state of the device, interference from the test environment, or other random factors can be reduced. Multiple tests can provide more stable data, making the target write amplification factor more representative and reliable. Therefore, through the target write amplification factor, the wear of the storage device can be more accurately evaluated, thereby predicting its remaining life.
[0050] According to one embodiment of the present application, a test volatility is determined based on the host write amount and the target storage device write amount, including: obtaining a maximum amplification coefficient and a minimum amplification coefficient among multiple write amplification coefficients; determining an amplification coefficient difference based on the maximum amplification coefficient and the minimum amplification coefficient, and determining the test volatility based on the ratio of the amplification coefficient difference to the target write amplification coefficient.
[0051] Specifically, when determining the test volatility based on the host write volume and the target storage device write volume, the maximum and minimum write amplification factors among multiple write amplification factors can be obtained. After obtaining the maximum and minimum write amplification factors, the amplification factor difference can be determined based on the maximum and minimum write amplification factors, and the test volatility can be determined based on the ratio of the amplification factor difference to the target write amplification factor.
[0052] The coefficient of variation (CV) measures the fluctuation in the write amplification factor across multiple tests. It helps assess the stability and repeatability of test results. CV is defined as: CV = (maximum write amplification factor - minimum write amplification factor) / target write amplification factor × 100%.
[0053] For example, assuming the second preset number of times is 5 and the duration of each random write operation is 4 hours, the first random write operation: host write amount: 100 GB, target storage device write amount: 200 GB, second random write operation: host write amount: 100 GB, target storage device write amount: 210 GB, third random write operation: host write amount: 100 GB, target storage device write amount: 205 GB, fourth random write operation: host write amount: 100 GB, target storage device write amount: 215 GB, fifth random write operation: host write amount: 100 GB, target storage device write amount: 200 GB. From this, we can calculate the write amplification factor for each operation: For the first random write operation, WAF1 = 200 / 100 = 2.0; for the second random write operation, WAF1 = 210 / 100 = 2.1; for the third random write operation, WAF1 = 205 / 100 = 2.05; for the fourth random write operation, WAF1 = 215 / 100 = 2.15; and for the fifth random write operation, WAF1 = 200 / 100 = 2.0. Therefore, we can determine the target write amplification factor: WAF target = (2.0 + 2.1 + 2.05 + 2.15 + 2.0) / 5 = 2.06. The maximum amplification factor is 2.15, and the minimum amplification factor is 2.0. The difference in amplification factors is 2.15 - 2.0 = 0.15. Therefore, we can determine the test volatility as 0.15 / 2.06 × 100% ≈ 7.28%.
[0054] Therefore, by calculating the test volatility, we can assess the stability of multiple test results. A lower volatility indicates more stable test results, less susceptible to random factors. Multiple tests can provide more stable data, making the target write amplification factor more representative and reliable. Test volatility can help verify the repeatability of test results. A low volatility indicates that the write amplification factor of the storage device is relatively consistent under different test conditions, and the test results are highly reliable. A higher volatility may indicate certain unstable factors during the test process, such as interference from the test environment or differences in the initial device state. This helps identify and resolve potential issues and improves test accuracy. This can significantly improve the accuracy, stability, and reliability of test results, providing strong support for performance evaluation and lifespan prediction of storage devices.
[0055] According to one embodiment of the present application, a target storage device is evaluated based on a target write amplification factor and a test volatility, including: if the test volatility is less than a preset volatility threshold and the target write amplification factor is less than a preset amplification factor threshold, determining that the wear level and lifespan of the target storage device meet requirements. The preset volatility threshold and the preset amplification factor threshold can be determined based on actual conditions.
[0056] Specifically, when evaluating the target storage device based on the target write amplification coefficient and the test volatility, the relationship between the test volatility and the preset volatility threshold is judged, and the relationship between the target write amplification coefficient and the preset amplification coefficient threshold is judged. When the test volatility is less than the preset volatility threshold and the target write amplification coefficient is less than the preset amplification coefficient threshold, it can be determined that the wear degree and life of the target storage device meet the requirements.
[0057] Complying with requirements means that device performance, lifespan, and reliability meet predetermined standards or specifications. For example, WAF is a metric that measures the amount of additional writes generated by internal operations (such as garbage collection and wear leveling) when writing data to a storage device. If the target WAF is less than a preset amplification factor threshold (e.g., 4.5), the storage device's wear is considered acceptable. This indicates that the device generates less additional writes when writing data, exhibits less wear, and has a longer lifespan. CV is a metric that measures the fluctuation of the write amplification factor across multiple tests and is used to assess the stability and repeatability of test results. If the test fluctuation rate is less than a preset fluctuation threshold (e.g., 20%), the test results are considered highly stable and repeatable. This means that the write amplification factor varies little across multiple tests, resulting in relatively consistent test results. This means that devices that meet the requirements are more reliable in actual use, capable of long-term stable operation, and reduce the risk of data loss or system downtime due to device failure. These devices demonstrate excellent performance and meet the needs of real-world application scenarios.
[0058] For example, set a reasonable volatility threshold, such as 20%. Set a reasonable write amplification factor threshold, such as 4.5. If the test volatility is less than the preset volatility threshold (for example, CV < 0%) and the target write amplification factor is less than the preset amplification factor threshold (for example, WAF < 4.5), the target storage device's wear and lifespan meet the requirements. If these conditions are not met, further analysis of the storage device's health or adjustment of test parameters are required.
[0059] Therefore, using the target write amplification factor and test volatility, we can quantitatively assess the wear and lifespan of storage devices, providing a clear basis for evaluation. This numerically-based evaluation reduces subjective judgment errors and makes the evaluation results more scientific and objective. Furthermore, the target write amplification factor quantifies the wear of storage devices and helps estimate their remaining lifespan, while the test volatility assesses the stability and repeatability of test results, ensuring the reliability of the evaluation results. The evaluation results can be used to determine whether the storage device requires maintenance or replacement, providing a quantitative basis for engineering decisions.
[0060] According to one embodiment of the present application, the life assessment method of a storage device further includes: when the test volatility is greater than a preset volatility threshold, adjusting the test parameters of the target storage device, wherein the test parameters include: at least one of test duration, number of tests, and data write size.
[0061] Specifically, the test volatility is compared with a preset volatility threshold. If the test volatility is greater than the preset volatility threshold, the test parameters of the target storage device may be adjusted. The test parameters may include at least one of a test duration, a number of tests, and a data write size.
[0062] That is, if the test volatility exceeds the preset volatility threshold, test parameters need to be adjusted to reduce volatility and improve the stability of test results. Test parameters include, but are not limited to, the following: test duration (the duration of each test), number of tests (the total number of tests performed), and data write size (the size of the data block used in each write operation). For example, if the test volatility is high, you can try increasing the duration of each test. Longer test durations can reduce random errors caused by device initialization, test environment interference, or other random factors. For example, increasing the duration of each test from 4 hours to 6 hours. Increasing the total number of tests provides more data points, allowing for a more accurate assessment of device performance and stability. More tests can reduce the impact of random errors, such as increasing the number of tests from 5 to 10. Changing the data block size of each write operation can better simulate the I / O patterns found in real-world scenarios. For example, adjusting from 4KB to 8KB or 16KB, or from 1MB to 2MB, such as adjusting the data write size from 4KB to 8KB.
[0063] That is, random write operations are performed using the initial test parameters, and the target write amplification coefficient and test volatility are calculated. If the currently calculated test volatility is greater than the preset volatility threshold (for example, test volatility > 20%), the adjustment phase begins. For example, the duration of each test is increased from 4 hours to 6 hours, the number of tests is increased from 5 to 10, and the data write size is adjusted from 4KB to 8KB. Then, random write operations can be re-executed using the adjusted test parameters. The new target write amplification coefficient test volatility is calculated. If the new test volatility is still greater than the preset volatility threshold, the test parameters can be further adjusted. If the new test volatility is less than the preset volatility threshold, the test results have high stability and repeatability, and the test parameter adjustment can be considered successful.
[0064] Therefore, by increasing the test duration and number of tests, we can reduce accidental errors caused by the device's initial state, test environment interference, or other random factors. More test data points can provide more stable data, making the target write amplification factor more representative and reliable. By adjusting the test duration, number of tests, and data write size, we can optimize the test process and ensure the stability and repeatability of the test results. The adjusted test parameters can provide more accurate evaluation metrics, providing strong support for performance evaluation and life prediction of storage devices. This ensures that the test results for the target storage device are highly stable and repeatable, providing strong support for performance evaluation and life prediction of storage devices.
[0065] In addition, in the first embodiment of the present application, the test volatility is compared with a preset volatility threshold. If the test volatility exceeds the preset volatility threshold, the health of the target storage device can also be checked. This disk health check can help quickly locate problems and avoid unnecessary device repair or replacement. Specifically, checking disk health can quickly diagnose hardware faults. For example, by checking SMART (Self-Monitoring, Analysis and Reporting Technology) logs, hardware faults such as bad blocks and excessive wear can be quickly identified. For example, the number of reallocated sectors can be monitored. A high value may indicate the presence of a hard drive and the wear leveling count. For SSDs, this value can reflect the degree of device wear and drive temperature. Excessive temperatures can affect drive performance and lifespan. Furthermore, the power supply can be checked for stability to avoid power fluctuations and the temperature of the test host can be checked for excessive heat dissipation. This avoids misdiagnosis due to device health issues, ensures the accuracy of test results, and allows for timely detection and resolution of hardware issues, extending the device's lifespan and reducing maintenance costs.
[0066] The following combination Figure 2 To describe the method of this application.
[0067] As a specific example, the storage device lifespan assessment method of the present application may include the following steps: S101, deploying a target operating system and using a test tool with a version number greater than a preset version number, wherein the test tool is used to simulate read and write operations of a target storage device in an actual usage scenario.
[0068] S102: A storage device other than the storage device equipped with the operating system is used as a target storage device.
[0069] S103 , executing a first preset number of sequential write operations based on the test tool, and after completing the sequential write operations, executing a first preset duration of random write operations based on the test tool.
[0070] S104, performing a second preset number of random write operations based on the test tool, and each random write operation lasts for a second preset time, and obtaining the host write amount and the target storage device write amount each time data is written, wherein the second preset time is greater than the first preset time.
[0071] S105 , when the test tool completes the random write operation each time, determining a write amplification factor based on a ratio of a write amount of the target storage device to a write amount of the host.
[0072] S106 : Determine a target write amplification factor based on a second preset number of times and an average value of the plurality of write amplification factors.
[0073] S107 , obtaining a maximum amplification factor and a minimum amplification factor among a plurality of write amplification factors, determining an amplification factor difference based on the maximum amplification factor and the minimum amplification factor, and determining a test volatility based on a ratio of the amplification factor difference to a target write amplification factor.
[0074] S108: Determine whether the test volatility is less than a preset volatility threshold and whether the target write amplification factor is less than a preset amplification factor threshold. If yes, execute step S109; if not, execute step S110.
[0075] S109: Determine whether the wear degree and lifespan of the target storage device meet the requirements.
[0076] S110, determining whether the test volatility is greater than a preset volatility threshold. If yes, proceed to step S111; if not, proceed to step S107.
[0077] S111 , adjusting test parameters of a target storage device, wherein the test parameters include at least one of a test duration, a number of tests, and a data write size.
[0078] In summary, according to the storage device lifespan assessment method of the embodiment of the present application, a target test environment is constructed, and a target storage device is determined. The data write mode of the target storage device is simulated based on sequential write operations and random write operations. After the data write mode of the target storage device is simulated, a random write operation is performed, and the host write amount and the target storage device write amount are obtained for each data write. Based on the host write amount and the target storage device write amount, a target write amplification factor and test volatility are determined, and the target storage device is evaluated based on the target write amplification factor and test volatility. As a result, this method can more comprehensively and accurately reflect the actual lifespan of the storage device.
[0079] Corresponding to the above embodiment, the present application also proposes an electronic device.
[0080] like Figure 3 As shown, the electronic device 200 of an embodiment of the present application may include: a memory 210, a processor 220, and a program stored in the memory 210 and executable on the processor 220. When the processor 220 executes the program, the above-mentioned storage device life assessment method is implemented.
[0081] According to the electronic device of the embodiment of the present application, by executing the above-mentioned storage device life assessment method, the actual life of the storage device can be reflected more comprehensively and accurately.
[0082] It should be noted that the logic and / or steps represented in flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and a portable compact disc read-only memory (CDROM). Furthermore, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing it in another suitable manner if necessary, and then storing it in a computer memory.
[0083] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having logic gate circuits for implementing logic functions on data signals, an application-specific integrated circuit having suitable combinational logic gate circuits, a programmable gate array (PGA), a field-programmable gate array (FPGA), etc.
[0084] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0085] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of such features. Throughout the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically defined.
[0086] In this application, unless otherwise specified or limited, the terms "installed," "connected," "connect," "fixed," etc. should be understood in a broad sense. For example, they can refer to fixed connection, detachable connection, or integration; mechanical connection or electrical connection; direct connection or indirect connection through an intermediate medium; internal communication between two elements or interaction between two elements, unless otherwise specified. Those skilled in the art will understand the specific meanings of the above terms in this application based on specific circumstances.
[0087] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A method for evaluating the life of a storage device, characterized in that: The method comprises: Build the target test environment and determine the target storage device; Simulating a data writing mode of the target storage device based on sequential write operations and random write operations; After simulating the data writing mode of the target storage device, performing a random write operation and obtaining the host write amount and the target storage device write amount during each data writing; Determining a target write amplification factor and a test volatility based on the host write amount and the target storage device write amount; The target storage device is evaluated based on the target write amplification factor and the test volatility.
2. The storage device life assessment method according to claim 1, wherein: The target test environment is constructed, including: Deploy a target operating system and use a test tool with a version number greater than a preset version number, wherein the test tool is used to simulate read and write operations of the target storage device in an actual usage scenario.
3. The method for evaluating the life of a storage device according to claim 1, wherein: The determining of the target storage device includes: A storage device other than the storage device equipped with the operating system is used as the target storage device.
4. The method for evaluating the life of a storage device according to claim 2, wherein: The simulating the data writing mode of the target storage device based on the sequential write operation and the random write operation includes: executing a first preset number of sequential write operations based on the test tool; After the sequential write operation is completed, a random write operation of a first preset duration is performed based on the test tool.
5. The method for evaluating the life of a storage device according to claim 4, wherein: The random write operation includes: A second preset number of random write operations are performed based on the test tool, and each random write operation lasts for a second preset time period, wherein the second preset time period is greater than the first preset time period.
6. The method for evaluating the life of a storage device according to claim 5, wherein: The determining a target write amplification factor based on the host write amount and the target storage device write amount includes: determining a write amplification factor based on a ratio of a write amount of the target storage device to a write amount of the host when the test tool completes the random write operation each time; The target write amplification factor is determined based on the second preset number of times and an average value of the plurality of write amplification factors.
7. The method for evaluating the life of a storage device according to claim 6, wherein: The determining of the test volatility based on the host write amount and the target storage device write amount includes: Obtaining a maximum amplification factor and a minimum amplification factor among the plurality of write amplification factors; An amplification factor difference is determined based on the maximum amplification factor and the minimum amplification factor, and the test volatility is determined based on a ratio of the amplification factor difference to the target write amplification factor.
8. The method for evaluating the life of a storage device according to claim 1, wherein: The evaluating the target storage device based on the target write amplification factor and the test volatility includes: When the test volatility is less than a preset volatility threshold and the target write amplification factor is less than a preset amplification factor threshold, it is determined that the wear degree and life of the target storage device meet the requirements.
9. The method for evaluating the life of a storage device according to claim 8, wherein: The method further comprises: When the test volatility is greater than a preset volatility threshold, the test parameters of the target storage device are adjusted, wherein the test parameters include at least one of test duration, test times, and data write size.
10. An electronic device, characterized in that: include: A memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for evaluating the life of a storage device according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Test method for evaluating total write-in amount of SSD and computer equipment
CN110544503A
IO performance test method for storage device
CN117690470A
Performance test system and performance test method of memory
CN117854569A
Testing method, device and equipment for solid state disk and medium
CN120412693A
Method and program for estimating operation of program
US20120072199A1