CN117806884A - Construction method of read-write model, read-write test method and read-write delay test method - Google Patents

Construction method of read-write model, read-write test method and read-write delay test method Download PDF

Info

Publication number
CN117806884A
CN117806884A CN202311599121.8A CN202311599121A CN117806884A CN 117806884 A CN117806884 A CN 117806884A CN 202311599121 A CN202311599121 A CN 202311599121A CN 117806884 A CN117806884 A CN 117806884A
Authority
CN
China
Prior art keywords
read
write
command
raid card
delay
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311599121.8A
Other languages
Chinese (zh)
Inventor
周铁军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
XFusion Digital Technologies Co Ltd
Original Assignee
XFusion Digital Technologies 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 XFusion Digital Technologies Co Ltd filed Critical XFusion Digital Technologies Co Ltd
Priority to CN202311599121.8A priority Critical patent/CN117806884A/en
Publication of CN117806884A publication Critical patent/CN117806884A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application provides a method for constructing a read-write model, a read-write test method and a read-write time delay test method. The RAID card is electrically connected with the plurality of hard disks and is electrically connected with the processor. Recording receiving time information for a plurality of read-write commands received by the RAID card from the processor; processing a read-write command, and recording a command processing type and front-end IO delay; the method comprises the steps of sending a processed read-write command to at least one hard disk, recording sending time information, and recording response time information when receiving a response command sent by at least one hard disk; determining back-end IO delay according to the issuing time information and the response time information; determining RAID card processing time consumption according to the receiving time information and the issuing time information; and constructing a read-write model according to command processing types, front-end IO delay, back-end IO delay and RAID card processing time consumption corresponding to the read-write commands. According to the embodiment of the application, a read-write model which truly reflects the conditions of processing read-write commands by the RAID card and the hard disk can be constructed by utilizing the RAID card without installing tools.

Description

Construction method of read-write model, read-write test method and read-write delay test method
Technical Field
The present disclosure relates to the field of server technologies, and in particular, to a method for constructing a read-write model, a read-write test method, and a read-write delay test method.
Background
The service scenes of the current value clients are various, such as a storage distributed file system service scene, an object storage service scene, a cloud host service scene, a database service scene and the like. In order to facilitate subsequent analysis (such as analyzing fault reasons, etc.), the related art may count the processing information in the process of processing the read-write command in the service scenario, and construct a read-write model for analysis and processing.
In the process of constructing a read-write model, it is generally necessary to rely on tools (e.g., iostat, blktrace, etc.) installed on an operating system to statistically process processing information during read-write commands and construct the read-write model. However, in the related art, before the processing information in the process of statistically processing the read/write command, a tool is required to be installed, and there is a technical problem of high operation complexity. In addition, the tool depending on the operating system regards an independent redundant array of inexpensive disks (Redundant Array of Independent Disks, abbreviated as RAID) card and at least one hard disk as a component, and counts the processing information in the process of processing the read-write command by the component, and has coarse statistical granularity, so that the built IO model is not matched with the real situation.
That is, the method for constructing the read-write model in the related art has the problems of high operation complexity and mismatching between the constructed read-write model and the real situation.
Disclosure of Invention
The embodiment of the application provides a method for constructing a read-write model, a read-write test method and a read-write delay test method.
In a first aspect, an embodiment of the present application provides a method for constructing a read-write model, where the method is applied to a RAID card, and the RAID card is electrically connected to a plurality of hard disks and is electrically connected to a processor; the method comprises the following steps:
recording receiving time information for a plurality of read-write commands received by the RAID card from the processor;
processing the read-write command, and recording the command processing type and the front-end IO delay;
the method comprises the steps of sending a processed read-write command to at least one hard disk, recording the sending time information, and recording the response time information when receiving a response command sent by at least one hard disk;
determining back-end IO delay according to the issuing time information and the response time information;
determining RAID card processing time consumption according to the receiving time information and the issuing time information;
And constructing a read-write model according to command processing types, front-end IO delay, back-end IO delay and RAID card processing time consumption corresponding to the read-write commands.
The beneficial effects of this embodiment are: based on the fact that the read-write command needs to be issued to at least one hard disk through the RAID card, the RAID card has the capability of counting processing information in the process of processing the read-write command by the RAID card and the hard disk and constructing a read-write model. For a plurality of read-write commands sent by the processor, the RAID card can record receiving time information, front-end IO delay and command processing type for processing the read-write commands by the RAID card, back-end IO delay for interacting with the hard disk, and RAID card processing time consumption. The RAID card can construct a read-write model based on the information. On one hand, in the embodiment of the application, a read-write model can be built by using the RAID card in the server without additionally consuming time installation tools, so that the operation complexity is reduced; on the other hand, compared with the related art, regarding the RAID card and at least one hard disk as a component, and counting related data interacted by the component and the processor, the method and the device can not count back-end IO time delay, time consumption of RAID card processing, and front-end IO time delay and command processing type of the RAID card processing the command.
In one implementation, the method further comprises:
recording command information corresponding to the read-write command; the command information comprises a data block size, a logic block address and a command type;
according to the command processing type, front end IO delay, back end IO delay and RAID card processing time consumption corresponding to the read-write commands, a read-write model is built, comprising:
and constructing a read-write model according to the data block size, the logical block address, the command type, the command processing type, the front-end IO delay, the back-end IO delay and the RAID card processing time consumption corresponding to the read-write commands.
The beneficial effect of this implementation mode is: in this embodiment of the present application, the RAID card may also count the data block size, the logical block address, and the command type, and incorporate the above information into the process of constructing the read-write model. On one hand, in the embodiment of the application, a read-write model can be built by using the RAID card in the server without additionally consuming time installation tools, so that the operation complexity is reduced; on the other hand, the method and the device can count the size of the data block, the address of the logic block, the command type, the command processing type, the front-end IO delay, the back-end IO delay and the RAID card processing time consumption, so that the constructed read-write model can truly and comprehensively reflect the read-write condition.
In one implementation, according to a data block size, a logical block address, a command type, a command processing type, a front end IO delay, a back end IO delay, and RAID card processing time consumption corresponding to a plurality of read-write commands, constructing a read-write model includes:
determining the distribution information of the data block sizes in the read-write model according to the data block sizes corresponding to the read-write commands;
determining a random sequence proportion in a read-write model according to the logical block addresses corresponding to the read-write commands;
determining the read-write proportion in a read-write model according to command types corresponding to the plurality of read-write commands;
determining a merging and splitting ratio in a read-write model according to command processing types corresponding to the plurality of read-write commands;
according to the front-end IO delay corresponding to the plurality of read-write commands, front-end IO delay information in the read-write model is determined;
determining back-end IO delay information in a read-write model according to the back-end IO delay corresponding to the plurality of read-write commands;
and determining the time-consuming information of RAID card processing in the read-write model according to the time-consuming of RAID card processing corresponding to the read-write commands.
The beneficial effect of this implementation mode is: the RAID card can determine the distribution information of the data block sizes in the read-write model according to the data block sizes corresponding to the read-write commands, and determine the random sequence proportion in the read-write model according to the logical block addresses corresponding to the read-write commands; determining the read-write proportion in a read-write model according to command types corresponding to the plurality of read-write commands; determining a merging and splitting ratio in a read-write model according to command processing types corresponding to the plurality of read-write commands; according to the front-end IO delay corresponding to the plurality of read-write commands, front-end IO delay information in the read-write model is determined; determining back-end IO delay information in a read-write model according to the back-end IO delay corresponding to the plurality of read-write commands; and determining the time-consuming information of RAID card processing in the read-write model according to the time-consuming of RAID card processing corresponding to the read-write commands.
In a second aspect, an embodiment of the present application provides a read-write test method, applied to a processor, where the processor is electrically connected to a RAID card, and the RAID card is electrically connected to a plurality of hard disks, where the method includes:
acquiring a target read-write model;
determining the read-write characteristics of the hard disk command according to the target read-write model;
based on the read-write characteristics of the hard disk commands, generating a plurality of read-write commands, and sending the plurality of read-write commands to at least one hard disk;
and acquiring a test result in the process of processing the read-write command by at least one hard disk.
The beneficial effects of this embodiment are: the processor can determine the read-write characteristics of the hard disk command according to the target read-write model, and generate and send a plurality of read-write commands based on the read-write characteristics of the hard disk command so as to perform read-write test. By the mode, the processor can accurately control the read-write test process, and reliability of test results is guaranteed.
In one implementation, determining the hard disk command read-write characteristics according to the target read-write model includes:
and determining the distribution information, the random sequence proportion and the read-write proportion of the data block size according to the target read-write model.
The beneficial effect of this implementation mode is: the processor can determine the distribution information, the random sequence proportion and the read-write proportion of the size of the data block according to the target read-write model so as to set the read-write command in the test process. By the mode, the controllability and standardability of the test can be realized, and the reliability of the test result is further ensured.
In one implementation, obtaining a target read-write model includes:
and searching the corresponding relation between the service scene and the read-write model according to the target service scene, and obtaining the target read-write model.
The beneficial effect of this implementation mode is: the processor can search the corresponding relation between the service scene and the read-write model according to the target service scene to be tested so as to obtain the target read-write model. By the method, the target read-write model corresponding to the target service scene of the client can be obtained only by knowing the target service scene of the client, so that the read-write characteristics of the hard disk command can be determined based on the target read-write model for testing. The reliability of the test is realized, and the reliability of products (servers or hardware (such as hard disks or RAID cards) in the servers) provided by the clients is further improved.
In one implementation, the method further comprises:
reading a read-write model stored in the RAID card; the read-write model is constructed in the process that the RAID card processes a plurality of read-write commands;
acquiring service scenes corresponding to a plurality of read-write commands;
and establishing a corresponding relation between the service scene and the read-write model according to the service scene and the read-write model.
The beneficial effect of this implementation mode is: the processor can establish the corresponding relation between the service scene and the read-write model after acquiring the service scene and establishing the read-write model of the RAID card in the process of processing a plurality of read-write commands by the hard disk under the service scene. On the one hand, the method can be convenient for the follow-up to determine the corresponding read-write model directly based on the service scene. On the other hand, clients and testers can conveniently learn the read-write model under each service scene.
In a third aspect, an embodiment of the present application provides a read-write latency test method, which is applied to a RAID card, where the RAID card is electrically connected to a plurality of hard disks and is electrically connected to a processor; the method comprises the following steps:
recording receiving time information for a plurality of read-write commands received by the RAID card from the processor;
processing the read-write command, and recording the command processing type and the front-end IO delay;
the method comprises the steps of sending a processed read-write command to at least one hard disk, recording the sending time information, and recording the response time information when receiving a response command sent by at least one hard disk;
determining back-end IO delay according to the issuing time information and the response time information;
and determining the time consumption of RAID card processing according to the receiving time information and the issuing time information.
The beneficial effects of this embodiment are: based on the read-write command, the read-write command needs to be issued to at least one hard disk through the RAID card, so the RAID card has the capability of counting the read-write delay. For a plurality of read-write commands sent by the processor, the RAID card can record receiving time information, front-end IO delay and command processing type for processing the read-write commands by the RAID card, back-end IO delay for interacting with the hard disk, and RAID card processing time consumption. Compared with the prior art, the RAID card and at least one hard disk are regarded as one component, and the granularity of the RAID card and the hard disk can not be used for counting the read-write time delay.
In a fourth aspect, embodiments of the present application provide a RAID card, where the RAID card is electrically connected to a plurality of hard disks and is electrically connected to a processor; the RAID card is used for:
recording receiving time information for a plurality of read-write commands received by the RAID card from the processor;
processing the read-write command, and recording the command processing type and the front-end IO delay;
The method comprises the steps of sending a processed read-write command to at least one hard disk, recording the sending time information, and recording the response time information when receiving a response command sent by at least one hard disk;
determining back-end IO delay according to the issuing time information and the response time information;
determining RAID card processing time consumption according to the receiving time information and the issuing time information;
and constructing a read-write model according to command processing types, front-end IO delay, back-end IO delay and RAID card processing time consumption corresponding to the read-write commands.
The RAID card provided in this embodiment may execute the technical solution shown in the foregoing method embodiment, and the beneficial effects are similar, and are not described herein again.
In one implementation, the RAID card is further configured to:
recording command information corresponding to the read-write command; the command information comprises a data block size, a logic block address and a command type;
the RAID card is specifically used for:
and constructing a read-write model according to the data block size, the logical block address, the command type, the command processing type, the front-end IO delay, the back-end IO delay and the RAID card processing time consumption corresponding to the read-write commands.
The RAID card provided in this implementation manner may execute the technical solution shown in the foregoing method embodiment, and the beneficial effects are similar and are not repeated herein.
In one implementation, a RAID card is used in particular:
determining the distribution information of the data block sizes in the read-write model according to the data block sizes corresponding to the read-write commands;
determining a random sequence proportion in a read-write model according to the logical block addresses corresponding to the read-write commands;
determining the read-write proportion in a read-write model according to command types corresponding to the plurality of read-write commands;
determining a merging and splitting ratio in a read-write model according to command processing types corresponding to the plurality of read-write commands;
according to the front-end IO delay corresponding to the plurality of read-write commands, front-end IO delay information in the read-write model is determined;
determining back-end IO delay information in a read-write model according to the back-end IO delay corresponding to the plurality of read-write commands;
and determining the time-consuming information of RAID card processing in the read-write model according to the time-consuming of RAID card processing corresponding to the read-write commands.
The RAID card provided in this implementation manner may execute the technical solution shown in the foregoing method embodiment, and the beneficial effects are similar and are not repeated herein.
In a fifth aspect, embodiments of the present application provide a processor, where the processor is electrically connected to a RAID card, the RAID card is electrically connected to a plurality of hard disks, and the processor is configured to:
Acquiring a target read-write model;
determining the read-write characteristics of the hard disk command according to the target read-write model;
based on the read-write characteristics of the hard disk commands, generating a plurality of read-write commands, and sending the plurality of read-write commands to at least one hard disk;
and acquiring a test result in the process of processing the read-write command by at least one hard disk.
The processor provided in this embodiment may execute the technical solution shown in the foregoing method embodiment, and the beneficial effects are similar, and are not described herein again.
In one implementation, a processor is specifically configured to:
and determining the distribution information, the random sequence proportion and the read-write proportion of the data block size according to the target read-write model.
The processor provided in this implementation manner may execute the technical solution shown in the foregoing method embodiment, and the beneficial effects are similar, and are not described herein again.
In one implementation, a processor is specifically configured to:
and searching the corresponding relation between the service scene and the read-write model according to the target service scene, and obtaining the target read-write model.
The processor provided in this implementation manner may execute the technical solution shown in the foregoing method embodiment, and the beneficial effects are similar, and are not described herein again.
In one implementation, the processor is further configured to:
Reading a read-write model stored in the RAID card; the read-write model is constructed in the process that the RAID card processes a plurality of read-write commands;
acquiring service scenes corresponding to a plurality of read-write commands;
and establishing a corresponding relation between the service scene and the read-write model according to the service scene and the read-write model.
The processor provided in this implementation manner may execute the technical solution shown in the foregoing method embodiment, and the beneficial effects are similar, and are not described herein again.
In a sixth aspect, embodiments of the present application provide a RAID card, where the RAID card is electrically connected to a plurality of hard disks and is electrically connected to a processor; the RAID card is used for:
recording receiving time information for a plurality of read-write commands received by the RAID card from the processor;
processing the read-write command, and recording the command processing type and the front-end IO delay;
the method comprises the steps of sending a processed read-write command to at least one hard disk, recording the sending time information, and recording the response time information when receiving a response command sent by at least one hard disk;
determining back-end IO delay according to the issuing time information and the response time information;
and determining the time consumption of RAID card processing according to the receiving time information and the issuing time information.
In a seventh aspect, embodiments of the present application provide a server, including:
The system comprises a RAID card, a processor electrically connected with the RAID card and a plurality of hard disks electrically connected with the RAID card;
the RAID card is used for executing the method of the first aspect or the third aspect;
the processor is configured to perform the method of the second aspect.
The server provided in this embodiment may execute the technical solution shown in the foregoing method embodiment, and the beneficial effects are similar, and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments or the prior art descriptions, it being obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
Fig. 1 is a schematic structural diagram of a server according to an embodiment of the present application;
fig. 2 is a schematic flow chart of an embodiment of a method for constructing a read-write model according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of another server according to an embodiment of the present application;
fig. 4 is a schematic flow chart of an embodiment of a read-write test method provided in the embodiment of the present application;
Fig. 5 is a schematic flow chart of an embodiment of a read-write delay test method provided in the embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which a person of ordinary skill in the art would have, based on the embodiments in this application, come within the scope of protection of this application.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims of this application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Noun interpretation:
firmware (FW): refers to a code or program running on a chip of an electronic device (such as a peripheral device of a server) for controlling the normal operation of the electronic device and implementing the functions of the electronic device. For example, firmware of a redundant array of independent disks (Redundant Array of Independent Disks, abbreviated as RAID) card is used to implement functions of data reading, data storage, data redundancy backup, and the like of the RAID card. The firmware of the hard disk is used for realizing data reading and data storage of the hard disk.
Redundant array of independent disks (Redundant Array of Independent Disks, simply RAID): the disk array is also called a disk array, and is formed by combining a plurality of independent hard disks into a hard disk group with huge capacity, and the performance of the whole hard disk group is improved by utilizing the addition effect generated by providing data by a plurality of hard disks.
Small computer system interface (Small Computer System Interface, abbreviated as SCSI): is an application layer protocol, and is an independent processor standard for system level interfaces between a computer and its peripheral devices (hard disk, floppy drive, optical drive, printer, scanner, etc.). The command based on the SCSI protocol is a SCSI command. The SCSI command generally includes a command description block (Command Descriptor Blocks, CDB for short) (a command type—a read command type or a write command type is recorded), a data block size, a logical block address (Logical Block Address, LBA for short), and the like.
Redundant array of independent disks (Redundant Array ofIndependent Disks, RAID) mode of operation: in the RAID operation mode, when data to be written is stored, the RAID card needs to determine whether to split the data to be written or combine the data based on the stripe size.
FIO tool: the testing tool is an open-source disk IO performance testing tool, aims to provide an all-around testing scheme, and can simulate common I/O scenes, and comprises parameters such as random/sequential read-write, read-write proportion, block size, I/O depth and the like. The test result is detailed and accurate, and can be used for evaluating the performance of a system disk, positioning bottlenecks, optimizing parameters and the like.
The service scenes of the current value clients are various, such as a storage distributed file system service scene, an object storage service scene, a cloud host service scene, a database service scene and the like. In order to facilitate subsequent analysis (such as analyzing failure cause, etc.), in the related art, processing information (Input/Output (IO) related information) in the process of processing the read-write command in the service scene may be counted, and a read-write model is constructed for analysis and processing. In the process of constructing a read-write model, it is generally necessary to rely on tools (e.g., iostat, blktrace, etc.) installed on an operating system to statistically process processing information during read-write commands and construct the read-write model. However, in the related art, before the processing information in the process of statistically processing the read/write command, a tool is required to be installed, and there is a technical problem of high operation complexity. In addition, the tools depending on the operating system are that a RAID card and at least one hard disk are regarded as one component, and the processing information in the process of processing read-write commands is counted, so that the counted granularity is coarse, and the built IO model is not matched with the real situation. That is, the method for constructing the read-write model in the related art has the problems of high operation complexity and mismatching between the constructed read-write model and the real situation.
Based on the technical problems, the embodiment of the application provides a method for constructing a read-write model, which can directly utilize RAID cards in a server without installing tools, count processing information in the process of processing read-write commands, namely command processing types, front-end IO time delay, back-end IO time delay and RAID card processing time consumption, and construct the read-write model. The operation complexity is reduced, and the constructed read-write model can truly reflect the processing information in the process of processing read-write commands by the RAID card and the hard disk.
The method for constructing the read-write model according to the embodiment of the present application is described in detail below.
The structure of the server is described below.
Fig. 1 is a schematic structural diagram of a server according to an embodiment of the present application. As shown in fig. 1, the server 10 may include a processor 101, a raid card 102, and a plurality of hard disks. Illustratively, fig. 1 shows five hard disks, namely a first hard disk 103, a second hard disk 104, a third hard disk 105, a fourth hard disk 106, and a fifth hard disk 107.
In addition, the server may also include a hard disk backplane (not shown in FIG. 1). The hard disk backboard is used for bearing the first hard disk 103, the second hard disk 104, the third hard disk 105, the fourth hard disk 106 and the fifth hard disk 107, so as to complete communication interaction between the first hard disk 103, the second hard disk 104, the third hard disk 105, the fourth hard disk 106 and the fifth hard disk 107 and the RAID card 102.
The processor 101 may be a central processing unit (Central Processing Unit, abbreviated as CPU), a baseboard management controller (Baseboard Management Controller, abbreviated as BMC), or other devices with processing capability.
Wherein, the central processing unit (Central Processing Unit, CPU for short): the operation and control core of the server 10 is the final execution unit for information processing and program running. The CPU is one very large scale integrated circuit comprising arithmetic unit, controller, register, etc. and has the main task of processing and handling various data.
Baseboard management controller (Baseboard Management Controller, BMC for short): as a separate processor embedded in the server 10, may be used to monitor server hardware and software information, health status, and operational status. It should be noted that the servers 10 of different companies have different names for BMCs, for example, some companies are called BMCs, some companies are called Integrated Lights-Out (iLO), and other companies are called Integrated Dell Remote Access Controller (iDRAC). Either called BMC or iLO or iracc may be understood to be BMC in embodiments of the present application.
RAID card 102: means for grouping a plurality of individual hard disks into a large-capacity hard disk group.
Taking the first Hard Disk 103 as an example, the first Hard Disk 103 may be a Solid State Disk (SSD) or a mechanical Hard Disk (HDD). The mechanical hard disk stores data through the magnetic disc, and the solid state disk stores data through the flash particles. The description of the first hard disk 103 is also applicable to the second hard disk 104, the third hard disk 105, the fourth hard disk 106, and the fifth hard disk 107.
Note that, the processor 101 and the RAID card 102 may be communicatively connected through an interface of a high-speed serial computer expansion bus standard (Peripheral Component Interconnect Express, abbreviated as PCIE), or may be communicatively connected through another interface, which is not limited in the embodiment of the present application.
The RAID card 102 may be in communication connection with a plurality of hard disks through a serial connection small computer system interface (Serial Attached Small Computer System Interface, abbreviated as SAS), may be in communication connection through a Non-volatile memory host controller interface specification (Non-Volatile Memory Express, abbreviated as NVME) interface, may be in communication connection through a serial advanced technology (Serial Advanced Technology Attachment, abbreviated as SATA) interface, and may be in communication connection through other interfaces.
It should be noted that, fig. 1 is only a block diagram of a server provided in the embodiment of the present application, and the embodiment of the present application does not limit the actual forms of various devices included in fig. 1, nor limit the interaction manner between the devices in fig. 1, and in application of the solution, the configuration may be set according to actual requirements.
The following describes the technical scheme of the present application in detail through specific embodiments. It should be noted that the following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
Fig. 2 is a schematic flow chart of an embodiment of a method for constructing a read-write model according to an embodiment of the present application. Referring to fig. 2, the method specifically includes the steps of:
s201: the reception time information is recorded for a plurality of read-write commands received by the RAID card from the processor.
In this embodiment, for a plurality of read/write commands received by the RAID card from the processor, the RAID card may record reception time information of each read/write command received by the RAID card. The read-write command may be a SCSI command.
In one implementation, the RAID card may obtain, in advance, a monitoring command sent by the processor, where the monitoring command is used to instruct the RAID card to monitor processing information in a process of processing a read-write command, and construct a read-write model. The processing information comprises a command processing type, front-end IO delay, back-end IO delay and RAID card processing time consumption. The monitoring command includes a statistical duration range. For example, the statistical duration may range from 5 minutes to 10 minutes. In one implementation, start time information may also be included in the monitoring command. For example, the start time information may be 12:00.
In addition, based on the read-write command including command information including a command description block (Command Descriptor Block, CDB for short), a data block size, and a logical block address (Logical Block Address, LBA for short). The command type (read command type or write command type) of the read-write command is described in the command description block. The RAID card may record command information corresponding to a read-write command when the read-write command is received from the processor.
S202: and processing the read-write command, and recording the command processing type and the front-end IO delay.
In this embodiment, in the case where the plurality of hard disks are in the RAID operation mode, data stored in the plurality of hard disks is distributed in the form of stripes, each stripe includes a plurality of stripes, and the plurality of stripes of each stripe are distributed on different hard disks.
The RAID card may perform merging/splitting processing on the read/write command based on the stripe size (also referred to as stripe depth, which refers to the size of each data block stored onto each hard disk) and the data block size in the read/write command when acquiring the read/write command, so as to merge/split the read/write command into a command conforming to the stripe size.
The RAID card may record the command processing type, as well as the front-end IO latency.
The command processing type is a merging processing type or a splitting processing type. The command processing type reflects the load condition of the RAID card for reading and writing commands to the hard disk.
The front-end IO time delay is the time length required by the RAID card to carry out merging processing or splitting processing on the read-write command based on the stripe size.
S203: and sending the processed read-write command to at least one hard disk, recording the sending time information, and recording the response time information when receiving the response command sent by at least one hard disk.
In this embodiment, the RAID card may send the processed read-write command to at least one hard disk.
The server includes five hard disks (a first hard disk, a second hard disk, a third hard disk, a fourth hard disk and a fifth hard disk), the stripe size is 512KB, and the data block size of the read/write command is 1536 KB.
The RAID card may split the read/write command to obtain a processed read/write command, i.e., a first read/write command (data block size is 512 KB), a second read/write command (data block size is 512 KB), and a third read/write command (data block size is 512 KB). The RAID card may send a first read/write command to the first hard disk, a second read/write command to the second hard disk, and a third read/write command to the third hard disk.
It should be noted that, the RAID card may assemble the processed read-write command into a corresponding protocol command according to the hard disk type, and send the corresponding protocol command to the corresponding hard disk.
For example, in the case that the hard disk type of the first hard disk is SAS type, the RAID card may assemble the first read-write command into a corresponding SAS command and send the corresponding SAS command to the first hard disk. And under the condition that the hard disk type of the second hard disk is NVME type, the RAID card can assemble the second read-write command into a corresponding NVME command and send the NVME command to the second hard disk. And under the condition that the hard disk type of the third hard disk is SATA type, the RAID card can assemble the third read-write command into a corresponding SATA command and send the corresponding SATA command to the third hard disk.
In addition, the RAID card may record the sending time information when sending the processed read-write command to at least one hard disk.
After the hard disk executes the corresponding operation according to the processed read-write command, the hard disk can send a response command to the RAID card.
And when the RAID card receives a response command sent by at least one hard disk, determining that the command processing is completed, and recording response time information.
S204: and determining the back-end IO delay according to the issuing time information and the response time information.
In this embodiment, the RAID card may determine the back-end IO delay according to the issue time information and the response time information. It should be noted that, the back-end IO delay is the difference between the response time information and the issue time information.
S205: and determining the time consumption of RAID card processing according to the receiving time information and the issuing time information.
In this embodiment, the RAID card may determine that the processing of the RAID card is time-consuming according to the receiving time information and the issuing time information. It should be noted that, the RAID card processing consumes time which is the difference between the issue time information and the receive time information.
S206: and constructing a read-write model according to command processing types, front-end IO delay, back-end IO delay and RAID card processing time consumption corresponding to the read-write commands.
In this embodiment, the RAID card may construct a read-write model according to a command processing type, front-end IO latency, back-end IO latency, and RAID card processing time consumption corresponding to a plurality of read-write commands.
In one implementation, when the RAID card receives a read-write command sent by a processor, under the condition that a read-write command logical block address, a data block size and a command type corresponding to the read-write command are recorded, the RAID card may construct a read-write model according to the data block sizes, the logical block addresses, the command types, the command processing types, the front end IO delay, the back end IO delay and the RAID card processing time consumption corresponding to the plurality of read-write commands.
Specifically, for the logical block address, when the RAID card identifies that the logical block address is a continuous address range, determining that the read-write type is a sequential read-write type; and when the RAID card identifies that the logical block addresses are not continuous address ranges, determining that the read-write type is a random read-write type. The RAID card can determine the random sequence proportion according to the read-write type of a plurality of read-write commands.
For the size of the data block, the RAID card can determine the distribution information of the size of the data block according to the sizes of the data blocks of a plurality of read-write commands.
For the command type, the RAID card may determine the read-write ratio according to the command types of the plurality of read-write commands.
For the command processing type, the RAID card may determine the merging-splitting ratio according to the command processing type of the plurality of read-write commands.
For the front-end IO delay, the RAID card can determine front-end IO delay information (any one or more of front-end IO average delay, front-end IO maximum delay and front-end IO minimum delay) according to the front-end IO delays of the plurality of read-write commands.
For the back-end IO delay, the RAID card can determine back-end IO delay information (any one or more of back-end IO average delay, back-end IO maximum delay and back-end IO minimum delay) according to the back-end IO delay of a plurality of read-write commands.
For RAID card processing time consumption, the RAID card may determine RAID card processing time consumption information (any one or more of RAID card average processing time consumption, RAID card maximum processing time consumption, and RAID card minimum processing time consumption) according to the RAID card processing time consumption of the plurality of read-write commands.
The beneficial effects of this embodiment are: based on the fact that the read-write command needs to be issued to at least one hard disk through the RAID card, the RAID card has the capability of statistically processing the processing information of the read-write command from the RAID card granularity and the hard disk granularity and constructing a read-write model. For a plurality of read-write commands sent by the processor, the RAID card can record receiving time information, front-end IO delay and command processing type for processing the read-write commands by the RAID card, back-end IO delay for interacting with the hard disk, and RAID card processing time consumption. The RAID card can construct a read-write model based on information recorded in the process of processing a plurality of read-write commands. On one hand, in the embodiment of the application, a read-write model can be built by using the RAID card in the server without additionally consuming time installation tools, so that the operation complexity is reduced; on the other hand, compared with the related art, regarding the RAID card and at least one hard disk as a component, and counting related data interacted by the component and the processor, the method and the device can not count back-end IO time delay, time consumption of RAID card processing, and front-end IO time delay and command processing type of the RAID card processing the command.
Fig. 3 is a schematic structural diagram of another server according to an embodiment of the present application. As shown in fig. 3, the server 10 may include a processor 101, a raid card 102, and a plurality of hard disks. Illustratively, fig. 1 shows five hard disks, namely a first hard disk 103, a second hard disk 104, a third hard disk 105, a fourth hard disk 106, and a fifth hard disk 107.
The RAID card 102 includes a front-end processing module 1021, a configuration management module 1022, a RAID algorithm module 1023, and a back-end processing module 1024.
It should be noted that, the front-end processing module 1021, the configuration management module 1022, the RAID algorithm module 1023, and the back-end processing module 1024 are functional modules divided by firmware used when the RAID card 102 constructs a read-write model, each functional module completes a sub-function, and all functional modules together complete a process of constructing the read-write model.
The process of constructing the read/write model is described below with reference to fig. 3 from the perspective of the front-end processing module 1021, the configuration management module 1022, the RAID algorithm module 1023, and the back-end processing module 1024.
When receiving a read/write command sent by the processor 101, the front-end processing module 1021 records command information corresponding to the read/write command, and records reception time information. Wherein the command information includes a data block size, a logical block address, and a command type.
The front end processing module 1021 may send read and write commands to the configuration management module 1022 and command information to the RAID algorithm module 1023.
The configuration management module 1022 may send the read/write command to the RAID algorithm module 1023 after obtaining the read/write command. It should be noted that, the configuration management module 1022 is configured to process creation and deletion of a RAID group, and is also configured to reconstruct data to be reconstructed in the RAID group. In addition, the configuration management module 1022 is also used to manage the hard disk.
In one implementation, the configuration management module 1022 may send read and write commands directly to the RAID algorithm module 1023 after the read and write commands are obtained.
In one implementation, the configuration management module 1022 may determine whether the plurality of hard disks are in a RAID operation mode after obtaining the read/write command. When the configuration management module 1022 determines that the plurality of hard disks are in the RAID operation mode, it sends a read-write command to the RAID algorithm module 1023, so that the RAID algorithm module 1023 performs merging/splitting processing on the read-write command. When the configuration management module 1022 determines that the plurality of hard disks are not in the RAID operation mode, the back-end processing module 1024 directly sends a read-write command to the back-end processing module 1024 so that the back-end processing module 1024 sends the read-write command to at least one hard disk.
The RAID algorithm module 1023 may record the acquisition time information when receiving the read/write command sent by the configuration management module 1022. The obtained time information is used for calculating the front-end IO delay.
The RAID algorithm module 1023 may process the read/write command based on the stripe size after the read/write command is acquired to merge/split the read/write command into a command conforming to the stripe size. In addition, the RAID card algorithm module may also record the command processing type.
After processing the read/write command, the RAID algorithm module 1023 may send the processed read/write command to the back-end processing module 1024 and record the sending time information. The sending time information is used for calculating the front-end IO delay.
The back-end processing module 1024 may send the processed read/write command to at least one hard disk after receiving the processed read/write command sent by the RAID algorithm module 1023. The back-end processing module 1024 may record the issue time information. The issuing time information is used for calculating RAID card processing time consumption and back-end IO delay.
The back-end processing module 1024 may record response time information when it receives a response command sent by at least one hard disk. The response time information is used to calculate the back-end IO delay. The response command is sent to the back-end processing module 1024 after the hard disk finishes processing the processed read-write command.
The RAID algorithm module 1023 may calculate the back-end IO delay after obtaining the response time information and the issue time information sent by the back-end processing module 1024. The RAID algorithm module 1023 may calculate the processing time of the RAID card according to the receiving time information and the issuing time information after obtaining the receiving time information sent by the front end processing module 1021 and the issuing time information sent by the back end processing module 1024. The RAID algorithm module 1023 may determine the front end IO delay after recording the acquisition time information and the transmission time information according to the acquisition time information and the transmission time information. It should be noted that the front-end IO latency reflects the processing time consumption of the RAID algorithm module 1023.
The RAID algorithm module 1023 may determine distribution information, random sequence proportion, read-write proportion, merging and splitting proportion, front end IO delay information, back end IO delay information, and RAID card processing time consumption information of the data block size according to the data block size, logical block address, command type, command processing type, front end IO delay, back end IO delay, and RAID card processing time consumption corresponding to the plurality of read-write commands.
The read-write model is a set of distribution information, random sequence proportion, read-write proportion, merging and splitting proportion, front-end IO delay information, back-end IO delay information and RAID card processing time-consuming information of the data block size.
In addition, the RAID algorithm module 1023 may perform storage processing on the read-write model after the read-write model is constructed. In one implementation, the RAID algorithm module 1023 may store the read-write model in the form of a data frame in text form into the flash memory of the RAID card.
The beneficial effects of this embodiment are: when a plurality of read-write commands sent by the processor flow through the RAID card, the functional modules (a front-end processing module, a configuration management module, a RAID algorithm module and a back-end processing module) of the RAID card can record command information (data block size, logical block address and command type), receiving time information, front-end IO delay and command processing type for processing the read-write commands by the RAID card, back-end IO delay for interacting with the hard disk and RAID card processing time consumption. The RAID card can construct a read-write model based on information recorded by the RAID card when a plurality of read-write commands flow through the RAID card. On one hand, in the embodiment of the application, a read-write model can be built by using the RAID card in the server without additionally consuming time installation tools, so that the operation complexity is reduced; on the other hand, compared with the related art, regarding the RAID card and at least one hard disk as a component, and counting related data interacted by the component and the processor, the method and the device can not count back-end IO time delay, time consumption of RAID card processing, and front-end IO time delay and command processing type of the RAID card processing the command.
Fig. 4 is a schematic flow chart of an embodiment of a read-write test method according to an embodiment of the present application. Referring to fig. 4, the method specifically includes the steps of:
s401: and obtaining a target read-write model.
In this embodiment, when the processor needs to test the processing situation of the read-write command, the processor may acquire the target read-write model.
In one implementation, the processor obtains the target read-write model when it is required to test the read-write command processing to determine if there is a compatibility problem between the RAID card and the hard disk.
In one implementation, the processor obtains the target read-write model when it is required to test the read-write command processing situation to determine whether a kick-out situation occurs in the RAID card. It should be noted that the occurrence of a kick-out condition of the RAID card means that the RAID card kicks out the hard disk from the hard disk set when recognizing that a hard disk having a failure exists in the hard disk set.
In the process of acquiring the target read-write model, the processor can search the corresponding relation between the service scene and the read-write model according to the target service scene to acquire the target read-write model.
It should be noted that, in the process of constructing the service scene and the read-write model by the processor, in one service scene, the processor may send a plurality of read-write commands to the hard disk through the RAID card, and the RAID card may construct the read-write model in the process of processing the plurality of read-write commands by the hard disk. The processor can read the read-write model stored in the RAID card and acquire service scenes corresponding to a plurality of read-write commands. The processor can construct the corresponding relation between the service scene and the read-write model according to the service scene and the read-write model.
It should be noted that, the target service scenario may be a storage distributed file system service scenario, an object storage service scenario, a cloud host service scenario, a database service scenario, or other service scenarios, which is not limited in this embodiment of the present application.
In addition, the database service scenario is divided into an online transaction processing (Online Transaction Processing, OLTP for short), an online analysis processing (Online Analytical Processing, OLAP for short), a virtual desktop infrastructure (Virtual Desktop Infrastructure, VDI for short), and a storage performance committee (Storage Performance Council, SPC) -1 service scenario.
S402: and determining the read-write characteristics of the hard disk command according to the target read-write model.
In this embodiment, the processor may determine the hard disk command read-write characteristics according to the target read-write model after acquiring the target read-write model.
The hard disk command read-write characteristics comprise distribution information of the size of the data block, random sequence proportion and read-write proportion.
In one implementation, the hard disk command read-write feature may further include any one or more of merging split ratio, front-end IO latency information, back-end IO latency information, and RAID card processing time-consuming information.
S403: based on the hard disk command read-write characteristics, a plurality of read-write commands are generated and sent to at least one hard disk.
In this embodiment, the processor may generate a plurality of read-write commands based on the hard disk command read-write characteristics, and send the plurality of read-write commands to at least one hard disk.
From a software perspective, the FIO tool running on the processor may generate a plurality of read-write commands based on the hard disk command read-write characteristics and send the plurality of read-write commands to at least one hard disk.
S404: and acquiring a test result in the process of processing the read-write command by at least one hard disk.
In this embodiment, the processor may obtain the test result during the process of processing the read/write command by at least one hard disk.
In one implementation, the processor may determine whether there is a compatibility problem between the RAID card and the hard disk during processing of the read/write commands by the at least one hard disk.
In one implementation, the processor may determine whether a kick-out condition occurs in the RAID card during processing of the read-write command by the at least one hard disk.
The beneficial effects of this embodiment are: the processor can acquire the target read-write model and determine the read-write characteristics of the hard disk command according to the target read-write model. The processor may generate a plurality of read-write commands based on the hard disk command read-write characteristics and send the plurality of read-write commands to the at least one hard disk. The processor may obtain the test result during the processing of the read/write command by the at least one hard disk. By the mode, the processor can accurately control the read-write test process, and reliability of test results is guaranteed.
Fig. 5 is a schematic flow chart of an embodiment of a read-write delay test method provided in the embodiment of the present application. Referring to fig. 5, the method specifically includes the steps of:
s501: the reception time information is recorded for a plurality of read-write commands received by the RAID card from the processor.
In this embodiment, in the existing network (all networks carrying commercial users and the networks connected thereto), the software has a requirement on the read-write delay. For example, the software requires 10 seconds for read and write latency. The read-write latency refers to the response time of the component (regarding the RAID card and the hard disk as one component) to the read-write command sent by the processor.
Under the condition that the read-write time delay exceeds the preset read-write time delay, the fault cause needs to be analyzed by testing the read-write time delay.
In the process of testing the read-write delay, the RAID card can record the receiving time information for a plurality of read-write commands received by the RAID card from the processor.
S502: and processing the read-write command, and recording the command processing type and the front-end IO delay.
In this embodiment, the RAID card may perform merging processing or splitting processing on the read/write command based on the stripe size, and record the command processing type and the front end IO delay.
In addition, after determining the command processing type and the front-end IO delay, the RAID card stores the command processing type and the front-end IO delay.
The processor can read the front end IO delay stored in the RAID card, and determine whether a problem exists for the processing strategy of the RAID card firmware according to the front end IO delay and the preset front end IO delay, so that the read-write delay exceeds the preset read-write delay. In one implementation, in the event that a problem is determined to exist with the processing policy of the RAID card firmware, the processing policy of the RAID card firmware may be optimized by adjusting the stripe size or the RAID level.
S503: and sending the processed read-write command to at least one hard disk, recording the sending time information, and recording the response time information when receiving the response command sent by at least one hard disk.
In this embodiment, after processing the read/write command, the RAID card may send the processed read/write command to at least one hard disk, and record the sending time information.
And when the RAID card receives a response command sent by at least one hard disk, recording response time information.
S504: and determining the back-end IO delay according to the issuing time information and the response time information.
In this embodiment, the RAID card may determine the back-end IO delay according to the issue time information and the response time information.
In addition, after the back end IO delay is determined, the RAID card can store the back end IO delay.
The processor can determine whether a problem exists in a processing strategy of the hard disk firmware or not, or whether a problem exists in the hard disk itself (such as a high-proportion bad track exists), or whether a problem exists in connection of the hard disk and the RAID card, according to the back-end IO delay and the preset back-end IO delay, so that the read-write delay exceeds the preset read-write delay.
S505: and determining the time consumption of RAID card processing according to the receiving time information and the issuing time information.
In this embodiment, the RAID card may determine that the processing of the RAID card is time-consuming according to the receiving time information and the issuing time information.
In addition, after determining that the RAID card takes time, the RAID card can take time for storage processing.
The processor can determine whether a problem exists in a processing strategy of the RAID card firmware or a problem exists in the RAID card according to the time consumption of RAID card processing and the time consumption of preset RAID card processing after the time consumption of RAID card processing stored in the RAID card is read, so that the read-write time delay exceeds the preset read-write time delay.
The beneficial effects of this embodiment are: based on the fact that the read-write command needs to be issued to at least one hard disk through the RAID card, the RAID card has the capability of counting the read-write command processed by the RAID card and the related information of the read-write command processed by the hard disk. When the read-write time delay is tested, the RAID card can record the receiving time information, the front-end IO time delay and the command processing type of the RAID card for processing the read-write command, the back-end IO time delay for interacting with the hard disk and the time consumption of RAID card processing. On one hand, the embodiment of the application can test the read-write time delay by using the RAID card in the server without additionally consuming time installation tools, thereby reducing the operation complexity; on the other hand, compared with the related art, regarding the RAID card and at least one hard disk as a component, and testing the read-write time delay between the component and the processor, if the read-write time delay caused by the hard disk or the RAID card having a problem cannot be located, the embodiment of the present invention can test the back-end IO time delay, the RAID card processes time-consuming, and the front-end IO time delay and the command processing type of the RAID card processing the command. The fine-granularity time delay test is realized, and then the fine-granularity fault location is realized.
The following are device embodiments of the present application, which may be used to perform method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
The embodiment of the application provides a RAID card, which is electrically connected with a plurality of hard disks and a processor; the RAID card is used for: recording receiving time information for a plurality of read-write commands received by the RAID card from the processor; processing the read-write command, and recording the command processing type and the front-end IO delay; the method comprises the steps of sending a processed read-write command to at least one hard disk, recording the sending time information, and recording the response time information when receiving a response command sent by at least one hard disk; determining back-end IO delay according to the issuing time information and the response time information; determining RAID card processing time consumption according to the receiving time information and the issuing time information; and constructing a read-write model according to command processing types, front-end IO delay, back-end IO delay and RAID card processing time consumption corresponding to the read-write commands.
The RAID card provided in this embodiment may execute the technical solution shown in the foregoing method embodiment, and the beneficial effects are similar, and are not described herein again.
In one implementation, the RAID card is further configured to: recording command information corresponding to the read-write command; the command information comprises a data block size, a logic block address and a command type; the RAID card is specifically used for: and constructing a read-write model according to the data block size, the logical block address, the command type, the command processing type, the front-end IO delay, the back-end IO delay and the RAID card processing time consumption corresponding to the read-write commands.
The RAID card provided in this implementation manner may execute the technical solution shown in the foregoing method embodiment, and the beneficial effects are similar and are not repeated herein.
In one implementation, a RAID card is used in particular: determining the distribution information of the data block sizes in the read-write model according to the data block sizes corresponding to the read-write commands; determining a random sequence proportion in a read-write model according to the logical block addresses corresponding to the read-write commands; determining the read-write proportion in a read-write model according to command types corresponding to the plurality of read-write commands; determining a merging and splitting ratio in a read-write model according to command processing types corresponding to the plurality of read-write commands; according to the front-end IO delay corresponding to the plurality of read-write commands, front-end IO delay information in the read-write model is determined; determining back-end IO delay information in a read-write model according to the back-end IO delay corresponding to the plurality of read-write commands; and determining the time-consuming information of RAID card processing in the read-write model according to the time-consuming of RAID card processing corresponding to the read-write commands.
The RAID card provided in this implementation manner may execute the technical solution shown in the foregoing method embodiment, and the beneficial effects are similar and are not repeated herein.
The embodiment of the application provides a processor, the processor is electrically connected with a RAID card, the RAID card is electrically connected with a plurality of hard disks, and the processor is used for: acquiring a target read-write model; determining the read-write characteristics of the hard disk command according to the target read-write model; based on the read-write characteristics of the hard disk commands, generating a plurality of read-write commands, and sending the plurality of read-write commands to at least one hard disk; and acquiring a test result in the process of processing the read-write command by at least one hard disk.
The processor provided in this embodiment may execute the technical solution shown in the foregoing method embodiment, and the beneficial effects are similar, and are not described herein again.
In one implementation, a processor is specifically configured to: and determining the distribution information, the random sequence proportion and the read-write proportion of the data block size according to the target read-write model.
The processor provided in this implementation manner may execute the technical solution shown in the foregoing method embodiment, and the beneficial effects are similar, and are not described herein again.
In one implementation, a processor is specifically configured to: and searching the corresponding relation between the service scene and the read-write model according to the target service scene, and obtaining the target read-write model.
The processor provided in this implementation manner may execute the technical solution shown in the foregoing method embodiment, and the beneficial effects are similar, and are not described herein again.
In one implementation, the processor is further configured to: reading a read-write model stored in the RAID card; the read-write model is constructed in the process that the RAID card processes a plurality of read-write commands; acquiring service scenes corresponding to a plurality of read-write commands; and establishing a corresponding relation between the service scene and the read-write model according to the service scene and the read-write model.
The processor provided in this implementation manner may execute the technical solution shown in the foregoing method embodiment, and the beneficial effects are similar, and are not described herein again.
The embodiment of the application provides a RAID card, which is electrically connected with a plurality of hard disks and a processor; the RAID card is used for: recording receiving time information for a plurality of read-write commands received by the RAID card from the processor; processing the read-write command, and recording the command processing type and the front-end IO delay; the method comprises the steps of sending a processed read-write command to at least one hard disk, recording the sending time information, and recording the response time information when receiving a response command sent by at least one hard disk; determining back-end IO delay according to the issuing time information and the response time information; and determining the time consumption of RAID card processing according to the receiving time information and the issuing time information.
The RAID card provided in this embodiment may execute the technical solution shown in the foregoing method embodiment, and the beneficial effects are similar, and are not described herein again.
The embodiment of the application provides a server, which comprises: the system comprises a RAID card, a processor electrically connected with the RAID card and a plurality of hard disks electrically connected with the RAID card; the RAID card is used for executing the method of which the execution subject is the RAID card in the embodiment of the method; the processor is configured to execute the method in the embodiment of the method in which the execution body is a processor.
The server provided in this embodiment may execute the technical solution shown in the foregoing method embodiment, and the beneficial effects are similar, and are not described herein again.
The embodiment of the application further provides a computer readable storage medium, in which computer executable instructions are stored, and the computer executable instructions are used for implementing the technical scheme shown in the embodiment of the method when being executed by the processor, and the beneficial effects are similar and are not repeated here.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features can be replaced equivalently; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. The method for constructing the read-write model is characterized by being applied to a RAID card, wherein the RAID card is electrically connected with a plurality of hard disks and is electrically connected with a processor; the method comprises the following steps:
recording receiving time information for a plurality of read-write commands received by the RAID card from the processor;
processing the read-write command, and recording the command processing type and the front-end IO delay;
the method comprises the steps of sending a processed read-write command to at least one hard disk, recording the sending time information, and recording the response time information when receiving a response command sent by the at least one hard disk;
determining back-end IO delay according to the issuing time information and the response time information;
Determining RAID card processing time consumption according to the receiving time information and the issuing time information;
and constructing the read-write model according to command processing types, front-end IO delay, back-end IO delay and RAID card processing time consumption corresponding to the read-write commands.
2. The method for constructing a read-write model according to claim 1, characterized in that the method further comprises:
recording command information corresponding to the read-write command; wherein the command information comprises a data block size, a logical block address and a command type;
the constructing the read-write model according to the command processing type, the front-end IO delay, the back-end IO delay and the RAID card processing time consumption corresponding to the plurality of read-write commands comprises the following steps:
and constructing the read-write model according to the data block size, the logical block address, the command type, the command processing type, the front-end IO delay, the back-end IO delay and the RAID card processing time consumption corresponding to the read-write commands.
3. The method for constructing a read-write model according to claim 2, wherein the constructing the read-write model according to the data block size, the logical block address, the command type, the command processing type, the front-end IO delay, the back-end IO delay, and the RAID card processing time consumption corresponding to the plurality of read-write commands includes:
Determining distribution information of the data block sizes in the read-write model according to the data block sizes corresponding to the read-write commands;
determining random sequence proportion in the read-write model according to the logical block addresses corresponding to the read-write commands;
determining the read-write proportion in the read-write model according to command types corresponding to a plurality of read-write commands;
determining a merging and splitting ratio in the read-write model according to command processing types corresponding to a plurality of read-write commands;
determining front-end IO delay information in the read-write model according to the front-end IO delay corresponding to the plurality of read-write commands;
determining back-end IO delay information in the read-write model according to the back-end IO delay corresponding to the plurality of read-write commands;
and determining the time-consuming information of RAID card processing in the read-write model according to the time-consuming of RAID card processing corresponding to the read-write commands.
4. A read-write test method, applied to a processor, the processor being electrically connected to a RAID card, the RAID card being electrically connected to a plurality of hard disks, the method comprising:
acquiring a target read-write model;
determining the read-write characteristics of the hard disk command according to the target read-write model;
generating a plurality of read-write commands based on the read-write characteristics of the hard disk commands, and sending the plurality of read-write commands to at least one hard disk;
And acquiring a test result in the process of processing the read-write command by the at least one hard disk.
5. The method according to claim 4, wherein determining the hard disk command read-write characteristics according to the target read-write model comprises:
and determining the distribution information, the random sequence proportion and the read-write proportion of the data block size according to the target read-write model.
6. The method for testing read-write according to claim 4, wherein the obtaining the target read-write model includes:
and searching the corresponding relation between the service scene and the read-write model according to the target service scene, and obtaining the target read-write model.
7. The read-write test method according to claim 6, characterized in that the method further comprises:
reading a read-write model stored in the RAID card; the read-write model is constructed in the process that the RAID card processes a plurality of read-write commands on a hard disk;
acquiring service scenes corresponding to the plurality of read-write commands;
and establishing a corresponding relation between the service scene and the read-write model according to the service scene and the read-write model.
8. The read-write time delay testing method is characterized by being applied to a RAID card, wherein the RAID card is electrically connected with a plurality of hard disks and is electrically connected with a processor; the method comprises the following steps:
Recording receiving time information for a plurality of read-write commands received by the RAID card from the processor;
processing the read-write command, and recording the command processing type and the front-end IO delay;
the method comprises the steps of sending a processed read-write command to at least one hard disk, recording the sending time information, and recording the response time information when receiving a response command sent by the at least one hard disk;
determining back-end IO delay according to the issuing time information and the response time information;
and determining the time consumption of RAID card processing according to the receiving time information and the issuing time information.
9. A RAID card, wherein the RAID card is electrically connected to a plurality of hard disks and to a processor; the RAID card is used for:
recording receiving time information for a plurality of read-write commands received by the RAID card from a processor;
processing the read-write command, and recording the command processing type and the front-end IO delay;
the method comprises the steps of sending a processed read-write command to at least one hard disk, recording the sending time information, and recording the response time information when receiving a response command sent by the at least one hard disk;
determining back-end IO delay according to the issuing time information and the response time information;
Determining RAID card processing time consumption according to the receiving time information and the issuing time information;
and constructing the read-write model according to command processing types, front-end IO delay, back-end IO delay and RAID card processing time consumption corresponding to the read-write commands.
10. A server, comprising:
a RAID card, a processor electrically connected with the RAID card, and a plurality of hard disks electrically connected with the RAID card;
the RAID card being adapted to perform the method of any of claims 1-3 or 8;
the processor is configured to perform the method of any of claims 4-7.
CN202311599121.8A 2023-11-27 2023-11-27 Construction method of read-write model, read-write test method and read-write delay test method Pending CN117806884A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311599121.8A CN117806884A (en) 2023-11-27 2023-11-27 Construction method of read-write model, read-write test method and read-write delay test method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311599121.8A CN117806884A (en) 2023-11-27 2023-11-27 Construction method of read-write model, read-write test method and read-write delay test method

Publications (1)

Publication Number Publication Date
CN117806884A true CN117806884A (en) 2024-04-02

Family

ID=90419350

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311599121.8A Pending CN117806884A (en) 2023-11-27 2023-11-27 Construction method of read-write model, read-write test method and read-write delay test method

Country Status (1)

Country Link
CN (1) CN117806884A (en)

Similar Documents

Publication Publication Date Title
US10268695B2 (en) Snapshot creation
US8250401B2 (en) Storage device realignment
US8839026B2 (en) Automatic disk power-cycle
EP2843537B1 (en) Method and systems for simulating a workload of a storage system
US10528416B2 (en) Checking data integrity of data storage systems
US11347573B2 (en) In-drive bus trace
US20210223963A1 (en) Method and Apparatus for Estimating a Distribution of Response Times of a Storage System for a Proposed Workload
US11748241B2 (en) Method and apparatus for generating simulated test IO operations
RU2731321C2 (en) Method for determining a potential fault of a storage device
CN116662214B (en) Hard disk garbage recycling method, device, system and medium based on fio
US8843781B1 (en) Managing drive error information in data storage systems
US20210081238A1 (en) Exception analysis for data storage devices
CN107273251A (en) A kind of method of testing of the racks of Rack in a production environment JBOD storages
US10705853B2 (en) Methods, systems, and computer-readable media for boot acceleration in a data storage system by consolidating client-specific boot data in a consolidated boot volume
US10254814B2 (en) Storage system bandwidth determination
CN117806884A (en) Construction method of read-write model, read-write test method and read-write delay test method
US20210216850A1 (en) Storage recommender system using generative adversarial networks
CN116339609A (en) Data processing method and storage device
CN110134572B (en) Validating data in a storage system
US20130067165A1 (en) Disk array device and disk array device control method
JP2024506524A (en) Publication file system and method
US10348605B2 (en) Embedding analyzer functionality in storage devices
US20240176492A1 (en) Native pipeline element abstract support in storage system
US11662908B2 (en) Space-efficient storage of system-monitoring data
Shvidkiy et al. Approaches Analysis to Determining the Characteristics of the Load on the Disk Subsystem Created by User Applications

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