CN115458035A - Dual-port hard disk test method, system, computer equipment and storage medium - Google Patents

Dual-port hard disk test method, system, computer equipment and storage medium Download PDF

Info

Publication number
CN115458035A
CN115458035A CN202211127246.6A CN202211127246A CN115458035A CN 115458035 A CN115458035 A CN 115458035A CN 202211127246 A CN202211127246 A CN 202211127246A CN 115458035 A CN115458035 A CN 115458035A
Authority
CN
China
Prior art keywords
port
range
test
read
dual
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211127246.6A
Other languages
Chinese (zh)
Inventor
栾玉雪
王帆
孙海涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Original Assignee
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd filed Critical Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority to CN202211127246.6A priority Critical patent/CN115458035A/en
Publication of CN115458035A publication Critical patent/CN115458035A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/56External testing equipment for static stores, e.g. automatic test equipment [ATE]; Interfaces therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2289Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by configuration test

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention discloses a method and a system for testing a dual-port hard disk, computer equipment and a storage medium, wherein the method comprises the following steps: configuring a test scene of a dual-port hard disk; configuring a writing range of a first port and a writing range of a second port of the dual-port hard disk based on a test scene, and performing writing performance test on the first port and the second port based on the configured writing range of the first port and the configured writing range of the second port; configuring a reading range of a first port and a reading range of a second port based on a test scene, and performing a reading performance test on the first port and the second port based on the configured reading range of the first port and the configured reading range of the second port; and exchanging the reading range of the first port and the reading range of the second port, and performing a reading performance test on the first port and the second port based on the reading range after the first port and the second port are exchanged. By the scheme of the invention, the performance test of the dual-port hard disk and the verification of the performance balance condition of the dual-port hard disk in a dual-active mode are realized.

Description

Dual-port hard disk test method, system, computer equipment and storage medium
Technical Field
The invention relates to the technical field of testing, in particular to a method and a system for testing a dual-port hard disk, computer equipment and a storage medium.
Background
Compared with a single-port hard disk, the dual-port hard disk has two sets of independent read-write ports, so that the dual-port hard disk has higher bandwidth, but the conventional test method for testing the performance of the dual-port hard disk is simple, the test scene is single, and the performance of the dual-port hard disk cannot be completely tested.
Disclosure of Invention
In view of this, the invention provides a method and a system for testing a dual-port hard disk, a computer device and a storage medium, which can flexibly perform performance testing on the dual-port hard disk under each test scenario by configuring a test scenario and test ranges of two ports of the dual-port hard disk, thereby realizing comprehensive performance testing of the dual-port hard disk and verification of performance balance condition of the dual-port hard disk under a dual-active mode by exchanging the test ranges of the two ports.
Based on the above object, an aspect of the embodiments of the present invention provides a method for testing a dual-port hard disk, which specifically includes the following steps:
configuring a test scene of a dual-port hard disk;
configuring a writing range of a first port and a writing range of a second port of a dual-port hard disk based on the test scene, and performing writing performance test on the first port and the second port based on the configured writing range of the first port and the configured writing range of the second port;
configuring a read range of the first port and a read range of a second port based on the test scenario, and performing a read performance test on the first port and the second port based on the configured read range of the first port and the configured read range of the second port;
and exchanging the reading range of the first port and the reading range of the second port, and performing the reading performance test on the first port and the second port based on the exchanged reading ranges of the first port and the second port.
In some embodiments, the test scenario includes: a steady state test scenario, a garbage collection test scenario, and a rewrite test scenario.
In some embodiments, configuring a test scenario of a dual port hard disk includes:
and responding to the test scene as a steady-state test scene, and performing full disk sequential writing on the dual-port hard disk to form a steady-state test environment.
In some embodiments, configuring a test scenario of a dual port hard disk includes:
responding to the test scene as a garbage recovery test scene, and performing full disk random writing on the dual-port hard disk;
after the full disk random writing is finished, inquiring a corresponding physical address according to the logical address of the dual-port hard disk, and generating a many-to-one mapping table of each physical address and a block of the dual-port hard disk based on all the inquired physical addresses;
and performing garbage collection on the corresponding block based on the physical address in the many-to-one mapping table to form a garbage collection test scene.
In some embodiments, configuring a test scenario of a dual port hard disk includes:
responding to the test scene as a rewriting test scene, and performing full disk sequential writing on the dual-port hard disk;
after the full disk sequential writing is finished, traversing all the logical addresses of the dual-port hard disk to obtain corresponding physical addresses;
generating a one-to-many mapping table of the blocks of the dual-port hard disk and each physical address based on all the acquired physical addresses;
and acquiring the read times of all the blocks based on the one-to-many mapping table, and setting the read interference strength based on the read times to form a rewrite test environment.
In some embodiments, configuring a write range of a first port and a write range of a second port of a dual port hard disk based on the test scenario, and performing a write performance test on the first port and the second port based on the configured write range of the first port and the configured write range of the second port includes:
responding to the test scenario that the test scenario is a steady-state test scenario, configuring a write range of a first port and a write range of a second port of a dual-port hard disk based on the steady-state test scenario, and simultaneously performing sequential write performance test on the first port and the second port based on the configured write range of the first port and the configured 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)%;
and responding to the test scenario being a garbage collection test scenario or a rewriting test scenario, configuring a writing range of a first port and a writing range of a second port of a dual-port hard disk based on the garbage collection test scenario or the rewriting test scenario, and simultaneously performing random writing performance test on the first port and the second port based on the configured writing range of the first port and the configured writing range of the second port.
In some embodiments, performing a read performance test on the first port and the second port based on the configured read range of the first port and the configured read range of the second port comprises:
performing sequential read performance testing 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)%;
performing the read performance test on the first port and the second port based on the read range after the exchange of the first port and the second port, including:
and simultaneously performing the sequential reading performance test on the first port and the second port based on the read range after the first port and the second port are exchanged.
In another aspect of the embodiments of the present invention, a dual-port hard disk test system is further provided, including:
the configuration module is configured to configure a test scene of the dual-port hard disk;
the write performance testing module is configured to configure a write range of a first port and a write range of a second port of the dual-port hard disk based on the test scenario, and perform write performance testing on the first port and the second port based on the configured write ranges of the first port and the second port;
a first read performance testing module, configured to configure a read range of the first port and a read range of the second port based on the test scenario, and perform a read performance test on the first port and the second port based on the configured read range of the first port and the configured read range of the second port;
a second read performance testing module configured to exchange a read range of the first port with a read range of the second port and perform the read performance test on the first port and the second port based on the exchanged read ranges of the first port and the second port.
In another aspect of the embodiments of the present invention, there is also provided a computer device, including: at least one processor; and a memory storing a computer program executable on the processor, the computer program when executed by the processor implementing the steps of the method as above.
In a further aspect of the embodiments of the present invention, a computer-readable storage medium is also provided, in which a computer program for implementing the above method steps is stored when the computer program is executed by a processor.
The invention has at least the following beneficial technical effects: by configuring the test scenes and the test ranges of the two ports of the dual-port hard disk, the performance of the dual-port hard disk can be flexibly tested in each test scene, the comprehensive test on the performance of the dual-port hard disk is realized, and the verification on the performance balance condition of the dual-port hard disk in a dual-active mode is realized by exchanging the test ranges of the two ports.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a block diagram of an embodiment of a dual-port hard disk test method provided by the present invention;
FIG. 2 is a diagram of a dual-port hard disk test system according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an embodiment of a computer device provided in the present invention;
fig. 4 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
Based on the above purpose, the first aspect of the embodiments of the present invention provides an embodiment of a method for testing a dual-port hard disk. As shown in fig. 1, it includes the following steps:
s10, configuring a test scene of the dual-port hard disk;
s20, configuring a writing range of a first port and a writing range of a second port of the dual-port hard disk based on the test scene, and performing writing performance test on the first port and the second port based on the configured writing range of the first port and the configured writing range of the second port;
s30, configuring a reading range of the first port and a reading range of the second port based on the test scene, and performing a reading performance test on the first port and the second port based on the configured reading range of the first port and the configured reading range of the second port;
s40, exchanging the reading range of the first port and the reading range of the second port, and performing the reading performance test on the first port and the second port based on the exchanged reading ranges of the first port and the second port.
Specifically, a test scenario of the dual-port hard disk is configured, where the test scenario includes: in order to achieve comprehensive performance testing of two ports of a dual-port hard disk, in the embodiment of the invention, preferably, when the test scenarios are configured, all the test scenarios are configured, namely the steady-state test scenario, the garbage recovery test scenario and the rewrite test scenario. In each test scenario, the configured write range of the first port and the write range of the second port, and the configured read range of the first port and the configured read range of the second port may be the same or different. Generally, if the write range of the first port is a% and the read range is b%, the write range of the second port is (100-a)%, and the read range is (100-b)%. The write performance test corresponds to a test scenario being performed, and the corresponding write performance test is set based on the type of the test scenario, and the write performance test includes sequential write and random write. The reading performance test corresponds to the test scene, and the corresponding reading performance test is set based on the type of the test scene, wherein the reading performance test comprises sequential reading and random reading. On one hand, by configuring a test scene of the dual-port hard disk and testing the read-write performance of the first port and the second port under the configured test scene, the flexible performance test of the dual-port hard disk under each test scene is realized; on the other hand, the full-coverage performance test of the dual-port hard disk under each test scene is realized by the comprehensive test scene configuration of the dual-port hard disk and the read-write performance test of the first port and the second port under each test scene.
In each test scenario, a write performance test and a read performance test are performed on a first port and a second port of a dual-port hard disk, wherein the read performance test comprises two parts, namely, firstly, the read performance test under a read range configured for the first port and the second port is performed for the first port and the second port at the same time, then, the read ranges of the first port and the second port are exchanged, and the read performance test under the read ranges exchanged for the first port and the second port is performed for the first port and the second port at the same time under the read range exchanged for the first port and the second port. By exchanging the test ranges of the two ports, the performance balance condition of the dual-port hard disk in the dual-active mode is verified.
In some embodiments, the test scenario includes: a steady state test scenario, a garbage collection test scenario, and a rewrite test scenario.
In some embodiments, configuring a test scenario of a dual port hard disk includes:
and responding to the test scene as a steady-state test scene, and performing full-disk sequential writing on the dual-port hard disk to form a steady-state test environment.
In some embodiments, configuring a test scenario of a dual port hard disk includes:
responding to the test scene as a garbage recovery test scene, and performing full disk random writing on the dual-port hard disk;
after the full disk random writing is finished, inquiring a corresponding physical address according to the logical address of the dual-port hard disk, and generating a many-to-one mapping table of each physical address and a block of the dual-port hard disk based on all the inquired physical addresses;
and performing garbage collection on the corresponding blocks based on the physical addresses in the many-to-one mapping table to form a garbage collection test scene.
In some embodiments, configuring a test scenario of a dual port hard disk includes:
responding to the test scene as a rewriting test scene, and performing full disk sequential writing on the dual-port hard disk;
after the full disk sequential writing is finished, traversing all the logical addresses of the dual-port hard disk to obtain corresponding physical addresses;
generating a one-to-many mapping table of the blocks of the dual-port hard disk and each physical address based on all the acquired physical addresses;
and acquiring the read times of all the blocks based on the one-to-many mapping table, and setting the read interference strength based on the read times to form a rewrite test environment.
In some embodiments, configuring a write range of a first port and a write range of a second port of a dual port hard disk based on the test scenario, and performing a write performance test on the first port and the second port based on the configured write range of the first port and the configured write range of the second port includes:
responding to the test scenario that the test scenario is a steady-state test scenario, configuring a write range of a first port and a write range of a second port of a dual-port hard disk based on the steady-state test scenario, and simultaneously performing sequential write performance test on the first port and the second port based on the configured write range of the first port and the configured 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)%;
and responding to the test scenario being a garbage collection test scenario or a rewriting test scenario, configuring a writing range of a first port and a writing range of a second port of a dual-port hard disk based on the garbage collection test scenario or the rewriting test scenario, and simultaneously performing random writing performance test on the first port and the second port based on the configured writing range of the first port and the configured writing range of the second port.
In some embodiments, performing a read performance test on the first port and the second port based on the configured read range of the first port and the configured read range of the second port includes:
performing sequential read performance testing 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)%;
performing the read performance test on the first port and the second port based on the read range after the exchange of the first port and the second port, including:
and simultaneously performing the sequential reading performance test on the first port and the second port based on the read range after the first port and the second port are exchanged.
The following describes a specific embodiment of the present invention with reference to a specific example.
(1) And (3) environment deployment: preparing a server supporting the dual port and an SSD (solid state disk) supporting the dual port function, and configuring test tools such as fio, nvme and the like;
(2) Prepare fio performance command, test performance under different scenes using the following parameters
Bs (block size) =512 \\4k \32k \\ \128k \\256k \\/1m \/2m
Iodepth (queue depth) =1\4\, 16\, 32\, 64\, 128\, 1024
Numjobs (thread number) =1 \/2 \/32 \/64 \/128 \/1024 \
(3) Testing scene:
a) Performance testing in steady state scenarios
S11, writing the SSD on a full disk in sequence twice to prepare a stable test environment;
s12, using a fio command, simultaneously carrying out sequential write test on a port A (a first port of the SSD) and a port B (a second port of the SSD), and configuring the write range of the port A as a%, the write range of the port B as (100-a)%, and a = random.
S13, following the step S2, configuring the reading range of the port A as B percent, configuring the reading range of the port B as (100-B)%, and simultaneously carrying out performance test of sequential reading on the port A and the port B;
s14, following the step S3, the port A uses the read range (100-B)% of the port B, the port B uses the read range B% of the port A, and the performance of sequential reading is tested.
b) Performance testing under GC (garbage recovery) scene
The garbage collection is to collect the valid data in the SSD flash memory together, delete the invalid data block, i.e. garbage, so as to better maintain the SSD performance and release the space for storing more collected valid data. The garbage collection function is operated in the background of the SSD solid state disk and can be performed simultaneously when data is written, so that the performance is affected when garbage is collected in the background. Configuring a garbage recycling test scene based on the following steps and carrying out performance test under the configured garbage recycling test scene:
s21, writing on the full disk randomly for two times;
s22, inquiring a PBA (physical Block Addressing) according to the LBA (Logical Block Addressing, namely a Logical address), acquiring the LBA address, and generating a many-to-one mapping table M of the PBA and the Block, wherein the realization mode is as follows: nvme rm _ debug _ entry-o × p lba;
and S23, forcing the block to be subjected to GC according to the PBA information of the block. According to the mapping table M, blocks of 10%,30%,60%,80% and the like of the SSD can be controlled to be simultaneously subjected to GC, and the implementation mode is as follows: nvme rm _ debug _ entry-o x-f x-p < PBA > device;
s24, performing fio random read-write test in the background forced GC process:
s241, performing a test of random writing at the port a and the port simultaneously, and configuring a writing range of the port a as a%, configuring a writing range of the port B as (100-a)%, a = random.
S242, configuring the reading range of the port A as B% and the reading range of the port B as (100-B)%, and simultaneously carrying out performance test of sequential reading on the port A and the port B;
s243, port A uses the read range (100-B)%, port B uses the read range B% of port A, tests the performance of sequence reading.
c) Performance testing in rewrite mode
S31, writing twice in a full disc sequence;
and S32, traversing the LBA of the SSD, acquiring the address of the PBA, and analyzing the PBA information to obtain a many-to-one mapping table of the block and the PBA.
S33, acquiring readcount values, namely reading times, of all current blocks according to the mapping table;
s34, setting different read interference strengths based on the read times of each acquired block, and performing rewrite operation on 10%,30%, 50% and 80% of blocks
S35, performing performance test when rewriting with different intensities is performed in the background:
s351, performing a test of random writing at the port a and the port simultaneously, and configuring a writing range of the port a as a%, configuring a writing range of the port B as (100-a)%, a = random.
S352, configuring the reading range of the port A to be B% and the reading range of the port B to be (100-B)%, and simultaneously carrying out performance test of sequential reading on the port A and the port B;
s353, using the read range (100-B)%, of the port B, using the read range B% of the port A, and testing the performance of sequential reading.
By the scheme, the performance of the dual-port hard disk is comprehensively tested, and the performance balance condition of the dual-port hard disk in a dual-active mode is verified by exchanging the test ranges of the two ports.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 2, an embodiment of the present invention further provides a dual-port hard disk test system, including:
a configuration module 110, wherein the configuration module 110 is configured to configure a test scenario of a dual-port hard disk;
a write performance test module 120, where the write performance test module 120 is configured to configure a write range of a first port and a write range of a second port of a dual-port hard disk based on the test scenario, and perform a write performance test on the first port and the second port based on the configured write range of the first port and the configured write range of the second port;
a first read performance test module 130, where the first read performance test module 130 is configured to configure a read range of the first port and a read range of the second port based on the test scenario, and perform a read performance test on the first port and the second port based on the configured read range of the first port and the configured read range of the second port;
a second read performance testing module 140, where the second read performance testing module 140 is configured to exchange a read range of the first port with a read range of the second port and perform the read performance test on the first port and the second port based on the read ranges after the exchange between the first port and the second port.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 3, the embodiment of the present invention further provides a computer device 30, in which the computer device 30 comprises a processor 310 and a memory 320, the memory 320 stores a computer program 321 that can run on the processor, and the processor 310 executes the program to perform the steps of the method.
The embodiment of the invention also can comprise corresponding computer equipment. The computer device comprises a memory, at least one processor and a computer program stored on the memory and executable on the processor, the processor performing any of the above methods when executing the program.
The memory is used as a non-volatile computer-readable storage medium, and can be used to store a non-volatile software program, a non-volatile computer-executable program, and modules, such as program instructions/modules corresponding to the dual-port hard disk test method in the embodiments of the present application. The processor executes various functional applications and data processing of the system by running the nonvolatile software program, instructions and modules stored in the memory, namely, the dual-port hard disk test method of the above method embodiment is realized.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the system, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and such remote memory may be coupled to the local module via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 4, an embodiment of the present invention further provides a computer-readable storage medium 40, where the computer-readable storage medium 40 stores a computer program 410, which when executed by a processor, performs the above method.
Finally, it should be noted that, as will be understood by those skilled in the art, all or part of the processes of the methods of the above embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. The storage medium of the program may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. Furthermore, although elements of the embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. A method for testing a dual-port hard disk is characterized by comprising the following steps:
configuring a test scene of a dual-port hard disk;
configuring a writing range of a first port and a writing range of a second port of a dual-port hard disk based on the test scene, and performing writing performance test on the first port and the second port based on the configured writing range of the first port and the configured writing range of the second port;
configuring a read range of the first port and a read range of a second port based on the test scenario, and performing a read performance test on the first port and the second port based on the configured read range of the first port and the configured read range of the second port;
and exchanging the read range of the first port and the read range of the second port and performing the read performance test on the first port and the second port based on the exchanged read ranges of the first port and the second port.
2. The method of claim 1, wherein the test scenario comprises: a steady state test scenario, a garbage collection test scenario, and a rewrite test scenario.
3. The method of claim 2, wherein configuring a test scenario of a dual port hard disk comprises:
and responding to the test scene as a steady-state test scene, and performing full-disk sequential writing on the dual-port hard disk to form a steady-state test environment.
4. The method of claim 2, wherein configuring a test scenario of a dual port hard disk comprises:
responding to the test scene as a garbage recovery test scene, and performing full disk random writing on the dual-port hard disk;
after the full disk random writing is finished, inquiring a corresponding physical address according to the logical address of the dual-port hard disk, and generating a many-to-one mapping table of each physical address and a block of the dual-port hard disk based on all the inquired physical addresses;
and performing garbage collection on the corresponding blocks based on the physical addresses in the many-to-one mapping table to form a garbage collection test scene.
5. The method of claim 2, wherein configuring a test scenario of a dual port hard disk comprises:
responding to the test scene as a rewriting test scene, and performing full disk sequential writing on the dual-port hard disk;
after the full disk sequential writing is finished, traversing all the logical addresses of the dual-port hard disk to obtain corresponding physical addresses;
generating a one-to-many mapping table of the blocks of the dual-port hard disk and each physical address based on all the acquired physical addresses;
and acquiring the read times of all the blocks based on the one-to-many mapping table, and setting the read interference strength based on the read times to form a rewrite test environment.
6. The method of claim 2, wherein configuring a write range of a first port and a write range of a second port of a dual port hard disk based on the test scenario, and performing a write performance test on the first port and the second port based on the configured write range of the first port and the configured write range of the second port comprises:
responding to the test scenario that the test scenario is a steady-state test scenario, configuring a write range of a first port and a write range of a second port of a dual-port hard disk based on the steady-state test scenario, and simultaneously performing sequential write performance test on the first port and the second port based on the configured write range of the first port and the configured 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)%;
and responding to the test scenario being a garbage collection test scenario or a rewriting test scenario, configuring a writing range of a first port and a writing range of a second port of a dual-port hard disk based on the garbage collection test scenario or the rewriting test scenario, and simultaneously performing random writing performance test on the first port and the second port based on the configured writing range of the first port and the configured writing range of the second port.
7. The method of claim 1, wherein performing a read performance test on the first port and the second port based on the configured read range of the first port and the configured read range of the second port comprises:
performing sequential read performance testing 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)%;
performing the read performance test on the first port and the second port based on the read range after the exchange of the first port and the second port, including:
and simultaneously performing the sequential reading performance test on the first port and the second port based on the read range after the first port and the second port are exchanged.
8. A dual port hard disk test system, comprising:
the configuration module is configured to configure a test scene of the dual-port hard disk;
the write performance testing module is configured to configure a write range of a first port and a write range of a second port of the dual-port hard disk based on the test scenario, and perform write performance testing on the first port and the second port based on the configured write ranges of the first port and the second port;
a first read performance testing module, configured to configure a read range of the first port and a read range of the second port based on the test scenario, and perform a read performance test on the first port and the second port based on the configured read range of the first port and the configured read range of the second port;
a second read performance testing module configured to exchange a read range of the first port with a read range of the second port and perform the read performance test on the first port and the second port based on the exchanged read ranges of the first port and the second port.
9. A computer device, comprising:
at least one processor; and
memory storing a computer program operable on the processor, wherein the processor executes the program to perform the steps of the method according to any of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202211127246.6A 2022-09-16 2022-09-16 Dual-port hard disk test method, system, computer equipment and storage medium Pending CN115458035A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211127246.6A CN115458035A (en) 2022-09-16 2022-09-16 Dual-port hard disk test method, system, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211127246.6A CN115458035A (en) 2022-09-16 2022-09-16 Dual-port hard disk test method, system, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115458035A true CN115458035A (en) 2022-12-09

Family

ID=84305860

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211127246.6A Pending CN115458035A (en) 2022-09-16 2022-09-16 Dual-port hard disk test method, system, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115458035A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116662214A (en) * 2023-05-06 2023-08-29 深圳市晶存科技有限公司 Hard disk garbage recycling method, device, system and medium based on fio

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116662214A (en) * 2023-05-06 2023-08-29 深圳市晶存科技有限公司 Hard disk garbage recycling method, device, system and medium based on fio
CN116662214B (en) * 2023-05-06 2024-05-07 深圳市晶存科技有限公司 Hard disk garbage recycling method, device, system and medium based on fio

Similar Documents

Publication Publication Date Title
CN104967585B (en) A kind of method and apparatus of remote debugging mobile terminal
US9916147B2 (en) Deployment of a tool for testing migrated applications
CN102045191B (en) Method and equipment for testing compatibility after upgrading of system
CN107911249B (en) Method, device and equipment for sending command line of network equipment
CN109697133A (en) ID generation method, apparatus and system
CN107580018A (en) The tracking and device of a kind of distributed system
CN108650501B (en) A kind of method, apparatus and electronic equipment for testing stability of set-top box
CN115458035A (en) Dual-port hard disk test method, system, computer equipment and storage medium
CN108228444A (en) A kind of test method and device
CN103518205B (en) Limit method and the automation equipment of operating right
CN105871631B (en) A method of it is given for change based on snmp protocol and loses IP
CN114997101A (en) Signal control method, system, medium and device based on chip verification system
CN107102889B (en) Virtual machine resource adjusting method and device
CN107579879A (en) A kind of network simulation method of testing, emulation server and storage medium
CN107632927A (en) A kind of method for testing pressure and device of the encryption of the analogue data in C/S frameworks
CN108845767B (en) Method, system, device and storage medium for cache acceleration management of volume in storage
CN105094742B (en) A kind of method and apparatus for writing data
CN107357808A (en) Data managing method, device and equipment
CN109992197B (en) Data reading and writing method and device, electronic equipment and storage medium
CN105488047A (en) Metadata read-write method and device
CN107430533B (en) A kind of data verification method and device
CN106557530B (en) Operation system, data recovery method and device
CN114153732A (en) Fault scene testing method and device, electronic equipment and storage medium
CN103067053A (en) Method and device for Bluetooth node processing
CN113254273A (en) Method, system, device and medium for real-time recovery of principal metadata

Legal Events

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