Solid-state drive performance testing method, device, electronic device, and storage medium
By using an in-memory database to store and analyze data during SSD testing, the problems of insufficient test tool accuracy and unstable log information in existing technologies are resolved, enabling more efficient performance testing and fault location.
Patent Information
- Application Number
- CN202411216975.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-08-30
AI Technical Summary
Existing solid-state drive testing methods consume a large number of read and write operations, resulting in storage space and read and write overhead that affect the accuracy of test tool results. In addition, log information is unstable, making it difficult to accurately record real-time performance indicators and quickly locate problems.
An in-memory database is used to store static data before SSD testing, real-time data during testing, and static data after testing. The high-speed read and write performance and low latency characteristics of memory are used to perform data analysis to determine the test results.
It improves the accuracy and efficiency of solid-state drive testing, can accurately identify performance changes, shorten troubleshooting time, and improve system stability and reliability.
Smart Images

Figure CN119993250B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of server technology, and in particular to a performance testing method, device, electronic device, and storage medium for a solid-state hard disk. Background Art
[0002] As an emerging storage technology, Solid State Drive (SSD) has become the data storage choice of more and more enterprise and individual users due to its fast reading and writing speed, light weight, low energy consumption, and small size that traditional mechanical hard drives do not have. It is widely used in various industries.
[0003] Existing methods for SSD testing are generally implemented using test tools. Recording performance data requires numerous read and write operations, requiring significant storage space and overhead, which can negatively impact the accuracy of the test tool itself and lead to inaccurate test results. Summary of the Invention
[0004] The present invention provides a solid state drive performance testing method, device, electronic equipment and storage medium, which are used to improve the accuracy of solid state drive testing.
[0005] The present invention provides a performance testing method for a solid-state drive, comprising the following steps:
[0006] Obtaining static data of a target solid-state drive before testing, and storing the static data before testing in a memory database, wherein the static data includes hard disk parameter data of the target solid-state drive and configuration data of a test machine for testing the target solid-state drive;
[0007] Testing the target solid-state drive based on the testing machine, and receiving real-time test data during the test of the target solid-state drive based on the memory database;
[0008] Acquire static data of the target solid-state hard disk after the test is completed, and store the static data after the test is completed in the memory database;
[0009] Based on analyzing the static data before the test, the static data after the test is completed, and the real-time test data in the memory database, the test result of the target solid state drive is determined.
[0010] According to a performance testing method for a solid-state drive provided by the present invention, the method determines a test result of the target solid-state drive by analyzing static data before the test, static data after the test, and real-time test data in the memory database, including:
[0011] Obtaining index data from the static data before the test, the static data after the test is completed, and the real-time test data, wherein the index data includes performance index data and function index data;
[0012] Comparing the indicator data with an expected indicator threshold corresponding to the indicator data to determine a first test result of the target solid-state drive;
[0013] Determining a second test result of the target solid-state drive based on determining data consistency of static data before the test and static data after the test is completed;
[0014] Determining a third test result of the target solid-state drive based on comparing the real-time test data with historical test data of the target solid-state drive;
[0015] A test result of the target solid state drive is determined based on the first test result, the second test result, and the third test result.
[0016] According to a performance testing method for a solid-state drive provided by the present invention, determining a third test result of the target solid-state drive based on comparing the real-time test data with historical test data of the target solid-state drive includes:
[0017] Acquire historical test data of the target solid-state drive, and generate a historical performance indicator line chart based on performance indicator data in the historical test data;
[0018] Determining performance indicator data of the target solid-state drive from the real-time test data, and generating a real-time performance indicator line graph based on the performance indicator data;
[0019] The historical performance indicator line graph is compared with the real-time performance indicator line graph to determine a third test result of the target solid-state drive.
[0020] According to a performance testing method for a solid-state drive provided by the present invention, determining the performance indicator data of the target solid-state drive from the real-time test data includes:
[0021] Traversing each data item in the real-time test data;
[0022] Determining a hash value of each data item based on a hash function, and constructing a hash table based on the hash value of each data item;
[0023] Determining performance indicators of the target solid-state drive, and determining a hash value of each performance indicator based on the hash function;
[0024] Based on the hash values of the performance indicators, determining, from the hash table, matching items that match the hash values of the performance indicators;
[0025] Based on the matching items, performance indicator data of the target solid-state drive is determined.
[0026] According to a performance testing method for a solid-state drive provided by the present invention, after determining the test result of the target solid-state drive, the method further includes:
[0027] Based on the test results, scoring the target solid state drive;
[0028] Based on the score, a quality risk of the target solid-state drive is determined.
[0029] According to a performance testing method for a solid-state drive provided by the present invention, receiving real-time test data during the test of the target solid-state drive based on the memory database includes:
[0030] Based on a pre-built data acquisition interface, real-time test data during the test of the target solid-state drive is received, and the real-time test data is stored in a memory database.
[0031] According to a performance testing method for a solid-state drive provided by the present invention, after determining the test result of the target solid-state drive, the method further includes:
[0032] After the test of the target solid state drive is completed, the static data before the test, the static data after the test is completed, and the real-time test data in the memory database are stored in the physical database, and the static data before the test, the static data after the test is completed, and the real-time test data in the memory database are deleted.
[0033] The present invention also provides a performance testing device for a solid-state hard disk, comprising the following modules:
[0034] A pre-test data acquisition module is used to obtain static data of the target solid-state drive before the test and store the static data before the test in a memory database, wherein the static data includes hard disk parameter data of the target solid-state drive and configuration data of the test machine for testing the target solid-state drive;
[0035] A test data acquisition module, configured to test the target solid-state drive based on the test machine and receive real-time test data during the test of the target solid-state drive based on the memory database;
[0036] A post-test data acquisition module, configured to acquire static data of the target solid-state drive after the test is completed, and store the static data after the test is completed in the memory database;
[0037] The test result determination module is used to determine the test result of the target solid state drive based on analyzing the static data before the test, the static data after the test is completed, and the real-time test data in the memory database.
[0038] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a performance test method for a solid-state hard disk as described above is implemented.
[0039] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for testing the performance of a solid-state hard disk.
[0040] The solid-state drive performance testing method, device, electronic device, and storage medium provided by the present invention introduce an in-memory database as a real-time storage medium during the target solid-state drive test process to store static data before the target solid-state drive test, test data during the target solid-state drive test, and static data after the target solid-state drive test is completed, and perform performance testing based on the stored data. Because the in-memory database utilizes the high-speed read and write performance and low-latency characteristics of memory, it can significantly improve the access speed and response performance of the database, and can well adapt to the storage requirements for hard drive performance indicators and related logs during performance and functional testing, thereby improving the accuracy of the target solid-state drive test. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 It is a flow chart of the performance testing method of the solid state drive provided by the present invention.
[0043] Figure 2 This is a real-time display discount chart of bandwidth data provided by the present invention.
[0044] Figure 3 This is a schematic diagram of the data analysis module processing provided by the present invention.
[0045] Figure 4It is a schematic diagram of the data acquisition synchronization process provided by the present invention.
[0046] Figure 5 It is a structural schematic diagram of the performance testing device for a solid state drive provided by the present invention.
[0047] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0048] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0049] As an emerging storage technology, SSDs, with their advantages over traditional mechanical hard drives, such as fast read / write speeds, lightweight design, low power consumption, and compact size, are becoming the data storage choice for a growing number of businesses and individuals, and are widely used across various industries. With the evolution of SSD technology and the rapid pace of product updates, ensuring product quality has become a growing concern for SSD manufacturers.
[0050] While SSD testing technology has improved significantly compared to traditional hard drives, many challenges remain. SSD testing primarily involves performance testing and functional testing.
[0051] SSD performance testing requires real-time recording and analysis of the drive's various I / O performance metrics. Testing tools (such as the fio tool) are commonly used. While these tools offer comprehensive functionality, they are unable to record all performance metrics at a very small time granularity (e.g., 1ms). This is because recording metric data requires numerous read and write operations, requiring significant storage space and overhead, which can affect the accuracy of the test tool's results. Developing a more detailed and accurate record of real-time performance metrics during drive testing is a key issue requiring improvement in SSD performance testing.
[0052] In the field of functional testing, when SSD products encounter functional problems, how to quickly collect relevant logs and locate the cause of the problem has always been one of the common work scenarios encountered by product testing and development engineers. However, the current problem location is due to the relatively simple and unstable log information: it mainly includes logs recorded by the SSD product firmware and operating system-related logs (such as dmesg, / var / log / message, and other Linux system logs), and the relevant logs may even be lost.
[0053] In view of the defects of the related methods, the present invention provides a performance testing method for a solid state hard disk. Figure 1 FIG. 1 is a flow chart of a performance test method for a solid-state hard disk provided by the present invention. Figure 1 As shown, the method includes the following:
[0054] Step 110: Obtain static data of the target solid-state drive before testing, and store the static data before testing in a memory database, wherein the static data includes hard disk parameter data of the target solid-state drive and configuration data of a test machine for testing the target solid-state drive;
[0055] Step 120: testing the target solid-state drive based on the testing machine, and receiving test data during the testing of the target solid-state drive based on the memory database;
[0056] Step 130, obtaining static data of the target solid state drive after the test is completed, and storing the static data after the test in the memory database;
[0057] Step 140 : Based on the analysis of the static data before the test, the static data after the test, and the test data in the memory database, determine the test result of the target solid state drive.
[0058] The solid-state drive performance testing method provided by the present invention can be performed by an electronic device, a component of an electronic device, an integrated circuit, or a chip. The electronic device can be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), while the non-mobile electronic device can be a server, a network attached storage (NAS), or a personal computer (PC), etc., although the present invention does not impose any specific limitations thereon.
[0059] The following takes a computer executing the performance testing method of the solid-state hard disk provided by the present invention as an example to describe the technical solution of the present invention in detail.
[0060] In step 110, static data of the target solid state drive before testing is obtained and stored in a memory database. The static data includes hard disk parameter data of the target solid state drive and configuration data of a test machine for testing the target solid state drive.
[0061] Before testing the target solid state drive, static data is acquired, wherein the static data includes hard drive parameter data and configuration data of a test machine for testing the target solid state drive.
[0062] Specifically, the target SSD's hard drive parameter data includes: hard drive configuration information (such as capacity, firmware version, controller model, NAND chip type, etc.), read and write speed, response time / latency, power consumption, etc.
[0063] The configuration data of the test machine includes: hardware configuration (Central Processing Unit (CPU) model, memory model and capacity, maximum number of supported hard drives, peripheral component interconnect standard or Peripheral Component Interconnect Express (PCIE) interface type), software information (operating system version, kernel version), etc.
[0064] The configuration data of the test machine may further include: information related to the target solid-state drive and the test machine: the target solid-state drive slot position, the binding relationship between the target solid-state drive and the CPU core, and the like.
[0065] After obtaining the above static data, it can be stored in the relevant table of the in-memory database.
[0066] An in-memory database (IMDB) is a database management system that stores data directly in a computer's memory, rather than on traditional disks or solid-state drives. This storage method leverages the much higher read and write speeds of memory than disks, significantly improving data access performance and making it particularly suitable for large-scale data processing scenarios that require fast responses.
[0067] Since data is stored in memory and has strong real-time performance, in-memory databases can complete data operations within milliseconds or even microseconds, significantly reducing data access latency and improving user experience and system efficiency.
[0068] In step 120, the target solid state drive is tested based on the testing machine, and test data during the test of the target solid state drive is received based on the memory database.
[0069] The test machine can be installed with specialized SSD testing software, which usually contains multiple test modules that can simulate read and write operations in various actual usage scenarios to comprehensively evaluate the performance and stability of the SSD.
[0070] Connect the target SSD to the test machine through the appropriate interface, start the test process through the test software, and select the corresponding test module and parameter settings as needed.
[0071] During the test, the test software sends the target SSD's performance parameters and test results to the in-memory database in real time. The in-memory database uses its high-speed read and write capabilities to quickly capture and store this data.
[0072] Optionally, the acquired test data is stored in a table in an in-memory database. The stored data may be as follows:
[0073] System resource data:
[0074] Contains the operating status information of devices such as CPU, memory, and network. This data is formatted and stored in the memory database in real time through the data acquisition interface. An example of the data format is shown in Table 1:
[0075] Table 1 System resource data table
[0076]
[0077] System operation log data:
[0078] Through the pre-opened system log interface, relevant log interface data is collected into the log interface file. The data format is shown in Table 2:
[0079] Table 2 Log data file table
[0080]
[0081] The log file content is stored in the data table using a blob type field.
[0082] The information of the target solid-state drive and related IO indicators are as follows:
[0083] Disk attribute data. The storage time granularity of this type of data does not need to be very small (generally 1 second is sufficient). Specific data examples are shown in Table 3:
[0084] Table 3 Disk attribute data table
[0085]
[0086] Disk IO indicator data:
[0087] Disk index data requires a relatively small time granularity (usually 0.1s or shorter). This granularity can be configured according to specific requirements. Specific data examples are shown in Table 4:
[0088] Table 4 Disk IO indicator data table
[0089]
[0090] In step 130, the static data of the target solid state drive after the test is completed is obtained, and the static data after the test is completed is stored in the memory database.
[0091] After the target solid state drive is tested, static data of the target solid state drive after the test is completed is obtained, wherein the static data after the test also includes hard disk parameter data of the target solid state drive and configuration data of the test machine used to test the target solid state drive.
[0092] It is understood that by obtaining test data from the target SSD before and after the test and comparing the data before and after the test, it is possible to determine whether the parameters of the target SSD have changed, and accurately identify the changes in the SSD's performance parameters during the test. This comparison method can reduce errors caused by subjective judgment or external interference, and improve the accuracy of the assessment.
[0093] If significant changes in SSD parameters are detected after testing (e.g., decreased read / write speeds, increased response times, etc.), the problem can be quickly located and appropriate measures taken to repair or replace the drive. This helps shorten troubleshooting time and improve system stability and reliability.
[0094] In step 140 , based on the analysis of the static data before the test, the static data after the test, and the test data in the memory database, the test result of the target solid state drive is determined.
[0095] After acquiring static data before the test, static data after the test is completed, and test data generated during the test, the acquired data is analyzed in a memory database to determine the test result of the target solid-state drive.
[0096] Specifically, analyzing the data in the in-memory database may include:
[0097] You can set indicator-related thresholds. For example, for system memory data, if the memory usage exceeds 90%, an alarm will be triggered, the test process will be automatically interrupted 100%, and all data snapshots at the test interruption time node will be recorded to preserve the problem site.
[0098] For the performance indicators collected in real time, such as the bandwidth data of disk nvme1, a line chart of the data at a specified time granularity is displayed in real time, such as Figure 2 The present invention provides a real-time display of bandwidth data, as shown in a line chart. The horizontal axis represents time, and the vertical axis represents bandwidth data. The line chart can be dynamically refreshed. A comparison with historical test records can be selected to view real-time differences. A comparison with SPEC expected indicators can be displayed to check in real time whether the measured data meets the expected SPEC expected indicators. The display can include basic data and aggregated statistical data, such as data consistency.
[0099] If a disk malfunction occurs during testing, the fault can be located and troubleshooted based on the collected data. The following scenarios are available:
[0100] If a test drive experiences a functional failure, after collecting relevant logs in real time, the first step is to search for obvious failure log data using a keyword library (historical accumulation). Then, the system status data (memory, CPU) at the time of the failure, as well as test drive data (performance indicators such as read and write, and physical data such as temperature), are matched against a problem library (historical accumulation) to see if there are similar scenarios. Based on the judgment logic, a preliminary conclusion is drawn about the fault location and supporting data is provided. If the test drive's performance fluctuates abnormally, the root cause can be determined by matching the historical performance problem library with the problem data, providing supporting data.
[0101] The accuracy of the above problem location process will become more accurate as the amount of data obtained during the test accumulates.
[0102] Specifically, such as Figure 3 The data analysis module processing diagram provided by the present invention is shown in the figure. The data analysis module can be set to analyze the static data before the test, the static data after the test, and the real-time test data. The analyzed indicator data is displayed in real time, and the problems determined by the analysis are located in real time. The data after the test is completed can be subjected to more complex, multi-dimensional data analysis and mining display, and the data model can be modeled based on a large amount of data. Application scenarios include data trend display analysis, test functions, and the cumulative improvement of the performance problem library. The disk version is scored for comprehensive performance data, and graded according to the function and performance of the disk, and the corresponding quality assessment of the disk version is given to identify the existing quality risks.
[0103] The performance testing method for solid-state drives provided by the present invention introduces an in-memory database as a real-time storage medium during the target solid-state drive test process, stores static data before the target solid-state drive test, test data during the target solid-state drive test, and static data after the target solid-state drive test is completed, and performs performance testing based on the stored data. Because the in-memory database utilizes the high-speed read and write performance and low-latency characteristics of memory, it can significantly improve the access speed and response performance of the database. It can well adapt to the storage requirements for hard drive performance indicators and related logs during performance and functional testing, thereby improving the accuracy of the target solid-state drive test.
[0104] In one embodiment, based on analyzing the static data before the test, the static data after the test is completed, and the real-time test data in the memory database, the test result of the target solid-state hard drive is determined, including: obtaining indicator data from the static data before the test, the static data after the test is completed, and the real-time test data, the indicator data including performance indicator data and functional indicator data; comparing the indicator data with the expected indicator threshold corresponding to the indicator data to determine the first test result of the target solid-state hard drive; determining the second test result of the target solid-state hard drive based on determining the data consistency of the static data before the test and the static data after the test is completed; determining the third test result of the target solid-state hard drive based on comparing the real-time test data with the historical test data of the target solid-state hard drive; determining the test result of the target solid-state hard drive based on the first test result, the second test result, and the third test result.
[0105] Predetermine the expected thresholds for each metric. These thresholds can be set based on the target SSD's specifications, industry standards, or customer requirements. For example, for system memory data, if memory utilization exceeds 90%, an abnormal alarm can be set, automatically interrupting the test process and recording all data snapshots at the time of the interruption to preserve the problem site. Compare the collected metric data with the corresponding expected thresholds to determine whether the target SSD meets performance and functional requirements.
[0106] Based on the comparison results, it is determined whether the target solid-state drive meets expectations in terms of performance and functions, forming a first test result.
[0107] Based on the data consistency evaluation results, the performance of the target solid-state drive in terms of data protection and system stability is determined to form a second test result.
[0108] Obtain historical test data for the target SSD, including previous performance evaluation results and failure records. Compare real-time test data with historical data to analyze performance trends and potential issues for the target SSD. Pay special attention to performance degradation, abnormal fluctuations, or new failure modes. Based on this comparative analysis of real-time test data and historical data, assess the long-term stability and performance trends of the target SSD, generating the third test results.
[0109] The first, second, and third test results are comprehensively evaluated, taking into account the importance and interrelationship of each test result. Based on the comprehensive evaluation results, the test results of the target solid-state drive are determined.
[0110] In one embodiment, the third test result of the target solid-state hard drive is determined based on comparing the real-time test data with the historical test data of the target solid-state hard drive, including: obtaining the historical test data of the target solid-state hard drive, and generating a historical performance indicator line graph based on the performance indicator data in the historical test data; determining the performance indicator data of the target solid-state hard drive from the real-time test data, and generating a real-time performance indicator line graph based on the performance indicator data; comparing the historical performance indicator line graph with the real-time performance indicator line graph to determine the third test result of the target solid-state hard drive.
[0111] Collect historical test data for the target SSD. This data is typically stored in a database, file, or dedicated test management system. This historical test data should include performance metrics at multiple time points, such as read and write speeds, IOPS (input and output operations per second), and latency. This data should cover the entire lifecycle of the target SSD, or at least a sufficiently long period to observe performance trends.
[0112] Generate a historical performance indicator line chart based on the performance indicator data in the acquired historical test data. The line chart should clearly show the changes of each performance indicator over time.
[0113] Based on the performance indicator data in the real-time test data collected during the real-time test process, a real-time performance indicator line chart is generated.
[0114] Compare the historical performance indicator line chart with the real-time performance indicator line chart to check whether the real-time performance indicator line chart continues the trend of the historical line chart. If the trends are consistent, the target SSD performance is stable. If the trends change significantly, further analysis is required. Observe the real-time line chart for any unusual performance fluctuations. These fluctuations may be caused by factors such as an unstable test environment, a malfunction of the target SSD itself, or external interference. Also, pay attention to whether the performance indicators in the real-time line chart show a downward trend. If multiple performance indicators show a decline, it may indicate that the target SSD performance is deteriorating and requires maintenance or replacement.
[0115] Based on the comparison results of the historical and real-time performance indicator line graphs, the third test result of the target solid-state drive can be determined.
[0116] In one embodiment, determining the performance indicator data of the target solid-state hard drive from the real-time test data includes: traversing each data item in the real-time test data; determining the hash value of each data item based on a hash function, and constructing a hash table based on the hash value of each data item; determining the performance indicator of the target solid-state hard drive, and determining the hash value of each performance indicator based on the hash function; based on the hash value of each performance indicator, determining a matching item from the hash table that matches the hash value of each performance indicator; and determining the performance indicator data of the target solid-state hard drive based on the matching item.
[0117] Traverse each data item in the real-time test data set. For each data item traversed, calculate its hash value using a predefined hash function. A hash function is a function that transforms an input of arbitrary length into an output (hash value) of fixed length through a certain algorithm.
[0118] A hash table is constructed using the calculated hash value as the key and the corresponding data item or reference to the data item (such as a pointer or index) as the value. A hash table is a data structure that quickly accesses data items by hash value, allowing data to be searched, inserted, and deleted in O(1) time complexity.
[0119] For each performance indicator, we use the previously defined hash function to calculate its hash value. Using the calculated performance indicator hash value as the key, we search the hash table for a matching entry. If an entry corresponding to the hash value exists in the hash table, it means that the real-time test data contains data for that performance indicator.
[0120] Based on the above process, we can efficiently traverse real-time test data and use the hash table to quickly locate and verify the performance indicator data of the target SSD. This method not only improves data processing efficiency but also reduces the complexity of data retrieval and verification.
[0121] In one embodiment, after determining the test result of the target solid state drive, the method further includes: scoring the target solid state drive based on the test result; and determining the quality risk of the target solid state drive based on the score.
[0122] Specifically, the data after testing can be analyzed and displayed in complex, multi-dimensional data formats. Data models can be built based on this large amount of data. Application scenarios include data trend analysis, testing functionality, and the cumulative improvement of performance problem libraries. Disk versions are scored based on comprehensive performance data, with graded scores based on disk functionality and performance. This provides a quality assessment of each disk version and identifies any quality risks.
[0123] In one embodiment, based on the memory database, real-time test data during the target solid-state hard drive test process is received, including: based on a pre-built data acquisition interface, real-time test data during the target solid-state hard drive test process is received, and the real-time test data is stored in the memory database.
[0124] Design and implement one or more data collection interfaces based on data collection requirements. These interfaces can be software-level APIs (application programming interfaces) or hardware-level physical interfaces (such as direct data reading from sensors). The interface design should ensure stable and reliable collection of the required real-time test data.
[0125] The received real-time test data is written into the in-memory database. During the writing process, a corresponding index structure can be established based on the characteristics of the data and query requirements to improve the efficiency of data retrieval and query.
[0126] In one embodiment, after determining the test result of the target solid-state hard drive, it also includes: after the test of the target solid-state hard drive is completed, the static data before the test, the static data after the test is completed, and the real-time test data in the memory database are stored in the physical database, and the static data before the test, the static data after the test is completed, and the real-time test data in the memory database are deleted.
[0127] Understandably, after the test is complete, the system detects in real time that the target SSD no longer has I / O data. Real-time data collection will cease, and the corresponding log collection process will also end. Because the access speed of the in-memory database decreases with increasing data volume, the in-memory database will only store test data for a limited period of time (e.g., three days). Historical data will be deleted after synchronization with the physical database.
[0128] The specific collection and synchronization process can be as follows Figure 4The data acquisition and synchronization process provided by the present invention is shown in a schematic diagram. Before the target SSD is tested on the test machine, static data of the target SSD before the test is obtained and stored in the memory database. The test machine performs performance and functional tests on the target SSD, obtains real-time test data during the test of the target SSD, and stores it in the memory database. After the test is completed, static data of the target SSD after the test is completed is obtained and stored in the memory database.
[0129] After storing in the memory database, data analysis and display are performed. After the data analysis and display are completed, the data stored in the memory database is synchronized to the physical database.
[0130] The performance testing device for a solid-state drive provided by the present invention is described below. The performance testing device for a solid-state drive described below and the performance testing method for a solid-state drive described above can be referenced to each other.
[0131] like Figure 5 As shown, the device includes:
[0132] A pre-test data acquisition module 510 is configured to acquire static data of a target solid-state drive before testing and store the static data before testing in a memory database. The static data includes hard disk parameter data of the target solid-state drive and configuration data of a test machine used to test the target solid-state drive.
[0133] A test data acquisition module 520 is configured to test the target solid-state drive based on the test machine and receive real-time test data during the test of the target solid-state drive based on the memory database;
[0134] A post-test data acquisition module 530 is configured to acquire static data of the target solid-state drive after the test is completed, and store the static data after the test in the memory database;
[0135] The test result determination module 540 is configured to determine the test result of the target solid state drive based on analyzing the static data before the test, the static data after the test, and the real-time test data in the memory database.
[0136] The performance testing device for a solid-state drive provided by the present invention incorporates an in-memory database as a real-time storage medium during the target solid-state drive test process, storing static data before the target solid-state drive test, test data during the target solid-state drive test, and static data after the target solid-state drive test is completed, and then performing performance testing based on the stored data. Because the in-memory database utilizes the high-speed read and write performance and low-latency characteristics of memory, it can significantly improve the access speed and response performance of the database. It can well adapt to the storage requirements for hard drive performance indicators and related logs during performance and functional testing, thereby improving the accuracy of the target solid-state drive test.
[0137] In one embodiment, the test result determination module 540 is specifically configured to:
[0138] The determining of the test result of the target solid-state drive by analyzing the static data before the test, the static data after the test, and the real-time test data in the memory database includes:
[0139] Obtaining index data from the static data before the test, the static data after the test is completed, and the real-time test data, wherein the index data includes performance index data and function index data;
[0140] Comparing the indicator data with an expected indicator threshold corresponding to the indicator data to determine a first test result of the target solid-state drive;
[0141] Determining a second test result of the target solid-state drive based on determining data consistency of static data before the test and static data after the test is completed;
[0142] Determining a third test result of the target solid-state drive based on comparing the real-time test data with historical test data of the target solid-state drive;
[0143] A test result of the target solid state drive is determined based on the first test result, the second test result, and the third test result.
[0144] In one embodiment, the test result determination module 540 is further configured to:
[0145] The determining a third test result of the target solid state drive based on comparing the real-time test data with historical test data of the target solid state drive includes:
[0146] Acquire historical test data of the target solid-state drive, and generate a historical performance indicator line chart based on performance indicator data in the historical test data;
[0147] Determining performance indicator data of the target solid-state drive from the real-time test data, and generating a real-time performance indicator line graph based on the performance indicator data;
[0148] The historical performance indicator line graph is compared with the real-time performance indicator line graph to determine a third test result of the target solid-state drive.
[0149] In one embodiment, the test result determination module 540 is further configured to:
[0150] Determining the performance indicator data of the target solid-state drive from the real-time test data includes:
[0151] Traversing each data item in the real-time test data;
[0152] Determining a hash value of each data item based on a hash function, and constructing a hash table based on the hash value of each data item;
[0153] Determining performance indicators of the target solid-state drive, and determining a hash value of each performance indicator based on the hash function;
[0154] Based on the hash values of the performance indicators, determining, from the hash table, matching items that match the hash values of the performance indicators;
[0155] Based on the matching items, performance indicator data of the target solid-state drive is determined.
[0156] In one embodiment, the test result determination module 540 is further configured to:
[0157] After determining the test result of the target solid state drive, the method further includes: scoring the target solid state drive based on the test result; and determining the quality risk of the target solid state drive based on the score.
[0158] In one embodiment, the test data acquisition module 520 is specifically configured to:
[0159] Receiving real-time test data during the test of the target solid-state drive based on the memory database includes:
[0160] Based on a pre-built data acquisition interface, real-time test data during the test of the target solid-state drive is received, and the real-time test data is stored in a memory database.
[0161] In one embodiment, the test result determination module 540 is further configured to:
[0162] After determining the test result of the target solid state drive, the method further includes:
[0163] After the test of the target solid state drive is completed, the static data before the test, the static data after the test is completed, and the real-time test data in the memory database are stored in the physical database, and the static data before the test, the static data after the test is completed, and the real-time test data in the memory database are deleted.
[0164] Figure 6 An example of a physical structure diagram of an electronic device is shown below. Figure 6 As shown, the electronic device may include: a processor 610, a communications interface 620, a memory 630, and a communications bus 640, wherein the processor 610, the communications interface 620, and the memory 630 communicate with each other via the communications bus 640. The processor 610 may call logic instructions in the memory 630 to execute a performance testing method for a solid-state drive, the method comprising: obtaining static data of a target solid-state drive before testing, and storing the static data before testing in a memory database, the static data including hard disk parameter data of the target solid-state drive and configuration data of a test machine used to test the target solid-state drive;
[0165] Testing the target solid-state drive based on the testing machine, and receiving real-time test data during the test of the target solid-state drive based on the memory database;
[0166] Acquire static data of the target solid-state hard disk after the test is completed, and store the static data after the test is completed in the memory database;
[0167] Based on analyzing the static data before the test, the static data after the test is completed, and the real-time test data in the memory database, the test result of the target solid state drive is determined.
[0168] Furthermore, the logic instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0169] On the other hand, the present invention further provides a computer program product, the computer program product including a computer program, the computer program being storable on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer is capable of executing the solid-state hard disk performance testing method provided by the above methods, the method including: obtaining static data of a target solid-state hard disk before testing, and storing the static data before testing in a memory database, the static data including hard disk parameter data of the target solid-state hard disk and configuration data of a testing machine for testing the target solid-state hard disk;
[0170] Testing the target solid-state drive based on the testing machine, and receiving real-time test data during the test of the target solid-state drive based on the memory database;
[0171] Acquire static data of the target solid-state hard disk after the test is completed, and store the static data after the test is completed in the memory database;
[0172] Based on analyzing the static data before the test, the static data after the test is completed, and the real-time test data in the memory database, the test result of the target solid state drive is determined.
[0173] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the solid-state hard disk performance testing method provided by the above methods, the method comprising: obtaining static data of a target solid-state hard disk before testing, and storing the static data before testing in a memory database, the static data including hard disk parameter data of the target solid-state hard disk and configuration data of a test machine for testing the target solid-state hard disk;
[0174] Testing the target solid-state drive based on the testing machine, and receiving real-time test data during the test of the target solid-state drive based on the memory database;
[0175] Acquire static data of the target solid-state hard disk after the test is completed, and store the static data after the test is completed in the memory database;
[0176] Based on analyzing the static data before the test, the static data after the test is completed, and the real-time test data in the memory database, the test result of the target solid state drive is determined.
[0177] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0178] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.
[0179] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A performance testing method for a solid state drive, characterized in that: The method comprises: Obtaining static data of a target solid-state drive before testing, and storing the static data before testing in a memory database, wherein the static data includes hard disk parameter data of the target solid-state drive and configuration data of a test machine for testing the target solid-state drive; Testing the target solid-state drive based on the testing machine, and receiving real-time test data during the test of the target solid-state drive based on the memory database; Acquire static data of the target solid-state hard disk after the test is completed, and store the static data after the test is completed in the memory database; Based on analyzing the static data before the test, the static data after the test is completed, and the real-time test data in the memory database, the test result of the target solid state drive is determined.
2. The performance testing method for a solid-state drive according to claim 1, wherein: The determining of the test result of the target solid-state drive by analyzing the static data before the test, the static data after the test, and the real-time test data in the memory database includes: Obtaining index data from the static data before the test, the static data after the test is completed, and the real-time test data, wherein the index data includes performance index data and function index data; Comparing the indicator data with an expected indicator threshold corresponding to the indicator data to determine a first test result of the target solid-state drive; Determining a second test result of the target solid-state drive based on determining data consistency of static data before the test and static data after the test is completed; Determining a third test result of the target solid-state drive based on comparing the real-time test data with historical test data of the target solid-state drive; A test result of the target solid state drive is determined based on the first test result, the second test result, and the third test result.
3. The performance testing method for a solid-state drive according to claim 2, wherein: The determining a third test result of the target solid state drive based on comparing the real-time test data with historical test data of the target solid state drive includes: Acquire historical test data of the target solid-state drive, and generate a historical performance indicator line chart based on performance indicator data in the historical test data; Determining performance indicator data of the target solid-state drive from the real-time test data, and generating a real-time performance indicator line graph based on the performance indicator data; The historical performance indicator line graph is compared with the real-time performance indicator line graph to determine a third test result of the target solid-state drive.
4. The performance testing method for a solid-state drive according to claim 3, wherein: Determining the performance indicator data of the target solid-state drive from the real-time test data includes: Traversing each data item in the real-time test data; Determining a hash value of each data item based on a hash function, and constructing a hash table based on the hash value of each data item; Determining performance indicators of the target solid-state drive, and determining a hash value of each performance indicator based on the hash function; Based on the hash values of the performance indicators, determining, from the hash table, matching items that match the hash values of the performance indicators; Based on the matching items, performance indicator data of the target solid-state drive is determined.
5. The performance testing method for a solid-state drive according to claim 1, wherein: After determining the test result of the target solid state drive, the method further includes: Based on the test results, scoring the target solid state drive; Based on the score, a quality risk of the target solid-state drive is determined.
6. The performance testing method for a solid-state drive according to claim 1, wherein: The receiving, based on the memory database, real-time test data during the test of the target solid-state drive includes: Based on a pre-built data acquisition interface, real-time test data during the test of the target solid-state drive is received, and the real-time test data is stored in a memory database.
7. The performance testing method for a solid-state drive according to claim 1, wherein: After determining the test result of the target solid state drive, the method further includes: After the test of the target solid state drive is completed, the static data before the test, the static data after the test is completed, and the real-time test data in the memory database are stored in the physical database, and the static data before the test, the static data after the test is completed, and the real-time test data in the memory database are deleted.
8. A performance testing device for a solid state drive, characterized in that: include: A pre-test data acquisition module is used to obtain static data of the target solid-state drive before the test and store the static data before the test in a memory database, wherein the static data includes hard disk parameter data of the target solid-state drive and configuration data of the test machine for testing the target solid-state drive; A test data acquisition module, configured to test the target solid-state drive based on the test machine and receive real-time test data during the test of the target solid-state drive based on the memory database; A post-test data acquisition module, configured to acquire static data of the target solid-state drive after the test is completed, and store the static data after the test is completed in the memory database; The test result determination module is used to determine the test result of the target solid state drive based on analyzing the static data before the test, the static data after the test is completed, and the real-time test data in the memory database.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the performance testing method for the solid state drive according to any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the performance testing method for a solid state drive according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Automatic unit test method and device based on memory database
CN110750457A
Performance test method, device and equipment for memory database and readable storage medium
CN110795319A