Method for evaluating life of storage device and electronic device
By constructing a target test environment to simulate sequential and random write operations of storage devices, calculating the write amplification factor and test volatility, the problem of existing technologies failing to fully consider the impact of complex read and write operations is solved, and accurate assessment of storage device lifespan and stability is achieved.
Patent Information
- Application Number
- CN202511178517.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-08-21
AI Technical Summary
Existing technologies fail to adequately consider the impact of complex read and write operations in real-world usage scenarios when assessing storage device lifespan, especially ignoring the additional write volume caused by internal operations such as garbage collection and wear leveling, resulting in inaccurate and non-repeatable assessment results.
By constructing a target test environment, simulating sequential and random write operations on storage devices, obtaining the write volume of the host and device, calculating the write amplification factor and test volatility, and combining multiple rounds of stress testing, the wear and tear of the storage devices can be quantified.
This allows for a more comprehensive and accurate reflection of the actual lifespan of storage devices, improves the stability and repeatability of assessment results, and provides a reliable basis for lifespan assessment.
Smart Images

Figure CN120670189B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of storage devices, and particularly relates to a life evaluation method of a storage device and an electronic device. BACKGROUND
[0002] At present, in the field of storage devices, especially in the application of system disks such as solid state disks (SSD, Solid State Drive), life evaluation is a key link to ensure data storage reliability and system stability. The traditional life evaluation method of storage devices mainly depends on total write byte number or endurance level and other indicators, but these methods often fail to fully consider the influence of complex read-write operations in actual use scenarios and the additional write amount generated by internal operations (such as garbage collection, wear leveling, etc.) of the storage device when writing data, thereby accelerating the wear of NAND (NAND Flash Memory, non-volatile storage technology) flash memory and shortening the life of the storage device. Therefore, the above problems will lead to the inability to comprehensively and accurately reflect the actual life of the storage device. SUMMARY
[0003] The present application provides a life evaluation method of a storage device and an electronic device to at least solve the problem that the related art fails to fully consider the influence of complex read-write operations in actual use scenarios and the additional write amount generated by internal operations (such as garbage collection, wear leveling, etc.) of the storage device when writing data, and can more comprehensively and accurately reflect the actual life of the storage device.
[0004] The present application provides a life evaluation method of a storage device, comprising:
[0005] constructing a target test environment and determining a target storage device;
[0006] simulating a data writing mode of the target storage device based on sequential write operations and random write operations;
[0007] after simulating the data writing mode of the target storage device, performing random write operations and obtaining a host write amount and a target storage device write amount at each data writing;
[0008] determining a target write amplification factor and a test fluctuation rate based on the host write amount and the target storage device write amount;
[0009] evaluating the target storage device based on the target write amplification factor and the test fluctuation rate.
[0010] 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, wherein the processor executes the program to implement the life evaluation method of the storage device.
[0011] By the present application, the target test environment is constructed, and the target storage device is determined. The data writing mode of the target storage device is simulated based on the sequential write operation and the random write operation. After the data writing mode of the target storage device is simulated, the random write operation is performed, and the host write amount and the target storage device write amount at each data write are obtained. The target write amplification factor and the test fluctuation rate are determined 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 fluctuation rate. Thus, the method can more comprehensively and accurately reflect the actual life of the storage device. BRIEF DESCRIPTION OF DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0013] Figure 1 The flowchart of the life evaluation method of the storage device according to the embodiments of the present application;
[0014] Figure 2 The flowchart of the life evaluation method of the storage device according to one specific example of the present application;
[0015] Figure 3 The block schematic diagram of the electronic device according to the embodiments of the present application.
[0016] Reference signs: 200-electronic device, 210-memory, 220-processor. DETAILED DESCRIPTION
[0017] The embodiments of the present application will be described in detail below, and examples of the embodiments are shown in the drawings, wherein the same or similar reference signs represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and are intended to explain the present application, and cannot be understood as a limitation of the present application.
[0018] Currently, in the related art, there are some methods for evaluating the life of storage devices, but these methods mostly have limitations and cannot comprehensively and accurately reflect the actual life of storage devices. For example, in the evaluation method according to the total number of written bytes, the life of the storage device is evaluated by counting the total number of written bytes that the storage device can withstand throughout its life cycle. However, this method does not take into account the write amplification effect and the influence of complex input / output in actual use scenarios, so the evaluation result may not be accurate. In computer and storage systems, input / output refers to the way and characteristics of data transmission between devices, including the type, size, frequency, order, etc. of data read and write operations. Common input / output includes sequential read / write, random read / write, etc.
[0019] For another example, in the evaluation method according to the durability level, the life of the storage device is evaluated according to its durability level, which is usually related to the NAND flash type and manufacturing process of the storage device. However, this method also does not take into account the write amplification effect and the influence of complex input / output patterns in actual use scenarios, and the durability level is usually a relatively fixed value, which cannot reflect the life changes of the storage device in actual use. For another example, in the evaluation method according to the single write amplification test, the life of the storage device is evaluated by a single write amplification test, but this method has accidental errors and cannot comprehensively reflect the life 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 use scenarios.
[0020] In summary, traditional methods rely on a single indicator, mainly relying on the total number of written bytes or the durability level to evaluate the life of the storage device. These indicators fail to fully consider the nonlinear impact of complex input / output patterns in actual use scenarios on the life of NAND flash, resulting in inaccurate evaluation results. And ignoring the write amplification effect, which is one of the core factors leading to premature failure of SSD, it reflects the additional write amount generated by internal operations (such as garbage collection, wear leveling, etc.) when writing data. However, existing technologies often ignore this effect and cannot quantify the actual wear of the storage device. In addition, the test results are not repeatable, which may be due to differences in initial state of the device, non-standard test process or accidental errors, etc., resulting in non-reproducible test results. This reduces the credibility of the test results, making it difficult to use the evaluation results as a basis for engineering decisions. The lack of standardized test procedures makes it difficult to compare the results of different tests directly, reducing the practical value of the test.
[0021] To this end, the application provides a storage device life evaluation method, which comprehensively considers the influence of complex input / output modes in actual use scenarios on the life of the storage device by combining multiple rounds of pressure testing and dynamic WAF (Write Amplification Factor) analysis. At the same time, the accidental errors are eliminated through multiple rounds of testing, and the accuracy of the evaluation result is improved.
[0022] The storage device life evaluation method and the electronic device according to the embodiments of the application are described below with reference to the accompanying drawings.
[0023] Figure 1 The flowchart of the storage device life evaluation method according to the embodiments of the application.
[0024] As Figure 1 shown, the storage device life evaluation method according to the embodiments of the application can include the following steps:
[0025] S1, constructing a target test environment and determining a target storage device.
[0026] S2, simulating the data writing mode of the target storage device based on sequential writing operations and random writing operations.
[0027] S3, after the simulation of the data writing mode of the target storage device is completed, performing random writing operations and obtaining the host writing amount and the target storage device writing amount at each data writing.
[0028] S4, determining the target write amplification factor and the test fluctuation rate based on the host writing amount and the target storage device writing amount.
[0029] S5, evaluating the target storage device based on the target write amplification factor and the test fluctuation rate.
[0030] Specifically, first, a target test environment is constructed. In the target test environment, a stable test host can be selected to ensure that the CPU (Central Processing Unit), memory, and I / O (Input / Output) interface of the host can meet the test requirements, and an operating system suitable for storage device testing, such as a Linux operating system, can be installed, and a test tool, such as FIO (Flexible I / O Tester), can be installed and configured to generate standardized I / O loads, and a monitoring tool, such as smartmontools, can be installed to monitor the health status and performance indicators of the storage device in real time. And determine the target storage device, the target storage device is the storage device selected for testing in the testing or evaluation process, it is the main object of testing, distinguished from other devices (such as system disks) in the test environment, can be a solid state disk (SSD), NVMe device, etc., and the appropriate storage device can be selected according to the specific requirements of the test. For example, if the test target is to evaluate the performance of the device under high I / O load, a high-performance SSD or NVMe device can be selected.
[0031] Then the data writing mode of the target storage device can be simulated according to the sequential write operation and the random write operation. For example, by running the test tool, the target storage device is executed sequentially. The purpose of this step is to eliminate the initial state difference of the storage device, such as the existence of free blocks and the influence of garbage collection strategy. And run the test tool, the target storage device is executed randomly. The purpose of this step is to establish a steady-state wear environment, so that the storage device reaches a wear balance state.
[0032] After the data write mode of the target storage device is simulated, the random write operation can be performed again, and the host write amount and the target storage device write amount at each data write can be obtained. That is, after the first random write operation, the storage device can have reached a steady-state wear environment. The random write operation can be performed again based on the test tool, so that the performance and wear of the device in this steady state can be further verified, and it is ensured that the device still maintains stable performance after a long time of operation. That is, the main purpose of the last random write operation is to simulate the complex I / O mode in the actual use scenario and establish a steady-state wear environment. The main purpose of this random write operation is to verify the performance and stability of the device in the steady-state wear environment, reduce accidental errors, and provide more reliable evaluation results. After each random write operation is completed, the host write amount (the amount of write data sent by the host to the storage device) and the target storage device write amount (the amount of data actually written by the storage device, including the amount of data written by the host and the additional write amount due to internal operations) can be obtained through the test tool or the monitoring tool (such as smartctl). Thus, the host write amount and the target storage device write amount are obtained, which provides data support for subsequent write amplification factor and test fluctuation rate calculation.
[0033] After the host write amount and the target storage device are determined, the target write amplification factor and the test fluctuation rate can be determined according to the host write amount and the target storage device write amount. The target write amplification factor is an index for measuring the additional write amount generated by the storage device due to internal operations (such as garbage collection, wear leveling, etc.) when writing data, which reflects the actual wear of the storage device when writing data. The test fluctuation rate is an index for measuring the fluctuation degree of the write amplification factor in multiple tests, which is used to evaluate the stability and repeatability of the test results. For example, the target write amplification factor and the test fluctuation rate can be determined through a predetermined correspondence, for example, a first relationship between the host write amount and the target storage device write amount and the target write amplification factor is predetermined, and a second relationship between the host write amount and the target storage device write amount and the test fluctuation rate is determined. After the host write amount and the target storage device write amount are determined, the first relationship and the second relationship are directly called to obtain the target write amplification factor and the test fluctuation rate. That is, by calculating the target write amplification factor and the test fluctuation rate, the wear of the storage device and the stability of the test results can be quantitatively evaluated.
[0034] After determining the target write amplification coefficient and the test fluctuation rate, the target storage device can be evaluated based on the target write amplification coefficient and the test fluctuation rate. For example, a performance model can be constructed, taking the target write amplification coefficient and the test fluctuation rate as input parameters, combined with other performance indicators (such as delay, bandwidth, etc.), to evaluate the overall performance of the storage device. For another example, the target write amplification coefficient and the test fluctuation rate of the current test are compared with the historical data of the device to evaluate the trend of the device performance. For another example, the target write amplification coefficient and the test fluctuation rate are compared with industry standards or best practices to evaluate whether the device meets the industry average level. Different target write amplification coefficient and test fluctuation rate thresholds can also be set according to 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 determined to be normal only when the corresponding requirement thresholds are met.
[0035] Thus, the actual life of the storage device can be more comprehensively and accurately reflected.
[0036] According to an embodiment of the present application, the target test environment is constructed, including: deploying a target operating system and a test tool with a version number greater than a preset version number, wherein the test tool is used to simulate the read-write operation of the target storage device in the actual use scenario. The preset version number can be determined according to actual conditions.
[0037] Specifically, when constructing the target test environment, the target operating system and the test tool with a version number greater than the preset version number need to be deployed. The operating system is the basis of the test environment, which not only provides the running environment required for testing, but also affects the underlying I / O scheduling strategy, thereby affecting the accuracy and repeatability of the test results. For example, in order to meet the needs of a specific cloud environment, an Aliyun customized operating system can be deployed, i.e., an operating system optimized for specific cloud environment needs, which provides additional security features and stability optimizations, is suitable for data centers and cloud computing environments, and optimizes the underlying I / O scheduling to better support high-performance storage devices such as solid state drives (SSDs). In addition, according to the test requirements, a suitable version of the Aliyun customized operating system can be selected. Alibaba Cloud provides multiple versions of operating systems, such as: Alibaba Cloud Linux 2: based on CentOS 7, suitable for scenarios that require long-term support and stability, Alibaba Cloud Linux 3: based on CentOS 8, providing more new features and performance optimizations, Alibaba Cloud Linux 4: independent evolution, providing the latest kernel and security features. The target operating system can be installed on the test host, such as through an ISO image file or using an automated deployment tool.
[0038] The test tool is used to simulate the read and write operations of the target storage device in actual use scenarios, so it is crucial to choose the appropriate test tool and ensure that its version number is greater than the preset version number. The test tool should be able to simulate various I / O modes, including sequential read and write, random read and write, etc., to comprehensively evaluate the performance and lifespan of the storage device. And ensure that the version number of the test tool is greater than the preset version number, the test tool of high version contains more functions and improvements, can more accurately simulate the actual use scene. For example, the test tool can be FIO, which supports multiple I / O modes and parameter configurations, can generate standardized I / O load, and the preset version number can be set to 3.13, so the version number should be 3.13 or above. Therefore, the FIO configuration file (such as test.FIO) can be written to specify the I / O mode, block size, queue depth, and other parameters of the test. In addition, hdparm (a command-line tool) can be used to view hard disk parameters, test hard disk performance, and control hard disk cache, etc.
[0039] Therefore, through the above steps, a standardized target test environment can be built to ensure the accuracy and repeatability of the test results, thereby providing a reliable basis for the performance and lifespan evaluation of the storage device.
[0040] According to an embodiment of the present application, determining the target storage device comprises: taking the storage device other than the storage device equipped with the operating system as the target storage device.
[0041] Specifically, when determining the target storage device, the storage device other than the storage device equipped with the operating system can be taken as the target storage device. That is, the storage device other than the storage device equipped with the operating system is taken as the target storage device, for example, all available storage devices are first identified, for example, this can be done through system management tools or hardware detection tools. The system disk is a storage device that installs an operating system, and other storage devices that do not install an operating system can be used as target storage devices. That is, the system disk is a storage device that installs an operating system, and is usually used to start and run the operating system. It may contain important system files and data, so it is not suitable for testing, and other storage devices that do not install an operating system are selected as target storage devices. These devices can be additional hard disks, solid state disks or NVMe devices. For example, among the obtained storage devices, determine which one is the system based on whether it is mounted on the root directory, after determining the system disk, exclude the system disk, and select other storage devices that are not mounted as target storage devices.
[0042] In addition, after determining the target storage device, the type of the target storage device can be confirmed, and the health status of the target storage device can be checked to ensure that the device is not faulty. Moreover, if the target storage device is not formatted, it can also be formatted into a suitable file system, and the formatting can clear the old data on the device and create a clean environment for testing. In addition, the target storage device can also be mounted to a temporary directory for testing, and the mounting operation can connect the file system of the storage device with the file system of the operating system, so that it can be accessed and used.
[0043] In this way, the target storage device is separated from the system disk, which can ensure that the test does not interfere with the normal operation of the operating system and is not affected by the performance of the system disk, i.e., independent storage devices can provide more accurate test results because they are not disturbed by factors such as the cache and scheduling strategy of the system disk. It can be ensured that the selection and preparation of the target storage device meet the testing requirements, thereby providing a reliable test environment for the performance and life evaluation of the storage device.
[0044] According to an embodiment of the present application, the data writing mode of the target storage device is simulated based on sequential write operations and random write operations, including: performing a first preset number of sequential write operations based on the test tool; after the sequential write operations are completed, performing a first preset time length of random write operations based on the test tool. Wherein, the first preset number and the first preset time length can be determined according to actual conditions.
[0045] Specifically, when simulating the data writing mode of the target storage device according to sequential write operations and random write operations, a first preset number of sequential write operations can be performed based on the test tool first. That is, the sequential write operation refers to writing in the order of the physical address of the storage device, which is usually used to simulate the writing scene of large files, such as video files, database backups, etc. A test tool that supports sequential write operations (such as FIO) can be used, and the following parameters can be specified: such as block size: the data block size of each write, usually a larger value (such as 128KB or 1MB). Write times: the number of sequential write operations, i.e., the first preset number (such as 3 times), write range: specify the range of write operations, usually the entire storage device. After starting the test tool, perform the sequential write operation according to the configuration. The test tool will write data to the target storage device in turn according to the specified block size and number. In this way, the sequential write operation can simulate the writing scene of large files, such as video files, database backups, etc. This method helps to evaluate the performance of the storage device when handling large blocks of data, and through the sequential write operation, 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, the sequential write operation can eliminate the initial state differences of the storage device, such as the existence of free blocks and the influence of the garbage collection strategy.
[0046] After the sequential write operation is completed, the test tool can be configured to perform a random write operation for a first predetermined duration. A random write operation refers to writing data to random locations on the storage device. This approach is typically used to simulate data write scenarios in a multi-user or multi-task environment, such as database transactions, file system fragmentation, etc. After the sequential write operation is completed, the test tool can be configured to perform a random write operation. The following parameters can be specified: block size, the size of the data block written each time, typically a small value (e.g., 4KB). Write duration: the duration of the random write operation, i.e., the first predetermined duration (e.g., 1 hour). Write range: specifies the range of the write operation, typically the entire storage device. After starting the test tool, the random write operation is performed according to the configuration. The test tool will randomly select locations on the storage device to write data within the specified duration. Random write operation can simulate data write scenarios in a multi-user or multi-task environment, such as database transactions, file system fragmentation, etc. This approach helps to evaluate the performance of the storage device under complex I / O mode. And through random write operation, the random write delay of the storage device can be measured, which is very important for evaluating the performance of the storage device when handling small blocks of data. In addition, random write operation can help establish a steady-state wear environment, so that the storage device reaches a wear-balanced state, thus more accurately evaluating its lifespan.
[0047] Thus, the sequential write operation can eliminate the initial state difference of the storage device, and the random write operation can help establish a steady-state wear environment, so that the storage device reaches a wear-balanced state. This helps to more accurately evaluate the lifespan of the storage device. The combination of sequential write operation and random write operation can simulate various I / O modes in actual use scenarios, such as large file writing and data writing in a multi-user environment. Through the combination of sequential write operation and random write operation, the data writing method of the target storage device in actual use scenarios can be simulated comprehensively.
[0048] According to an embodiment of the present application, the random write operation is performed, including: based on the test tool, performing a second predetermined number of random write operations, and continuing for a second predetermined duration at each random write operation, wherein the second predetermined duration is greater than the first predetermined duration. The second predetermined number can be determined according to actual conditions.
[0049] Specifically, when performing a random write operation, a second preset number of random write operations can be executed based on a test tool, and each random write operation lasts for a second preset duration. That is, a test tool that supports random write operations is first selected, such as FIO, which can simulate various complex I / O modes, including random write operations. The random write operation is configured, the second preset number: determines the number of executions of the random write operation. 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 operation. For example, each round of random write operation lasts for 4 hours. Block size: set the data block size of each write, usually a small value (such as 4KB) to simulate small block data writing in actual use scenarios. Write range: specifies the range of the write operation, usually the entire storage device.
[0050] According to the configuration of the random write operation, after starting the test tool, the random write operation is executed according to the configuration. The test tool randomly selects a location on the storage device for the write operation within the specified duration of each round. After each round of operation is completed, relevant parameters (such as host write amount, NAND write amount, etc.) are recorded for subsequent write amplification factor calculation.
[0051] That is, the random write operation can simulate data writing scenarios in a multi-user or multi-task environment, such as database transactions, file system fragmentation, etc. This approach helps to evaluate the performance of the storage device under complex I / O modes. Through random write operations, the random write delay of the storage device can be measured, which is very important for evaluating the performance of the storage device when handling small block data. In addition, the second preset duration is greater than the first preset duration, meaning that the duration of each round of random write operation is longer, which can more comprehensively simulate long-time random write load in actual use scenarios, thereby more accurately evaluating the performance and lifespan of the storage device under long-time high load, reducing accidental errors in test results, and making test results more stable and repeatable.
[0052] Therefore, by performing multiple rounds of random write operations and with a longer duration for each round of operation, the impact of these accidental errors can be reduced, and multiple random write operations can provide more data points, thereby more accurately quantifying performance indicators of the storage device, such as write speed, delay, input / output operations per second, etc., making the test results more stable and reliable, and more closely resembling long-time high load scenarios in actual use scenarios, ensuring that the test environment of the target storage device can fully simulate actual use scenarios, thereby providing a reliable basis for performance and lifespan evaluation of the storage device.
[0053] According to one embodiment of the present application, determining the target write amplification factor based on the host write amount and the target storage device write amount comprises: determining the write amplification factor based on the ratio of the target storage device write amount to the host write amount in each time the test tool completes a random write operation; and determining the target write amplification factor based on the average of the second preset number of write amplification factors.
[0054] Specifically, when determining the target write amplification factor based on the host write amount and the target storage device write amount, the write amplification factor can be determined based on the ratio of the target storage device write amount to the host write amount in each time the test tool completes a random write operation. That is, the write amplification factor (WAF) is an index for measuring the additional write amount generated by the internal operation (such as garbage collection, wear leveling, etc.) of the storage device when writing data. The target storage device write amount is divided by the host write amount to determine the write amplification factor, wherein the host write amount is the amount of write data sent by the host to the storage device, and the target storage device write amount is the amount of data actually written by the storage device, including the amount of data written by the host and the additional write amount generated due to internal operation.
[0055] After determining the plurality of write amplification times, the target write amplification factor can be determined based on the average of the second preset number of write amplification factors. That is, the 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 a second preset time length. For example, assuming that the second preset number is 5 times, and each random write operation lasts for 4 hours. After each random write operation is completed, the host write amount and the target storage device write amount are obtained through the test tool or the monitoring tool (such as smartctl) of the storage device. For each random write operation, the corresponding write amplification factor is calculated, and then based on the average of the second preset number of write amplification factors, the target write amplification factor can be determined.
[0056] For example, assuming that the second preset number of times is 5 times, 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, the second random write operation: host write amount: 100 GB, target storage device write amount: 210 GB, the third random write operation: host write amount: 100 GB, target storage device write amount: 205 GB, the fourth random write operation: host write amount: 100 GB, target storage device write amount: 215 GB, and the fifth random write operation: host write amount: 100 GB, target storage device write amount: 200 GB. Thus, the write amplification factor of each operation can be calculated, the first random write operation: WAF1=200 / 100=2.0, the second random write operation: WAF1=210 / 100=2.1, the third random write operation: WAF1=205 / 100=2.05, the fourth random write operation: WAF1=215 / 100=2.15, and the fifth random write operation: WAF1=200 / 100=2.0. Thus, the target write amplification factor can be determined: WAFtarget=(2.0+2.1+2.05+2.15+2.0) / 5=2.06.
[0057] Thus, through multiple random write operations, accidental errors caused by device initial state, test environment interference or other random factors can be reduced, and multiple tests can provide more stable data, so that the target write amplification factor is more representative and reliable, so that the wear condition of the storage device can be more accurately evaluated through the target write amplification factor, and the remaining life thereof can be predicted.
[0058] According to an embodiment of the present application, the test fluctuation rate is determined based on the host write amount and the target storage device write amount, including: obtaining a maximum amplification factor and a minimum amplification factor in the plurality of write amplification factors; determining an amplification factor difference value based on the maximum amplification factor and the minimum amplification factor, and determining the test fluctuation rate based on the ratio of the amplification factor difference value and the target write amplification factor.
[0059] Specifically, when the test fluctuation rate is determined based on the host write amount and the target storage device write amount, a maximum amplification factor and a minimum amplification factor in the plurality of write amplification factors can be obtained. After the maximum amplification factor and the minimum amplification factor are obtained, an amplification factor difference value can be determined based on the maximum amplification factor and the minimum amplification factor, and the test fluctuation rate can be determined based on the ratio of the amplification factor difference value and the target write amplification factor.
[0060] The test coefficient of variation (CV) is an indicator for measuring the fluctuation degree of the write amplification factor in multiple tests. It can help evaluate the stability and repeatability of the test results. The definition of the test coefficient of variation is: test coefficient of variation = (maximum write amplification factor - minimum write amplification factor) / target write amplification factor x 100%.
[0061] For example, assuming that the second preset number of times is 5 times, 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, the second random write operation: host write amount: 100 GB, target storage device write amount: 210 GB, the third random write operation: host write amount: 100 GB, target storage device write amount: 205 GB, the fourth random write operation: host write amount: 100 GB, target storage device write amount: 215 GB, the fifth random write operation: host write amount: 100 GB, target storage device write amount: 200 GB. Thus, the write amplification factor of each operation can be calculated, the first random write operation: WAF1 = 200 / 100 = 2.0, the second random write operation: WAF1 = 210 / 100 = 2.1, the third random write operation: WAF1 = 205 / 100 = 2.05, the fourth random write operation: WAF1 = 215 / 100 = 2.15, the fifth random write operation: WAF1 = 200 / 100 = 2.0. Thus, the target write amplification factor can be determined: WAFtarget = (2.0 + 2.1 + 2.05 + 2.15 + 2.0) / 5 = 2.06. The maximum amplification factor is determined to be 2.15, and the minimum amplification factor is determined to be 2.0, and the amplification factor difference = 2.15 - 2.0 = 0.15. Thus, the test coefficient of variation = 0.15 / 2.06 x 100% ≈ 7.28%.
[0062] Thus, by calculating the test coefficient of variation, the stability of multiple test results can be evaluated. A lower coefficient of variation indicates that the test results are more stable and less affected by accidental factors, and multiple tests can provide more stable data, making the target write amplification factor more representative and reliable. The test coefficient of variation can help verify the repeatability of the test results. If the coefficient of variation is low, it means that the write amplification factor of the storage device is relatively consistent under different test conditions, and the test results have high credibility. A higher coefficient of variation may indicate that there are some unstable factors in the test process, such as interference from the test environment, differences in the initial state of the device, etc. This helps to find and solve potential problems, and improves the accuracy of the test. Thus, the accuracy, stability and reliability of the test results can be significantly improved, providing strong support for performance evaluation and life prediction of storage devices.
[0063] According to one embodiment of the present application, the target storage device is evaluated based on the target write amplification factor and the test fluctuation rate, including: in the case that the test fluctuation rate is less than a preset fluctuation rate threshold and the target write amplification factor is less than a preset amplification factor threshold, determining that the wear level and the life of the target storage device meet the requirements. Wherein, the preset fluctuation rate threshold and the preset amplification factor threshold can be determined according to actual conditions.
[0064] Specifically, when evaluating the target storage device based on the target write amplification factor and the test fluctuation rate, the size relationship between the test fluctuation rate and the preset fluctuation rate threshold is determined, and the size relationship between the target write amplification factor and the preset amplification factor threshold is determined. In the case that the test fluctuation rate is less than the preset fluctuation rate threshold and the target write amplification factor is less than the preset amplification factor threshold, it can be determined that the wear level and the life of the target storage device meet the requirements.
[0065] Wherein, meeting the requirements means that the performance, life and reliability of the device meet the predetermined standards or specifications. For example, WAF is an index for measuring the additional write amount of a storage device when writing data due to internal operations such as garbage collection, wear leveling, etc. If the target WAF is less than the preset amplification factor threshold (for example, 4.5), it is considered that the wear level of the storage device is within an acceptable range. This means that the device generates less additional write amount when writing data, and the wear is lighter, and the device life is longer. CV is an index for measuring the fluctuation degree of write amplification factor in multiple tests, which is used to evaluate the stability and repeatability of test results. If the test fluctuation rate is less than the preset fluctuation rate threshold (for example, 20%), it is considered that the test results have high stability and repeatability. This means that the change of write amplification factor is small in multiple tests, and the test results are consistent. That is, the device that meets the requirements is more reliable in actual use, can run stably for a long time, reduces the risk of data loss or system downtime caused by device failure, and the device that meets the requirements performs well in performance and can meet the needs of actual application scenarios.
[0066] For example, set a reasonable fluctuation rate threshold, for example, 20%. Set a reasonable write amplification factor threshold, for example, 4.5. If the test fluctuation rate is less than the preset fluctuation rate threshold (for example, CV<0%), and the target write amplification factor is less than the preset amplification factor threshold (for example, WAF<4.5), it is determined that the wear level and the life of the target storage device meet the requirements. If the above conditions are not met, further analysis of the health status of the storage device or adjustment of the test parameters is required.
[0067] Therefore, by the target write amplification factor and the test volatility, the wear level and the life of the storage device can be quantitatively evaluated, providing clear evaluation basis, evaluating based on numerical indicators, reducing the error of subjective judgment, making the evaluation result more scientific and objective. Moreover, the target write amplification factor can quantify the wear of the storage device, helping to evaluate its remaining life, and the test volatility can evaluate the stability and repeatability of the test results, ensuring the reliability of the evaluation results. Through the evaluation results, it can be determined whether the storage device needs to be maintained or replaced, providing quantitative basis for engineering decision-making.
[0068] According to one embodiment of the present application, the life evaluation method of the storage device further comprises: adjusting the test parameters of the target storage device when the test volatility is greater than the preset volatility threshold, wherein the test parameters include at least one of the test duration, the test times and the data write size.
[0069] Specifically, the size relationship between the test volatility and the preset volatility threshold is compared, and the test parameters of the target storage device are adjusted when the test volatility is greater than the preset volatility threshold. Among them, the test parameters can include at least one of the test duration, the test times and the data write size.
[0070] That is, when the test volatility is greater than the preset volatility threshold, the test parameters need to be adjusted to reduce the volatility and improve the stability of the test results. The test parameters include but are not limited to the following: test duration: the duration of each test, test times: the total number of tests, data write size: the data block size of each write operation. For example, if the test volatility is large, the duration of each test can be increased. Longer test duration can reduce accidental errors caused by device initial state, test environment interference or other random factors. For example, increase the duration of each test from 4 hours to 6 hours. Increasing the total number of tests can provide more data points, thereby more accurately evaluating the performance and stability of the device. More test times can reduce the influence of accidental errors, such as increasing the test times from 5 to 10. Changing the data block size of each write operation can better simulate the I / O mode in the actual use scenario. For example, from 4KB to 8KB or 16KB, or from 1MB to 2MB, such as adjusting the data write size from 4KB to 8KB.
[0071] If the initial test parameters are used to perform random write operations, and the target write amplification factor and test fluctuation rate are calculated. If the current calculated test fluctuation rate is greater than the preset fluctuation rate threshold (for example, test fluctuation rate > 20%), enter the adjustment stage. For example, increase the duration of each test from 4 hours to 6 hours, increase the number of tests from 5 to 10, and adjust the data write size from 4KB to 8KB. Then, the random write operation can be re-executed using the adjusted test parameters. Calculate the new target write amplification factor test fluctuation rate. If the new test fluctuation rate is still greater than the preset fluctuation rate threshold, the test parameters can be further adjusted, and if the new test fluctuation rate is less than the preset fluctuation rate threshold, the test result has higher stability and repeatability, and the test parameter adjustment can be considered successful.
[0072] Thus, by increasing the test duration and the number of tests, accidental errors caused by the initial state of the device, test environment interference or other random factors can be reduced, and more test data points can provide more stable data, making the target write amplification factor more representative and reliable. By adjusting the test duration, test frequency and data write size, the test process can be optimized to ensure the stability and repeatability of the test results, so that the adjusted test parameters can provide more accurate evaluation indicators to provide strong support for performance evaluation and life prediction of storage devices. Thus, the test results of the target storage device have high stability and repeatability, which provides strong support for performance evaluation and life prediction of storage devices.
[0073] In addition, in the first embodiment of the present application, the size relationship between the test fluctuation rate and the preset fluctuation rate threshold is compared, and the health of the target storage device is also detected when the test fluctuation rate is greater than the preset fluctuation rate threshold. That is, the disk health check can help quickly locate the problem and avoid unnecessary maintenance or replacement of the device. Specifically, checking the disk health can quickly diagnose hardware failures, such as checking the SMART (Self-Monitoring, Analysis and Reporting Technology) log to quickly find hardware failures such as bad blocks and excessive wear. For example, pay attention to the number of reallocated sectors. If this value is high, it may indicate that the hard disk is worn out, and the wear leveling count. For SSDs, this value can reflect the wear level of the device, and the hard disk temperature, and high temperature can affect the performance and life of the hard disk. And, check if the power supply is stable to avoid power fluctuations, check if the temperature of the test host is too high to ensure good heat dissipation. Thus, avoid misjudgment caused by device health problems, ensure the accuracy of the test results, and can timely find and handle hardware problems, can prolong the service life of the device, and reduce maintenance costs.
[0074] The following will be described in combination withFigure 2 The method of the present application will be described.
[0075] As a specific example, the life evaluation method of the storage device of the present application can include the following steps:
[0076] S101, deploying a target operating system and a test tool with a version number greater than a preset version number, wherein the test tool is used to simulate the read and write operations of the target storage device in the actual use scenario.
[0077] S102, taking the storage device equipped with the operating system as the target storage device.
[0078] S103, performing a first preset number of sequential write operations based on the test tool, and after the sequential write operations are completed, performing a first preset duration of random write operations based on the test tool.
[0079] S104, performing a second preset number of random write operations based on the test tool, and continuously for a second preset duration each time the random write operation is performed, and obtaining the host write amount and the target storage device write amount each time the data is written, wherein the second preset duration is greater than the first preset duration.
[0080] S105, determining the write amplification factor based on the ratio of the target storage device write amount to the host write amount each time the test tool completes the random write operation.
[0081] S106, determining the target write amplification factor based on the second preset number and the average of the plurality of write amplification factors.
[0082] S107, obtaining the maximum amplification factor and the minimum amplification factor in the plurality of write amplification factors, and determining the amplification factor difference based on the maximum amplification factor and the minimum amplification factor, and determining the test fluctuation rate based on the ratio of the amplification factor difference to the target write amplification factor.
[0083] S108, determining whether the test fluctuation rate is less than a preset fluctuation rate threshold and whether the target write amplification factor is less than a preset amplification factor threshold. If yes, step S109 is performed; if no, step S110 is performed.
[0084] S109, determining that the wear degree and the life of the target storage device meet the requirements.
[0085] S110, determining whether the test fluctuation rate is greater than the preset fluctuation rate threshold. If yes, step S111 is performed; if no, step S107 is performed.
[0086] S111, adjusting the test parameters of the target storage device, wherein the test parameters include at least one of the test duration, the test number, and the data write size.
[0087] To sum up, according to the life evaluation method of the storage device provided in the embodiments of the present application, a target test environment is constructed, and a target storage device is determined. The data writing mode of the target storage device is simulated based on sequential writing operation and random writing operation. After the simulation of the data writing mode of the target storage device is completed, random writing operation is performed, and the host writing amount and the target storage device writing amount at each data writing are obtained. The target write amplification factor and the test fluctuation rate are determined based on the host writing amount and the target storage device writing amount. The target storage device is evaluated based on the target write amplification factor and the test fluctuation rate. Thus, the method can more comprehensively and accurately reflect the actual life of the storage device.
[0088] Corresponding to the above embodiments, the present application also provides an electronic device.
[0089] As shown in Figure 3 the electronic device 200 provided in the embodiments of the present application can include a memory 210, a processor 220, and a program stored on the memory 210 and executable on the processor 220. When the processor 220 executes the program, the life evaluation method of the storage device described above is implemented.
[0090] According to the electronic device provided in the embodiments of the present application, by executing the life evaluation method of the storage device described above, the actual life of the storage device can be more comprehensively and accurately reflected.
[0091] It is to be appreciated that the above description and the examples that follow are intended to be illustrative only and that changes can be made to the description, either functionally or chronologically, as well as changes being made concerning the order of implementation. The logic and / or steps represented in the flow diagrams and / or described herein can be considered as a sequence of executable instructions, and can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable medium can be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system (or apparatus) or a propagation medium. More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection (electronic) having one or more wires, a portable computer diskette (magnetic), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber (optical), and a portable compact disc read-only memory (CDROM). Note that the computer-readable medium can even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, for example via the optical scanner of a device or device or via an intermediary, such as a facility bureau, then compiled, interpreted, or otherwise processed in a suitable manner, if necessary, and then stored in a computer storage medium.
[0092] It is to be understood that the various parts of the present application can be implemented in hardware, software, firmware or a combination thereof. In the above embodiments, various steps or methods can be implemented in software or firmware that is stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, implementation can be with any or a combination of the following technologies, which are all well-known in the art: a discrete logic circuit(s) having logic gates for implementing logic functions upon an application of data signals, an application specific integrated circuit having appropriate combinational logic gates, a programmable gate array(s) (PGA), a field programmable gate array (FPGA), etc.
[0093] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific feature, structure, material or characteristic being described in connection with the embodiment or example is included in at least one embodiment or example of the present application. Descriptive terms of the above terms do not necessarily refer to the same embodiment or example in the present specification. Also, the specific feature, structure, material or characteristic being described can be combined in any one or more embodiments or examples in an appropriate manner.
[0094] In addition, the terms "first", "second", etc. are used only for the purpose of description, and should not be understood as indicating or implying relative importance or implying a number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "a plurality of" is at least two, for example, two, three, etc., unless otherwise explicitly and specifically limited.
[0095] In the present application, unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connecting", "fixing" and the like should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or it can be integrated; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium; it can be the internal communication of two elements or the interaction relationship between two elements, unless otherwise explicitly limited. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0096] 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 limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above embodiments within the scope of the present application.
Claims
1. A method of evaluating the lifetime of a storage device, characterized by, The method comprises: constructing a target test environment and determining a 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 is completed, performing random write operations and obtaining a host write amount and a target storage device write amount at each data writing; determining a target write amplification factor and a test fluctuation rate based on the host write amount and the target storage device write amount; evaluating the target storage device based on the target write amplification factor and the test fluctuation rate; wherein the constructing a target test environment comprises: 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 an actual use scenario; the determining a target storage device comprises: taking a storage device equipped with an operating system as a target storage device; the simulating a data writing mode of the target storage device based on sequential write operations and random write operations comprises: performing a first preset number of sequential write operations based on the test tool; after the sequential write operations are completed, performing a first preset time length of random write operations based on the test tool; the performing random write operations comprises: performing a second preset number of random write operations based on the test tool, and continuing for a second preset time length at each random write operation, wherein the second preset time length is greater than the first preset time length; the determining a target write amplification factor based on the host write amount and the target storage device write amount comprises: determining a write amplification factor based on a ratio of the target storage device write amount to the host write amount when the test tool performs the random write operations each time; determining the target write amplification factor based on an average value of the second preset number and a plurality of write amplification factors; the determining a test fluctuation rate based on the host write amount and the target storage device write amount comprises: obtaining a maximum amplification factor and a minimum amplification factor in the plurality of write amplification factors; determining an amplification factor difference based on the maximum amplification factor and the minimum amplification factor, and determining the test fluctuation rate based on a ratio of the amplification factor difference to the target write amplification factor; the evaluating the target storage device based on the target write amplification factor and the test fluctuation rate comprises: determining that a wear degree and a lifetime of the target storage device meet requirements when the test fluctuation rate is less than a preset fluctuation rate threshold and the target write amplification factor is less than a preset amplification factor threshold.
2. The life assessment method of a storage device according to claim 1, wherein The method further comprises: in a case where the test fluctuation rate is greater than a preset fluctuation rate threshold, adjusting a test parameter of the target storage device, wherein the test parameter comprises at least one of a test time length, a test number, and a data writing size.
3. An electronic device, comprising: comprises: a memory, a processor, and a program stored on the memory and executable on the processor, wherein the processor executes the program to implement the lifetime evaluation method of the storage device according to any one of claims 1-2.
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