CN115129572A - Performance test method, device, equipment and medium - Google Patents

Performance test method, device, equipment and medium Download PDF

Info

Publication number
CN115129572A
CN115129572A CN202210911911.4A CN202210911911A CN115129572A CN 115129572 A CN115129572 A CN 115129572A CN 202210911911 A CN202210911911 A CN 202210911911A CN 115129572 A CN115129572 A CN 115129572A
Authority
CN
China
Prior art keywords
performance index
preset
parameter
performance
value
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.)
Granted
Application number
CN202210911911.4A
Other languages
Chinese (zh)
Other versions
CN115129572B (en
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210911911.4A priority Critical patent/CN115129572B/en
Publication of CN115129572A publication Critical patent/CN115129572A/en
Application granted granted Critical
Publication of CN115129572B publication Critical patent/CN115129572B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging

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)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a performance test method, a performance test device, performance test equipment and performance test media, which relate to the technical field of computers, and the method comprises the following steps: generating a parameter combination of a target parameter according to a preset value-taking rule, sequentially sending a target test instruction generated based on the parameter combination to a preset hard disk by using a preset test tool for performance test so as to determine performance index values corresponding to the preset hard disk and different parameter combinations, and determining an optimal performance index value corresponding to each performance index item from all the performance index values based on a preset greedy algorithm; the performance index item comprises any one or more of bandwidth, input/output quantity per second and delay; and determining a target parameter combination corresponding to each optimal performance index value, and outputting each optimal performance index value and the target parameter combination to a preset display interface. The invention determines a test scene for enabling the NVMe SSD to reach the optimal performance in a dual-active mode by applying a greedy algorithm.

Description

Performance test method, device, equipment and medium
Technical Field
The invention relates to the technical field of computers, in particular to a performance testing method, a performance testing device, performance testing equipment and performance testing media.
Background
A dual-port NVMe (Non-Volatile Memory host controller interface specification) SSD (solid state disk) is mainly used in enterprise-level storage, and two controllers can operate the same NVMe SSD simultaneously, which not only tests the service processing capability of the NVMe SSD, but also tests the overall performance of the NVMe SSD. Therefore, how the dual-port NVMe SSD runs out of the optimal performance and how much the optimal performance can reach is also an important selling point for external propaganda of products, and under the current environment that information is rapidly developed, for the NVMe SSD, a winner wins the world, so that the optimal performance of the dual-port NVMe SSD is obtained in the process of manually and repeatedly testing when the NVMe SSD is tested, and the human resource consumption is large and the efficiency is low.
Therefore, how to avoid the situation that the manual test of the performance of the dual-port NVMe SSD causes large human resource consumption and low test efficiency in the test process of the dual-port NVMe SSD is a problem to be solved in the field.
Disclosure of Invention
In view of this, an object of the present invention is to provide a performance testing method, apparatus, device, and medium, which can obtain an optimal performance value of a dual-port NVMe SSD, and can definitely obtain the optimal performance value in what kind of test scenarios, and which abandons the complexity of manual repeated testing in the prior art, and improves the testing efficiency. The specific scheme is as follows:
in a first aspect, the present application discloses a performance testing method, comprising:
generating a parameter combination of the target parameters according to a preset value rule; the target parameters comprise a first parameter corresponding to a first port of the preset hard disk and a second parameter corresponding to a second port;
sequentially sending target test instructions generated based on the parameter combinations to a preset hard disk by using a preset test tool for performance test so as to determine performance index values corresponding to the preset hard disk and different parameter combinations, and determining optimal performance index values corresponding to all performance index items from all the performance index values based on a preset greedy algorithm; the performance index item comprises any one or more of bandwidth, input/output quantity per second and delay;
and determining a target parameter combination corresponding to each optimal performance index value, and outputting each optimal performance index value and the target parameter combination to a preset display interface.
Optionally, the generating a parameter combination of the target parameter according to a preset value rule includes:
generating a parameter combination of the target parameters according to a preset value rule; the target parameters comprise a first parameter corresponding to a first port of the preset hard disk and a second parameter corresponding to a second port; the first parameter and the second parameter both include any one or a combination of multiple of offset, read-write mode, data read-write quantity, block size of single IO, queue depth and thread number.
Optionally, the generating a parameter combination of the target parameter according to a preset value rule includes:
taking values according to a first preset increment value from the offset by a first preset minimum value until the offset reaches a first preset maximum value; the read-write mode is valued according to read, write, random read, random write read and random read; taking the value of the data read-write quantity according to the increment of a preset percentage; starting the block size of the single IO with a second preset minimum value, and carrying out value taking according to a second preset increment value until the block size of the single IO is taken to a second preset maximum value; starting the queue depth from a third preset minimum value, and taking a value according to a third preset increment value until the queue depth reaches a third preset maximum value; and starting the thread number with a fourth preset minimum value, and carrying out value taking according to a fourth preset increment value until a value rule of taking the thread number to the fourth preset maximum value generates a parameter combination.
Optionally, the step of sequentially sending, by using a preset test tool, the target test instruction generated based on the parameter combination to a preset hard disk for performing performance test to determine performance index values corresponding to the preset hard disk and different parameter combinations includes:
sequentially sending target test instructions generated based on the parameter combinations to the preset hard disk by using a preset test tool to perform performance test so as to determine first performance indexes and second performance indexes corresponding to the preset hard disk and different parameter combinations; wherein the first performance level corresponds to the first port and the second performance level corresponds to the second port;
and summarizing the first performance index and the second performance index corresponding to each parameter combination respectively to determine the performance index value corresponding to the preset hard disk and each parameter combination.
Optionally, the determining the optimal performance index value corresponding to each performance index item from all performance index values based on the preset greedy algorithm includes:
determining a target performance index item from all the performance index items, and determining an optimal performance index value from all performance index values corresponding to the target performance index item by using a preset greedy algorithm;
and re-determining the current target performance index item, and re-jumping to the step of determining the optimal performance index value from the performance index values corresponding to the target performance index item by using the preset greedy algorithm until the optimal performance index corresponding to all the target performance index items is determined.
Optionally, the determining an optimal performance index value from all performance index values corresponding to the target performance index item by using a preset greedy algorithm includes:
determining a first parameter combination from all the parameter combinations, and determining a first performance index value corresponding to a target performance index item corresponding to the first parameter combination;
determining a second parameter combination from all the parameter combinations except the first parameter combination, and determining a second performance index value corresponding to a target performance index item corresponding to the second parameter combination;
comparing the first performance indicator value to the second performance indicator value;
if the first performance index value is larger than the second performance index value, removing the current second parameter combination, and jumping to the step of determining a second parameter combination from all the parameter combinations except the first parameter combination until all the parameter combinations are traversed;
if the first performance index value is not larger than the second performance index value, removing the current first parameter combination, determining a first parameter combination from all the parameter combinations except the second parameter combination, then determining a first performance index value corresponding to a target performance index item corresponding to the first parameter combination, and skipping to the step of comparing the first performance index value with the second performance index value until all the parameter combinations are traversed;
and determining the performance index value corresponding to the target performance index item of the rest parameter combinations as the optimal performance index value.
Optionally, the step of sequentially sending the target test instruction generated based on the parameter combination to a preset hard disk by using a preset test tool to perform performance test includes:
and sequentially sending the target test instruction generated based on the parameter combination to a preset hard disk by using FIO (field oriented input/output) for performance test.
In a second aspect, the present application discloses a performance testing device, comprising:
the parameter combination determining module is used for generating a parameter combination according to the target parameter according to a preset value-taking rule; the target parameters comprise a first parameter corresponding to a first port of the preset hard disk and a second parameter corresponding to a second port;
the performance testing module is used for sequentially sending target testing instructions generated based on the parameter combinations to a preset hard disk by using a preset testing tool for performance testing so as to determine performance index values corresponding to the preset hard disk and different parameter combinations, and determining optimal performance index values corresponding to all performance index items from all the performance index values based on a preset greedy algorithm; the performance index item comprises any one or more of bandwidth, input/output quantity per second and delay;
and the performance index output module is used for determining a target parameter combination corresponding to each optimal performance index value and outputting each optimal performance index value and the target parameter combination to a preset display interface.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the aforementioned performance testing method.
In a fourth aspect, the present application discloses a computer storage medium for storing a computer program; wherein the computer program realizes the steps of the performance testing method disclosed in the foregoing when being executed by a processor.
The method comprises the steps of generating a parameter combination of a target parameter according to a preset value rule; the target parameters comprise a first parameter corresponding to a first port of the preset hard disk and a second parameter corresponding to a second port; sequentially sending target test instructions generated based on the parameter combinations to a preset hard disk by using a preset test tool for performance test so as to determine performance index values corresponding to the preset hard disk and different parameter combinations, and determining optimal performance index values corresponding to all performance index items from all the performance index values based on a preset greedy algorithm; the performance index item comprises any one or more of bandwidth, input/output quantity per second and delay; and determining a target parameter combination corresponding to each optimal performance index value, and outputting each optimal performance index value and the target parameter combination to a preset display interface. Therefore, the invention utilizes the preset test tool to input the parameter combination generated according to the preset value-taking rule to the preset hard disk for performance test, and utilizes the preset greedy algorithm to determine the optimal performance index value and the optimal parameter combination. The invention determines the test scene for enabling the NVMe SSD to reach the optimal performance in the double-active mode by applying a greedy algorithm, not only can the optimal performance value of the double-port NVMe SSD be obtained, but also the optimal performance value can be obtained in the test scene definitely, the complexity of manual repeated testing in the prior art is abandoned, the testing efficiency is improved, and an irreplaceable important role is played for product propaganda.
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, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a performance testing method provided herein;
FIG. 2 is a schematic structural diagram provided herein;
FIG. 3 is a flow chart of a specific performance testing method provided herein;
FIG. 4 is a schematic flow chart provided herein;
FIG. 5 is a schematic structural diagram of a performance testing apparatus provided in the present application;
fig. 6 is a block diagram of an electronic device provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the prior art, in the process of testing the dual-port NVMe SSD, the manual testing of the performance of the dual-port NVMe SSD causes large human resource consumption and low testing efficiency. In this application, can obtain dual-port NVMe SSD's optimal performance value, can definitely obtain this optimal performance value under what kind of test scenario moreover, abandon the loaded down with trivial details nature of manual retest among the prior art, promoted the efficiency of test. The specific scheme is as follows:
the embodiment of the invention discloses a performance testing method, which is described with reference to fig. 1 and comprises the following steps:
step S11: generating a parameter combination of the target parameters according to a preset value rule; the target parameters comprise a first parameter corresponding to a first port of the preset hard disk and a second parameter corresponding to a second port.
In this embodiment, the preset hard disk is a dual-port memory with two ports, and the dual ports enable one hard disk to be connected to two different storage controllers. In particular embodiments NVMe SSD is preferred. Fig. 2 is a schematic structural diagram of the present invention, in which an NVMe SSD (i.e., a dual port SSD) is connected to different servers a and B, the servers a and B are respectively connected to the same NVMe SSD through a PCIe switch (i.e., a PCIe switch or a PCIe switch; where PCIe is PCI-Express, which is a high speed serial computer expansion bus standard), and the two NVMe SSDs can access the same storage space at the same time and perform redundant backup of stored data.
In a specific implementation manner of this embodiment, the target parameter includes a first parameter corresponding to the first port and a second parameter corresponding to the second port, where the first parameter and the second parameter may each include any one or a combination of multiple of an offset (i.e., offset), a read/write mode (i.e., rw), a data read/write amount (i.e., size), a block size (i.e., bs) of a single IO (i.e., Input/Output, I/O Input/Output), a queue depth (iodepth), and a thread number (numjobs). That is, the target parameters in this step include twelve parameters: offset A, rw A, size A, bs A, iodepth A, numblobs A, offset B, rw B, size B, bs B, iodepth B, numblobs B, specifically, offset A, rw A, size A, bs A, iodepth A, numblobs A are input into Server A, and offset B, rw B, size B, bs B, iodepth B, numblobs B are input into Server B.
In this embodiment, the target parameters are sequentially valued according to a preset value rule to obtain a parameter combination. It should be noted that each parameter combination corresponds to a workload (i.e., a workload).
Step S12: sequentially sending target test instructions generated based on the parameter combinations to a preset hard disk by using a preset test tool for performance test so as to determine performance index values corresponding to the preset hard disk and different parameter combinations, and determining optimal performance index values corresponding to all performance index items from all the performance index values based on a preset greedy algorithm; the performance index items comprise any one or more of bandwidth, input/output per second and delay.
In this embodiment, sequentially sending the target test instruction generated based on the parameter combination to a preset hard disk by using a preset test tool to perform a performance test may include: and sequentially sending the target test instruction generated based on the parameter combination to a preset hard disk for performance test by using an FIO (flexible I/O tester).
In this embodiment, a preset test tool is used to sequentially send target test instructions generated based on the parameter combination to a preset hard disk for performance testing, wherein the preset test tool may preferably be an FIO. Correspondingly, the preset test tool is an FIO instruction.
In this embodiment, after the target test instruction is sent to the preset hard disk for performance test each time, the performance index in the hard disk changes due to the input target parameters, and at this time, the present embodiment obtains the performance index value by using the preset test tool, and records the performance index value and the corresponding parameter combination. In some preferred embodiments, three performance indicators, i.e., bandwidth, iops (i.e., the number of times of performing read/write Operations Per Second), and latency, may be collected.
In a specific implementation process, FIO may be used to issue a workload determined by an input target parameter value from a dual port to the NVMe SSD, and after the execution of each workload is completed, the bandwidth, iops, and latency of the Server a and the Server B are recorded respectively.
In this embodiment, after the performance index value corresponding to each parameter combination is determined, the optimal performance index value corresponding to each performance index item is determined from all the performance index values based on a preset greedy algorithm, and then subsequent operations are performed based on the optimal performance index value.
Step S13: and determining a target parameter combination corresponding to each optimal performance index value, and outputting each optimal performance index value and the target parameter combination to a preset display interface.
In this embodiment, after determining the optimal performance index value, a target parameter combination corresponding to each optimal performance index value is determined, and each optimal performance index value and the target parameter combination are output to a preset display interface. In a specific implementation manner, each performance index applies a greedy algorithm once, and if the performance index items are three items of bandwidth, iops and latency, the bandwidth, iops and latency optimal performance values of the NVMe SSD can be obtained after three rounds of greedy algorithms are performed, and a corresponding workload can be obtained, that is, a corresponding parameter combination is obtained.
In the embodiment, a parameter combination is generated by firstly generating a target parameter according to a preset value rule; the target parameters comprise a first parameter corresponding to a first port of the preset hard disk and a second parameter corresponding to a second port; sequentially sending target test instructions generated based on the parameter combinations to a preset hard disk by using a preset test tool for performance test so as to determine performance index values corresponding to the preset hard disk and different parameter combinations, and determining optimal performance index values corresponding to all performance index items from all the performance index values based on a preset greedy algorithm; the performance index item comprises any one or more of bandwidth, input/output quantity per second and delay; and determining a target parameter combination corresponding to each optimal performance index value, and outputting each optimal performance index value and the target parameter combination to a preset display interface. Therefore, the invention utilizes the preset test tool to input the parameter combination generated according to the preset value-taking rule to the preset hard disk for performance test, and utilizes the preset greedy algorithm to determine the optimal performance index value and the optimal parameter combination. The invention determines a test scene for enabling the NVMe SSD to reach the optimal performance from various workloads in a double-active mode by applying a greedy algorithm, not only can the optimal performance of the dual-port NVMe SSD be obtained, but also the optimal performance can be obtained in the test scene, the complexity of manual repeated testing in the prior art is abandoned, the testing efficiency is improved, and an irreplaceable important role is played for product propaganda.
Fig. 3 is a flowchart of a specific performance testing method according to an embodiment of the present disclosure. Referring to fig. 2, the method includes:
step S21: generating a parameter combination of the target parameters according to a preset value rule; the target parameters comprise a first parameter corresponding to a first port of the preset hard disk and a second parameter corresponding to a second port; the first parameter and the second parameter both include any one or a combination of multiple of offset, read-write mode, data read-write quantity, block size of single IO, queue depth and thread number.
In this embodiment, the generating a parameter combination according to the preset value rule with the target parameter may include: taking values according to a first preset increment value from the offset by a first preset minimum value until the offset reaches a first preset maximum value; the read-write mode is valued according to read, write, random read, random write read and random read; taking the value of the data read-write quantity according to the increment of a preset percentage; starting the block size of the single IO with a second preset minimum value, and carrying out value taking according to a second preset increment value until the block size of the single IO is taken to a second preset maximum value; starting the queue depth from a third preset minimum value, and taking a value according to a third preset increment value until the queue depth reaches a third preset maximum value; and starting the thread number with a fourth preset minimum value, and carrying out value taking according to a fourth preset increment value until a value rule of taking the thread number to the fourth preset maximum value generates a parameter combination.
In a specific implementation manner, the preset value rule in this embodiment is preferably: set offset A/B to a variable from 0 to 100% in 1% increments; setting rw A/B as variable with write, read, randwrite, randread, rw and randrw as input; set size a/B to a variable of 0 to 100% in 1% increments, and size a + size B100% to satisfy a dual-port joint write/read full disk; setting bs A/B to be variable from 4k to 1M in 4k increments, thus basically covering the requirement of most performance indexes in the market; setting iodepth A/B to a variable from 1 to 256 in increments of 1; numjobs A/B is set to variables of 1 to 20 in increments of 1.
Step S22: sequentially sending target test instructions generated based on the parameter combinations to the preset hard disk by using a preset test tool for performance test so as to determine first performance indexes and second performance indexes corresponding to the preset hard disk and different parameter combinations; wherein the first performance level corresponds to the first port and the second performance level corresponds to the second port.
In this embodiment, after the execution of each workload is completed, the bandwidths, iops, and latency of the Server a and the Server B are respectively recorded, that is, the first performance index bandwidth a and iops a latency a corresponding to the Server a, and the second performance index bandwidth B, iops B, and latency B corresponding to the Server B.
Step S23: and summarizing the first performance index and the second performance index corresponding to each parameter combination respectively to determine the performance index value corresponding to the preset hard disk and each parameter combination.
In this step, the performance indexes of the two ports obtained in the above step are added to obtain the total performance index of the NVMe SSD, that is, the total bandwidth is bandwidth a + bandwidth B, the total iops is iops a + iops B, and the total latency is latency a + latency B.
Step S24: determining a target performance index item from all the performance index items, and determining an optimal performance index value from all performance index values corresponding to the target performance index item by using a preset greedy algorithm; the performance index item comprises any one or more of bandwidth, input/output quantity per second and delay.
In this embodiment, the determining an optimal performance index value from all performance index values corresponding to the target performance index item by using a preset greedy algorithm may include: determining a first parameter combination from all the parameter combinations, and determining a first performance index value corresponding to a target performance index item corresponding to the first parameter combination; determining a second parameter combination from all the parameter combinations except the first parameter combination, and determining a second performance index value corresponding to a target performance index item corresponding to the second parameter combination; comparing the first performance indicator value to the second performance indicator value; if the first performance index value is larger than the second performance index value, removing the current second parameter combination, and jumping to the step of determining a second parameter combination from all the parameter combinations except the first parameter combination until all the parameter combinations are traversed; if the first performance index value is not larger than the second performance index value, removing the current first parameter combination, determining a first parameter combination from all the parameter combinations except the second parameter combination, then determining a first performance index value corresponding to a target performance index item corresponding to the first parameter combination, and skipping to the step of comparing the first performance index value with the second performance index value until all the parameter combinations are traversed; and determining the performance index value corresponding to the target performance index item of the rest parameter combinations as the optimal performance index value.
Step S25: and re-determining the current target performance index item, and re-jumping to the step of determining the optimal performance index value from the performance index values corresponding to the target performance index item by using the preset greedy algorithm until the optimal performance index corresponding to all the target performance index items is determined.
In this embodiment, each performance index corresponding to all the parameter combinations is compared two by two, and the smaller one of the two performance index values is removed, and after the final traversal is completed, the parameter combinations corresponding to the smaller performance index values are all removed, and only the optimal target parameter combination with the largest performance index value remains. In a specific implementation manner, each round of the process of obtaining the optimal performance index value by using the preset greedy algorithm will complete the processes of comparing two sets of the optimal performance index values, removing one set with a smaller value, and using the last set as the optimal target parameter.
Step S26: and determining a target parameter combination corresponding to each optimal performance index value, and outputting each optimal performance index value and the target parameter combination to a preset display interface.
In a specific implementation manner in this embodiment, the workload of the Server a may be determined as: rw-read, offset-0%, size-50%, bs-128 k, iodopth-128, numjobs-1; determining the Server B terminal workload as follows: rw, offset, size, bs, 128k, iodopth, numjobs, 1; the two ports simultaneously issue FIO instructions to the preprocessed NVMe SSD, the bandwidth, iops and latency of the two ports are summarized after the test is completed, so that the bandwidth, iops and latency of the NVMe SSD are obtained, and then the result obtained under other workloads is compared to determine whether the optimal performance value required by the user is in the scene. Finally, the optimal performance index value and the corresponding parameter combination are obtained.
FIG. 4 is a schematic flow chart showing the present invention, in which after the NVMe SSD is preprocessed, workloads of Server A and Server B are determined according to input variables, after the Server A and the Server B issue the determined workloads at the same time, the hard disk is tested, after the test is completed, the bandwidths, iops and latency of the Server A and the Server B are recorded, then the bandwidths, iops and latency values of the Server A and the Server B are summarized to obtain various performance values of the whole disk, and finally after all input variables are traversed, the optimal performance values of the bandwidths, iops and latency of the NVMe SSD are obtained.
In the embodiment, a parameter combination is generated by firstly generating a target parameter according to a preset value rule; the target parameters comprise a first parameter corresponding to a first port of the preset hard disk and a second parameter corresponding to a second port; the first parameter and the second parameter both include any one or a combination of multiple of offset, read-write mode, data read-write quantity, block size of single IO, queue depth and thread number. Then, sequentially sending target test instructions generated based on the parameter combinations to the preset hard disk by using a preset test tool for performance test so as to determine first performance indexes and second performance indexes corresponding to the preset hard disk and different parameter combinations; wherein the first performance level corresponds to the first port and the second performance level corresponds to the second port. And then summarizing the first performance index and the second performance index corresponding to each parameter combination respectively to determine the performance index value corresponding to the preset hard disk and each parameter combination. Then, determining a target performance index item from all the performance index items, and determining an optimal performance index value from all the performance index values corresponding to the target performance index item by using a preset greedy algorithm; the performance index item comprises any one or more of bandwidth, input/output quantity per second and delay. And re-determining the current target performance index item, and re-jumping to the step of determining the optimal performance index value from the performance index values corresponding to the target performance index item by using the preset greedy algorithm until the optimal performance index corresponding to all the target performance index items is determined. And finally, determining a target parameter combination corresponding to each optimal performance index value, and outputting each optimal performance index value and the target parameter combination to a preset display interface. Therefore, the invention inputs the parameter combination generated according to the preset value-taking rule to the preset hard disk for performance test by using the preset test tool, determines the performance index of the preset hard disk by combining the performance index values of the two ports, and finally determines the optimal performance index value and the optimal parameter combination by traversing the preset greedy algorithm. The invention determines the test scene for enabling the NVMe SSD to reach the optimal performance from various workloads in a double-active mode by applying a greedy algorithm, not only can the optimal performance value of the dual-port NVMe SSD be obtained, but also the optimal performance value can be obtained in the test scene, the complexity of manual repeated testing in the prior art is abandoned, the testing efficiency is improved, and an irreplaceable important role is played for product propaganda.
Referring to fig. 5, an embodiment of the present application discloses a performance testing apparatus, which may specifically include:
the parameter combination determining module 11 is configured to generate a parameter combination from the target parameter according to a preset value rule; the target parameters comprise a first parameter corresponding to a first port of the preset hard disk and a second parameter corresponding to a second port;
the performance testing module 12 is configured to sequentially send target testing instructions generated based on the parameter combinations to a preset hard disk by using a preset testing tool to perform performance testing, so as to determine performance index values corresponding to the preset hard disk and different parameter combinations, and determine an optimal performance index value corresponding to each performance index item from all the performance index values based on a preset greedy algorithm; the performance index item comprises any one or more of bandwidth, input/output quantity per second and delay;
and the performance index output module 13 is configured to determine a target parameter combination corresponding to each optimal performance index value, and output each optimal performance index value and the target parameter combination to a preset display interface.
According to the method, firstly, a parameter combination is generated by target parameters according to a preset value rule; the target parameters comprise a first parameter corresponding to a first port of the preset hard disk and a second parameter corresponding to a second port; sequentially sending target test instructions generated based on the parameter combinations to a preset hard disk by using a preset test tool for performance test so as to determine performance index values corresponding to the preset hard disk and different parameter combinations, and determining optimal performance index values corresponding to all performance index items from all the performance index values based on a preset greedy algorithm; the performance index item comprises any one or more of bandwidth, input/output quantity per second and delay; and determining a target parameter combination corresponding to each optimal performance index value, and outputting each optimal performance index value and the target parameter combination to a preset display interface. Therefore, the invention utilizes the preset test tool to input the parameter combination generated according to the preset value-taking rule to the preset hard disk for performance test, and utilizes the preset greedy algorithm to determine the optimal performance index value and the optimal parameter combination. The invention determines a test scene for enabling the NVMe SSD to reach the optimal performance from various workloads in a double-active mode by applying a greedy algorithm, not only can the optimal performance of the dual-port NVMe SSD be obtained, but also the optimal performance can be obtained in the test scene, the complexity of manual repeated testing in the prior art is abandoned, the testing efficiency is improved, and an irreplaceable important role is played for product propaganda.
In some embodiments, the parameter combination determining module 11 includes:
the parameter combination generating unit is used for generating a parameter combination according to the target parameter according to a preset value rule; the target parameters comprise a first parameter corresponding to a first port of the preset hard disk and a second parameter corresponding to a second port; the first parameter and the second parameter both include any one or a combination of multiple of offset, read-write mode, data read-write quantity, block size of single IO, queue depth and thread number.
In some embodiments, the parameter combination determining module 11 includes:
the parameter value taking unit is used for taking a value according to the offset from a first preset minimum value and a first preset incremental value until the offset reaches a first preset maximum value; the read-write mode is valued according to read, write, random read, random write read and random read; taking the value of the data read-write quantity according to the increment of a preset percentage; starting the block size of the single IO with a second preset minimum value, and carrying out value taking according to a second preset increment value until the block size of the single IO is taken to a second preset maximum value; starting the queue depth from a third preset minimum value, and taking a value according to a third preset increment value until the queue depth reaches a third preset maximum value; and taking the thread number from a fourth preset minimum value and taking the value according to a fourth preset increment value until a value rule of a fourth preset maximum value is taken to generate a parameter combination.
In some embodiments, the performance testing module 12 includes:
the performance testing unit is used for sequentially sending target testing instructions generated based on the parameter combinations to the preset hard disk by using a preset testing tool for performance testing so as to determine first performance indexes and second performance indexes of the preset hard disk corresponding to different parameter combinations; wherein the first performance level corresponds to the first port and the second performance level corresponds to the second port;
and the index summarizing unit is used for summarizing the first performance index and the second performance index corresponding to each parameter combination respectively so as to determine the performance index value corresponding to the preset hard disk and each parameter combination.
In some embodiments, the performance testing module 12 includes:
the target performance index item determining unit is used for determining a target performance index item from all the performance index items and determining an optimal performance index value from all the performance index values corresponding to the target performance index item by using a preset greedy algorithm;
and the target performance index item re-determining unit is used for re-determining the current target performance index item, and re-jumping to the step of determining the optimal performance index value from the performance index values corresponding to the target performance index item by using a preset greedy algorithm until the optimal performance index corresponding to all the target performance index items is determined.
In some embodiments, the target performance indicator item determining unit includes:
a first parameter combination determining unit, configured to determine a first parameter combination from all the parameter combinations, and determine a first performance index value corresponding to a target performance index item corresponding to the first parameter combination;
a second parameter combination determining unit, configured to determine a second parameter combination from parameter combinations other than the first parameter combination in all the parameter combinations, and determine a second performance index value corresponding to a target performance index item corresponding to the second parameter combination;
a performance index comparison unit for comparing the first performance index value with the second performance index value;
a first traversal unit, configured to, if the first performance index value is greater than the second performance index value, remove the current second parameter combination, and skip to the step of determining a second parameter combination from the parameter combinations other than the first parameter combination in all the parameter combinations until all the parameter combinations are traversed;
a second traversal unit, configured to, if the first performance index value is not greater than the second performance index value, remove the current first parameter combination, determine a first parameter combination from parameter combinations other than the second parameter combination in all the parameter combinations, then determine a first performance index value corresponding to a target performance index item corresponding to the first parameter combination, and skip to the step of comparing the first performance index value and the second performance index value until all the parameter combinations are traversed;
and the optimal performance index value determining unit is used for determining the performance index values corresponding to the target performance index items of the remaining parameter combinations as the optimal performance index values.
In some embodiments, the performance testing module 12 includes:
and the tool application unit is used for sequentially sending the target test instruction generated based on the parameter combination to a preset hard disk by using FIO (field oriented input/output) for performance test.
Further, an electronic device is also disclosed in the embodiments of the present application, and fig. 6 is a block diagram of the electronic device 20 shown in the exemplary embodiments, and the contents in the diagram cannot be considered as any limitation to the scope of the application.
Fig. 6 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a display screen 24, an input output interface 25, a communication interface 26, and a communication bus 27. Wherein, the memory 22 is used for storing a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the performance testing method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 26 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to acquire external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
In addition, the storage 22 is used as a carrier for storing resources, and may be a read-only memory, a random access memory, a magnetic disk, an optical disk, or the like, the resources stored thereon may include an operating system 221, a computer program 222, virtual machine data 223, and the like, and the virtual machine data 223 may include various data. The storage means may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device on the electronic device 20 and the computer program 222, and may be Windows Server, Netware, Unix, Linux, or the like. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the performance testing method performed by the electronic device 20 disclosed in any of the foregoing embodiments.
Further, the present application discloses a computer-readable storage medium, wherein the computer-readable storage medium includes a Random Access Memory (RAM), a Memory, a Read-Only Memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a magnetic disk, or an optical disk or any other form of storage medium known in the art. Wherein the computer program, when executed by a processor, implements the performance testing method disclosed above. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, which are not described herein again.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. 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 present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The performance testing method, apparatus, device and storage medium provided by the present invention are described in detail above, and specific examples are applied herein to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method of performance testing, comprising:
generating a parameter combination of the target parameters according to a preset value rule; the target parameters comprise a first parameter corresponding to a first port of the preset hard disk and a second parameter corresponding to a second port;
sequentially sending target test instructions generated based on the parameter combinations to a preset hard disk by using a preset test tool for performance test so as to determine performance index values corresponding to the preset hard disk and different parameter combinations, and determining optimal performance index values corresponding to all performance index items from all the performance index values based on a preset greedy algorithm; the performance index item comprises any one or more of bandwidth, input/output quantity per second and delay;
and determining a target parameter combination corresponding to each optimal performance index value, and outputting each optimal performance index value and the target parameter combination to a preset display interface.
2. The performance testing method according to claim 1, wherein the generating of the parameter combination from the target parameter according to the preset value rule comprises:
generating a parameter combination of the target parameters according to a preset value rule; the target parameters comprise a first parameter corresponding to a first port of the preset hard disk and a second parameter corresponding to a second port; the first parameter and the second parameter both include any one or a combination of multiple of offset, read-write mode, data read-write quantity, block size of single IO, queue depth and thread number.
3. The performance testing method according to claim 2, wherein the generating of the parameter combination from the target parameter according to the preset value rule comprises:
taking values according to a first preset increment value from the offset by a first preset minimum value until the offset reaches a first preset maximum value; the read-write mode is valued according to read, write, random read, random write read and random read; taking the value of the data read-write quantity according to the increment of a preset percentage; starting the block size of the single IO with a second preset minimum value, and carrying out value taking according to a second preset increment value until the block size of the single IO is taken to a second preset maximum value; starting the queue depth from a third preset minimum value, and taking a value according to a third preset increment value until the queue depth reaches a third preset maximum value; and starting the thread number with a fourth preset minimum value, and carrying out value taking according to a fourth preset increment value until a value rule of taking the thread number to the fourth preset maximum value generates a parameter combination.
4. The performance testing method of claim 1, wherein the sequentially sending target test instructions generated based on the parameter combinations to a preset hard disk by using a preset testing tool for performance testing to determine performance index values corresponding to the preset hard disk and different parameter combinations comprises:
sequentially sending target test instructions generated based on the parameter combinations to the preset hard disk by using a preset test tool for performance test so as to determine first performance indexes and second performance indexes corresponding to the preset hard disk and different parameter combinations; wherein the first performance level corresponds to the first port and the second performance level corresponds to the second port;
and summarizing the first performance index and the second performance index corresponding to each parameter combination respectively to determine the performance index value corresponding to the preset hard disk and each parameter combination.
5. The performance testing method according to claim 1, wherein the determining an optimal performance index value corresponding to each performance index item from all performance index values based on a preset greedy algorithm comprises:
determining a target performance index item from all the performance index items, and determining an optimal performance index value from all performance index values corresponding to the target performance index item by using a preset greedy algorithm;
and re-determining the current target performance index item, and re-jumping to the step of determining the optimal performance index value from the performance index values corresponding to the target performance index item by using the preset greedy algorithm until the optimal performance index corresponding to all the target performance index items is determined.
6. The performance testing method of claim 5, wherein determining an optimal performance index value from all performance index values corresponding to the target performance index item by using a preset greedy algorithm comprises:
determining a first parameter combination from all the parameter combinations, and determining a first performance index value corresponding to a target performance index item corresponding to the first parameter combination;
determining a second parameter combination from all the parameter combinations except the first parameter combination, and determining a second performance index value corresponding to a target performance index item corresponding to the second parameter combination;
comparing the first performance indicator value to the second performance indicator value;
if the first performance index value is larger than the second performance index value, removing the current second parameter combination, and jumping to the step of determining a second parameter combination from all the parameter combinations except the first parameter combination until all the parameter combinations are traversed;
if the first performance index value is not larger than the second performance index value, removing the current first parameter combination, determining a first parameter combination from all the parameter combinations except the second parameter combination, then determining a first performance index value corresponding to a target performance index item corresponding to the first parameter combination, and skipping to the step of comparing the first performance index value with the second performance index value until all the parameter combinations are traversed;
and determining the performance index values corresponding to the target performance index items of the rest parameter combinations as the optimal performance index value.
7. The performance testing method according to any one of claims 1 to 6, wherein the sequentially sending the target test instructions generated based on the parameter combination to a preset hard disk by using a preset testing tool for performance testing comprises:
and sequentially sending the target test instruction generated based on the parameter combination to a preset hard disk by using the FIO for performance test.
8. A performance testing device, comprising:
the parameter combination determining module is used for generating a parameter combination according to the target parameter according to a preset value-taking rule; the target parameters comprise a first parameter corresponding to a first port of the preset hard disk and a second parameter corresponding to a second port;
the performance testing module is used for sequentially sending target testing instructions generated based on the parameter combinations to a preset hard disk by using a preset testing tool for performance testing so as to determine performance index values corresponding to the preset hard disk and different parameter combinations, and determining optimal performance index values corresponding to all performance index items from all the performance index values based on a preset greedy algorithm; the performance index item comprises any one or more of bandwidth, input/output quantity per second and delay;
and the performance index output module is used for determining a target parameter combination corresponding to each optimal performance index value and outputting each optimal performance index value and the target parameter combination to a preset display interface.
9. An electronic device comprising a processor and a memory; wherein the processor, when executing the computer program stored in the memory, implements the performance testing method of any of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the performance testing method of any of claims 1 to 7.
CN202210911911.4A 2022-07-29 2022-07-29 Performance test method, device, equipment and medium Active CN115129572B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210911911.4A CN115129572B (en) 2022-07-29 2022-07-29 Performance test method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210911911.4A CN115129572B (en) 2022-07-29 2022-07-29 Performance test method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN115129572A true CN115129572A (en) 2022-09-30
CN115129572B CN115129572B (en) 2024-06-28

Family

ID=83386865

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210911911.4A Active CN115129572B (en) 2022-07-29 2022-07-29 Performance test method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115129572B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116434824A (en) * 2023-06-14 2023-07-14 四川华鲲振宇智能科技有限责任公司 Method for testing optimal performance of hard disk and product cooperation
WO2024087428A1 (en) * 2022-10-25 2024-05-02 浪潮电子信息产业股份有限公司 Parameter configuration recommendation method and apparatus for memory product, and device and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109215721A (en) * 2018-10-24 2019-01-15 郑州云海信息技术有限公司 A kind of method, device and equipment of test NVME SSD hard disk delay
CN111290895A (en) * 2020-01-21 2020-06-16 苏州浪潮智能科技有限公司 Method, device, equipment and medium for testing IO performance of server
CN111540400A (en) * 2020-04-23 2020-08-14 苏州浪潮智能科技有限公司 Write amplification factor testing method and device, electronic equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109215721A (en) * 2018-10-24 2019-01-15 郑州云海信息技术有限公司 A kind of method, device and equipment of test NVME SSD hard disk delay
CN111290895A (en) * 2020-01-21 2020-06-16 苏州浪潮智能科技有限公司 Method, device, equipment and medium for testing IO performance of server
CN111540400A (en) * 2020-04-23 2020-08-14 苏州浪潮智能科技有限公司 Write amplification factor testing method and device, electronic equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024087428A1 (en) * 2022-10-25 2024-05-02 浪潮电子信息产业股份有限公司 Parameter configuration recommendation method and apparatus for memory product, and device and medium
CN116434824A (en) * 2023-06-14 2023-07-14 四川华鲲振宇智能科技有限责任公司 Method for testing optimal performance of hard disk and product cooperation
CN116434824B (en) * 2023-06-14 2023-09-15 四川华鲲振宇智能科技有限责任公司 Method for testing optimal performance of hard disk and product cooperation

Also Published As

Publication number Publication date
CN115129572B (en) 2024-06-28

Similar Documents

Publication Publication Date Title
CN115129572A (en) Performance test method, device, equipment and medium
US9032175B2 (en) Data migration between storage devices
CN106201652B (en) Data processing method and virtual machine
US9710379B2 (en) Tuning utilization and heap memory size for real-time garbage collection
US8612674B2 (en) Systems and methods for concurrently accessing a virtual tape library by multiple computing devices
US11205496B2 (en) Apparatus and method for testing storage device in power interruptions
CN116662214B (en) Hard disk garbage recycling method, device, system and medium based on fio
CN107562554A (en) A kind of memory reliability method of testing and server
CN115757066A (en) Hard disk performance test method, device, equipment, storage medium and program product
CN109144796B (en) Method, system and device for testing performance of storage system and server
CN105511959A (en) Method and device for distributing virtual resource
US11436123B2 (en) Application execution path tracing for inline performance analysis
CN105471930B (en) A kind of method, system and equipment reading distributed data
CN113448730A (en) Service processing method and device, computer equipment and storage medium
US9135191B1 (en) Techniques for storage network bandwidth management
CN108959020B (en) Method and device for calculating CPU utilization rate of computer
CN113031873B (en) IO request processing method, device, equipment and readable storage medium
CN104536861A (en) Multi-operation system based FC SAN (Fiber Channel Storage Area Network) memory testing method
CN111221713B (en) FC parameter-based storage performance tuning method, system, terminal and storage medium
US20170154142A1 (en) Method and apparatus for simulating slow storage disk
CN110399297B (en) Test method and computing device
CN113220467B (en) DPDK performance limit calculation method based on memory throughput and related equipment
CN110740099B (en) Data flow control method and device
CN113900928B (en) IO load automatic test method and device
CN112000430A (en) HCI storage performance optimization method, device, equipment and storage medium

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
GR01 Patent grant