Test method and device of storage equipment, computer equipment, readable storage medium and program product
By avoiding the merge and sorting operation of read and write request data structures in the storage device test, and directly calling the storage device for read and write tests, the problem of low accuracy of test results in the prior art is solved, and the precise test of each read and write queue of the storage device is realized.
Patent Information
- Application Number
- CN202411792020.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-06
AI Technical Summary
When testing the performance of storage devices such as smart network cards, the reading and writing queue merging and sorting processing results in low accuracy of the test results, and it is impossible to show the system's testing of each read and write queue.
By determining the scheduler queue and the read and write operation data structure to be tested, converting it into the read and write request data structure and putting it into the queue, directly calling the storage device for read and write tests, avoiding the merge and sorting operation of the read and write request data structure.
Accurate testing of each read and write queue of the storage device is realized, the accuracy of the test results is improved, and the hardware processing capabilities of the storage device can be more realistically reflected.
Smart Images

Figure CN119645746A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of storage devices, and in particular to a storage device testing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] Smart NICs are increasingly used as computer infrastructure, especially as hardware devices for cloud computing bases. The complexity of developing new devices based on smart NICs is high, and it is necessary to master the hardware performance of the smart NIC storage system to meet product development. The current performance testing method for storage devices such as smart NICs will merge and sort the read and write queues when testing the read and write paths. The test results obtained are the merged read and write execution results, which cannot show the test status of each read and write queue distributed by the system to the storage device. Therefore, the relevant technology has the problem of low accuracy of the test results. Summary of the invention
[0003] Based on this, it is necessary to provide a storage device testing method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the accuracy of test results in response to the above technical problems.
[0004] In a first aspect, the present application provides a method for testing a storage device, comprising:
[0005] Determine a scheduler queue and a plurality of read-write operation data structures to be tested based on read-write test parameters for the storage device to be tested, and determine corresponding memory pages based on the read-write operation data structures to be tested;
[0006] Convert each of the read-write operation data structures to be tested into a corresponding read-write request data structure, and sequentially place each of the read-write request data structures into the scheduler queue;
[0007] Call the storage device to be tested, and perform read and write tests on each storage sector in the storage device to be tested according to each read and write request data structure in the scheduler queue through the memory pages corresponding to the read and write operation data structure to be tested, so as to obtain the test result of the storage device to be tested.
[0008] In one embodiment, the storage device testing method described in the above embodiment further includes:
[0009] Obtaining a test parameter range specified by a user for the storage device to be tested;
[0010] According to the test parameter range and the particle swarm optimization algorithm, a plurality of particle parameters included in the initial particle population are obtained, and according to the particle parameters, read and write test parameters for the storage device to be tested are obtained.
[0011] In one embodiment, the calling of the storage device to be tested, performing read and write tests on the memory pages corresponding to the read and write operation data structures to be tested in turn according to the read and write request data structures in each of the scheduler queues, and obtaining the test results of the storage device to be tested, further comprises:
[0012] The initial particle population is iteratively updated according to the test result until a preset iteration end condition is met, thereby obtaining a target test result and a corresponding target read-write test parameter.
[0013] In one of the embodiments, the read / write test parameters include at least the number of read / write queues and the depth of the read / write queues;
[0014] The method of determining a scheduler queue and a plurality of read-write operation data structures to be tested based on the read-write test parameters for the storage device to be tested, and determining a corresponding memory page based on the read-write operation data structures to be tested, includes:
[0015] According to the read / write test parameters, determining a plurality of kernel threads matching the number of the read / write queues, and determining a scheduler queue matching the depth of the read / write queues;
[0016] Calling each of the kernel threads to generate a preset number of read and write operation data structures to be tested;
[0017] According to the read / write test parameters and each of the read / write operation data structures to be tested, a memory page corresponding to each of the read / write operation data structures to be tested is determined.
[0018] In one embodiment, the calling of the storage device to be tested, sequentially passing through the memory pages corresponding to the read and write operation data structures to be tested according to each of the read and write request data structures in the scheduler queue, performing read and write tests on each storage sector in the storage device to be tested, and obtaining the test result of the storage device to be tested, includes:
[0019] In the case where the read / write type of the read / write test parameter is sequential read / write, the memory pages corresponding to the read / write operation data structure to be tested are sequentially passed through according to each of the read / write request data structures in the scheduler queue, and read / write tests are performed on each storage sector in the storage device to be tested in sector order to obtain a test result of the storage device to be tested;
[0020] In the case where the read / write type of the read / write test parameters is random read / write, the read / write test is performed in a random order on each storage sector in the storage device to be tested according to the memory pages corresponding to the read / write operation data structure to be tested in turn according to each of the read / write request data structures in the scheduler queue, to obtain the test result of the storage device to be tested.
[0021] In one embodiment, the calling of the storage device to be tested, sequentially passing through the memory pages corresponding to the read and write operation data structures to be tested according to each of the read and write request data structures in the scheduler queue, performing read and write tests on each storage sector in the storage device to be tested, and obtaining the test result of the storage device to be tested, includes:
[0022] Calling the storage device to be tested, and performing read and write tests on each storage sector in the storage device to be tested through the memory pages corresponding to the read and write operation data structures to be tested in turn according to each of the read and write request data structures in the scheduler queue, to obtain a test time;
[0023] The unit read / write operation number and the read / write bandwidth of the storage device to be tested are determined according to the test time, and the unit read / write operation number and the read / write bandwidth are used as test results.
[0024] In a second aspect, the present application also provides a storage device testing device, comprising:
[0025] A data determination module, used to determine a scheduler queue and a plurality of read-write operation data structures to be tested based on read-write test parameters for the storage device to be tested, and to determine a corresponding memory page based on the read-write operation data structures to be tested;
[0026] A queue construction module, used to convert each of the read-write operation data structures to be tested into a corresponding read-write request data structure, and put each of the read-write request data structures into the scheduler queue in sequence;
[0027] The device testing module is used to call the storage device to be tested, and perform read and write tests on each storage sector in the storage device to be tested according to each read and write request data structure in the scheduler queue through the memory pages corresponding to the read and write operation data structure to be tested, so as to obtain the test result of the storage device to be tested.
[0028] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0029] Determine a scheduler queue and a plurality of read-write operation data structures to be tested based on read-write test parameters for the storage device to be tested, and determine corresponding memory pages based on the read-write operation data structures to be tested;
[0030] Convert each of the read-write operation data structures to be tested into a corresponding read-write request data structure, and sequentially place each of the read-write request data structures into the scheduler queue;
[0031] Call the storage device to be tested, and perform read and write tests on each storage sector in the storage device to be tested according to each read and write request data structure in the scheduler queue through the memory pages corresponding to the read and write operation data structure to be tested, so as to obtain the test result of the storage device to be tested.
[0032] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0033] Determine a scheduler queue and a plurality of read-write operation data structures to be tested based on read-write test parameters for the storage device to be tested, and determine corresponding memory pages based on the read-write operation data structures to be tested;
[0034] Convert each of the read-write operation data structures to be tested into a corresponding read-write request data structure, and sequentially place each of the read-write request data structures into the scheduler queue;
[0035] Call the storage device to be tested, and perform read and write tests on each storage sector in the storage device to be tested according to each read and write request data structure in the scheduler queue through the memory pages corresponding to the read and write operation data structure to be tested, so as to obtain the test result of the storage device to be tested.
[0036] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0037] Determine a scheduler queue and a plurality of read-write operation data structures to be tested based on read-write test parameters for the storage device to be tested, and determine corresponding memory pages based on the read-write operation data structures to be tested;
[0038] Convert each of the read-write operation data structures to be tested into a corresponding read-write request data structure, and sequentially place each of the read-write request data structures into the scheduler queue;
[0039] Call the storage device to be tested, and perform read and write tests on each storage sector in the storage device to be tested according to each read and write request data structure in the scheduler queue through the memory pages corresponding to the read and write operation data structure to be tested, so as to obtain the test result of the storage device to be tested.
[0040] The above-mentioned storage device testing method, device, computer device, computer-readable storage medium and computer program product, the method determines a scheduler queue and multiple read-write operation data structures to be tested based on the read-write test parameters for the storage device to be tested, and determines the corresponding memory page based on the read-write operation data structure to be tested, paving the way for subsequent read-write testing; then each read-write operation data structure to be tested is converted into a corresponding read-write request data structure, and each read-write request data structure is sequentially placed in the scheduler queue, and the read-write data corresponding to the read-write request data structure is not merged and sorted, and the storage device to be tested is further called, and the memory page corresponding to the read-write operation data structure to be tested is sequentially passed through according to each read-write request data structure in the scheduler queue, and a read-write test is performed on each storage sector in the storage device to be tested, and a test result of the storage device to be tested is obtained, so that the storage device to be tested responds to the read-write request data structure in sequence, and the test result of each read-write request data structure that has not been merged and sorted is obtained, which can more truly reflect the hardware processing capability of the storage device to be tested, thereby improving the accuracy of the test result. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 It is a schematic diagram of the reading and writing process of the operating system in the related technology;
[0043] Figure 2 A schematic diagram of a flow chart of a method for testing a storage device in one embodiment;
[0044] Figure 3 A schematic diagram of a flow chart of a scheduler queue and a read / write operation data structure and a memory page determination step in one embodiment;
[0045] Figure 4 is a flow chart of a method for testing a storage device in another embodiment;
[0046] Figure 5A flowchart of the working principle of a custom scheduler in one embodiment;
[0047] Figure 6 is a structural block diagram of a testing device for a storage device in one embodiment;
[0048] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0050] As described in the background technology, the performance test method of storage devices such as smart network cards in the related art has the problem of low accuracy of test results. The inventors have found that the reason for this problem is that: Figure 1As shown, a schematic diagram of the read and write process of the operating system in the related technology is provided. The io (Input / Output, read and write) data is submitted from the file system or kernel to the block io (read and write block) layer through the submit_bio (read and write operation data structure synthesis function) function. At this time, the io data has been encapsulated into the data structure of bio. In the generic_make_request (request generation function) function, the blk_plug_device (block device request queue) function is called to add io to the queue of this process. In the scheduler queue, the io of this process can be merged without locking. Next, in the generic_make_request function, the operation function of the io scheduler is called to merge bio, and generate a request (read and write request data structure) and put it into the io scheduler queue. Multiple bios may be merged into one request, and too large bios will also be split into multiple requests. Then when the device is idle, the storage device driver takes the request from the io scheduler queue to the device distribution queue. The device distribution queue is a software queue. One software queue can correspond to one hardware queue, or multiple software queues can be bound to one hardware queue. When the request is converted from the software queue to the hardware queue, it is converted into a cmd (command prompt) command that can be recognized by the hardware, and the storage hardware executes the corresponding io operation. For smart network card devices, they are generally multi-queue block devices. The actual processing capacity of the hardware is only when the device distributes the queue. However, the test method of related technologies is affected by the merging and sorting operations in the scheduling of the operating system itself, and cannot accurately measure the processing capacity of the hardware. In particular, the full load capacity of the io queue and io depth has become a black box and is not controlled by the test parameters of the user-mode test program. In some tests, there are several cases where the test results are quite different, especially random writes are greatly affected.
[0051] Based on the above reasons, the present invention proposes a storage device testing method, aiming to solve the problem of low accuracy of test results in the related art.
[0052] In one embodiment, Figure 2 As shown, a storage device testing method is provided. This embodiment uses the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0053] Step 202 : determining a scheduler queue and a plurality of read / write operation data structures to be tested based on the read / write test parameters for the storage device to be tested, and determining corresponding memory pages based on the read / write operation data structures to be tested.
[0054] The storage device to be tested may be a storage device that requires hardware performance testing, such as the hardware processing capability of an FPGA (Field-Programmable Gate Array) or an ASIC (Application-Specific Integrated Circuit), or the overall performance of underlying storage system paths such as virtio-blk (block device driver for virtualized environments) and RDMA (Remote Direct Memory Access, a high-performance data transmission technology).
[0055] The read / write test parameters may be parameters configured by a technician for a read / write test task of the storage device to be tested.
[0056] Among them, the scheduler queue can be an important part of the operating system kernel, responsible for managing disk I / O (Input / Output) requests. When the user process initiates read / write operations, these requests are added to the kernel's IO queue, which is actually a data structure used to organize and queue these I / O tasks according to a certain strategy (such as first come first served, shortest response time, etc.). When the CPU has free time to process these I / O requests, the scheduler selects a task in the queue, converts it from the waiting state to the execution state, and transfers data from memory to disk or vice versa.
[0057] Among them, the read-write operation data structure to be tested may be a read-write operation data structure that requires the storage device to be tested to perform corresponding read-write tests. The read-write operation data structure is BIO (Blocking I / O), which is the abbreviation of "Blocking Input / Output". It is an input / output model used in the Java NIO (New I / O) API (Application Programming Interface). In this model, the read and write operations of files or network connections are usually blocking, that is, if an operation needs to wait for data to return, then the thread will be suspended until the operation is completed. In other words, when BIO performs read and write operations, if the data is not available, the program will temporarily stop and suspend until the data is available before continuing to execute. In short, the BIO data structure usually includes BufferedInputStream (buffered input stream) and BufferedOutputStream (buffered output stream), which provide encapsulation of the underlying low-level IO, increase processing performance and simplify the work of programmers.
[0058] Among them, the memory page can be a memory page is a basic storage unit in a computer operating system. It is one of the core concepts of virtual memory management. In modern operating systems, each process has a virtual address space, which is divided into several fixed-size pages (Page). Generally, the page size is a fixed value of 4KB, 8KB or larger, and the common ones are 4KB, 16KB, 32KB or even larger. When the process is running, the data it needs will be loaded into the memory, and it will be managed and exchanged in units of pages. Each physical memory block corresponds to one or more virtual pages. When a process tries to access a virtual address, it actually looks up the corresponding physical page through the page table mapping mechanism.
[0059] Optionally, the system constructs a scheduler queue and multiple read and write operation data structures to be tested based on the read and write test parameters for the storage device to be tested, and determines the corresponding memory pages based on the binding relationship in the read and write operation data structures to be tested, paving the way for subsequent calls to the storage device to be tested to perform read and write tests.
[0060] Step S204: convert each read / write operation data structure to be tested into a corresponding read / write request data structure, and put each read / write request data structure into the scheduler queue in sequence.
[0061] The read / write request data structure may be Request, which is a request corresponding to the read / write test task.
[0062] Optionally, the system calls the p-noop (private noop) custom scheduler through the _make_request (request generation) function, converts each read and write operation data structure to be tested into a corresponding read and write request data structure, and puts the read and write request data structure into the scheduler queue in sequence. In addition, when p-noop puts the read and write request data structure into the scheduler queue in sequence, it does not merge and sort the read and write data.
[0063] It should be noted that compared with the traditional noop scheduler, p-noop no longer calls the pulg list queue of the creation process in the make_request_fn() function. The scheduler removes the elevator_merge_fn operation function in elevator_ops, which is responsible for the merging operation of read and write data. The operations to implement p-noop are as follows:
[0064] void p_noop_elevator_add_req_fn(struct request *request)
[0065] / / Create a FIFO queue
[0066] create_fifo_queue(fifo_queue)
[0067] / / Get the queue lock
[0068] lock_fifo_queue(fifo_queue)
[0069] / / Add the request to the end of the queue
[0070] enqueue_request(fifo_queue, request)
[0071] / / Release the queue lock
[0072] unlock_fifo_queue(fifo_queue)
[0073] static const struct elevator_ops p_noop_elevator_ops =
[0074] .elevator_merge_req_fn = p_noop_elevator_merge_req_fn
[0075] .elevator_add_req_fn = p_noop_elevator_add_req_fn
[0076] static int __make_request(struct bio *bio)
[0077] / / Apply for p-noop scheduler queue
[0078] get_p_noop_scheduler_queue(p_noop)
[0079] / / Create a request
[0080] create_request(request)
[0081] / / Set some properties of the request
[0082] request->bio = bio
[0083] request->scheduler = p_noop
[0084] / / Call the p_noop_elevator_add_req_fn function to add the request to the queue
[0085] p_noop_elevator_add_req_fn(request)
[0086] return 0
[0087] Step S206, calling the storage device to be tested, and performing read and write tests on each storage sector in the storage device to be tested according to each read and write request data structure in the scheduler queue, through the memory pages corresponding to the read and write operation data structure to be tested, to obtain the test result of the storage device to be tested.
[0088] Among them, the storage sector can be a sector in the storage device to be tested. A "sector" is the smallest addressable data unit, usually referring to a physical area on a storage medium (such as a hard disk, solid-state drive, etc.). The sector size of a traditional hard disk is usually 512 bytes, while modern hard disks and solid-state drives generally use a sector size of 4K (4096 bytes).
[0089] Optionally, the system calls the storage device to be tested, and performs a read and write test on each storage sector in the storage device to be tested by sequentially passing through the memory pages corresponding to the read and write operation data structures to be tested according to the read and write request data structures in the scheduler queue. For example, if the test performed is a read data test, the system uses the memory to which data needs to be written in the system's memory as the memory in which data needs to be written, and then reads data from each storage sector in the storage device to be tested and writes it to the corresponding memory pages.
[0090] In the above-mentioned storage device testing method, the method determines a scheduler queue and multiple read-write operation data structures to be tested based on the read-write test parameters for the storage device to be tested, and determines the corresponding memory pages based on the read-write operation data structures to be tested, so as to pave the way for subsequent read-write tests; then each read-write operation data structure to be tested is converted into a corresponding read-write request data structure, and each read-write request data structure is sequentially placed in the scheduler queue, and the read-write data corresponding to the read-write request data structure is not merged and sorted, and the storage device to be tested is further called, and the memory pages corresponding to the read-write operation data structure to be tested are sequentially passed through according to each read-write request data structure in the scheduler queue, and read-write tests are performed on each storage sector in the storage device to be tested, and the test results of the storage device to be tested are obtained, so that the storage device to be tested responds to the read-write request data structure in sequence, and the test results of each read-write request data structure that has not been merged and sorted are obtained, which can more truly reflect the hardware processing capability of the storage device to be tested, thereby improving the accuracy of the test results.
[0091] In an exemplary embodiment, the storage device testing method described in the above embodiment further includes:
[0092] A test parameter range for the storage device to be tested specified by a user is obtained; multiple particle parameters included in the initial particle population are obtained according to the test parameter range and the particle swarm optimization algorithm, and read and write test parameters for the storage device to be tested are obtained according to the particle parameters.
[0093] Among them, the test parameter range can be the range value composed of the upper and lower limits of the read and write test parameters entered by the user in the system, such as the range of the minimum data unit of read and write data, the range of the number of read and write queues, and the range of the depth of read and write queues.
[0094] Among them, the particle swarm optimization algorithm (PSO) can be a group intelligence optimization algorithm used to solve optimization problems, and find the optimal solution by simulating a group of particles to learn and cooperate with each other in the search space. Among them, the particle parameters can be multiple particles simulated according to the test parameter range, and the parameters of each particle correspond to random numbers in the test parameter range.
[0095] Optionally, the system obtains a test parameter range specified by the user for the storage device to be tested, uses a particle swarm optimization algorithm to initialize the size of the initial particle population to N, the initial value of each particle parameter is a random number within the test parameter range, and uses the particle parameter as a read and write test parameter for the storage device to be tested.
[0096] In this embodiment, the particle swarm optimization algorithm is used to optimize the read and write test parameters of a specific storage device, which can not only improve the efficiency and accuracy of the test, but also provide a more scientific basis for evaluating the performance of the storage device.
[0097] In an exemplary embodiment, the steps of the above embodiment call the storage device to be tested, and perform read and write tests on the memory pages corresponding to the read and write operation data structure to be tested in turn according to the read and write request data structures in each scheduler queue, and after obtaining the test results of the storage device to be tested, further include:
[0098] The initial particle population is iteratively updated according to the test results until the preset iteration end condition is met, and the target test results and the corresponding target read-write test parameters are obtained.
[0099] The preset iteration technical condition may be that the fitness of each particle meets a preset fitness threshold or the number of iteration updates reaches a preset number threshold.
[0100] Among them, the target test result can be the test result with the best performance of the storage device among all test results of the storage device to be tested during the iterative update process, and the target read and write test parameters are the read and write test parameters used in the test of the test result with the best performance of the storage device.
[0101] Optionally, when the test results do not meet the actual requirements, the system uses a preset weight to calculate the fitness of each particle in each initial particle population, and iteratively updates the initial particle population according to the fitness of each particle until the preset iteration end condition is met, and obtains the target test results and the corresponding target read-write test parameters. The update formula of the particle population is:
[0102]
[0103] in, represents the updated particle population, represents the preset weight, represents the particle population before updating, represents the individual optimal position of particle i, represents the current global best position, represents the individual particle acceleration constant, represents the particle population acceleration constant, Represents a random number within the test parameters.
[0104] In this embodiment, the particle swarm optimization algorithm is used to optimize the parameters of the storage device read and write test. In particular, when the test results do not meet the actual requirements, iterative updates are performed through preset weights and fitness calculations. When the initial test results do not meet the requirements, the search strategy can be flexibly adjusted by iteratively updating the particle population to ensure that the system improves the test results through continuous learning and adaptation, finds the optimal test results, and provides a data-driven basis for product development and improvement.
[0105] In an exemplary embodiment, Figure 3 As shown, the read / write test parameters include at least the number of read / write queues and the depth of the read / write queues; step S202 determines the scheduler queue and multiple read / write operation data structures to be tested based on the read / write test parameters for the storage device to be tested, and determines the corresponding memory page based on the read / write operation data structures to be tested, including:
[0106] Step S302: Determine, according to the read / write test parameters, a plurality of kernel threads that match the number of read / write queues, and determine a scheduler queue that matches the depth of the read / write queues.
[0107] Among them, the kernel thread can be a thread created and managed by the operating system kernel, which can access all resources of the operating system and execute any service provided by the operating system, such as the file system and the network.
[0108] Among them, the read and write queue depth can be (IO Queue Depth) is an important performance indicator in the data storage system, which indicates the number of pending IO requests that the storage system can handle at a certain point in time. This depth is directly related to the system's concurrency and throughput.
[0109] Optionally, the system determines multiple kernel threads that match the number of read-write queues according to the number of read-write queues included in the read-write test parameters, and constructs a scheduler queue with a queue depth twice the depth of the read-write queue according to the depth of the read-write queue included in the read-write test parameters, to ensure that the hardware queue of the storage device to be tested is always in a full-load state during the test. It can be understood that when the user specifies that the read-write and io depth of multiple read-write queues need to be tested, each read-write queue generates a p-noop FIFO scheduler queue with a queue depth of twice the depth of the read-write queue specified by the user to ensure that the device hardware queue is always in a full-load state, and the kernel io data generator generates a corresponding number of threads, and each thread writes a p-noop FIFO scheduling queue. Each p-noop FIFO scheduling queue corresponds to a device dispatch queue and a hardware hardwaredispatch q (hardware dispatch request processing queue). This method is different from the original operating system scheduling method, in addition to solving the traditional read-write request merging, splitting and sorting effects. Each thread tests a read-write queue and queue depth separately, which solves the impact of the original operating system scheduler binding multiple soft-Qs (soft queues) to one hardware q, and avoids the ambiguity of mismatched read-write queue tests of single or multiple threads.
[0110] Step S304: calling each kernel thread to generate a preset number of read and write operation data structures to be tested.
[0111] Optionally, the system calls each kernel thread to generate a preset number of read and write operation data structures to be tested, enter the block io (read and write block) layer, bypassing the influence of traditional vfs (Virtual File System) and file system calls on reading and writing in the operating system, and can achieve finer-grained control, directly controlling the data storage process, managing buffers and I / O scheduling.
[0112] Step S306, determining the memory page corresponding to each read / write operation data structure to be tested according to the read / write test parameters and each read / write operation data structure to be tested.
[0113] Optionally, the system determines the memory page corresponding to each read-write operation data structure to be tested according to the read-write test parameters and each read-write operation data structure to be tested, and also determines the storage sector position and the length of the storage sector pointed to by the read-write operation data structure. As shown in Table 1, the structure of the read-write operation data structure is provided:
[0114] Table 1
[0115]
[0116] It should be noted that the system determines the operation corresponding to the memory page corresponding to each read / write operation data structure to be tested according to the read / write test parameters and each read / write operation data structure to be tested as follows:
[0117] struct bio {
[0118] sector_t bi_sector; / *Disk starting sector number* /
[0119] struct block_device *bi_bdev; / * block device operated by bio* /
[0120] unsigned long bi_flags; / * Status flag* /
[0121] unsigned long bi_rw; / *read and write* /
[0122] unsigned short bi_vcnt; / * number of bio_vec's* /
[0123] unsigned short bi_idx; / * index of current bvl_vec array* /
[0124] unsigned int bi_size; / * The size of the entire bio: the sum of all bi_io_vec->len* /
[0125] bio_end_io_t *bi_end_io; / * Called when bio is finished* /
[0126] void *bi_private; / *bio private data* /
[0127] unsigned int bi_max_vecs; / * Maximum number of bio_vecs carried by bio (the actual bio_vec used is represented by bi_vcnt) * /
[0128] atomic_t bi_cnt; / * bio reference count* /
[0129] struct bio_vec *bi_io_vec; / * bio_vec array* /
[0130] struct bio_set *bi_pool; / *bio_set maintains several bio slabs of different sizes* /
[0131] struct bio_vec bi_inline_vecs[0]; / * bio embedded bio_vec* /
[0132] };
[0133] struct bio_vec {
[0134] struct page *bv_page; / *The page to which the data belongs* /
[0135] unsigned int bv_len; / *data size* /
[0136] unsigned int bv_offset; / *Data offset within the page* /
[0137] }
[0138] Among them, bio_vec represents a piece of memory data, which is a page at most. In general, bio_vec corresponds to page (memory page) one by one, and all bio_vecs constitute all the data carried by a bio. The system builds kernel threads and allocates memory pages to simulate the io data writing needs of upper-level users. Here, the corresponding memory pages are created and data is written according to the user-specified test parameters obtained from the above proc file / proc / kernel_io_test_param. At the same time, the kernel thread creates the corresponding bio and binds the memory page to the bio. For sequential bio, the location of the sector storage sector is continuous. For random bio, each bio adds a random step length. The value of the random step length is generated by a pseudo-random number generator to achieve the purpose of the same random number in each round of testing, which can effectively evaluate the random test results in different scenarios.
[0139] In this embodiment, the number of read-write queues in the read-write test parameters is used to determine the corresponding read-write queue kernel threads to generate multiple read-write operation data structures, and a scheduler queue corresponding to the read-write queue depth is constructed. Each scheduler queue corresponds to the device distribution queue and the hardware dispatch request processing queue during the subsequent test. In addition to solving the traditional read-write request merging, splitting and sorting effects. Each thread tests a read-write queue and queue depth separately, solving the effect of the original operating system scheduler binding multiple queues with one hardware, avoiding the ambiguity of mismatching the read-write queue test by a single or multiple threads, and further improving the accuracy of the test results.
[0140] In an exemplary embodiment, step S206 calls the storage device to be tested, and sequentially passes through the memory pages corresponding to the read and write operation data structures to be tested according to the read and write request data structures in the scheduler queue, and performs read and write tests on each storage sector in the storage device to be tested, and obtains the test results of the storage device to be tested, including:
[0141] In the case where the read / write type of the read / write test parameters is sequential read / write, the memory pages corresponding to the read / write operation data structure to be tested are passed in sequence according to each read / write request data structure in the scheduler queue, and read / write tests are performed in sector order on each storage sector in the storage device to be tested to obtain a test result of the storage device to be tested; in the case where the read / write type of the read / write test parameters is random read / write, the memory pages corresponding to the read / write operation data structure to be tested are passed in sequence according to each read / write request data structure in the scheduler queue, and read / write tests are performed in random order on each storage sector in the storage device to be tested to obtain a test result of the storage device to be tested.
[0142] Sequential reading and writing can be accessing data blocks in a continuous order, and the reading or writing operations occur at adjacent locations on the data storage device, usually in a specific order.
[0143] Random reading and writing may refer to that the reading or writing operation of data does not follow a fixed order, but is dispersed in different locations of the storage device, that is, an I / O request may be performed between multiple random locations.
[0144] Optionally, in the case where the read / write type of the read / write test parameter is sequential read / write, the memory pages corresponding to the read / write operation data structure to be tested are sequentially passed through according to each read / write request data structure in the scheduler queue, and the read / write test is performed in sector order for each storage sector in the storage device to be tested, and the test result of the storage device to be tested is obtained. The sector order used at this time is configured when the read / write operation data structure is generated, and the storage sectors pointed to by each generated read / write operation data structure can be configured in ascending order according to a preset interval. In the case where the read / write type of the read / write test parameter is random read / write, the memory pages corresponding to the read / write operation data structure to be tested are sequentially passed through according to each read / write request data structure in the scheduler queue, and the read / write test is performed in random order for each storage sector in the storage device to be tested, and the test result of the storage device to be tested is obtained. The random order adopted at this time can be configured when the read / write operation data structure is generated, and the random number generated by the random number generator is configured in the read / write operation data structure.
[0145] In this embodiment, the storage sector pointed to by the read / write operation data structure is configured in a targeted manner according to the read / write type in the read / write test parameters, and during the test process, the read / write test is performed on each storage sector of the storage device to be tested in sector order or random order, thereby improving the flexibility of the system during testing.
[0146] In an exemplary embodiment, a storage device to be tested is called, and a read / write test is performed on each storage sector in the storage device to be tested through the memory pages corresponding to the read / write operation data structure to be tested in turn according to each read / write request data structure in the scheduler queue, and a test result of the storage device to be tested is obtained, including:
[0147] Call the storage device to be tested, and perform read and write tests on each storage sector in the storage device to be tested according to the memory pages corresponding to the read and write operation data structures to be tested in turn according to the read and write request data structures in the scheduler queue to obtain the test time; determine the unit read and write operation number and read and write bandwidth of the storage device to be tested according to the test time, and use the unit read and write operation number and read and write bandwidth as the test results.
[0148] The unit read / write operation number may be iops (Input / Output Operations Per Second), which indicates the number of input / output operations that can be performed per second. It is an important indicator for measuring the performance of storage devices, especially in random read / write operations.
[0149] Among them, the read and write bandwidth can be bw, which represents the amount of data transferred in a specific time, usually expressed in bytes per second (B / s) or more common units such as MB / s or GB / s, reflecting the data transmission capacity of the storage device in read and write operations.
[0150] Optionally, the storage device to be tested is called, and the memory pages corresponding to the read and write operation data structures to be tested are sequentially passed through according to the read and write request data structures in the scheduler queue, and the read and write test is performed on each storage sector in the storage device to be tested, and the time spent in the test process is counted to obtain the test time. The unit read and write operation number is obtained according to the ratio of the total number of read and write operations involved in the test process to the test time, and the read and write bandwidth is obtained according to the ratio between the total amount of data transmitted involved in the test process and the test time.
[0151] In this embodiment, the unit read and write operation number and read and write bandwidth of the storage device to be tested are determined by counting the test time during the test process, which can reflect the hardware performance of the storage device to be tested, help system administrators or developers make more informed decisions when selecting storage devices and configuring storage architectures, and can serve as an optimization reference for developing storage devices.
[0152] In an exemplary embodiment, Figure 4 As shown, another method for testing a storage device is provided, comprising:
[0153] Step 1, automatically calculate the optimal iops and bw values through the particle swarm evolution algorithm through the parameter update module, and output the corresponding read and write test parameters bs size, number of io queues, and io queue depth. The general tools mainly solved here require manual and tedious work to continuously try to test the optimal solution. It is completed automatically by the program. The idea of particle swarm evolution algorithm is a mature AI intelligent algorithm. Here we only briefly describe the design of the io business model of this device: each particle in this business has three parameters, namely bs size, number of io queues, and io queue depth. Initialize the particle swarm, and set the maximum and minimum values of the three parameters: , , . The population size is N, and the initialization value of each particle is a random number between the maximum and minimum values of the three parameters. Calculate the fitness of each particle, pass the parameters of each particle into this device, perform io performance test, obtain the corresponding iops or bw, and obtain the fitness of each particle. Update the particle parameters by introducing the standard particle swarm optimization algorithm with inertia weight. Iterate the steps between calculating fitness and performing io performance test until the maximum number of iterations is reached or the global optimal solution (target test results and target read and write test parameters) is obtained.
[0154] Step 2, the kernel io data generator module generates the specified io data, i.e., bio, through a kernel thread. The file system receives user instructions through the proc (a virtual file system of the operating system). The user can specify the test bs size. The typical io size can be entered as 4k and 1024k options, which are used to test iops and bandwidth respectively. The user can specify the test type (read and write type): sequential and random, read or write. The user can specify the io queue and queue depth to be tested. The kernel io data generator generates bio that meets the requirements upon receiving the user instruction, and directly generates bio to enter the block io layer, bypassing the influence of traditional vfs and file system calls write and read in the operating system. bio_vec represents a piece of memory data, with a maximum of one page. In general, bio_vec corresponds to page one by one, and all bio_vecs constitute all the data carried by a bio. The kernel io data generator starts with kernel threads to allocate memory pages to simulate the io write data requirements of upper-level users. Here, the corresponding memory pages are created and data is written according to the user-specified test parameters obtained from the above proc file / proc / kernel_io_test_param. At the same time, the kernel thread creates the corresponding bio and binds the memory page to the bio. For sequential bios, the sectors are continuous. For random bios, each bio adds a random step to itself. The value of the random step is generated by a pseudo-random number generator to achieve the same random number in each round of testing. This can effectively evaluate the random test results in different scenarios.
[0155] Step 3, such as Figure 5As shown in the figure, a flowchart of the working principle of the p-noop scheduler is provided. By building a custom io scheduler p-noop (private noop), this scheduler is modified according to the noop scheduler, and the pulg list queue of the creation process is no longer called in the make_request_fn() function. The scheduler removes the elevator_merge_fn operation function in elevator_ops. This function is responsible for the io merge operation. Remove the io merge operation. Create the corresponding FIFO scheduler queue according to the number of queues required for the test, execute IO requests one by one, and do not merge and sort io. Each bio generates 1 request. When the user specifies that multiple io queues and io depths need to be tested, each io queue generates a p-noop FIFO scheduling queue, and the queue depth is twice the depth specified by the user to ensure that the device hardware queue is always at full load. The kernel io data generator generates the corresponding number of threads, and each thread writes a p-noop FIFO scheduling queue. And each p-noop FIFO scheduling queue corresponds to the device dispatch queue and the hardware dispatch q. This method is different from the original operating system scheduling method. In addition to solving the impact of traditional io merging, splitting and sorting. Each thread tests an io queue and queue depth separately, which solves the impact of the original operating system scheduler binding multiple soft-qs to one hardware q, and avoids the ambiguity of mismatching io queue tests on single or multiple threads. When the storage device is idle, the device driver takes io from the custom scheduler p-noop queue in turn to perform the test. The io data generator receives the io return count of 1 io completion. Each round of testing generates 10,000 bios. After the test is completed, the test time is counted, and the iops and bandwidth are calculated and printed to dmesg (a command in the operating system used to print messages that control the kernel ring buffer) for users to view.
[0156] In this embodiment, the maximum and minimum values of the input io test parameters are combined with the intelligent AI algorithm particle swarm optimization algorithm and the underlying hardware io performance calculation system of the present invention to calculate the optimal solution for the io performance of the underlying hardware storage system. A dedicated kernel io data generator bypasses vfs and the file system and directly acts on the block io layer to directly generate a bio for targeted testing, including bs size, sector value, etc. The autonomous and controllable bio can control the sequential io sector to be continuous. The random io generates a controllable and iteratively comparable group of random sectors through a pseudo-random number generator for testing and comparison, making the product iteration evaluation comparison effective. The custom p-noop io scheduler creates a one-to-one corresponding kernel thread and io scheduler queue for testing this path according to the number of io queues to be tested. The actual number of storage hardware queues and queue depths are generated in a targeted manner, and bound to the storage hardware queues one by one to form a targeted test. At the same time, in the operation function concentration of the io scheduler, each bio generates 1 request, and no bio merging and request sorting are performed, so that the iops performance is accurately controllable and the hardware processing capability is truly presented.
[0157] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0158] Based on the same inventive concept, the embodiment of the present application also provides a storage device testing apparatus for implementing the storage device testing method involved above. The implementation scheme for solving the problem provided by the apparatus is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the storage device testing apparatus provided below can refer to the limitations of the storage device testing method above, and will not be repeated here.
[0159] In an exemplary embodiment, Figure 6 As shown, a storage device testing apparatus 600 is provided, comprising: a data determination module 602, a queue construction module 604 and a device testing module 606, wherein:
[0160] The data determination module 602 is used to determine a scheduler queue and a plurality of read-write operation data structures to be tested based on the read-write test parameters for the storage device to be tested, and determine corresponding memory pages based on the read-write operation data structures to be tested.
[0161] The queue construction module 604 is used to convert each read-write operation data structure to be tested into a corresponding read-write request data structure, and put each read-write request data structure into the scheduler queue in sequence.
[0162] The device testing module 606 is used to call the storage device to be tested, and perform read and write tests on each storage sector in the storage device to be tested according to the memory pages corresponding to the read and write operation data structures to be tested in turn according to the read and write request data structures in the scheduler queue, to obtain the test results of the storage device to be tested.
[0163] Furthermore, in one embodiment, the storage device testing apparatus 600 also includes a data acquisition module for acquiring a user-specified test parameter range for the storage device to be tested; based on the test parameter range and the particle swarm optimization algorithm, a plurality of particle parameters included in the initial particle population are obtained, and based on the particle parameters, read and write test parameters for the storage device to be tested are obtained.
[0164] Furthermore, in one embodiment, the device testing module 606 is also used to iteratively update the initial particle population according to the test results until a preset iteration end condition is met, thereby obtaining a target test result and a corresponding target read-write test parameter.
[0165] Furthermore, in one embodiment, the data determination module 602 is also used to determine, based on the read-write test parameters, a plurality of kernel threads that match the number of read-write queues, and to determine a scheduler queue that matches the depth of the read-write queues; to call each kernel thread to generate a preset number of read-write operation data structures to be tested; and to determine, based on the read-write test parameters and each read-write operation data structure to be tested, the memory page corresponding to each read-write operation data structure to be tested.
[0166] Further, in one embodiment, the device testing module 606 is also used to, when the read / write type of the read / write test parameters is sequential read / write, sequentially pass through the memory pages corresponding to the read / write operation data structure to be tested according to each read / write request data structure in the scheduler queue, and perform read / write tests on each storage sector in the storage device to be tested in sector order to obtain the test result of the storage device to be tested; when the read / write type of the read / write test parameters is random read / write, sequentially pass through the memory pages corresponding to the read / write operation data structure to be tested according to each read / write request data structure in the scheduler queue, and perform read / write tests on each storage sector in the storage device to be tested in random order to obtain the test result of the storage device to be tested.
[0167] Furthermore, in one embodiment, the device testing module 606 is also used to call the storage device to be tested, and perform read and write tests on each storage sector in the storage device to be tested according to each read and write request data structure in the scheduler queue through the memory pages corresponding to the read and write operation data structure to be tested, so as to obtain the test time; according to the test time, the unit read and write operation number and the read and write bandwidth of the storage device to be tested are determined, and the unit read and write operation number and the read and write bandwidth are used as the test results.
[0168] Each module in the test device 600 of the storage device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0169] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as read-write test parameters, read-write operation data structures, and read-write request data structures. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a test method for a storage device is implemented.
[0170] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0171] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0172] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0173] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0174] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0175] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0176] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for testing a storage device, characterized in that: The method comprises: Determine a scheduler queue and a plurality of read-write operation data structures to be tested based on read-write test parameters for the storage device to be tested, and determine corresponding memory pages based on the read-write operation data structures to be tested; Convert each of the read-write operation data structures to be tested into a corresponding read-write request data structure, and sequentially place each of the read-write request data structures into the scheduler queue; Call the storage device to be tested, and perform read and write tests on each storage sector in the storage device to be tested according to each read and write request data structure in the scheduler queue through the memory pages corresponding to the read and write operation data structure to be tested, so as to obtain the test result of the storage device to be tested.
2. The method according to claim 1, characterized in that The method further comprises: Obtaining a test parameter range specified by a user for the storage device to be tested; According to the test parameter range and the particle swarm optimization algorithm, a plurality of particle parameters included in the initial particle population are obtained, and according to the particle parameters, read and write test parameters for the storage device to be tested are obtained.
3. The method according to claim 2, characterized in that The calling of the storage device to be tested, performing read and write tests on the memory pages corresponding to the read and write operation data structures to be tested in turn according to the read and write request data structures in each of the scheduler queues, and obtaining the test results of the storage device to be tested, further comprises: The initial particle population is iteratively updated according to the test result until a preset iteration end condition is met, thereby obtaining a target test result and a corresponding target read-write test parameter.
4. The method according to claim 1, characterized in that The read / write test parameters include at least the number of read / write queues and the depth of the read / write queues; The method of determining a scheduler queue and a plurality of read-write operation data structures to be tested based on the read-write test parameters for the storage device to be tested, and determining a corresponding memory page based on the read-write operation data structures to be tested, includes: According to the read / write test parameters, determining a plurality of kernel threads matching the number of the read / write queues, and determining a scheduler queue matching the depth of the read / write queues; Calling each of the kernel threads to generate a preset number of read and write operation data structures to be tested; According to the read / write test parameters and each of the read / write operation data structures to be tested, a memory page corresponding to each of the read / write operation data structures to be tested is determined.
5. The method according to any one of claims 1 to 4, characterized in that: The calling of the storage device to be tested, sequentially passing through the memory pages corresponding to the read and write operation data structures to be tested according to the read and write request data structures in the scheduler queue, performing read and write tests on each storage sector in the storage device to be tested, and obtaining a test result of the storage device to be tested, includes: In the case where the read / write type of the read / write test parameter is sequential read / write, the memory pages corresponding to the read / write operation data structure to be tested are sequentially passed through according to each of the read / write request data structures in the scheduler queue, and read / write tests are performed on each storage sector in the storage device to be tested in sector order to obtain a test result of the storage device to be tested; In the case where the read / write type of the read / write test parameters is random read / write, the read / write test is performed in a random order on each storage sector in the storage device to be tested according to the memory pages corresponding to the read / write operation data structure to be tested in turn according to each of the read / write request data structures in the scheduler queue, to obtain the test result of the storage device to be tested.
6. The method according to any one of claims 1 to 4, characterized in that: The calling of the storage device to be tested, sequentially passing through the memory pages corresponding to the read and write operation data structures to be tested according to the read and write request data structures in the scheduler queue, performing read and write tests on each storage sector in the storage device to be tested, and obtaining a test result of the storage device to be tested, includes: Calling the storage device to be tested, and performing read and write tests on each storage sector in the storage device to be tested through the memory pages corresponding to the read and write operation data structures to be tested in turn according to each of the read and write request data structures in the scheduler queue, to obtain a test time; The unit read / write operation number and the read / write bandwidth of the storage device to be tested are determined according to the test time, and the unit read / write operation number and the read / write bandwidth are used as test results.
7. A storage device testing device, characterized in that: The device comprises: A data determination module, used to determine a scheduler queue and a plurality of read-write operation data structures to be tested based on read-write test parameters for the storage device to be tested, and to determine a corresponding memory page based on the read-write operation data structures to be tested; A queue construction module, used to convert each of the read-write operation data structures to be tested into a corresponding read-write request data structure, and put each of the read-write request data structures into the scheduler queue in sequence; The device testing module is used to call the storage device to be tested, and perform read and write tests on each storage sector in the storage device to be tested according to each read and write request data structure in the scheduler queue through the memory pages corresponding to the read and write operation data structure to be tested, so as to obtain the test result of the storage device to be tested.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Hard disk performance test method, system and equipment and storage medium
CN118571302A
Estimating Power Consumption in a Computing Environment
US20100050008A1