CN112002368B - Solid state disk abrasion degree data simulation method and system and related equipment - Google Patents

Solid state disk abrasion degree data simulation method and system and related equipment Download PDF

Info

Publication number
CN112002368B
CN112002368B CN202010746787.1A CN202010746787A CN112002368B CN 112002368 B CN112002368 B CN 112002368B CN 202010746787 A CN202010746787 A CN 202010746787A CN 112002368 B CN112002368 B CN 112002368B
Authority
CN
China
Prior art keywords
data
solid state
state disk
write
writing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010746787.1A
Other languages
Chinese (zh)
Other versions
CN112002368A (en
Inventor
梁鑫辉
王团结
曹琪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Inspur Data Technology Co Ltd
Original Assignee
Beijing Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Inspur Data Technology Co Ltd filed Critical Beijing Inspur Data Technology Co Ltd
Priority to CN202010746787.1A priority Critical patent/CN112002368B/en
Publication of CN112002368A publication Critical patent/CN112002368A/en
Application granted granted Critical
Publication of CN112002368B publication Critical patent/CN112002368B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • G11C29/08Functional testing, e.g. testing during refresh, power-on self testing [POST] or distributed testing
    • G11C29/10Test algorithms, e.g. memory scan [MScan] algorithms; Test patterns, e.g. checkerboard patterns 
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • G11C29/08Functional testing, e.g. testing during refresh, power-on self testing [POST] or distributed testing
    • G11C29/12Built-in arrangements for testing, e.g. built-in self testing [BIST] or interconnection details
    • G11C29/44Indication or identification of errors, e.g. for repair

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The application discloses a method for simulating abrasion degree data of a solid state disk, which comprises the steps of carrying out data extension operation on original host writing amount data in the solid state disk to obtain candidate data to be written in the solid state disk in each data writing period; determining periodic write amplification information of the solid state disk; calculating the total amount of actual written data of the solid state disk in all data writing periods according to the candidate data and the period writing amplification information; and determining the abrasion degree of the solid state disk according to the actual total written data. The method and the device can simulate the abrasion change data of the solid state disk so as to predict the service life of the solid state disk. The application also discloses a system for simulating the abrasion degree data of the solid state disk, an electronic device and a storage medium, and the system has the beneficial effects.

Description

Solid state disk abrasion degree data simulation method and system and related equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and a system for simulating wear level data of a solid state disk, an electronic device, and a storage medium.
Background
A Solid State Disk (SSD) is a computer storage device that mainly uses a Flash memory (NAND Flash) as a permanent memory. Flash-based Solid State Drives (SSDs) have been widely sought after since their high performance, and their service life has become a common concern in the storage industry.
The abrasion degree is an important index for representing the NAND abrasion condition in the solid state disk. According to the manufacturer regulation, when the abrasion degree reaches 100%, the service life of the solid state disk reaches the upper limit promised by the manufacturer, and even if the solid state disk is not damaged at the moment, the reliability of the solid state disk cannot be guaranteed. In the actual process of predicting, researching, developing and testing the service life of the solid state disk, the real data of the abrasion degree of the solid state disk is difficult to collect, and the abrasion degree of the solid state disk at each time point cannot be obtained.
Therefore, how to simulate the wear variation data of the solid state disk is a technical problem that needs to be solved by those skilled in the art at present.
Disclosure of Invention
The application aims to provide a method and a system for simulating abrasion degree data of a solid state disk, an electronic device and a storage medium, which can simulate abrasion degree change data of the solid state disk.
In order to solve the above technical problem, the present application provides a method for simulating wear level data of a solid state disk, where the method for determining wear level includes:
performing data extension operation on original host writing amount data in a solid state disk to obtain candidate data to be written in the solid state disk in each data writing period;
determining periodic write amplification information of the solid state disk; the periodic write amplification information comprises a write amplification coefficient of the solid state disk in each data write period;
calculating the total amount of actual written data of the solid state disk in all data writing periods according to the candidate data and the period writing amplification information;
and determining the abrasion degree of the solid state disk according to the actual total written data.
Optionally, the performing data extension operation on the original host writing amount data in the solid state disk to obtain candidate data to be written in the solid state disk in each data writing period includes:
determining cycle data increase information of the solid state disk according to the write-in time of the original host write-in amount data in the solid state disk; the periodic data growth information comprises data growth amount of the solid state disk in each data writing period;
selecting any number of data writing periods from the data writing periods corresponding to the original host writing amount data as target periods;
according to the periodic data increment information, taking the data increment corresponding to each target period as candidate data to be written into the solid state disk in the next data writing period;
judging whether the number of the obtained candidate data is greater than a preset value or not;
if yes, judging that the candidate data to be written into the solid state disk in all periods are generated completely;
and if not, executing the operation of selecting any number of data writing periods from the data writing periods corresponding to the original host writing amount data as target periods.
Optionally, determining the periodic write amplification information of the solid state disk includes:
determining the number of bad blocks of the solid state disk in each data writing period by using a bad block probability formula; wherein the bad block probability formula is y ═ (x-b)2X is the period number of a data writing period, y is the probability of bad blocks appearing in the x-th period, and b is a preset parameter larger than 0;
and determining periodic write amplification information of the solid state disk according to the corresponding relation between the number of the bad blocks and the write amplification coefficient.
Optionally, determining the periodic write amplification information of the solid state disk according to the corresponding relationship between the number of bad blocks and the write amplification coefficient includes:
calculating periodic write amplification information of the solid state disk by using a write amplification coefficient formula;
wherein, the formula of the write amplification factor is wa ═ scale1 (errors-errors _ min) + wa _ min; wa is a write amplification factor of a current data write cycle, scale1 is a first scaling factor, errors is the number of bad blocks of the current data write cycle, error _ min is the minimum number of bad blocks, wa _ min is the minimum number of write amplification factors, scale1 ═ wa _ max-wa _ min)/(error _ max-error _ min), wa _ max is the maximum value of the write amplification factors, and error _ max is the maximum number of bad blocks.
Optionally, calculating the total amount of actually written data of the solid state disk in all data writing periods according to the candidate data and the period writing amplification information, includes:
calculating the product of the byte number of the candidate data and the write amplification factor in the same data write period according to the candidate data and the period write amplification information to obtain the actual write data volume of each data write period;
and accumulating the actual written data amount of each data writing period to obtain the actual written data total amount of all the data writing periods.
Optionally, determining the wear level of the solid state disk according to the total amount of the actual write data includes:
obtaining an abrasion degree calculation value by utilizing an abrasion conversion formula, and rounding the abrasion degree calculation value upwards to obtain the abrasion degree of the solid state disk;
the wear conversion formula is webout ═ 100-scale2 [ (. words-writes _ min) ], webout is a wear calculation value of the current data writing period, scale2 is a second scaling factor, writes is the total amount of actual written data, writes _ min is the minimum value of the total amount of actual written data, scale2 ═ 100/(writes _ max-writes _ min) ], and writes _ max is the maximum value of the total amount of actual written data.
Optionally, after determining the wear level of the solid state disk according to the total amount of the actual write data, the method further includes:
and predicting the service life of the solid state disk according to the abrasion degree of the solid state disk.
The application also provides a system for simulating the abrasion degree data of the solid state disk, which comprises:
the data extension module is used for performing data extension operation on original host writing amount data in the solid state disk to obtain candidate data to be written in the solid state disk in each data writing period;
the write amplification factor determining module is used for determining periodic write amplification information of the solid state disk; the periodic write amplification information comprises a write amplification coefficient of the solid state disk in each data write period;
the actual write data volume determining module is used for calculating the total actual write data volume of the solid state disk in all data write cycles according to the candidate data and the cycle write amplification information;
and the abrasion degree determining module is used for determining the abrasion degree of the solid state disk according to the total amount of the actual written data.
The application also provides a storage medium, on which a computer program is stored, and the computer program realizes the steps executed by the abrasion degree data simulation method of the solid state disk when being executed.
The application also provides electronic equipment which comprises a memory and a processor, wherein a computer program is stored in the memory, and the processor realizes the step executed by the abrasion degree data simulation method of the solid state disk when calling the computer program in the memory.
The application provides a method for simulating abrasion degree data of a solid state disk, which comprises the following steps: performing data extension operation on original host writing amount data in a solid state disk to obtain candidate data to be written in the solid state disk in each data writing period; determining periodic write amplification information of the solid state disk; the periodic write amplification information comprises a write amplification coefficient of the solid state disk in each data write period; calculating the total amount of actual written data of the solid state disk in all data writing periods according to the candidate data and the period writing amplification information; and determining the abrasion degree of the solid state disk according to the actual total written data.
According to the method and the device, the candidate data needing to be written into the solid state disk in a plurality of data writing periods are obtained by performing data extension operation on the original host writing amount data in the solid state disk. The period amplification information determined by the application can include write amplification coefficients corresponding to the solid state disk when the candidate data are written in each data writing period, the actual written data total amount of the solid state disk in all data writing periods is calculated according to the candidate data and the period write amplification information, and then the abrasion degree of the solid state disk in any period is determined according to the corresponding relation between the actual written data total amount of the solid state disk and the abrasion degree. The method and the device can truly simulate the data writing process of the solid state disk, and can predict the abrasion degree of the solid state disk in any period. The application also provides a system for simulating the abrasion degree data of the solid state disk, a storage medium and electronic equipment, and has the beneficial effects that the system is not repeated.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a method for simulating wear-level data of a solid state disk according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram illustrating a principle of a method for simulating wear level data of a solid state disk according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a wear-level data simulation system of a solid-state disk according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a flowchart of a method for simulating wear level data of a solid state disk according to an embodiment of the present disclosure.
The specific steps may include:
s101: performing data extension operation on original host writing amount data in the solid state disk to obtain candidate data to be written in the solid state disk in each data writing period;
in this embodiment, the solid state disk is a hard disk that needs to be subjected to wear prediction, data stored in the solid state disk before this step is original host write-in amount data, and the original host write-in amount data is data stored for a period of time (for example, three months). For example, the present embodiment may perform a data extension operation on three months of original host writing amount data to obtain new nine months of candidate data, that is, implement a data extension operation on new data that extends three months of original host writing amount data to twelve months. The present embodiment does not limit the length of the data writing period, and may use 24 hours as one data writing period. For example, the present embodiment may simulate the wear data of the solid state disk for the entire life cycle (5-7 years) based on the original host write volume data for a limited time (e.g., 3 months to 1 year).
It is understood that the present embodiment may exist prior to S101 to determine that the total duration corresponding to the data needs to be extended. By performing data extension operation on the original host writing amount data in the solid state disk, candidate data to be written into the solid state disk in each data writing period within a preset time period (for example, the service life of the solid state disk is 7 years) can be obtained. As a possible implementation, the process of performing a data elongation operation on original host write volume data may include the steps of:
step 1: determining cycle data increase information of the solid state disk according to the write-in time of original host write-in quantity data in the solid state disk;
the periodic data growth information comprises data growth amount of the solid state disk in each data writing period; the cycle data increase information is used for describing the increase condition of the data writing amount of the current data writing cycle relative to the data writing amount of the previous data writing cycle. If a data write cycle in this embodiment is one day, the periodic data increment information is a data write increment for each day, and the data increment may be a negative number, an integer, or 0.
Step 2: selecting any number of data writing periods from data writing periods corresponding to the original host writing amount data as target periods;
and step 3: according to the periodic data increment information, taking the data increment corresponding to each target period as candidate data to be written into the solid state disk in the next data writing period;
in this embodiment, any number of cycles is selected from the data writing cycles corresponding to the original host writing amount data as a target cycle, and the data increment corresponding to the target cycle is used as candidate data for writing in the solid state disk in the next data writing cycle. And 4, step 4: judging whether the number of the obtained candidate data is greater than a preset value or not; if yes, entering step 5; if not, entering step 6;
and 5: judging that the generation of candidate data to be written into the solid state disk in all periods is finished;
and 6: and executing the operation of selecting any number of data writing periods from the data writing periods corresponding to the original host writing amount data as target periods.
The implementation process of the embodiment is illustrated: under the condition that the data writing period is 1 day, the original host writing amount data comprises data written into the solid state disk within 7 months 21-7 months 23, if the data increment of 7 months 21 is 20 bytes, the data increment of 7 months 22 is-15 bytes, and the data increment of 7 months 23 is 30 bytes; in step 2, 7-month-21 day and 7-month-23 day are selected as target cycles, and at this time, "20 Byte" is used as data that needs to be written into the solid state disk in 7-month-24 day, and "30 Byte" is used as data that needs to be written into the solid state disk in 7-month-25 day. If the data written into the solid state disk within 7-21-27 days of month needs to be obtained in this embodiment, this embodiment may select 7-22-month and 7-23-month as the target cycles again, use "-15 Byte" as the data that needs to be written into the solid state disk within 7-26 days of month, and use "30 Byte" as the data that needs to be written into the solid state disk within 7-27 days of month. The original host writing amount data of 7-month 21-7-month 23-day can be prolonged to obtain new data of 7-month 21-7-month 27-day.
S102: determining periodic write amplification information of the solid state disk;
among them, Write Amplification (Write Amplification) is an important attribute of a solid state disk, and when data is written to the solid state disk, the amount of data actually written to the solid state disk is much larger than the required amount of data. The meaning of the write amplification factor is: when the host end requires to write effective data with the size of A into the solid state disk, and actually due to the characteristics of the solid state disk, the data size actually written into the solid state disk is B, and then B/A is the write amplification coefficient. The period write amplification information in this embodiment includes a write amplification factor of the solid state disk in each data write period. The write amplification factor is related to the number of bad blocks in the solid state disk, so that the write amplification factor of each period can be determined according to the number of bad blocks corresponding to each data write period, and further the periodic write amplification information of the solid state disk is obtained.
S103: calculating the total amount of actual written data of the solid state disk in all data writing periods according to the candidate data and the period writing amplification information;
the candidate data is data to be written into the solid state disk, so that the size of data actually written into the solid state disk in each data writing period, that is, the actual written data amount, can be determined according to the candidate data and the write amplification factor. For example, if the data size of the candidate data to be written in a certain cycle is 32 bytes, and if the write amplification factor at this time is 2, the actual write data amount in this cycle is 32 × 2 to 64 bytes. The present embodiment may take the sum of the actual write data amounts for all data write cycles as the total actual write data amount for all data write cycles.
As a possible implementation manner, the present embodiment may calculate a product of the number of bytes of the candidate data and the write amplification factor in the same data write period according to the candidate data and the periodic write amplification information, so as to obtain an actual write data amount of each data write period; and accumulating the actual written data amount of each data writing period to obtain the actual written data total amount of all the data writing periods.
It is understood that, before S101, the present embodiment may determine that the total duration corresponding to the data needs to be extended (for example, the lifetime of the solid state disk is 7 years), and the present embodiment may obtain the actual total amount of written data after each data writing cycle is executed.
S104: and determining the abrasion degree of the solid state disk according to the total amount of the actually written data.
In this step, the wear degree of the solid state disk after any data writing period can be determined according to the corresponding relationship between the actual written data total amount and the wear degree. The wear level (Media wear Indicator) is a target of the solid state disk, and is used for indicating the degree of the erasing times of the NAND on the solid state disk, the initial value is 100, the NAND starts to linearly decrease along with the increase of the erasing times, and the decreasing speed is in proportion to the erasing times from 0 to the maximum. Once this value drops to 1, it does not drop again, indicating that the maximum number of erasures has been reached for the NAND on the solid state disk. At this time, it is recommended that data needs to be backed up and the solid state disk needs to be replaced.
After the abrasion degree of the solid state disk is obtained, the service life of the solid state disk can be predicted according to the abrasion degree of the solid state disk. In the life cycle of the solid state disk, the probability of the failure of the hardware device of the solid state disk is very small, which is the guarantee given by the solid state disk manufacturer. And the fault caused by the software algorithm is uncontrollable and mainly caused by the bug of the firmware algorithm. Secondly, the damage of the fault to the solid state disk is small. Other hardware devices except the NAND Flash have faults, so that data damage is small, the faults can be repaired by replacing the damaged devices, and the continuous use of the solid state disk is not influenced. The software bug may typically be repaired by a reboot or a firmware upgrade. The service life of the solid state disk is really influenced. The degree of wear is an important index for representing the wear condition of the solid state disk. When the abrasion degree reaches 100%, the service life of the solid state disk reaches the upper limit promised by a manufacturer, and even if the solid state disk is not damaged at the moment, the reliability of the solid state disk cannot be guaranteed. Therefore, the residual service life of the solid state disk can be predicted by calculating the abrasion degree of the solid state disk.
In the embodiment, the candidate data to be written into the solid state disk in a plurality of data writing periods is obtained by performing data extension operation on the original host writing amount data in the solid state disk. The period amplification information determined in this embodiment may include a write amplification coefficient corresponding to the solid state disk when the candidate data is written in each data writing period, the actual written data total amount of the solid state disk in all data writing periods is calculated according to the candidate data and the period write amplification information, and then the wear degree of the solid state disk in any period is determined according to the corresponding relationship between the actual written data total amount of the solid state disk and the wear degree. The embodiment can truly simulate the data writing process of the solid state disk, and can predict the abrasion degree of the solid state disk in any period.
As a further description of the embodiment corresponding to fig. 1, the embodiment may determine the periodic write amplification information of the solid state disk by the following method, where the specific process includes:
determining the number of bad blocks of the solid state disk in each data writing period by using a bad block probability formula; and determining periodic write amplification information of the solid state disk according to the corresponding relation between the number of the bad blocks and the write amplification coefficient.
Wherein the probability formula of the bad block is y ═ (x-b)2X is the number of cycles of the data writing cycle, y is the probability of bad blocks appearing in the x-th cycle, and b is a preset parameter greater than 0. The specific b may be a data writing period at the time when the solid state disk has a bad block.
Further, the embodiment may also calculate periodic write amplification information of the solid state disk by using a write amplification coefficient formula; wherein, the formula of the write amplification factor is wa ═ scale1 (errors-errors _ min) + wa _ min; wa is a write amplification factor of a current data write cycle, scale1 is a first scaling factor, error is a bad block number of the current data write cycle, error _ min is a bad block number minimum, wa _ min is a write amplification factor minimum, scale1 ═ wa _ max-wa _ min)/(error _ max-error _ min), wa _ max is a write amplification factor maximum, and error _ max is a bad block number maximum.
As a further description of the corresponding embodiment of fig. 1, the process of determining the degree of wear from the actual total amount of written data may be: obtaining an abrasion degree calculation value by utilizing an abrasion conversion formula, and rounding the abrasion degree calculation value upwards to obtain the abrasion degree of the solid state disk;
the wear conversion formula is webout being 100-scale2 (writes-writes _ min), webout being a calculated wear value of the current data writing period, scale2 being a second scaling factor, writes being a total amount of actual written data, writes _ min being a minimum value of the total amount of actual written data, scale2 being 100/(writes _ max-writes _ min), and writes _ max being a maximum value of the total amount of actual written data.
The flow described in the above embodiment is explained below by an embodiment in practical use. Referring to fig. 2, fig. 2 is a schematic diagram illustrating a principle of a method for simulating wear-level data of a solid state disk according to an embodiment of the present disclosure, in which data extension is performed on write-level data of a solid state disk host, and the write-level data is mixed with a write-amplification conversion coefficient generated by bad block simulation and conversion from bad blocks to write amplification to obtain write-level data affected by mixed write amplification, and then the wear-level simulated data is finally obtained through a series of conversions, such as data normalization and precision processing. Specifically, the present embodiment may include the following operations:
step 1: and prolonging the original host writing amount data.
The original host writing amount data is data written in the solid state disk before the step is executed. The primary host write volume data may be data written in only a few months or a couple of years. This embodiment extends the original host write volume data to 5-7 years by this step. The specific operation method comprises the following steps: (1) the daily difference of the original host write volume is calculated. The key information is the date and the 1-day increment corresponding to the date, and the data is taken as candidate data. (2) Randomly selecting a segment from the original host write volume data (each segment containing a start time point and a time length, e.g., 7 consecutive days of data starting from day 10); (3) and extracting and storing candidate data corresponding to the randomly selected time segment from the candidate data. (4) Repeating steps (2) and (3) until the total saved time segment reaches a target length (e.g., 5 years).
Step 2: and simulating bad blocks according to probability distribution.
As devices age, bad blocks of the solid state disk typically occur. These bad blocks can cause write amplification and thus affect the actual write volume. The present embodiment first simulates the impact of bad blocks. The general rule is that the longer the time, the greater the probability of bad block occurrence. Here, a simple quadratic distribution curve y ═ (x-b) is used2As a bad block distribution curve. The specific implementation method comprises the following steps: and selecting N positions (N is the number of the bad blocks) from the target position list by using a specified bad block distribution function with the returned samples, and counting the number of the bad blocks at each position as the injection number of the fault number at each time point.
And step 3: the bad block is converted into a write amplification factor.
The write amplification is ultimately affected by the introduction of bad blocks, so that the original write volume is larger than the required write volume in the final landing. And converting the number of bad blocks into a write amplification coefficient by using a min-max normalization method. The maximum (wa _ max) and minimum (wa _ min) values of the write amplification are given by the SSD firmware domain expert, with reference values wa _ min ═ 2.5 and wa _ max ═ 5.
The specific conversion process in this step is:
the scaling factor is calculated using the formula scale1 ═ (wa _ max-wa _ min)/(errors _ max-errors _ min), and the bad block number errors is converted into the write amplification factor wa using the formula wa ═ scale (errors-errors _ min) + wa _ min. wa represents the write amplification factor in the period, error represents the number of bad blocks in the period, error _ max is the maximum value of the number of the bad blocks, and error _ min is the minimum value of the number of the bad blocks.
And 4, step 4: the write volume mixes the write amplification effects.
The write quantity affected by the hybrid write amplification can be obtained from the daily host write quantity and the daily write amplification factor, and specifically, the daily actual write quantity is the daily host write quantity and the daily write amplification factor. By adding up the daily actual write quantities, the write quantities (i.e., the total amount of actually written data) affected by the superimposed write amplification can be obtained.
And 5: and (5) converting the abrasion degree.
The amount of writing affected by the hybrid write amplification is measured in bytes and the final wear is in percent. Therefore, the min-max algorithm is needed again to convert the writing quantity affected by the mixed writing amplification into the abrasion degree of 100-0, and the data type of the abrasion degree is a floating point number (including a decimal point).
The specific conversion process of the abrasion degree conversion is as follows:
the scale2 is calculated as 100/(writes _ max-writes _ min), and the write amount affected by the mixed write amplification is converted into the wear degree weeut using the formula weeut as 100-scale2 (writes-writes _ min).
Step 6: and adjusting the precision of the abrasion degree.
Since the accuracy of the wear degree of the real environment is generally only an integer of 0-100, the wear degree data obtained in step 5 needs to be rounded up to obtain an integer of 1-100.
Through the processing, the host write-in quantity data which are easy to obtain and can be months can be simulated into the solid state disk wear degree change data which are close to the real scene, and the data can be used for further research or a system development process. The method can obtain the wear-degree change data of the solid state disk through effective simulation under the condition that no real wear-degree experimental data of the solid state disk exists, and is used for guiding technical research or system development depending on the wear-degree data of the solid state disk, such as service life prediction of the solid state disk. The embodiment provides a scheme for performing SSD wear data simulation based on a limited SSD Host Writes parameter. The main difference between the SSD Host Writes parameter and the abrasion ratio is that the SSD Host Writes parameter does not contain writing caused by write amplification, and simultaneously has difference of data value range and difference of data precision.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a system for simulating wear level data of a solid state disk according to an embodiment of the present disclosure;
the system may include:
the data extension module 100 is configured to perform data extension operation on original host write-in amount data in the solid state disk to obtain candidate data to be written in the solid state disk in each data write-in period;
a write amplification factor determining module 200, configured to determine periodic write amplification information of the solid state disk; the periodic write amplification information comprises a write amplification coefficient of the solid state disk in each data write period;
an actual write data amount determining module 300, configured to calculate, according to the candidate data and the periodic write amplification information, a total amount of actual write data of the solid state disk in all data write periods;
and the wear-out determining module 400 is configured to determine the wear-out of the solid state disk according to the total amount of the actual write data.
In the embodiment, the candidate data to be written into the solid state disk in a plurality of data writing periods is obtained by performing data extension operation on the original host writing amount data in the solid state disk. The period amplification information determined in this embodiment may include a write amplification coefficient corresponding to the solid state disk when the candidate data is written in each data writing period, the actual written data total amount of the solid state disk in all data writing periods is calculated according to the candidate data and the period write amplification information, and then the wear degree of the solid state disk in any period is determined according to the corresponding relationship between the actual written data total amount of the solid state disk and the wear degree. The method and the device can truly simulate the data writing process of the solid state disk, and can predict the abrasion degree of the solid state disk in any period.
Further, the data extension module 100 includes:
the growth information determining unit is used for determining cycle data growth information of the solid state disk according to the writing time of the original host writing amount data in the solid state disk; the period data growth information comprises the data growth amount of the solid state disk in each data writing period;
the period selection unit is used for selecting any number of data writing periods from the data writing periods corresponding to the original host writing amount data as target periods;
the candidate data selecting unit is used for taking the data increment corresponding to each target period as candidate data to be written into the solid state disk in the next data writing period according to the periodic data increment information;
the judging unit is used for judging whether the number of the obtained candidate data is larger than a preset value or not; if yes, judging that the candidate data to be written into the solid state disk in all periods are generated completely; if not, starting the working process corresponding to the period selection unit.
Further, the write amplification factor determining module 200 includes:
the bad block number determining unit is used for determining the number of bad blocks of the solid state disk in each data writing period by using a bad block probability formula; wherein the bad block probability formula is y ═ (x-b)2X is the number of cycles of the data writing cycle, y is the probability of bad block appearing in the x-th cycle, and b is a preset parameter greater than 0Counting;
and the write amplification information determining unit is used for determining the periodic write amplification information of the solid state disk according to the corresponding relation between the number of the bad blocks and the write amplification coefficient.
Further, the write amplification information determining unit is used for calculating periodic write amplification information of the solid state disk by using a write amplification coefficient formula;
wherein, the formula of the write amplification factor is wa ═ scale1 (errors-errors _ min) + wa _ min; wa is a write amplification factor of a current data write cycle, scale1 is a first scaling factor, errors is the number of bad blocks of the current data write cycle, error _ min is the minimum number of bad blocks, wa _ min is the minimum number of write amplification factors, scale1 ═ wa _ max-wa _ min)/(error _ max-error _ min), wa _ max is the maximum value of the write amplification factors, and error _ max is the maximum number of bad blocks.
Further, the actual write data size determining module 300 is configured to calculate, according to the candidate data and the periodic write amplification information, a product of a number of bytes of the candidate data and a write amplification factor in the same data write period, so as to obtain an actual write data size of each data write period; and accumulating the actual written data amount of each data writing period to obtain the total actual written data amount of all data writing periods.
Further, the wear degree determining module 400 is configured to obtain a wear degree calculation value by using a wear conversion formula, and obtain the wear degree of the solid state disk by rounding up the wear degree calculation value;
the wear conversion formula is webout being 100-scale2 (writes-writes _ min), webout being a calculated wear value of the current data writing period, scale2 being a second scaling factor, writes being a total amount of actual written data, writes _ min being a minimum value of the total amount of actual written data, scale2 being 100/(writes _ max-writes _ min), and writes _ max being a maximum value of the total amount of actual written data.
Further, the method also comprises the following steps:
and the service life prediction module is used for predicting the service life of the solid state disk according to the abrasion degree of the solid state disk after determining the abrasion degree of the solid state disk according to the actual written data total amount.
Since the embodiment of the system part corresponds to the embodiment of the method part, the embodiment of the system part is described with reference to the embodiment of the method part, and is not repeated here.
The present application also provides a storage medium on which a computer program is stored, which when executed, can implement the steps provided by the above embodiments. The storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The application further provides an electronic device, which may include a memory and a processor, where the memory stores a computer program, and the processor may implement the steps provided by the foregoing embodiments when calling the computer program in the memory. Of course, the electronic device may also include various network interfaces, power supplies, and the like.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (9)

1. A method for simulating abrasion degree data of a solid state disk is characterized by comprising the following steps:
performing data extension operation on original host writing amount data in a solid state disk to obtain candidate data to be written in the solid state disk in each data writing period;
determining periodic write amplification information of the solid state disk; the periodic write amplification information comprises a write amplification coefficient of the solid state disk in each data write period;
calculating the total amount of actual written data of the solid state disk in all data writing periods according to the candidate data and the period writing amplification information;
determining the abrasion degree of the solid state disk according to the actual written data total amount;
the data extension operation is performed on original host writing amount data in the solid state disk to obtain candidate data to be written in the solid state disk in each data writing period, and the data extension operation includes:
determining cycle data increase information of the solid state disk according to the write-in time of the original host write-in amount data in the solid state disk; the period data growth information comprises the data growth amount of the solid state disk in each data writing period;
selecting any number of data writing periods from the data writing periods corresponding to the original host writing amount data as target periods;
according to the periodic data increment information, taking the data increment corresponding to each target period as candidate data to be written into the solid state disk in the next data writing period;
judging whether the number of the obtained candidate data is greater than a preset value or not;
if yes, judging that the candidate data to be written into the solid state disk in all periods are generated completely;
and if not, executing the operation of selecting any number of data writing periods from the data writing periods corresponding to the original host writing amount data as target periods.
2. The method of simulating wear data of claim 1 wherein determining periodic write amplification information for the solid state disk comprises:
determining the number of bad blocks of the solid state disk in each data writing period by using a bad block probability formula; wherein the bad block probability formula is y = (x-b)2X is the period number of a data writing period, y is the probability of bad blocks appearing in the x-th period, and b is a preset parameter larger than 0;
and determining periodic write amplification information of the solid state disk according to the corresponding relation between the number of the bad blocks and the write amplification coefficient.
3. The wear-degree data simulation method of claim 2, wherein determining the periodic write amplification information of the solid state disk according to the corresponding relationship between the number of bad blocks and the write amplification coefficient comprises:
calculating periodic write amplification information of the solid state disk by using a write amplification coefficient formula;
wherein, the writing amplification factor formula is wa = scale1 (errors-errors _ min) + wa _ min; wa is a write amplification factor of a current data write cycle, scale1 is a first scaling factor, errors is the number of bad blocks of the current data write cycle, error _ min is the minimum number of bad blocks, wa _ min is the minimum number of write amplification factors, scale1= (wa _ max-wa _ min)/(error _ max-error _ min), wa _ max is the maximum value of the write amplification factors, and error _ max is the maximum number of bad blocks.
4. The method for simulating the wear degree data according to claim 1, wherein calculating the total amount of actually written data of the solid state disk in all data writing periods according to the candidate data and the period writing amplification information comprises:
calculating the product of the byte number of the candidate data and the write amplification factor in the same data write period according to the candidate data and the period write amplification information to obtain the actual write data volume of each data write period;
and accumulating the actual written data amount of each data writing period to obtain the actual written data total amount of all the data writing periods.
5. The method for simulating the wear degree data according to claim 1, wherein determining the wear degree of the solid state disk according to the actual total amount of written data comprises:
obtaining an abrasion degree calculation value by utilizing an abrasion conversion formula, and rounding the abrasion degree calculation value upwards to obtain the abrasion degree of the solid state disk;
wherein the wear conversion formula is webout = 100-scale2 (writes-writes _ min), webout is a calculated wear value of the current data writing cycle, scale2 is a second scaling factor, writes is a total amount of actual written data, writes _ min is a minimum value of the total amount of actual written data, scale2= 100/(writes _ max-writes _ min), and writes _ max is a maximum value of the total amount of actual written data.
6. The method for simulating wear degree data according to any one of claims 1 to 5, further comprising, after determining the wear degree of the solid state disk according to the actual total amount of written data:
and predicting the service life of the solid state disk according to the abrasion degree of the solid state disk.
7. The wear degree data simulation system of the solid state disk is characterized by comprising:
the data extension module is used for performing data extension operation on original host writing amount data in the solid state disk to obtain candidate data to be written in the solid state disk in each data writing period;
the write amplification factor determining module is used for determining periodic write amplification information of the solid state disk; the periodic write amplification information comprises a write amplification coefficient of the solid state disk in each data write period;
the actual write data volume determining module is used for calculating the total actual write data volume of the solid state disk in all data write cycles according to the candidate data and the cycle write amplification information;
the abrasion degree determining module is used for determining the abrasion degree of the solid state disk according to the total amount of the actual written data;
wherein the data extension module comprises:
the growth information determining unit is used for determining cycle data growth information of the solid state disk according to the writing time of the original host writing amount data in the solid state disk; the periodic data growth information comprises data growth amount of the solid state disk in each data writing period;
the period selection unit is used for selecting any number of data writing periods from the data writing periods corresponding to the original host writing amount data as target periods;
the candidate data selecting unit is used for taking the data increment corresponding to each target period as candidate data to be written into the solid state disk in the next data writing period according to the periodic data increment information;
the judging unit is used for judging whether the number of the obtained candidate data is larger than a preset value or not; if yes, judging that the candidate data to be written into the solid state disk in all periods are generated completely; if not, starting the working process corresponding to the period selection unit.
8. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method for simulating the wear data of the solid state disk according to any one of claims 1 to 6 when calling the computer program in the memory.
9. A storage medium having stored thereon computer-executable instructions, which when loaded and executed by a processor, carry out the steps of the method for simulating wear data of a solid state disk as claimed in any one of claims 1 to 6.
CN202010746787.1A 2020-07-29 2020-07-29 Solid state disk abrasion degree data simulation method and system and related equipment Active CN112002368B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010746787.1A CN112002368B (en) 2020-07-29 2020-07-29 Solid state disk abrasion degree data simulation method and system and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010746787.1A CN112002368B (en) 2020-07-29 2020-07-29 Solid state disk abrasion degree data simulation method and system and related equipment

Publications (2)

Publication Number Publication Date
CN112002368A CN112002368A (en) 2020-11-27
CN112002368B true CN112002368B (en) 2022-06-17

Family

ID=73462486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010746787.1A Active CN112002368B (en) 2020-07-29 2020-07-29 Solid state disk abrasion degree data simulation method and system and related equipment

Country Status (1)

Country Link
CN (1) CN112002368B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106164841A (en) * 2014-03-24 2016-11-23 西部数据技术公司 Life for the nonvolatile semiconductor memory of data storage device
KR20180078112A (en) * 2016-12-29 2018-07-09 재단법인 다차원 스마트 아이티 융합시스템 연구단 Apparatus and method for lifetime prediction of storage device
CN109690468A (en) * 2016-11-09 2019-04-26 闪迪技术有限公司 For the method and system of amplification analysis to be written
CN111078439A (en) * 2019-10-31 2020-04-28 苏州浪潮智能科技有限公司 Method and device for predicting service life of solid state disk

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5979512B2 (en) * 2014-04-02 2016-08-24 コニカミノルタ株式会社 Image forming apparatus and flash memory control method
US20170131948A1 (en) * 2015-11-06 2017-05-11 Virtium Llc Visualization of usage impacts on solid state drive life acceleration

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106164841A (en) * 2014-03-24 2016-11-23 西部数据技术公司 Life for the nonvolatile semiconductor memory of data storage device
CN109690468A (en) * 2016-11-09 2019-04-26 闪迪技术有限公司 For the method and system of amplification analysis to be written
KR20180078112A (en) * 2016-12-29 2018-07-09 재단법인 다차원 스마트 아이티 융합시스템 연구단 Apparatus and method for lifetime prediction of storage device
CN111078439A (en) * 2019-10-31 2020-04-28 苏州浪潮智能科技有限公司 Method and device for predicting service life of solid state disk

Also Published As

Publication number Publication date
CN112002368A (en) 2020-11-27

Similar Documents

Publication Publication Date Title
US11055450B2 (en) Industrial asset health model update
US20170131948A1 (en) Visualization of usage impacts on solid state drive life acceleration
US20140365271A1 (en) Industrial asset health model update
CN105095614A (en) Method and device for updating prediction model
WO2022037169A1 (en) Method and apparatus for predicting service life of solid-state disk, and computer-readable storage medium
CN111078123B (en) Method and device for evaluating wear degree of flash memory block
EP3806008A1 (en) Model generation device for lifespan prediction, model generation method for lifespan prediction, and storage medium storing model generation program for lifespan prediction
CN111176575A (en) SSD (solid State disk) service life prediction method, system, terminal and storage medium based on Prophet model
CN111078439A (en) Method and device for predicting service life of solid state disk
CN110990174A (en) Method, device and medium for predicting SSD available time based on Prophet model
CN111400099B (en) Flash memory data rereading method, device, equipment and computer readable storage medium
CN110956997A (en) Method, device and equipment for testing BER (bit error rate) of solid state disk
CN110728008A (en) Method and device for determining expected life of smart electric meter
CN107402726B (en) Method and system for determining data inspection cycle of solid state disk
CN111400164A (en) Software testing method and device
CN109830255A (en) A kind of service life of flash memory prediction technique, system and storage medium based on characteristic quantity
CN112002368B (en) Solid state disk abrasion degree data simulation method and system and related equipment
CN112599182A (en) Nonvolatile storage life prediction method, device, equipment and medium
CN115147136A (en) Natural gas supply and demand difference determining method and device, computer equipment and storage medium
CN101752008B (en) Method for testing reliability of solid-state storage media
KR20180129496A (en) Method for predicting electric power demand and apparatus for the same
CN111767165B (en) Data processing method, device and control equipment
CN111258789A (en) Method, apparatus, device and medium for predicting remaining life of nonvolatile memory device
Oe et al. A practical approach to the year 2038 problem for 32-bit embedded system
EP4170575A1 (en) Asset value assessment system and asset value assessment method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant