A method, device and readable storage medium for testing a physical page of an SSD
By writing a program to test SSD physical pages, determine read locations and times, and analyze data peak periods, the program solves the problem of complex operation in existing technologies and achieves simple and accurate determination of SSD physical page size.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AGRICULTURAL BANK OF CHINA
- Filing Date
- 2022-10-31
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies that test SSD physical pages using specific testing tools are complex and require specific tools, making the process complicated.
By determining the unit length, critical length, and test length of the SSD data unit to be read, the read position, the read time, the position offset, the test data statistics, the data peak period analysis, the SSD physical page size is determined, and a program is written to implement the test.
It requires no external tools, is easy to operate, and can accurately determine the physical page size of the SSD, reducing the technical requirements for operators.
Smart Images

Figure CN115878369B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically, to an SSD physical page testing method, apparatus, and readable storage medium. Background Technology
[0002] Solid State Drives (SSDs) are storage media based on flash memory, consisting of a control unit and storage units. Compared to Hybrid Hard Drives (HDDs), SSDs offer advantages such as faster boot times, support for fast random and parallel reads, lower power consumption, lower noise, and a lower risk of data loss. Furthermore, as SSD prices continue to decrease and capacities gradually increase, SSDs are increasingly replacing HDDs as the mainstream storage medium.
[0003] An SSD physical page is the smallest unit of reading and writing on an SSD. To further improve SSD read performance and make reasonable use of its physical characteristics, obtaining the size of the SSD physical pages is crucial for SSD testing. Existing technologies can obtain the size of SSD physical pages using specific testing tools; however, this method has certain limitations in practical operation, requiring the availability of appropriate testing tools beforehand and making the operation complex. Summary of the Invention
[0004] In view of this, this application provides an SSD physical page testing method, apparatus and readable storage medium to solve the problem of complex operation when testing SSDs with specific testing tools.
[0005] To achieve the above objectives, the following solution is proposed:
[0006] A method for testing SSD physical pages, comprising:
[0007] The unit length, critical length, and test length of the SSD data unit to be read are determined. The unit length is the length of the smallest read unit, the critical length is the maximum length of a single read in the test, and the test length is the length of each data read in the test.
[0008] Determine the reading position, which is the starting position for reading data;
[0009] Read the data of the test length at the read position and return the read time;
[0010] Determine whether the read position has reached a preset value;
[0011] If the read position does not reach the preset value, the read position is offset by a preset length, which is a fixed offset length of the read position, and the process returns to determining the read position, where the read position is the starting position of the read data.
[0012] If the reading position reaches a preset value, then the test data of the test length is statistically analyzed. The test data includes the reading position and the corresponding reading time for each reading of the test length data.
[0013] Determine whether the test length has reached the critical length;
[0014] If the test length does not reach the critical length, the test length is adjusted, and the process returns to determining the read position, where the read position is the starting position of the read data.
[0015] If the test length reaches the critical length, the test data for each test length is analyzed, and the data size corresponding to one change cycle of the data peak is determined as the size of the physical page where the SSD data unit is located.
[0016] Preferably, adjusting the test length includes:
[0017] The unit length may be increased or decreased based on the test length.
[0018] Preferably, it further includes:
[0019] The number of reads is recorded each time data is read, and the number of reads is the number of times the same test length of data is read at the same read position.
[0020] When the number of reads reaches a preset threshold, the total reading time is recorded;
[0021] Calculate the average reading time, which is the ratio of the total time to the number of reads, and record the average reading time in the corresponding test data.
[0022] Preferably, the analysis of the test data for each test length includes:
[0023] By plotting the test data for each test length into a graph, the periodic pattern of the reading time changing with the reading position offset is analyzed.
[0024] Preferably, determining whether the reading position has reached a preset value includes:
[0025] Determine whether the read position has reached the product of the preset length and the preset offset number, where the preset offset number is a pre-set number of times to offset the read position.
[0026] An SSD physical page testing device, comprising:
[0027] The test parameter setting unit is used to determine the unit length, critical length, and test length of the SSD data unit to be read. The unit length is the length of the smallest read unit, the critical length is the maximum length of a single read in the test, and the test length is the length of each data read in the test.
[0028] The test variable setting unit is used to determine the reading position, which is the starting position of the data reading;
[0029] The SSD data reading unit is used to read data of the test length at the reading location and return the reading time.
[0030] The first judgment unit is used to determine whether the reading position has reached a preset value;
[0031] The test variable adjustment unit is used to offset the reading position by a preset length when the reading position does not reach the preset value. The preset length is a fixed offset length of the reading position. Then, it returns to execute the determined reading position, where the reading position is the starting position of the read data.
[0032] The test data statistics unit is used to count the test data of the test length when the reading position reaches a preset value. The test data includes the reading position and the corresponding reading time for each reading of the test length data.
[0033] The second judgment unit is used to determine whether the test length has reached the critical length;
[0034] The test parameter adjustment unit is used to adjust the test length when the test length has not reached the critical length, and return to the determined reading position, where the reading position is the starting position of the read data;
[0035] The test data analysis unit is used to analyze the test data for each test length and determine the data size corresponding to one change cycle of the data peak as the size of the physical page where the SSD data unit is located.
[0036] Preferably, it further includes:
[0037] A read count recording unit is used to record the read count each time data is read, wherein the read count is the number of times data of the same test length is read at the same read position;
[0038] A total reading time recording unit is used to record the total reading time when the number of readings reaches a preset threshold.
[0039] The average reading time recording unit calculates the average reading time, which is the ratio of the total time to the number of reads, and records the average reading time in the corresponding test data.
[0040] Preferably, the test data analysis unit includes:
[0041] The statistical chart drawing unit is used to analyze the periodic pattern of the reading time changing with the reading position offset by drawing the test data for each test length into a chart.
[0042] A readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the various steps of the aforementioned SSD physical page testing method.
[0043] As can be seen from the above technical solution, the SSD physical page testing method provided in this application first determines the test length of the first set of tests when testing the SSD. Each time data is read, the read position is determined, the test length of data is read, and the read time is returned. Starting from the second read, each time the read position is offset by a preset length, and the above read operation is repeated until the read position reaches the preset value, at which point the data reading stops. The read position and corresponding read time of each data read are counted to obtain the test data of the first set of tests. Then the test length is adjusted, and the second set of tests is performed. The above read operation is returned to obtain the test data of the second set of tests. The above test steps are repeated until the test length reaches the critical length and the test ends. The periodic pattern of the data peak change in the test data of each set of tests is analyzed to determine the size of the SSD physical page. As the read position is continuously shifted backward with a fixed offset, the read time when the data is distributed across two physical pages is significantly longer than the read time when reading one physical page. Therefore, the data size corresponding to one cycle of the peak read time can be determined as the size of an SSD physical page. Furthermore, by writing and running a program, the above test steps can be implemented to complete the read of SSD data and perform statistical analysis on the test results. No external tools are required, the operation is simple, and the technical requirements for operators are low. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0045] Figure 1A flowchart of an SSD physical page testing method provided in this application embodiment;
[0046] Figure 2 This example illustrates the statistical results of SSD physical page testing.
[0047] Figure 3 This is a schematic diagram of an SSD physical page testing device provided in an embodiment of this application. Detailed Implementation
[0048] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0049] Investigations revealed that data storage and retrieval in SSDs typically occur in units of one physical page. When reading data from an SSD, even if the data size is less than one page, it is still read as a full page. Due to this characteristic of SSDs, if the data spans two physical pages, it will be read as two pages, thus taking longer than reading a single page. The inventors discovered that, based on this principle, the relationship between read times can be used to determine whether the boundary between two physical pages falls within the data read range, further determining the physical page size. Traditional methods for determining SSD physical page sizes require testing tools and skilled personnel with specific technical expertise.
[0050] In view of this, the inventors proposed a method for testing SSD physical pages. Figure 1 A flowchart of an SSD physical page testing method provided in an embodiment of this application is shown, such as... Figure 1 As shown, the process may include:
[0051] Step S10: Determine the unit length, critical length, and test length for reading SSD data units.
[0052] Here, an SSD data unit can be a unit in an SSD that can perform data reading operations. An SSD data unit can store data and then read the data already stored in the SSD data unit. In this embodiment, the unit length is set to the length of the smallest read unit in the operating system. The unit length represents the size of the smallest data unit that can be read at one time. Specifically, the size of a physical page can be composed of one or more data units of length.
[0053] The critical length refers to the maximum length that can be read in a single test across all tests. The test length represents the size of the data read in each test within a set of tests. Optionally, to ensure the accuracy of the test results, the critical length and the test length can be set to integer multiples of the unit length. The critical length can be the maximum value of the test length, and the number of times the test length is adjusted can be controlled by the critical length.
[0054] Step S11: Determine the reading position, which is the starting position for reading data.
[0055] In this embodiment, the read position corresponding to the current read count can be determined by setting the address position, where the read position can be the starting address position of the read data. Specifically, after determining the unit length, critical length, and test length required in the test, the current read count is the first read, and the read position of the first read data in this test is determined. Optionally, the read position of the first read data can be the starting position of the SSD data unit under test.
[0056] Furthermore, in order to control irrelevant variables in each test group, the initial read position can be set to the same address before each test group begins, so that the read position for the corresponding number of reads in each test group remains consistent.
[0057] Step S12: Read the test length data at the reading position and return the reading time.
[0058] Starting from the determined read position, read data for the test length and record the read time. Since the determined test length is different in each test group, when reading different test lengths at the same read position, the read data may be distributed in one physical page or two physical pages. According to the aforementioned read principle, the read time in these two cases is significantly different.
[0059] Alternatively, after each data reading, the reading position and reading time can be recorded in a statistical chart corresponding to the test length.
[0060] Step S13: Determine whether the reading position has reached the preset value.
[0061] Step S14: When the reading position does not reach the preset value, the reading position is offset by the preset length.
[0062] The preset value can be the product of the preset length and the preset number of offsets. The preset length can be a fixed length for each offset of the reading position. The preset number of offsets can be the number of offset tests performed in each test group. The product of the preset number of offsets and the preset length represents the total offset of the reading position.
[0063] Specifically, when the reading position does not reach the preset value, it means that the number of offsets has not reached the preset number of offsets. Optionally, the reading position is offset by a fixed preset length once, and the above step S11 is returned to be executed. The position after offset is determined as the reading position, and the subsequent steps are executed.
[0064] Step S15: When the reading position reaches the preset value, the test data of the test length is statistically analyzed. The test data includes the reading position and the corresponding reading time for each reading of the test length data.
[0065] Specifically, when the read position reaches a preset value, it indicates that the offset count has reached the preset offset count, completing a set of tests for the current test length. Optionally, the test results returned each time data is read in this set of tests are statistically analyzed to obtain the test data corresponding to the test length. The test data may include the test length, read position, and corresponding read time for each read. In a set of tests, keeping the test length constant, the test data can record the process of how the read time changes with the offset of the read position within that test length.
[0066] Step S16: Determine whether the test length has reached the critical length.
[0067] Step S17: When the test length has not reached the critical length, adjust the test length.
[0068] In step S10 above, the critical length in the test has been determined. When the test length has not reached the critical length, it means that the number of times the test length has been adjusted has not reached the preset number. At this time, the test length can be adjusted, and the next set of tests can be performed. Specifically, after adjusting the test length, the process returns to step S11 to determine the initial reading position of the next set of tests, and the above reading operation is repeated to obtain the test data corresponding to the test length.
[0069] Optionally, the test length can be adjusted by adding or subtracting one or more units of length based on the current test length. To ensure the accuracy of the test results, the initial test length can be set to an integer multiple of the unit length. This ensures that after adjusting the test length in units of length, the adjusted test length will still be an integer multiple of the unit length.
[0070] Step S18: When the test length reaches the critical length, analyze the test data for each test length and determine the data size corresponding to one change cycle of the data peak as the size of the physical page where the SSD data unit is located.
[0071] Specifically, when the test length reaches the critical length, it indicates that the number of adjustments to the test length has reached the preset number, and the test ends. The test data obtained from each set of tests is then analyzed. Optionally, each set of test data can be plotted into a statistical graph or table, with the reading position as the independent variable, to observe the changing pattern of the dependent variable, reading time.
[0072] The number of statistical charts or tables drawn is consistent with the preset number of adjustments. Optionally, based on the statistical charts or tables of each test group, the variation pattern of the peak reading time under different test lengths can be analyzed to determine the peak variation period of each test data group. Since the reading position of the corresponding reading number in each test group is kept consistent by controlling variables during the test, theoretically, the peak variation period of each data group is the same. Furthermore, by determining the length of the same variation period, the data size corresponding to that length is calculated. According to the SSD data reading principle, the calculated value is the size of the SSD physical page.
[0073] The SSD physical page testing scheme provided in this embodiment first determines the test length of the first set of tests. Each time data is read, the read position is determined, the test length of data is read, and the read time is returned. Starting from the second read, each read operation first offsets the read position by a preset length, and then repeats the above read operation until the read position reaches the preset value, at which point data reading stops. The read position and corresponding read time for each read are statistically analyzed to obtain the test data for the first set of tests. Then, the test length is adjusted, and the second set of tests is performed. The above read operation is repeated to obtain the test data for the second set of tests. This testing process is repeated until the test length reaches the critical length, at which point the test ends. The periodic pattern of the test data changes in each set of tests is analyzed to determine the size of the SSD physical page. In the process of continuously offsetting the read position backward with a fixed offset, since the read time when the data is distributed across two physical pages is significantly longer than the read time of one physical page, the data size corresponding to one cycle of the peak read time can be determined as the size of the SSD physical page. Furthermore, by writing and running a program, the above testing steps can be implemented to complete the reading of SSD data and perform statistical analysis of the test results. No external tools are required, the operation is simple, and the technical requirements for operators are low.
[0074] In some embodiments of this application, considering the issue of test data accuracy, this application provides an optional implementation of obtaining the reading time in step S12 above, which may include the following steps:
[0075] S1. Record the number of reads each time data is read.
[0076] Optionally, the read count can be used to identify the number of times the same read data operation is repeatedly performed at a fixed read position in a set of tests with the same test length. The read count identifier can be updated after each read data operation is performed.
[0077] S2. When the number of reads reaches the preset threshold, record the total reading time.
[0078] The preset threshold can be a pre-set number of times to repeatedly read at the same reading position. When the number of reads reaches the preset threshold, it means that the number of times to repeatedly read at that reading position has reached the preset threshold.
[0079] Optionally, the total time for repeatedly reading data at the read position can be recorded. Specifically, the time of each read can be summed up to obtain the total time, or the time of the current moment can be recorded as the total time, starting from the moment the first read operation is performed.
[0080] S3. Calculate the average read time and record it in the corresponding test data.
[0081] Specifically, the average read time can be obtained by calculating the ratio of the total time to the number of reads. Optionally, the average read time can be recorded as the returned read time in the test data corresponding to the test length.
[0082] This embodiment performs multiple tests on each combination of test length and reading position, calculates the average reading time, ensures the accuracy of the test data for each combination, and then performs statistical analysis on the test data to obtain accurate test results.
[0083] Next, this embodiment combines Figure 2 The example provides statistical results of an SSD physical page test, further illustrating the SSD physical page testing method disclosed in this application.
[0084] In one optional scenario, the various parameters in the test are first set. The test parameters may include: unit length M, critical length K, preset offset length L, preset offset count P, and preset read count N.
[0085] Further testing of SSD physical pages involves writing and running a program. Optionally, the variables in the test may include: test length len, read position pos, and read time t, where test length len and read position pos are independent variables that need to be adjusted, and read time t can be a dependent variable output by the program. The following pseudocode example illustrates in detail the execution process of an SSD physical page testing method in this embodiment:
[0086]
[0087] The read(pos,len) function reads data of length len starting from position pos and returns the reading time.
[0088] The test parameters are set as follows in this embodiment:
[0089] Unit length M = 512 (Bytes): Set the unit length M to the smallest read / write unit of the operating system, which is 512 bytes in size;
[0090] Critical length K = 512 * 8 (Bytes): Setting the critical length K to 8 times the unit length M indicates that 8 sets of tests will be performed in this embodiment;
[0091] Preset offset length L = M = 512 (Bytes): Set the preset offset length L to the unit length M;
[0092] The preset number of offsets P = 50 (times);
[0093] The preset number of reads is N = 10 (times).
[0094] Furthermore, by executing the above procedure, eight sets of test data corresponding to the test length can be obtained. Each set of test data is plotted as a line graph, and the statistical results are as follows: Figure 2 As shown, each statistical chart has its corresponding test length data size marked above it. Figure 2 As shown, the vertical axis reading time in each statistical chart corresponds to the reading time in this scheme, and the horizontal axis value is the number of offset tests in that group of tests. Multiplying the number of offset tests by the preset offset length L can give the offset of the reading position. If the initial reading position is used as the zero point to mark the reading position, then the offset in the chart can correspond to the reading position in this scheme.
[0095] pass Figure 2 The statistical charts shown indicate that for each test length, the reading time exhibits a periodic variation as the reading position shifts. The following section combines... Figure 2 The statistical charts in the figure analyze the test data of this embodiment:
[0096] (1) When the test length data size is 512 bytes, the test data is as follows: Figure 2As shown in the first statistical chart, the read time remains relatively stable as the read position moves forward. However, a significant peak occurs when the offset is 0. This is because the initial file read operation takes time, resulting in a significantly higher read time for the first read compared to subsequent tests. Considering the margin of error, it can be assumed that when each read operation is 512 bytes, the read time does not change with the read position.
[0097] (2) When the test length data size is 512*2 bytes, the test data is as follows: Figure 2 As shown in the second statistical chart, the reading time fluctuates periodically as the reading position shifts, and a relatively large peak appears at intervals. Through experimental data analysis, the positional distance between two adjacent large peaks is 512*8 bytes. Considering the error, the reading time between other intervals can be considered relatively stable.
[0098] (3) By analogy, through observation Figure 2 The data fluctuations in read time shown in the six statistical charts at the end reveal that read time exhibits periodic fluctuations under different test lengths, and the distance between the corresponding peaks in each period is 512*8 bytes. Therefore, it can be seen that the size of the SSD physical page tested in this embodiment is 512*8 bytes, which means that the size of one physical page of the tested SSD is 4KB.
[0099] Obviously, the solution proposed in this application can test the physical pages of an SSD by writing and running a program. Furthermore, by statistically analyzing the test data of each group, it can be observed that the read time changes periodically with the offset of the read position. The positional distance between the corresponding peaks in the change period of each group of test data can be calculated to obtain the size of the physical page of the SSD under test. No external tools are required, the operation is simple, the technical requirements for the operator are low, and it is easy to implement.
[0100] The following describes an SSD physical page testing device provided in an embodiment of this application. The SSD physical page testing device described below can be referred to in correspondence with the SSD physical page testing method described above.
[0101] Combination Figure 3 This paper introduces an SSD physical page testing device, such as... Figure 3 As shown, the device may include:
[0102] The test parameter setting unit 100 is used to determine the unit length, critical length, and test length of the SSD data unit to be read. The unit length is the length of the smallest read unit, the critical length is the maximum length of a single read in the test, and the test length is the length of each data read in the test.
[0103] The test variable setting unit 110 is used to determine the reading position, which is the starting position of the data reading;
[0104] SSD data reading unit 120 is used to read data of the test length at the reading position and return the reading time;
[0105] The first judgment unit 130 is used to determine whether the reading position has reached a preset value;
[0106] The test variable adjustment unit 140 is used to offset the reading position by a preset length when the reading position does not reach the preset value. The preset length is a fixed offset length of the reading position. Then, it returns to execute the determined reading position, where the reading position is the starting position of the read data.
[0107] The test data statistics unit 150 is used to count the test data of the test length when the reading position reaches a preset value. The test data includes the reading position and the corresponding reading time for each reading of the test length data.
[0108] The second judgment unit 160 is used to determine whether the test length has reached the critical length;
[0109] The test parameter adjustment unit 170 is used to adjust the test length when the test length has not reached the critical length, and return to the determined reading position, where the reading position is the starting position of the read data;
[0110] The test data analysis unit 180 is used to analyze the test data for each test length and determine the data size corresponding to one change cycle of the data peak as the size of the physical page where the SSD data unit is located.
[0111] Optionally, the test parameter adjustment unit 170 may include:
[0112] The test length adjustment unit is used to add or subtract the unit length based on the test length.
[0113] Optionally, the test data analysis unit 180 may include:
[0114] The statistical chart drawing unit is used to analyze the periodic pattern of the reading time changing with the reading position offset by drawing the test data for each test length into a chart.
[0115] Optionally, the SSD physical page testing device provided in this application may further include:
[0116] A read count recording unit is used to record the read count each time data is read, wherein the read count is the number of times data of the same test length is read at the same read position;
[0117] A total reading time recording unit is used to record the total reading time when the number of readings reaches a preset threshold.
[0118] The average reading time recording unit calculates the average reading time, which is the ratio of the total time to the number of reads, and records the average reading time in the corresponding test data.
[0119] This application embodiment also provides a readable storage medium that can store a program suitable for processor execution, the program being used to implement various processing flows in the aforementioned SSD physical page testing scheme.
[0120] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0121] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0122] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for testing SSD physical pages, characterized in that, include: The unit length, critical length, and test length of the SSD data unit to be read are determined. The unit length is the length of the smallest read unit, the critical length is the maximum length of a single read in the test, and the test length is the length of each data read in the test. Determine the reading position, which is the starting position for reading data; Read the data of the test length at the read position and return the read time; Determine whether the read position has reached a preset value; If the read position does not reach the preset value, the read position is offset by a preset length, which is a fixed offset length of the read position, and the process returns to determine the read position, which is the starting position of the read data. If the reading position reaches a preset value, then the test data of the test length is statistically analyzed. The test data includes the reading position and the corresponding reading time for each reading of the test length data. Determine whether the test length has reached the critical length; If the test length does not reach the critical length, the test length is adjusted, and the process returns to determining the read position, where the read position is the starting position of the read data. If the test length reaches the critical length, the test data for each test length is analyzed, and the data size corresponding to one change cycle of the data peak is determined as the size of the physical page where the SSD data unit is located.
2. The method according to claim 1, characterized in that, Adjusting the test length includes: The unit length may be increased or decreased based on the test length.
3. The method according to claim 1, characterized in that, Also includes: The number of reads is recorded each time data is read, and the number of reads is the number of times the same test length of data is read at the same read position. When the number of reads reaches a preset threshold, the total reading time is recorded; Calculate the average reading time, which is the ratio of the total time to the number of reads, and record the average reading time in the corresponding test data.
4. The method according to claim 1, characterized in that, The analysis of the test data for each test length includes: By plotting the test data for each test length into a graph, the periodic pattern of the reading time changing with the reading position offset is analyzed.
5. The method according to claim 1, characterized in that, The step of determining whether the read position has reached a preset value includes: Determine whether the read position has reached the product of the preset length and the preset offset number, where the preset offset number is a pre-set number of times to offset the read position.
6. An SSD physical page testing device, characterized in that, include: The test parameter setting unit is used to determine the unit length, critical length, and test length of the SSD data unit to be read. The unit length is the length of the smallest read unit, the critical length is the maximum length of a single read in the test, and the test length is the length of each data read in the test. The test variable setting unit is used to determine the reading position, which is the starting position of the data reading; The SSD data reading unit is used to read data of the test length at the reading location and return the reading time. The first judgment unit is used to determine whether the reading position has reached a preset value; The test variable adjustment unit is used to offset the reading position by a preset length when the reading position does not reach the preset value. The preset length is a fixed offset length of the reading position. Then, it returns to execute the determined reading position, where the reading position is the starting position of the read data. The test data statistics unit is used to count the test data of the test length when the reading position reaches a preset value. The test data includes the reading position and the corresponding reading time for each reading of the test length data. The second judgment unit is used to determine whether the test length has reached the critical length; The test parameter adjustment unit is used to adjust the test length when the test length has not reached the critical length, and return to the determined reading position, where the reading position is the starting position of the read data; The test data analysis unit is used to analyze the test data for each test length if the test length reaches the critical length, and determine the data size corresponding to one change cycle of the data peak as the size of the physical page where the SSD data unit is located.
7. The apparatus according to claim 6, characterized in that, Also includes: A read count recording unit is used to record the read count each time data is read, wherein the read count is the number of times data of the same test length is read at the same read position; A total reading time recording unit is used to record the total reading time when the number of readings reaches a preset threshold. The average reading time recording unit calculates the average reading time, which is the ratio of the total time to the number of reads, and records the average reading time in the corresponding test data.
8. The apparatus according to claim 6, characterized in that, The test data analysis unit includes: The statistical chart drawing unit is used to analyze the periodic pattern of the reading time changing with the reading position offset by drawing the test data for each test length into a chart.
9. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the various steps of an SSD physical page testing method as claimed in any one of claims 1-5.