A test method and system for garbage collection performance in a raid reconstruction process
Patent Information
- Application Number
- CN202611390416.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-09
- Publication Date
- 2026-10-09
AI Technical Summary
传统方法中,RAID重构过程与垃圾回收操作相互独立,导致以下技术问题:传统GC机制(垃圾回收)在RAID重构期间产生大量不必要的数据搬迁,这些搬迁操作与重构操作之间缺乏协同机制:重构期间与GC操作会竞争有限的存储资源,造成资源调用冲突,重构期间前端业务性能显著劣化
[0051]1)通过构建模拟测试环境,创建真实的RAID重构场景和工作负载模式,能够准确评估存储设备在RAID重构过程中的垃圾回收性能。
Smart Images

Figure CN122889036A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of storage system testing technology, and specifically to a method and system for testing garbage collection performance during RAID reconstruction. Background Technology
[0002] In modern storage systems, RAID (Redundant Array of Independent Disks) technology provides fault tolerance through data redundancy. When a disk failure occurs in a RAID array, the system needs to perform a reconstruction operation to restore data redundancy. In flash-based storage systems, garbage collection (GC) is a key component for ensuring long-term stable operation. Traditional garbage collection mechanisms reclaim flash blocks containing invalid data, organize valid data, and free up space for new data to be written. In traditional methods, the RAID reconstruction process and garbage collection operations are independent of each other, leading to the following technical problems: Traditional GC mechanisms generate a large amount of unnecessary data migration during RAID reconstruction, and these migration operations lack a coordination mechanism with the reconstruction operation; during reconstruction, GC operations compete for limited storage resources, causing resource allocation conflicts, and significantly degrading the performance of front-end services during reconstruction. Frequent migration of invalid data leads to increased write amplification, thereby shortening the lifespan of flash memory devices. Especially during RAID reconstruction, without an effective coordination mechanism, the write amplification problem will be more severe. Finally, there is currently a lack of standardized testing methods to evaluate the garbage collection performance of storage devices during RAID reconstruction. Existing testing methods are mostly designed for garbage collection performance under normal workloads, and cannot accurately assess garbage collection efficiency and its impact on system performance in the special scenario of RAID reconstruction. Summary of the Invention
[0003] The purpose of this invention is to overcome the shortcomings of the prior art and provide a test method and system for garbage collection performance during RAID reconstruction, providing a standardized test method to evaluate the efficiency of RAID reconstruction-coordinated garbage collection and its impact on system performance.
[0004] The objective of this invention is achieved through the following technical solution:
[0005] Firstly, a method for testing garbage collection performance during RAID reconstruction includes the following steps:
[0006] Test environment initialization: Perform a secure erase on the storage device under test to completely erase historical data; update the firmware of the storage device under test to the version specified for the test and disable the automatic power management function; preheat the device by running it under continuous load to bring it to a stable operating temperature of 65-70℃;
[0007] Workload generation and fragmentation: Generate workloads with specific characteristics based on the target test scenario. These workloads are used to simulate different business scenarios. Run the generated workloads on the storage device under test and inject data fragmentation mode according to the test level.
[0008] RAID Failure Simulation: Simulate disk failure at the corresponding RAID level in the target test scenario, mark the data blocks of the failed disk and start the reconstruction and data recovery process; record the precise time point of the failure injection as a performance benchmark timestamp;
[0009] Collaborative GC test: The storage device under test receives a collaborative garbage collection instruction, collaboratively executes data reconstruction and GC activities, and records the collaborative execution process and scheduling information of GC and data reconstruction.
[0010] Performance data acquisition: Real-time acquisition of performance data of the storage device under test during collaborative data reconstruction and GC activities, acquisition of I / O throughput and latency distribution data at 100ms intervals, monitoring of GC activity indicators, device internal status and power consumption and thermal data;
[0011] Key performance indicator calculations: Based on the collected raw performance data, calculate the data migration efficiency improvement rate and reconstruction time acceleration ratio to evaluate efficiency; calculate the write amplification improvement and QoS impact improvement to evaluate device lifespan; and calculate the flash memory wear reduction and front-end IOPS penetration rate to evaluate performance.
[0012] Performance compliance assessment and report generation: When the instruction response latency is less than 10ms, the data migration efficiency improvement rate, reconstruction time speedup ratio, write amplification improvement degree, and QoS impact improvement degree are compared with preset thresholds to determine whether the performance of each aspect meets the standards; if the performance of each aspect meets the standards, an optimization verification report containing basic information, performance data, and compliance matrix content is automatically generated; if the performance does not meet the standards, a problem diagnosis report containing bottleneck identification and fault classification content is generated.
[0013] Compatibility Level Certification: Based on the test results, the device compatibility level is assessed, a digital certificate and a unique authentication ID are generated, a one-year validity period is set, and the device information is entered into the compatibility database.
[0014] Furthermore, workloads with specific characteristics are generated based on the target test scenario. These workloads are used to simulate different business scenarios, specifically including:
[0015] The hardware parameters of the storage device under test are set according to the target test scenario to make the workload have a specific data distribution pattern. The hardware parameters include read / write ratio, IO size, random / sequential access ratio, and number of concurrent threads. The target test scenarios include transaction processing scenario, virtualization scenario, streaming media storage scenario, and data analysis scenario.
[0016] Write the initial dataset into the hard disk group of the storage device under test to make the storage device under test reach the predetermined effective data ratio.
[0017] An aging process is performed to simulate the state of the NAND flash memory media after the storage device under test has been running for a long time.
[0018] Furthermore, the step of running the generated workload in the storage device under test and injecting data fragmentation mode according to the test level specifically includes:
[0019] By adjusting the effective data ratio, sequential access ratio, and random I / O threads of the workload, the workload can achieve different levels of data fragmentation, including low, medium, high, and extreme.
[0020] Run a workload that injects fragmented data into the storage device under test, analyze the degree of fragmentation of the current data layout, and calculate a fragmentation score;
[0021] Verify whether the fragmentation score has reached the target value and record the fragmentation distribution map.
[0022] Furthermore, the tested storage device receives a coordinated garbage collection instruction, coordinates data reconstruction and GC activities, and records the coordinated execution process and scheduling information of GC and data reconstruction, specifically including:
[0023] Send a sequence of coordinated garbage collection instructions based on the NVMe or SCSI standard extended instruction set to the storage device under test. After receiving the coordinated garbage collection instructions, the storage device under test will coordinately perform data reconstruction and GC activities.
[0024] By monitoring the response timing and status codes of the storage device under test to the collaborative garbage collection command, it can be determined whether the device correctly executes the collaborative garbage collection command;
[0025] Record the interaction timing and resource allocation between GC activities and data reconstruction during their coordinated execution;
[0026] Collect background operation scheduling information during the reconstruction process, including the trigger frequency and execution duration of GC operations.
[0027] Furthermore, the real-time acquisition of performance data during the collaborative data reconstruction and GC activities of the tested storage device includes collecting I / O throughput and latency distribution data at 100ms intervals, and monitoring GC activity indicators, device internal status, power consumption, and thermal data. Specifically, this includes:
[0028] I / O throughput and latency distribution data are collected at 100ms intervals, and the transient behavior of GC and reconstruction interaction is captured through high-precision time sampling.
[0029] Monitor GC activity metrics, including GC cycle count, block erase count, and page migration count. These metrics are used to quantify the impact of GC activity on system resources.
[0030] Records internal status registers and temperature sensor data used to characterize the device's operating status;
[0031] Capture power consumption changes and potential thermal throttling events to evaluate the system's energy efficiency.
[0032] Furthermore, the calculation of data migration efficiency improvement rate and reconstruction time speedup ratio based on the collected raw performance data for evaluating efficiency, and the calculation of write amplification improvement degree and QoS impact improvement degree for evaluating equipment lifetime, specifically include:
[0033] Calculate the improvement rate of data migration efficiency:
[0034]
[0035] in, This represents the total amount of data moved using traditional GC methods. The total amount of data moved by the coordinated GC method, and the improvement rate of data moving efficiency. This value is used to measure the effectiveness of the collaborative GC mechanism in reducing redundant data migration; a larger value indicates a better optimization effect.
[0036] Computational reconstruction time speedup:
[0037]
[0038] in, Based on the reconstruction time, To optimize the refactoring time, the refactoring time speedup ratio is [missing information]. Used to quantify the time optimization effect of collaborative GC on refactoring operations;
[0039] Calculate the write amplification improvement:
[0040]
[0041] in, Write the magnification factor as the reference. To optimize, write the magnification factor and the magnification improvement factor. Used to reflect the positive impact of collaborative GC on flash memory lifetime;
[0042] Calculate the degree of QoS impact improvement:
[0043]
[0044] in, As the baseline QoS impact coefficient, The optimized QoS impact coefficient represents the degree of QoS improvement. This value is used to measure the effectiveness of coordinated garbage collection in protecting the performance of front-end business applications; a larger value indicates a smaller impact on business applications.
[0045] Based on the calculated data migration efficiency improvement rate, reconstruction time speedup ratio, write amplification improvement degree, and QoS impact improvement degree, a performance improvement score is obtained.
[0046] Secondly, a testing system for garbage collection performance during RAID reconstruction, used to implement the testing method described in the first aspect, includes:
[0047] Hardware layer: includes test host, storage device under test, reference device and test controller, wherein the test controller adopts a high-performance multi-core processor and is equipped with large capacity memory;
[0048] Software layer: includes an operating system based on a standard Linux distribution and a test control and acquisition system. The test control and acquisition system supports the sending of coordinated garbage collection commands using NVMe or SCSI standard extended instruction sets and has a high-precision data acquisition function with a 100ms interval.
[0049] Functional modules include: test environment initialization module, workload generation and fragmentation module, RAID fault simulation module, collaborative GC testing module, performance data acquisition module, indicator calculation module, compliance judgment and report generation module, and compatibility certification module. Each module executes its corresponding test steps in sequence.
[0050] The beneficial effects of this invention are:
[0051] 1) By building a simulated test environment, creating real RAID reconstruction scenarios and workload modes, the garbage collection performance of storage devices during the RAID reconstruction process can be accurately evaluated.
[0052] 2) By defining a quantitative indicator system and establishing a complete mathematical formula for performance evaluation, including data migration efficiency improvement rate, reconstruction time speedup ratio, write amplification improvement coefficient, QoS impact improvement degree, etc., the performance of storage devices can be accurately quantified.
[0053] 3) By designing standardized processes, repeatable test execution steps are provided, including environment preparation and equipment preprocessing, workload generation, test execution and data collection, to ensure the consistency and comparability of test results; by establishing certification standards and formulating multi-level compatibility certification, performance rating standards are provided for storage devices.
[0054] 4) By coordinating data reconstruction and GC activities, redundant data migration was reduced, data migration efficiency was improved, reconstruction operation time was optimized, and system availability was improved; by reducing the write amplification factor, the lifespan of flash memory devices was extended; by reducing the impact on front-end business performance, business continuity was ensured; and by reducing energy consumption, system energy efficiency was improved. Attached Figure Description
[0055] Figure 1 This is a flowchart of a method for testing garbage collection performance during RAID reconstruction. Detailed Implementation
[0056] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0057] See Figure 1 The present invention provides a technical solution:
[0058] Example 1:
[0059] A method for testing garbage collection performance during RAID reconstruction includes the following steps:
[0060] Step 1: Test Environment Initialization: Perform a secure erase on the storage device under test to completely erase historical data. The secure erase operation ensures the consistency of the test environment and eliminates the potential impact of historical data on test results. Update the firmware of the storage device under test to the version specified for the test and disable automatic power management to prevent performance fluctuations caused by the device entering power-saving mode during testing. Preheat the device by running it under continuous load to reach a stable operating temperature of 65-70℃, eliminating performance deviations caused by cold starts and ensuring the device is in typical operating condition at the start of the test.
[0061] Step 2, Workload Generation and Fragmentation: Generate workloads with specific characteristics based on the target test scenario. These workloads are used to simulate different business scenarios. Run the generated workloads on the storage device under test and inject data fragmentation mode according to the test level.
[0062] Workload generation specifically includes:
[0063] The hardware parameters of the storage device under test are configured according to the target test scenario to give the workload a specific data distribution pattern. These hardware parameters include read / write ratio, I / O size, random / sequential access ratio, and number of concurrent threads. The target test scenarios include transaction processing, virtualization, streaming media storage, and data analysis scenarios.
[0064] Write the initial dataset into the hard drive group of the storage device under test to bring the storage device under test to a predetermined effective data ratio; the effective data ratio is usually controlled between 30% and 85%, and this ratio can be adjusted according to the test purpose to simulate different usage scenarios.
[0065] Performing an aging process to simulate the state of the NAND flash memory media after long-term operation of the storage device under test is crucial for evaluating write amplification and lifetime metrics. After these steps are completed, it can be further verified whether the generated workload characteristics meet the test specifications for data distribution, read / write ratio, and random / sequential ratio.
[0066] The specific data fragmentation patterns include:
[0067] By adjusting the effective data ratio, sequential access ratio, and random I / O threads of the workload, the workload can achieve different levels of data fragmentation, including low, medium, high, and extreme.
[0068] Run a workload that injects fragmented data into the storage device under test, analyze the degree of fragmentation of the current data layout, and calculate a fragmentation score;
[0069] Verify whether the fragmentation score has reached the target value and record the fragmentation distribution map to provide a basis for subsequent analysis.
[0070] Step 3: RAID Failure Simulation: Simulate a disk failure at the corresponding RAID level in the target scenario, mark the data blocks of the failed disk, and initiate the reconstruction and data recovery process. Simulate a disk failure at a specified RAID level (such as RAID 5 / 6 / 10) in the software-defined storage layer, which can simulate single-disk or multi-disk failure scenarios. Record the precise time point of the failure injection as a performance benchmark timestamp; verify whether the reconstruction process starts normally and whether the data recovery mechanism is correctly activated.
[0071] Step 4, Coordinated GC Test: The storage device under test receives a coordinated garbage collection instruction, coordinates data reconstruction and GC activities, and records the coordinated execution process and scheduling information of GC and data reconstruction; specifically including:
[0072] Send a sequence of coordinated garbage collection instructions based on the NVMe or SCSI standard extended instruction set to the storage device under test. After receiving the coordinated garbage collection instructions, the storage device under test will coordinately perform data reconstruction and GC activities.
[0073] By monitoring the response timing and status codes of the storage device under test to the collaborative garbage collection command, it can be determined whether the device correctly executes the collaborative garbage collection command;
[0074] Record the interaction timing and resource allocation between GC activities and data reconstruction during their coordinated execution;
[0075] Collect background operation scheduling information during the reconstruction process, including the trigger frequency and execution duration of GC operations.
[0076] Step 5, Performance Data Acquisition: Real-time acquisition of performance data from the tested storage device during collaborative data reconstruction and GC activities. I / O throughput and latency distribution data are collected at 100ms intervals. GC activity metrics, device internal status, power consumption, and thermal data are monitored. Specifically, this includes:
[0077] I / O throughput and latency distribution data are collected at 100ms intervals, and the transient behavior of GC and reconstruction interaction is captured through high-precision time sampling.
[0078] GC activity metrics are monitored at 1-second intervals, including the number of GC cycles, the number of block erases, and the number of page migrations. These GC activity metrics are used to quantify the impact of GC activities on system resources.
[0079] Record internal status register and temperature sensor data, which are used to characterize the working status of the device, at 5-second intervals;
[0080] The system's energy efficiency is evaluated by capturing power consumption changes and potential thermal throttling events at 1-second intervals.
[0081] Step 6: Calculation of key indicators: Based on the collected raw performance data, calculate the data migration efficiency improvement rate and reconstruction time acceleration ratio to evaluate efficiency; calculate the write amplification improvement degree and QoS impact improvement degree to evaluate device lifespan; and calculate the flash memory wear reduction and front-end IOPS penetration rate to evaluate performance.
[0082] Furthermore, the calculation of data migration efficiency improvement rate and reconstruction time speedup ratio based on the collected raw performance data for evaluating efficiency, and the calculation of write amplification improvement degree and QoS impact improvement degree for evaluating equipment lifetime, specifically include:
[0083] Calculate the improvement rate of data migration efficiency:
[0084]
[0085] in, This represents the total amount of data moved using traditional GC methods. The total amount of data moved by the coordinated GC method, and the improvement rate of data moving efficiency. This value is used to measure the effectiveness of the collaborative GC mechanism in reducing redundant data migration; a larger value indicates a better optimization effect.
[0086] Computational reconstruction time speedup:
[0087]
[0088] in, Based on the reconstruction time, To optimize the refactoring time, the refactoring time speedup ratio is [missing information]. Used to quantify the time optimization effect of collaborative GC on refactoring operations;
[0089] Calculate the write amplification improvement:
[0090]
[0091] in, Write the magnification factor as the reference. To optimize, write the magnification factor and the magnification improvement factor. Used to reflect the positive impact of collaborative GC on flash memory lifetime;
[0092] Calculate the degree of QoS impact improvement:
[0093]
[0094] in, As the baseline QoS impact coefficient, The optimized QoS impact coefficient represents the degree of QoS impact improvement. This value is used to measure the effectiveness of coordinated garbage collection in protecting the performance of front-end business applications; a larger value indicates a smaller impact on business applications.
[0095] Based on the calculated data migration efficiency improvement rate, reconstruction time speedup ratio, write amplification improvement degree, and QoS impact improvement degree, a performance improvement score is obtained.
[0096] Step 7, Performance Compliance Judgment and Report Generation: With a command response latency of less than 10ms, the data migration efficiency improvement rate, reconstruction time acceleration ratio, write amplification improvement degree, and QoS impact improvement degree are compared with preset thresholds to determine whether each performance aspect meets the standards. In a specific embodiment, the judgment criteria include: data migration reduction rate ≥ 20%, reconstruction time acceleration ratio ≥ 15%, write amplification improvement degree ≥ 30%, and QoS impact reduction ≥ 40%. If each performance aspect meets the standards, an optimization verification report containing basic information, performance data, and a compliance matrix is automatically generated; if the standards are not met, a problem diagnosis report containing bottleneck identification and fault classification is generated.
[0097] Step 8, Compatibility Level Certification: Based on the test results, assess the device's compatibility level, generate a digital certificate and a unique authentication ID, set a one-year validity period, and enter the device information into the compatibility database for easy subsequent query and management.
[0098] In a preferred embodiment, a workload with specific characteristics is generated based on the target test scenario. This workload is used to simulate different business scenarios. In the transaction processing scenario, the read / write ratio is set to 70%:30%, the IO size is 8KB, the random access ratio is 85%, and the number of concurrent threads is 16-32. In the virtualization scenario, the read / write ratio is set to 50%:50%, the IO size is 16KB, the random access ratio is 70%, and the number of concurrent threads is 24-48. In the streaming media storage scenario, the read / write ratio is set to 90%:10%, the IO size is 128KB, the sequential access ratio is 90%, and the number of concurrent threads is 8-16. In the data analysis scenario, the read / write ratio is set to 80%:20%, the IO size is 128KB, the mixed access ratio is 65%, and the number of concurrent threads is 12-24.
[0099] In another preferred embodiment, a generated workload is run on the storage device under test, and data fragmentation patterns are injected according to the test level. Low fragmentation mode: high effective data ratio (85%), primarily sequential access (80% sequential access ratio), 8 random I / O threads, fragmentation score target 20-30; Medium fragmentation mode: medium effective data ratio (65%), mixed access mode (50% sequential access ratio), 16 random I / O threads, fragmentation score target 45-55; High fragmentation mode: low effective data ratio (45%), primarily random access (20% sequential access ratio), 24 random I / O threads, fragmentation score target 70-80; Extreme fragmentation mode: extremely low effective data ratio (25%), highly random access (10% sequential access ratio), 32 random I / O threads, fragmentation score target 85-95.
[0100] In another preferred embodiment, the storage device under test receives a coordinated garbage collection instruction, coordinates data reconstruction and GC activities, and records the coordinated execution process and scheduling information of GC and data reconstruction. The coordinated garbage collection instruction sequence includes: an initialization instruction (0x01) to prepare the coordinated GC environment; a priority setting instruction (0x02) to set the resource allocation ratio between reconstruction and GC; an execution instruction (0x03) to trigger coordinated execution; a status query instruction (0x04) to obtain the current coordinated execution status; a pause instruction (0x05) to temporarily pause coordinated execution; a resumption instruction (0x06) to resume coordinated execution; and a termination instruction (0x07) to forcibly terminate coordinated execution. The device response status codes include: success (0x00), the instruction was executed successfully; not supported (0xF1), the device does not support the coordinated instruction; insufficient resources (0xF2), the system resources are insufficient to execute the coordinated operation; executing (0x01), the instruction is being executed; and execution completed (0x02), the coordinated execution has been completed. The interaction timing between GC and data reconstruction includes: GC-before-reconstruction (GC is performed first, then reconstruction), reconstruction-before-reconstruction (reconstruction is performed first, then GC), and alternating execution (GC and reconstruction are performed alternately). Resource allocation records include CPU usage percentage, memory usage, and flash channel bandwidth allocation percentage.
[0101] In another preferred embodiment, performance data of the storage device under test during the collaborative data reconstruction and GC activities are collected in real time. I / O throughput and latency distribution data are collected at 100ms intervals, and GC activity metrics, device internal status, and power consumption and thermal data are monitored. I / O throughput data includes read throughput (MB / s), write throughput (MB / s), read IOPS, and write IOPS. Latency distribution data includes average latency, P50 latency, P90 latency, P99 latency, and maximum latency. GC activity metrics include GC cycles (times / second), block erases (number / second), page migrations (pages / second), GC occupancy time percentage (%), and effective data copying volume (MB). Device internal status data includes internal status register values, temperature sensor data (°C), number of remaining free blocks, and write cache utilization (%). Power consumption and thermal data include instantaneous power consumption (W), cumulative energy consumption (J), thermal throttling event count, and thermal throttling duration (ms).
[0102] In yet another preferred embodiment, the optimization verification report generated when performance targets are met includes:
[0103] Basic information: device model, firmware version, test timestamp, etc.;
[0104] Performance data: Measured values and improvement rates for each performance indicator;
[0105] Conformity Matrix: A matrix showing compliance with certification standards;
[0106] Rating: Performance rating results (Platinum / Gold / Silver / Bronze).
[0107] Authentication status: Collaboration function compatibility authentication status;
[0108] Configuration Details: Test environment configuration details and limitations;
[0109] Visualization Charts: Performance optimization effect visualization charts.
[0110] The problem diagnosis report generated when performance fails to meet standards includes the following:
[0111] Bottleneck identification: performance bottleneck identification and root cause analysis;
[0112] Fault Classification: Fault Mode Classification (Slow Reconstruction / High Write Amplification / QoS Degradation, etc.);
[0113] Deviation analysis: Detailed performance deviation data and analysis of influencing factors;
[0114] Anomaly Log: A timeline record of points where equipment behavior is abnormal;
[0115] Improvement suggestions: Recommendations for improvement and parameter tuning;
[0116] Retesting Guidelines: Retesting conditions and verification methods.
[0117] The optimization verification report categorizes devices into four compatibility levels based on their support for and performance of collaborative GC instructions, as shown in Table 1. Table 1: Compatibility Levels
[0118]
[0119] The core of compatibility verification in step 8 lies in verifying the device's support for the cooperative GC mechanism through a standardized instruction sequence. This is achieved through a series of progressively more in-depth tests to confirm the device's support for cooperative GC instructions. The verification process is as follows:
[0120] Phase 1: Basic Command Response Test
[0121] Send a collaborative GC query command to the device to check if the device returns the correct support flag;
[0122] Verify whether the device can correctly parse the cooperative GC instruction format, including opcodes, parameter blocks, and status codes;
[0123] Test the consistency of the device's response to coordinated GC commands in idle and high-load states;
[0124] Phase Two: Functional Collaboration Testing
[0125] Sending GC setup phase instructions to put the device into GC preparation state; this process is similar to the "garbage collection setup phase" described in Samsung's patent.
[0126] During the RAID reconstruction operation performed by the device, GC execution phase instructions are sent to observe whether the device can correctly adjust the GC strategy.
[0127] Verify whether the device can postpone non-critical GC operations during peak reconstruction periods, such as the mechanism of postponing GC triggering through write redirection as described in the "DGC" scheme;
[0128] Test whether the equipment can dynamically adjust the GC intensity according to the reconstruction progress to achieve resource balance between reconstruction and GC.
[0129] Phase 3: Abnormal Situation Handling Test
[0130] Simulate command transmission errors to verify the device's error handling mechanism;
[0131] The test examines the execution priority of coordinated GC instructions under conditions of limited device resources.
[0132] Verify the device's fault tolerance capability for coordinated GC instructions under unstable power conditions;
[0133] Phase 4: Long-term stability testing
[0134] Repeatedly send coordinated GC commands during the extended testing period (24-72 hours) to check the stability of device behavior;
[0135] The ability of monitoring equipment to maintain performance consistency and state after long-term collaborative GC operations.
[0136] Secondly, a testing system for garbage collection performance during RAID reconstruction, used to implement the testing method described in the first aspect, includes:
[0137] Hardware layer: includes test host, storage device under test, reference device and test controller, wherein the test controller adopts a high-performance multi-core processor and is equipped with large capacity memory;
[0138] Software layer: includes an operating system based on a standard Linux distribution and a test control and acquisition system. The test control and acquisition system supports the sending of coordinated garbage collection commands using NVMe or SCSI standard extended instruction sets and has a high-precision data acquisition function with a 100ms interval.
[0139] Functional modules include: test environment initialization module, workload generation and fragmentation module, RAID fault simulation module, collaborative GC testing module, performance data acquisition module, indicator calculation module, compliance judgment and report generation module, and compatibility certification module. Each module executes its corresponding test steps in sequence.
[0140] The test host includes a test controller and a network interface. The storage device under test is equipped with a solid-state drive that supports the NVMe protocol, and the RAID configuration supports multiple RAID levels and stripe sizes.
[0141] The above description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the concept described herein through the above teachings or related technologies or knowledge. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.
Claims
1. A method for testing garbage collection performance during RAID reconstruction, characterized in that: Includes the following steps: Test environment initialization: Perform a secure erase on the storage device under test to completely erase historical data; update the firmware of the storage device under test to the version specified for the test and disable the automatic power management function; preheat the device by running it under continuous load to bring it to a stable operating temperature of 65-70℃; Workload generation and fragmentation: Generate workloads with specific characteristics based on the target test scenario. These workloads are used to simulate different business scenarios. Run the generated workloads on the storage device under test and inject data fragmentation mode according to the test level. RAID Failure Simulation: Simulate disk failure at the corresponding RAID level in the target scenario, mark the data blocks of the failed disk, and initiate the reconstruction and data recovery process; Record the precise time point of fault injection as a performance benchmark timestamp; Collaborative GC test: The storage device under test receives a collaborative garbage collection instruction, collaboratively executes data reconstruction and GC activities, and records the collaborative execution process and scheduling information of GC and data reconstruction. Performance data acquisition: Real-time acquisition of performance data of the storage device under test during collaborative data reconstruction and GC activities, acquisition of I / O throughput and latency distribution data at 100ms intervals, monitoring of GC activity indicators, device internal status and power consumption and thermal data; Key performance indicator calculations: Based on the collected raw performance data, calculate the data migration efficiency improvement rate and reconstruction time acceleration ratio to evaluate efficiency; calculate the write amplification improvement and QoS impact improvement to evaluate device lifespan; and calculate the flash memory wear reduction and front-end IOPS penetration rate to evaluate performance. Performance compliance assessment and report generation: When the instruction response latency is less than 10ms, the data migration efficiency improvement rate, reconstruction time speedup ratio, write amplification improvement degree, and QoS impact improvement degree are compared with preset thresholds to determine whether the performance of each aspect meets the standards; if the performance of each aspect meets the standards, an optimization verification report containing basic information, performance data, and compliance matrix content is automatically generated; if the performance does not meet the standards, a problem diagnosis report containing bottleneck identification and fault classification content is generated. Compatibility Level Certification: Based on the test results, the device compatibility level is assessed, a digital certificate and a unique authentication ID are generated, a one-year validity period is set, and the device information is entered into the compatibility database.
2. The method for testing garbage collection performance during RAID reconstruction according to claim 1, characterized in that: Workloads with specific characteristics are generated based on the target test scenario. These workloads are used to simulate different business scenarios, including: The hardware parameters of the storage device under test are set according to the target test scenario to make the workload have a specific data distribution pattern. The hardware parameters include read / write ratio, IO size, random / sequential access ratio, and number of concurrent threads. The target test scenarios include transaction processing scenario, virtualization scenario, streaming media storage scenario, and data analysis scenario. Write the initial dataset into the hard disk group of the storage device under test to make the storage device under test reach the predetermined effective data ratio. An aging process is performed to simulate the state of the NAND flash memory media after the storage device under test has been running for a long time.
3. The method for testing garbage collection performance during RAID reconstruction according to claim 1, characterized in that: The process of running the generated workload on the storage device under test and injecting data fragmentation mode according to the test level specifically includes: By adjusting the effective data ratio, sequential access ratio, and random I / O threads of the workload, the workload can achieve different levels of data fragmentation, including low, medium, high, and extreme. Run a workload that injects fragmented data into the storage device under test, analyze the degree of fragmentation of the current data layout, and calculate a fragmentation score; Verify whether the fragmentation score has reached the target value and record the fragmentation distribution map.
4. The method for testing garbage collection performance during RAID reconstruction according to claim 1, characterized in that: The tested storage device receives a coordinated garbage collection instruction, coordinates data reconstruction and GC activities, and records the coordinated execution process and scheduling information of GC and data reconstruction, specifically including: Send a sequence of coordinated garbage collection instructions based on the NVMe or SCSI standard extended instruction set to the storage device under test. After receiving the coordinated garbage collection instructions, the storage device under test will coordinately perform data reconstruction and GC activities. By monitoring the response timing and status codes of the storage device under test to the collaborative garbage collection command, it can be determined whether the device correctly executes the collaborative garbage collection command; Record the interaction timing and resource allocation between GC activities and data reconstruction during their coordinated execution; Collect background operation scheduling information during the reconstruction process, including the trigger frequency and execution duration of GC operations.
5. The method for testing garbage collection performance during RAID reconstruction according to claim 1, characterized in that: The real-time acquisition of performance data during the collaborative data reconstruction and GC activities of the tested storage device includes collecting I / O throughput and latency distribution data at 100ms intervals, and monitoring GC activity indicators, device internal status, power consumption, and thermal data. Specifically, this includes: I / O throughput and latency distribution data are collected at 100ms intervals, and the transient behavior of GC and reconstruction interaction is captured through high-precision time sampling. Monitor GC activity metrics, including GC cycle count, block erase count, and page migration count. These metrics are used to quantify the impact of GC activity on system resources. Record internal status registers and temperature sensor data used to characterize the device's operating status; capture power consumption changes and possible thermal throttling events to evaluate the system's energy efficiency.
6. The method for testing garbage collection performance during RAID reconstruction according to claim 1, characterized in that: The data migration efficiency improvement rate and reconstruction time speedup ratio, calculated based on the collected raw performance data, are used to evaluate efficiency. The write amplification improvement and QoS impact improvement rates, used to evaluate device lifespan, are also calculated. Specifically, these include: Calculate the improvement rate of data migration efficiency: ; in, This represents the total amount of data moved using traditional GC methods. The total amount of data moved by the coordinated GC method, and the improvement rate of data moving efficiency. This value is used to measure the effectiveness of the collaborative GC mechanism in reducing redundant data migration; a larger value indicates a better optimization effect. Computational reconstruction time speedup: ; in, Based on the reconstruction time, To optimize the refactoring time, the refactoring time speedup ratio is [missing information]. Used to quantify the time optimization effect of collaborative GC on refactoring operations; Calculate the write amplification improvement: ; in, Write the magnification factor as the reference. To optimize, write the magnification factor and the magnification improvement factor. Used to reflect the positive impact of collaborative GC on flash memory lifetime; Calculate the degree of QoS impact improvement: ; in, As the baseline QoS impact coefficient, The optimized QoS impact coefficient represents the degree of QoS improvement. This value is used to measure the effectiveness of coordinated garbage collection in protecting the performance of front-end business applications; a larger value indicates a smaller impact on business applications. Based on the calculated data migration efficiency improvement rate, reconstruction time speedup ratio, write amplification improvement degree, and QoS impact improvement degree, a performance improvement score is obtained.
7. A testing system for garbage collection performance during RAID reconstruction, characterized in that, To implement the test method according to any one of claims 1-6, comprising: Hardware layer: includes test host, storage device under test, reference device and test controller, wherein the test controller adopts a high-performance multi-core processor and is equipped with large capacity memory; Software layer: includes an operating system based on a standard Linux distribution and a test control and acquisition system. The test control and acquisition system supports the sending of coordinated garbage collection commands using NVMe or SCSI standard extended instruction sets and has a high-precision data acquisition function with a 100ms interval. Functional modules include: test environment initialization module, workload generation and fragmentation module, RAID fault simulation module, collaborative GC testing module, performance data acquisition module, indicator calculation module, compliance judgment and report generation module, and compatibility certification module. Each module executes its corresponding test steps in sequence.