A dual-port hard disk testing method, system, computer device and storage medium

By configuring various test scenarios and switching port ranges, the problem of incomplete performance testing of dual-port hard drives in existing technologies is solved, and comprehensive testing and performance balance verification of dual-port hard drives are achieved.

CN115458035BActive Publication Date: 2026-11-20SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211127246.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-16
Publication Date
2026-11-20
Estimated Expiration
2042-09-16

AI Technical Summary

Technical Problem

Existing technologies cannot comprehensively test the performance of dual-port hard drives, and the test scenarios are too limited to fully understand the performance of dual-port hard drives.

Method used

Flexible performance testing is conducted by configuring various test scenarios and the test range of the two ports of the dual-port hard drive, including steady-state, garbage collection and rewrite tests, and performance testing of the read and write range of the switch port.

Benefits of technology

Comprehensive testing of the dual-port hard drive performance was achieved, verifying the performance balance in dual-active mode.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115458035B_ABST
    Figure CN115458035B_ABST
Patent Text Reader

Abstract

The application discloses a kind of double-port hard disk test method, system, computer equipment and storage medium, method includes: the test scene of configuration double-port hard disk;The write range of the first port of double-port hard disk is configured based on test scene and the write range of the second port, and the write performance test is carried out to first port and second port based on the write range of the configured first port and the write range of the second port;The read range of the first port is configured based on test scene and the read range of the second port, and the read performance test is carried out to first port and second port based on the read range of the configured first port and the read range of the second port;The read range of the first port is exchanged with the read range of the second port and the read performance test is carried out to first port and second port based on the read range after the exchange of first port and second port.The scheme of the present application realizes the performance test to double-port hard disk, and the verification of the performance balance condition under the double live mode of double-port hard disk.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of testing technology, and in particular to a dual-port hard disk testing method, system, computer equipment, and storage medium. Background Technology

[0002] Dual-port hard drives have two independent read / write ports compared to single-port hard drives, resulting in higher bandwidth. However, current performance testing methods for dual-port hard drives are simple and limited to a single testing scenario, making it impossible to fully assess the performance of dual-port hard drives. Summary of the Invention

[0003] In view of this, the present invention proposes a dual-port hard drive testing method, system, computer equipment, and storage medium. By configuring the test scenarios and the test range of the two ports of the dual-port hard drive, the performance of the dual-port hard drive can be flexibly tested in various test scenarios, realizing comprehensive performance testing of the dual-port hard drive and verifying the performance balance of the dual-port hard drive in dual-active mode by swapping the test range of the two ports.

[0004] To achieve the above objectives, one aspect of the present invention provides a dual-port hard drive testing method, specifically including the following steps:

[0005] Test scenario with dual-port hard drive configuration;

[0006] Based on the test scenario, configure the write range of the first port and the write range of the second port of the dual-port hard drive, and perform write performance tests on the first port and the second port based on the configured write range of the first port and the write range of the second port.

[0007] Configure the read range of the first port and the read range of the second port based on the test scenario, and perform read performance tests on the first port and the second port based on the configured read range of the first port and the read range of the second port.

[0008] The read range of the first port is swapped with the read range of the second port, and the read performance test is performed on the first port and the second port based on the swapped read range.

[0009] In some implementations, the test scenarios include: steady-state test scenarios, garbage collection test scenarios, and rewrite test scenarios.

[0010] In some implementations, test scenarios for configuring dual-port hard drives include:

[0011] In response to the test scenario being a steady-state test scenario, a full-disk sequential write is performed on the dual-port hard drive to form a steady-state test environment.

[0012] In some implementations, test scenarios for configuring dual-port hard drives include:

[0013] In response to the test scenario being a garbage collection test scenario, a full-disk random write is performed on the dual-port hard drive;

[0014] After the full disk random write is completed, the corresponding physical address is queried according to the logical address of the dual-port hard disk, and a many-to-one mapping table between each physical address and the block of the dual-port hard disk is generated based on all the queried physical addresses.

[0015] Based on the physical addresses in the many-to-one mapping table, garbage collection is performed on the corresponding blocks to form a garbage collection test scenario.

[0016] In some implementations, test scenarios for configuring dual-port hard drives include:

[0017] In response to the test scenario being a rewrite test scenario, a full-disk sequential write is performed on the dual-port hard drive.

[0018] After the full disk sequential write is completed, traverse all logical addresses of the dual-port hard disk to obtain the corresponding physical addresses;

[0019] A one-to-many mapping table between blocks and each physical address of the dual-port hard disk is generated based on all the acquired physical addresses;

[0020] The number of reads for all blocks is obtained based on the one-to-many mapping table, and the read interference intensity is set based on the number of reads to form a rewrite test environment.

[0021] In some implementations, the write range of the first port and the write range of the second port of the dual-port hard drive are configured based on the test scenario, and write performance tests are performed on the first port and the second port based on the configured write ranges of the first port and the second port, including:

[0022] In response to the test scenario being a steady-state test scenario, the write range of the first port and the write range of the second port of the dual-port hard drive are configured based on the steady-state test scenario, and sequential write performance tests are performed on the first port and the second port simultaneously based on the configured write range of the first port and the write range of the second port, wherein the write range of the first port is a%, and the write range of the second port is (100-a)%.

[0023] In response to the test scenario being a garbage collection test scenario or a rewrite test scenario, the write range of the first port and the write range of the second port of the dual-port hard drive are configured based on the garbage collection test scenario or the rewrite test scenario, and random write performance tests are performed on the first port and the second port simultaneously based on the configured write range of the first port and the write range of the second port.

[0024] In some implementations, read performance tests are performed on the first port and the second port based on the configured read range of the first port and the read range of the second port, including:

[0025] Based on the configured read ranges of the first port and the second port, a sequential read performance test is performed on the first port and the second port simultaneously, wherein the read range of the first port is b%, and the read range of the second port is (100-b)%.

[0026] The read performance test is performed on the first port and the second port based on the read range after the first port and the second port are swapped, including:

[0027] Based on the read ranges exchanged between the first port and the second port, the sequential read performance test is performed simultaneously on both the first port and the second port.

[0028] Another aspect of this invention provides a dual-port hard disk testing system, comprising:

[0029] A configuration module, configured to configure a test scenario for a dual-port hard drive;

[0030] A write performance testing module is configured to configure the write range of the first port and the write range of the second port of the dual-port hard drive based on the test scenario, and to perform write performance tests on the first port and the second port based on the configured write range of the first port and the write range of the second port.

[0031] The first read performance testing module is configured to configure the read range of the first port and the read range of the second port based on the test scenario, and to perform read performance testing on the first port and the second port based on the configured read range of the first port and the read range of the second port.

[0032] The second read performance testing module is configured to swap the read range of the first port with the read range of the second port and perform the read performance test on the first port and the second port based on the swapped read range.

[0033] In another aspect of the present invention, a computer device is provided, comprising: at least one processor; and a memory storing a computer program executable on the processor, the computer program performing the steps of the method described above when executed by the processor.

[0034] In another aspect, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method steps.

[0035] The present invention has at least the following beneficial technical effects: by configuring the test scenarios and the test range of the two ports of the dual-port hard drive, the performance of the dual-port hard drive can be flexibly tested in various test scenarios, realizing comprehensive testing of the performance of the dual-port hard drive, and by swapping the test range of the two ports, the performance balance of the dual-port hard drive in the dual-active mode can be verified. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.

[0037] Figure 1 A block diagram of an embodiment of the dual-port hard disk testing method provided by the present invention;

[0038] Figure 2 This is a schematic diagram of an embodiment of the dual-port hard disk testing system provided by the present invention.

[0039] Figure 3 A schematic diagram of the structure of an embodiment of the computer device provided by the present invention;

[0040] Figure 4 This is a schematic diagram of an embodiment of the computer-readable storage medium provided by the present invention. Detailed Implementation

[0041] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to specific examples and the accompanying drawings.

[0042] It should be noted that all uses of "first" and "second" in the embodiments of the present invention are for the purpose of distinguishing two entities or parameters with the same name but different names. It is clear that "first" and "second" are only for the convenience of expression and should not be construed as limiting the embodiments of the present invention. Subsequent embodiments will not explain this in detail.

[0043] Based on the above objectives, a first aspect of the present invention provides an embodiment of a dual-port hard disk testing method. For example... Figure 1 As shown, it includes the following steps:

[0044] S10, Test scenario with dual-port hard drive configuration;

[0045] S20. Configure the write range of the first port and the write range of the second port of the dual-port hard drive based on the test scenario, and perform write performance tests on the first port and the second port based on the configured write range of the first port and the write range of the second port.

[0046] S30. Configure the read range of the first port and the read range of the second port based on the test scenario, and perform read performance tests on the first port and the second port based on the configured read range of the first port and the read range of the second port.

[0047] S40. Swap the read range of the first port with the read range of the second port, and perform the read performance test on the first port and the second port based on the read range after the swap.

[0048] Specifically, the test scenarios for the dual-port hard drive are configured, including: steady-state test scenario, garbage collection test scenario, and rewrite test scenario. One or more of these test scenarios can be configured based on test requirements. In this embodiment of the invention, to achieve comprehensive performance testing of both ports of the dual-port hard drive, it is preferable to configure all test scenarios, i.e., the steady-state test scenario, garbage collection test scenario, and rewrite test scenario. Under each test scenario, the write range of the first port and the write range of the second port, as well as the read range of the first port and the read range of the second port, can be the same or different. Generally, if the write range of the first port is a%, and the read range is b%, then the write range of the second port is (100-a)%, and the read range is (100-b)%. The write performance test corresponds to the test scenario being performed, and the corresponding write performance test is set based on the type of test scenario. The write performance test includes sequential write and random write. The read performance test also corresponds to the test scenario being performed, and the corresponding read performance test is set based on the type of test scenario. The read performance test includes sequential read and random read. On the one hand, by configuring test scenarios for dual-port hard drives and conducting read / write performance tests on the first and second ports under the configured test scenarios, flexible performance testing of dual-port hard drives under various test scenarios is achieved; on the other hand, by comprehensively configuring test scenarios for dual-port hard drives and conducting read / write performance tests on the first and second ports under various test scenarios, full-coverage performance testing of dual-port hard drives under various test scenarios is achieved.

[0049] In each test scenario, write and read performance tests were performed on both the first and second ports of the dual-port hard drive. The read performance test consisted of two parts: first, the read performance of the first and second ports was tested simultaneously within their respective configured read ranges; then, the read ranges of the first and second ports were swapped, and the read performance of both ports was tested again within their swapped read ranges. By swapping the test ranges of the two ports, the performance balance of the dual-port hard drive in active-active mode was verified.

[0050] In some implementations, the test scenarios include: steady-state test scenarios, garbage collection test scenarios, and rewrite test scenarios.

[0051] In some implementations, test scenarios for configuring dual-port hard drives include:

[0052] In response to the test scenario being a steady-state test scenario, a full-disk sequential write is performed on the dual-port hard drive to form a steady-state test environment.

[0053] In some implementations, test scenarios for configuring dual-port hard drives include:

[0054] In response to the test scenario being a garbage collection test scenario, a full-disk random write is performed on the dual-port hard drive;

[0055] After the full disk random write is completed, the corresponding physical address is queried according to the logical address of the dual-port hard disk, and a many-to-one mapping table between each physical address and the block of the dual-port hard disk is generated based on all the queried physical addresses.

[0056] Based on the physical addresses in the many-to-one mapping table, garbage collection is performed on the corresponding blocks to form a garbage collection test scenario.

[0057] In some implementations, test scenarios for configuring dual-port hard drives include:

[0058] In response to the test scenario being a rewrite test scenario, a full-disk sequential write is performed on the dual-port hard drive.

[0059] After the full disk sequential write is completed, traverse all logical addresses of the dual-port hard disk to obtain the corresponding physical addresses;

[0060] A one-to-many mapping table between blocks and each physical address of the dual-port hard disk is generated based on all the acquired physical addresses;

[0061] The number of reads for all blocks is obtained based on the one-to-many mapping table, and the read interference intensity is set based on the number of reads to form a rewrite test environment.

[0062] In some implementations, the write range of the first port and the write range of the second port of the dual-port hard drive are configured based on the test scenario, and write performance tests are performed on the first port and the second port based on the configured write ranges of the first port and the second port, including:

[0063] In response to the test scenario being a steady-state test scenario, the write range of the first port and the write range of the second port of the dual-port hard drive are configured based on the steady-state test scenario, and sequential write performance tests are performed on the first port and the second port simultaneously based on the configured write range of the first port and the write range of the second port, wherein the write range of the first port is a%, and the write range of the second port is (100-a)%.

[0064] In response to the test scenario being a garbage collection test scenario or a rewrite test scenario, the write range of the first port and the write range of the second port of the dual-port hard drive are configured based on the garbage collection test scenario or the rewrite test scenario, and random write performance tests are performed on the first port and the second port simultaneously based on the configured write range of the first port and the write range of the second port.

[0065] In some implementations, read performance tests are performed on the first port and the second port based on the configured read range of the first port and the read range of the second port, including:

[0066] Based on the configured read ranges of the first port and the second port, a sequential read performance test is performed on the first port and the second port simultaneously, wherein the read range of the first port is b%, and the read range of the second port is (100-b)%.

[0067] The read performance test is performed on the first port and the second port based on the read range after the first port and the second port are swapped, including:

[0068] The sequential read performance test is performed on both the first port and the second port simultaneously based on the read ranges after the first port and the second port are swapped.

[0069] The specific implementation of the present invention will be described below through a specific embodiment.

[0070] (1) Environment deployment: Prepare a server that supports dual ports and an SSD (solid-state drive) that supports dual ports, and configure testing tools such as fio and nvme;

[0071] (2) Prepare the fio performance command and use the following parameters to test the performance in different scenarios.

[0072] Bs (block size) = 512\4k\32k\128k\256k\1M\2M

[0073] Iodepth (queue depth) = 1\4\16\32\64\128\256\1024

[0074] Numjobs (number of threads) = 1\2\32\64\128\256\1024

[0075] (3) Test scenario:

[0076] a) Performance testing under steady-state scenarios

[0077] S11. Write the SSD full disk sequentially twice to prepare a stable test environment;

[0078] S12. Use the fio command to perform a sequential write test on port A (the first port of the SSD) and port B (the second port of the SSD) at the same time, and configure the write range of port A as a%, and the write range of port B as (100-a)%, a = random.randint(100);

[0079] S13. Following step S2, configure the read range of port A to b%, and the read range of port B to (100-b)%, and perform a sequential read performance test on both port A and port B simultaneously.

[0080] S14. Following step S3, port A uses the read range (100-b)% of port B, and port B uses the read range b% of port A to test the performance of sequential reads.

[0081] b) Performance testing under GC (garbage collection) scenarios

[0082] Garbage collection organizes valid data within the SSD's flash memory and deletes invalid data blocks, i.e., garbage, to better maintain SSD performance and free up space for more organized, valid data. Garbage collection runs in the background of the SSD, occurring simultaneously with data writing; therefore, background garbage collection can impact performance. The following steps outline how to configure a garbage collection test scenario and conduct performance tests under that scenario:

[0083] S21. Write the entire disk randomly twice;

[0084] S22. Query the PBA (Physics Block Addressing) based on the LBA (Logical Block Addressing, i.e., logical address) to obtain the LBA address, and generate a many-to-one mapping table M between PBA and block. The implementation method is: nvme rm_debug_entry –o***-p lba;

[0085] S23. Force garbage collection (GC) on a block based on its PBA information. According to the mapping table M, it's possible to control which 10%, 30%, 60%, and 80% of the SSD's blocks will be GCed simultaneously. The implementation is: `nvme rm_debug_entry –o*** –f*** -p` <pba>device;

[0086] S24. During the forced GC process in the background, perform random read / write tests on fio:

[0087] S241. Perform random write tests on both port A and port B simultaneously, and configure the write range of port A as a%, and configure the write range of port B as (100-a)%, a = random.randint(100);

[0088] S242. Configure the read range of port A to b%, and the read range of port B to (100-b)%. Perform a sequential read performance test on both port A and port B simultaneously.

[0089] S243, Port A uses the read range (100-b)% of Port B, Port B uses the read range b% of Port A, and tests the performance of sequential reads.

[0090] c) Performance testing in rewrite mode

[0091] S31. Write the entire sequence twice;

[0092] S32. Traverse the LBAs of the SSD, obtain the addresses of the PBAs, analyze the PBA information, and derive a many-to-one mapping table between blocks and PBAs.

[0093] S33. Based on the mapping table, obtain the readcount value of all current blocks, i.e., the number of reads;

[0094] S34. Based on the number of reads for each block, set different read interference intensities, such as rewrite operations for 10%, 30%, 50%, and 80% of blocks.

[0095] S35. Perform performance tests when rewriting at different intensities in the background:

[0096] S351. Perform random write tests on both port A and port B simultaneously, and configure the write range of port A as a%, and configure the write range of port B as (100-a)%, a = random.randint(100);

[0097] S352. Configure the read range of port A to b%, and the read range of port B to (100-b)%. Perform a sequential read performance test on both port A and port B simultaneously.

[0098] S353, Port A uses the read range (100-b)% of Port B, Port B uses the read range b% of Port A, and tests the performance of sequential reads.

[0099] The above scheme enables comprehensive testing of the performance of dual-port hard drives. Furthermore, by swapping the test ranges of the two ports, it also verifies the performance balance of dual-port hard drives in active-active mode.

[0100] Based on the same inventive concept, according to another aspect of the present invention, such as Figure 2 As shown, an embodiment of the present invention also provides a dual-port hard disk testing system, comprising:

[0101] Configuration module 110, configured to configure a test scenario for a dual-port hard drive;

[0102] Write performance testing module 120 is configured to configure the write range of the first port and the write range of the second port of the dual-port hard drive based on the test scenario, and to perform write performance testing on the first port and the second port based on the configured write range of the first port and the write range of the second port.

[0103] The first read performance test module 130 is configured to configure the read range of the first port and the read range of the second port based on the test scenario, and to perform read performance tests on the first port and the second port based on the configured read range of the first port and the read range of the second port.

[0104] The second read performance test module 140 is configured to swap the read range of the first port with the read range of the second port and perform the read performance test on the first port and the second port based on the swapped read range.

[0105] Based on the same inventive concept, according to another aspect of the present invention, such as Figure 3 As shown, an embodiment of the present invention also provides a computer device 30, which includes a processor 310 and a memory 320. The memory 320 stores a computer program 321 that can be run on the processor. When the processor 310 executes the program, it performs the steps of the method described above.

[0106] Embodiments of the present invention may also include a corresponding computer device. The computer device includes a memory, at least one processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes any of the methods described above when executing the program.

[0107] The memory, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the dual-port hard disk testing method described in this application embodiment. The processor executes various system functions and data processing by running the non-volatile software programs, instructions, and modules stored in the memory, thereby implementing the dual-port hard disk testing method described in the above embodiment.

[0108] The memory may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on system usage. Furthermore, the memory may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the processor, which can be connected to the local module via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0109] Based on the same inventive concept, according to another aspect of the present invention, such as Figure 4 As shown, embodiments of the present invention also provide a computer-readable storage medium 40, which stores a computer program 410 that, when executed by a processor, performs the methods described above.

[0110] Finally, it should be noted that those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The storage medium for the program can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. The above computer program embodiments can achieve the same or similar effects as any of the corresponding foregoing method embodiments.

[0111] Those skilled in the art will also understand that the various exemplary logic blocks, modules, circuits, and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability between hardware and software, the functionality of various illustrative components, blocks, modules, circuits, and steps has been generally described. Whether this functionality is implemented as software or as hardware depends on the specific application and the design constraints imposed on the system as a whole. Those skilled in the art can implement the functionality in various ways for each specific application, but such implementation decisions should not be construed as departing from the scope of the embodiments disclosed herein.

[0112] The above are exemplary embodiments disclosed in this invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments of this invention as defined by the claims. The functions, steps, and / or actions of the methods according to the disclosed embodiments described herein do not need to be performed in any particular order. The sequence numbers of the disclosed embodiments of this invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. Furthermore, although the elements disclosed in the embodiments of this invention may be described or claimed individually, they may be understood as multiple unless explicitly limited to a singular number.

[0113] It should be understood that, as used herein, the singular form "a" is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations of one or more of the associated listed items.

[0114] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention (including the claims) is limited to these examples. Within the framework of the invention, technical features of the above embodiments or different embodiments can be combined, and many other variations of different aspects of the invention exist, which are not provided in the details for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.< / pba>

Claims

1. A method for testing a dual-port hard disk, characterized in that, include: Test scenarios for configuring dual-port hard drives include steady-state test scenarios, garbage collection test scenarios, and rewrite test scenarios; Based on the test scenario, configure the write range of the first port and the write range of the second port of the dual-port hard drive, and perform write performance tests on the first port and the second port based on the configured write range of the first port and the write range of the second port. The test scenario configures the write range of the first port and the write range of the second port of the dual-port hard drive, and performs write performance tests on the first port and the second port based on the configured write ranges of the first port and the second port. This includes: responding to a steady-state test scenario, configuring the write range of the first port and the write range of the second port of the dual-port hard drive based on the steady-state test scenario, and simultaneously performing sequential write performance tests on the first port and the second port based on the configured write ranges of the first port and the second port, wherein the write range of the first port is a%, and the write range of the second port is (100-a)%; responding to a garbage collection test scenario or a rewrite test scenario, configuring the write range of the first port and the write range of the second port of the dual-port hard drive based on the garbage collection test scenario or the rewrite test scenario, and simultaneously performing random write performance tests on the first port and the second port based on the configured write ranges of the first port and the second port. Based on the test scenario, the read range of the first port and the read range of the second port are configured. Based on the configured read ranges of the first port and the second port, sequential read performance tests are performed on both the first port and the second port simultaneously. The read range of the first port is b%, and the read range of the second port is (100-b)%. The read ranges of the first port and the second port are swapped, and the sequential read performance test is performed on both the first port and the second port based on the swapped read ranges.

2. The method according to claim 1, characterized in that, Test scenarios for configuring dual-port hard drives include: In response to the test scenario being a steady-state test scenario, a full-disk sequential write is performed on the dual-port hard drive to form a steady-state test environment.

3. The method according to claim 1, characterized in that, Test scenarios for configuring dual-port hard drives include: In response to the test scenario being a garbage collection test scenario, a full-disk random write is performed on the dual-port hard drive; After the full disk random write is completed, the corresponding physical address is queried according to the logical address of the dual-port hard disk, and a many-to-one mapping table between each physical address and the block of the dual-port hard disk is generated based on all the queried physical addresses. Based on the physical addresses in the many-to-one mapping table, garbage collection is performed on the corresponding blocks to form a garbage collection test scenario.

4. The method according to claim 1, characterized in that, Test scenarios for configuring dual-port hard drives include: In response to the test scenario being a rewrite test scenario, a full-disk sequential write is performed on the dual-port hard drive. After the full disk sequential write is completed, traverse all logical addresses of the dual-port hard disk to obtain the corresponding physical addresses; A one-to-many mapping table between blocks and each physical address of the dual-port hard disk is generated based on all the acquired physical addresses; The number of reads for all blocks is obtained based on the one-to-many mapping table, and the read interference intensity is set based on the number of reads to form a rewrite test environment.

5. A dual-port hard disk testing system, characterized in that, include: The configuration module is configured to configure test scenarios for dual-port hard drives, including steady-state test scenarios, garbage collection test scenarios, and rewrite test scenarios. A write performance testing module is configured to configure the write range of the first port and the write range of the second port of the dual-port hard drive based on the test scenario, and to perform write performance tests on the first port and the second port based on the configured write range of the first port and the write range of the second port. The test scenario configures the write range of the first port and the write range of the second port of the dual-port hard drive, and performs write performance tests on the first port and the second port based on the configured write ranges of the first port and the second port. This includes: responding to a steady-state test scenario, configuring the write range of the first port and the write range of the second port of the dual-port hard drive based on the steady-state test scenario, and simultaneously performing sequential write performance tests on the first port and the second port based on the configured write ranges of the first port and the second port, wherein the write range of the first port is a%, and the write range of the second port is (100-a)%; responding to a garbage collection test scenario or a rewrite test scenario, configuring the write range of the first port and the write range of the second port of the dual-port hard drive based on the garbage collection test scenario or the rewrite test scenario, and simultaneously performing random write performance tests on the first port and the second port based on the configured write ranges of the first port and the second port. The first read performance testing module is configured to configure the read range of the first port and the read range of the second port based on the test scenario, and to perform sequential read performance tests on the first port and the second port simultaneously based on the configured read ranges of the first port and the second port, wherein the read range of the first port is b%, and the read range of the second port is (100-b)%. The second read performance testing module is configured to swap the read range of the first port and the read range of the second port, and perform the sequential read performance test on the first port and the second port based on the swapped read range.

6. A computer device, comprising: At least one processor; as well as A memory storing a computer program executable on the processor, characterized in that the processor executes the program and performs the steps of the method as described in any one of claims 1 to 4.

7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it performs the steps of the method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Storage device, test system for testing the same, and method thereof

    CN107688516A

  • Device to test storage performance in virtualization system environment

    KR101498700B1