IO problem positioning method and server
By setting a positioning device inside the server to capture IO frame information, the problem of low IO problem positioning efficiency in the existing technology is solved, accurate identification and positioning of IO faults is achieved, and the IO performance of the server is improved.
Patent Information
- Application Number
- CN202410743685.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-09-27
AI Technical Summary
It is difficult to effectively locate IO-related issues such as increased IO access latency and slow disks in servers with existing technology. The locating process can only reach the driver layer, lacking a simple and effective method for the device layer.
Set up a positioning device inside the server to capture IO information through IO frames between the RAID controller, expander and storage device, which can be used to locate IO problems online and improve positioning efficiency. There is no need to disassemble the server or use additional equipment to affect the data. business.
It achieves accurate location of IO problems, identifies storage device delay, frame traffic and expander forwarding delay, determines the location of IO faults, and improves the efficiency and accuracy of IO problem location.
Smart Images

Figure CN118708387A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and server for locating IO problems. Background Art
[0002] At present, the business volume of data centers is increasing day by day, and the business system has also put forward higher requirements for the bandwidth and latency of data access. When a single physical hard disk is not enough to support the business of the system in terms of capacity and security, multiple hard disks need to be combined in a certain way and used as a visible hard disk. Redundant Array of Independent Disks (RAID) combines multiple physical hard disks into a virtual single large-capacity hard disk through a RAID card, thereby providing higher storage performance, higher input and output (IO) performance and reliability than a single hard disk.
[0003] However, in actual use, IO-related problems such as increased IO access latency and slow disks are often encountered. At this time, it is necessary to determine the location of the problem. Currently, the positioning process relies on positioning only at the driver layer, but there is a lack of simple and effective positioning methods for positioning the device layer. Summary of the invention
[0004] The embodiment of the present application provides a method and server for locating an input / output (IO) problem. The method captures IO information by setting a positioning device inside the server, thereby improving the efficiency of locating IO problems.
[0005] In a first aspect, an embodiment of the present application provides a method for locating an input / output (IO) problem, which is applied to a server, wherein the server includes a data processing unit, a redundant disk array (RAID) controller, an expander, a positioning device, and at least one storage device; the RAID controller is connected to the at least one storage device through the expander, and the positioning device is connected to the expander and the data processing unit; the method includes:
[0006] The RAID controller sends a downlink IO frame corresponding to the IO request to the storage device through the expander;
[0007] The storage device sends an upstream IO frame to the RAID controller through the expander in response to the downstream IO frame;
[0008] The positioning device captures the IO frame forwarded by the extender, obtains IO information, and sends the IO information to the data processing unit;
[0009] The data processing unit determines an IO problem based on the IO information.
[0010] The above method realizes online capture of IO information by setting a positioning device inside the server, thereby improving the efficiency of locating IO problems. In addition, the method does not require disassembling the server or using additional equipment, and does not affect the data service of the server during operation.
[0011] Optionally, the IO frames forwarded by the expander include an uplink IO frame and a downlink IO frame, and the obtained IO information includes IO information of the uplink IO frame and IO information of the downlink IO frame.
[0012] Optionally, the data storage unit may be a BMC, a processor, a DPU, or the like.
[0013] In a possible implementation, the IO information includes frame header information of the downstream IO frame and frame header information of the upstream IO frame, and the frame header information includes at least one of a frame type, a destination SAS address, a source SAS address, a label, and an offset.
[0014] In a possible implementation, the data processing unit determines the IO problem based on the IO information, specifically including:
[0015] The data processing unit determines an IO parameter based on the IO information;
[0016] The data processing unit determines an IO problem based on the IO parameters.
[0017] In a possible implementation, the IO information further includes the time when the positioning device captures the downlink IO frame and the time when the positioning device captures the uplink IO frame; the multiple storage devices include a first storage device, the IO parameter includes a latency of the first storage device, and the data processing unit determines the IO parameter based on the IO information, specifically including:
[0018] The data processing unit determines, based on the IO information, from the downstream IO frame a first IO frame whose target SAS address is the first storage device and whose frame type is a task frame or a command frame;
[0019] The data processing unit determines a response frame corresponding to the first IO frame from the upstream IO frame based on the destination SAS address of the first IO frame, the label of the first IO frame, the frame type of the first IO frame, the source SAS address of the upstream IO frame, the frame type of the upstream IO frame and the label of the upstream IO frame;
[0020] The data processing unit determines the delay of the first IO frame based on the difference between the time when the positioning device captures the first IO frame and the time when the positioning device captures the response frame corresponding to the first IO frame;
[0021] The data processing unit determines a latency of the first storage device based on a latency of each of the first IO frames.
[0022] In a possible implementation, the IO parameter further includes a frame flow of the first storage device; and the data processing unit determines the IO parameter based on the IO information, further including:
[0023] The data processing unit determines, based on the IO information, the sum of the total number of downlink IO frames whose target SAS address is the first storage device captured by the positioning device in a unit time and the total number of uplink IO frames whose target SAS address is the first storage device captured by the positioning device in a unit time as the frame flow of the first storage device;
[0024] The data processing unit determines IO parameters based on the IO information, and also includes: the data processing unit determines that the IO problem includes a failure of the first storage device when a ratio of the latency of the first storage device to the frame flow of the first storage device is greater than a second threshold.
[0025] The above method identifies the storage device latency and frame flow based on IO information. If the latency of the storage device is too large but the frame flow is not large, it is determined that the storage device is faulty, which is more accurate.
[0026] In a possible implementation, the IO parameters further include the frame flow and the total frame flow of each storage device; and the data processing unit determines the IO parameters based on the IO information, further comprising:
[0027] The data processing unit determines the sum of the total number of the downlink IO frames captured by the positioning device within a unit time and the total number of the uplink IO frames captured by the positioning device within a unit time as the total frame flow;
[0028] The data processing unit determines the IO parameters based on the IO information, further comprising:
[0029] The data processing unit determines the frame flow ratio of each storage device based on the frame flow of each storage device in the multiple storage devices and the total frame flow;
[0030] When there is a storage device whose frame traffic ratio is greater than a third threshold among the multiple storage devices, the data processing unit determines that the IO problem includes access concentration of the application layer of the server.
[0031] The above method determines whether the upper-layer application has balanced access to the underlying storage device based on the proportion of frame traffic of each storage device. When the proportion of frame traffic of one or more distributed storage devices is too large, it means that the upper-layer application has too concentrated access to the underlying storage device.
[0032] In a possible implementation, the IO information further includes the time when the expander receives the downlink IO frame and the time when the expander sends the downlink IO frame, and / or the IO information of the uplink IO frame further includes the time when the expander receives the uplink IO frame and the time when the expander sends the uplink IO frame; the IO parameter further includes the forwarding delay of the expander; the data processing unit determines the IO problem based on the IO information, including:
[0033] The data processing unit determines the forwarding delay of the expander based on the difference between the time when the expander receives the downstream IO frame and the time when the expander sends the downstream IO frame, and / or the difference between the time when the expander receives the upstream IO frame and the time when the expander sends the upstream IO frame; and determines that the IO problem includes a failure of the expander when the forwarding delay is greater than a fourth threshold.
[0034] The above method can obtain the forwarding delay of the expander based on the IO information, and then determine that the expander is faulty when the forwarding delay of the expander is too large, thereby realizing the identification of the expander fault.
[0035] In a possible implementation, the IO parameter further includes a ratio of IO request frames of request blocks of multiple sizes, and the IO request frame is a downlink IO frame whose frame type is a command frame;
[0036] The data processing unit determines the IO parameters based on the IO information, including: the data processing unit determines the size of the request block of each IO request frame in the downstream IO frame based on the frame type, target SAS address and offset of the downstream IO frame;
[0037] The data processing unit determines the IO problem based on the IO parameters, including: when the proportion of IO request frames of request blocks with a size smaller than a fifth threshold is greater than a sixth threshold, determining that the IO problem includes excessive small block access.
[0038] The above method analyzes the distribution information of the accessed request blocks based on the IO information to further determine the IO request frame proportions of request blocks of different sizes. If too many small blocks are accessed, the IO performance will be reduced.
[0039] In a possible implementation, the method further includes:
[0040] The data processing unit outputs prompt information on the management interface of the server, where the prompt information includes the IO parameters and / or the IO problems determined based on the IO parameters.
[0041] In the above method, the server can also output the IO parameters and / or IO problems on its management interface so that the administrator can clearly know the IO problems existing in the current server.
[0042] In a possible implementation, the method further includes:
[0043] The data processing unit sends a start instruction to the positioning device, wherein the start instruction is used to instruct the positioning device to start capturing the IO frame forwarded by the extender to obtain IO information;
[0044] The data processing unit sends a closing instruction to the positioning device, where the closing instruction is used to instruct the positioning device to stop executing the capturing of the IO frames forwarded by the expander to obtain the IO information.
[0045] With the above method, the server can manage the opening and closing of the positioning device, thereby realizing the opening and closing of the positioning method for the IO problem.
[0046] In the second aspect, an embodiment of the present application also provides a server, including: a data processing unit, a redundant disk array RAID controller, an expander, a positioning device and at least one storage device; the RAID controller is connected to the at least one storage device through the expander, and the positioning device is connected to the expander and the data processing unit; the server is used to implement the method described in the first aspect or any possible implementation of the first aspect.
[0047] Optionally, the positioning device and the expander are both arranged on the hard disk backplane.
[0048] In the third aspect, an embodiment of the present application further provides a circuit board, which includes a positioning device and an expander, wherein the positioning device is used to implement the method performed by the positioning device in the first aspect or any possible implementation of the first aspect, and the expander is used to implement the method performed by the expander in the first aspect or any possible implementation of the first aspect.
[0049] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, the server executes the method provided in the first aspect or any one of the implementations of the first aspect.
[0050] In the fifth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a server, the server executes the method provided in the first aspect or any one of the implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1A A schematic diagram of the structure of a server provided in an embodiment of the present application;
[0052] Figure 1B A schematic diagram of the structure of another server provided in an embodiment of the present application;
[0053] Figure 2 A schematic diagram of the structure of another hard board backplane provided in an embodiment of the present application;
[0054] Figure 3A A flowchart of a task management process provided in an embodiment of the present application;
[0055] Figure 3B A flowchart of a data writing process provided in an embodiment of the present application;
[0056] Figure 3C A flowchart of a data reading process provided in an embodiment of the present application;
[0057] Figure 3D A flowchart of a process of processing an interlock frame provided in an embodiment of the present application;
[0058] Figure 3E A flowchart of a process of processing a non-interlocked frame provided in an embodiment of the present application;
[0059] Figure 3F A flowchart of another non-interlocked frame processing process provided by an embodiment of the present application;
[0060] Figure 4 A flowchart of a method for locating an IO problem provided in an embodiment of the present application;
[0061] Figure 5 A flowchart of another method for locating an IO problem provided in an embodiment of the present application;
[0062] Fig. 6A and Figure 6B A structural diagram of a user interface involved in the method for locating IO problems provided in an embodiment of the present application. DETAILED DESCRIPTION
[0063] The embodiment of the present application provides a server, which includes a positioning device connected between a RAID controller and a disk, and the positioning device can capture the IO information (such as frame header information and time information, etc.) of the downstream IO frame from the RAID controller to the disk online, and / or capture the IO information of the upstream IO frame from the disk to the RAID controller online, and then, based on the IO information of the downstream IO frame and / or the IO information of the upstream IO frame, the latency of each storage device, the frame flow of each storage device, the total frame flow, the forwarding latency of the expander, the distribution information of the request block, etc. are analyzed to determine the location of the IO failure based on these IO parameters. Among them, the distribution information of the request block may include the proportion of IO request frames of request blocks of multiple sizes (sizes), where the IO request frame is a downstream IO frame whose frame type is a command frame.
[0064] Combine as follows Figure 1A and Figure 1B The structural diagram of two servers provided in the embodiment of the present application is introduced. Among them, the server 10 can be a computing server, a storage server, a GPU server, an artificial intelligence server, a file server, a domain control server, a database server, a mail server, a web server, a multimedia server, a communication server, a terminal server, an infrastructure server, a virtualization server, etc. The server can be a tower, a rack, a blade, etc. The server 10 can be, but is not limited to, an X86 architecture, a reduced instruction set computer (RISC) architecture, an advanced reduced instruction set machine (ARM) architecture, etc.
[0065] like Figure 1AAs shown, the server 10 may include but is not limited to: one or more processors 110, one or more memories 120, a baseboard management controller (BMC) 130, a RAID card 140, a hard disk backplane 150, and multiple storage devices 160. The processor 110 is connected to the memory 120, the BMC 130, the RAID card 140, etc. through a bus, the RAID card 140 is connected to the hard disk backplane 150 through a SAS bus, and the hard disk backplane 150 is connected to multiple storage devices 160 through a SAS bus. The RAID card 140 includes a RAID controller 141, and the hard disk backplane 150 may include an expander 151 and a positioning device 152.
[0066] like Figure 1B As shown, in another implementation, the server 10 may include but is not limited to: a data processing unit 100, a RAID controller 141, an expander 151, a positioning device 152 and at least one storage device 160. The data processing unit 100 may be Figure 1A The processor 110 or BMC 130 in the data processing unit 100 . The RAID controller 141 is connected to at least one storage device 160 via the expander 151 , and the positioning device 152 is connected to the expander 151 and the data processing unit 100 , respectively.
[0067] The processor 110 can be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), an artificial intelligence (AI) chip, a system on chip (SoC) or a complex programmable logic device (CPLD), a graphics processing unit (GPU), a data processing unit (DPU), etc.
[0068] The memory 120 may include an internal memory (also referred to as a memory). The memory 120 may store an executable program code, which may include instructions. The processor 110 implements various functions and data processing of the server by running the instructions stored in the memory 120. For example, the memory 120 may be a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR SDRAM), etc.
[0069] BMC130 is an independent system and an out-of-band processor responsible for monitoring the hardware status of the server, recording the information and logs of each hardware, and realizing remote management, control, installation, restart, etc. of the server 10. It can also be connected to the Internet to realize remote maintenance and management of the server 10. BMC130 can have a built-in server bottom management platform (intelligent baseboard management controller, iBMC). Among them, iBMC is a server bottom management software that provides rich management functions, illustratively, including multiple management interfaces, capable of realizing fault detection and diagnosis, including multiple security management means, including multiple system maintenance interfaces, and supporting diverse network protocols.
[0070] The RAID controller 141 is used to manage the storage device 160 in the server. The RAID controller is used to combine multiple independent storage devices 160 according to different configuration rules to form a disk group (logical hard disk), store data in multiple disks, and use parity information to provide data redundancy to improve data reliability and performance. The RAID card 140 can support one or more levels of RAID among RAID0, RAID1, RAID2, RAID3, RAID4, RAID5, RAID6, RAID7, etc.
[0071] The hard disk backplane 150 is a printed circuit board (PCB) used to connect the RAID card 140 and multiple storage devices 160 to achieve data transmission between the RAID card 140 and the multiple storage devices 160. The hard disk backplane 150 includes an expander 151 and a positioning device 152. The RAID controller 141 is connected to the expander 151 through a SAS bus, and the expander 151 is connected to the multiple storage devices 160 through a SAS bus. The positioning device 152 is connected to the expander 151.
[0072] The storage device 160 may be a disk, a solid state disk (SSD) or a mechanical hard disk, and the storage device 160 may perform data read and write operations according to the received IO frame.
[0073] In the embodiment of the present application, the processor 110 may send an IO request to the RAID controller 141 , and the IO request may be a read request, a write request, etc.
[0074] The RAID controller 141 is also used to receive the IO request sent by the processor 110, for example, respond to the IO request based on the configuration rule of the RAID card, convert the IO request based on the address of the IO request to obtain one or more IO frames (since the IO frame is sent to the disk, it is also called a downstream IO frame), and send the downstream IO frame to the storage device 160. Specifically, when the server includes an expander 151, the RAID controller 141 is used to send the downstream IO frame to the expander 151. It should be understood that in the embodiment of the present application, the IO frame from the RAID card to the storage device 160 is called a downstream IO frame, and the IO frame from the storage device 160 to the RAID card is called an upstream IO frame.
[0075] The expander 151 is used to send the downstream IO frame to the storage device 160 corresponding to the target address according to the target address of the downstream IO frame.
[0076] The storage device 160 is used to receive the downstream IO frame, and in response to the downstream IO frame, perform a corresponding operation, such as a write operation or a read operation. The storage device is also used to send an upstream IO frame, such as response data, to the expander 151 for the downstream IO frame.
[0077] The expander 151 is further configured to receive an uplink IO frame sent by the storage device 160 , and send the uplink IO frame to the RAID controller 141 .
[0078] The RAID controller 141 is further configured to receive an uplink IO frame sent by a storage device.
[0079] The positioning device 152 is used to capture the IO information of the downstream IO frame and the IO information of the upstream IO frame online, and send the captured IO information of the downstream IO frame and the IO information of the upstream IO frame to the BMC 130 .
[0080] BMC130 is also used to analyze the IO information of the downstream IO frame and the upstream IO frame to obtain IO parameters such as the delay of each storage device, the frame flow of each storage device, the total frame flow, the forwarding delay of the expander, and the distribution information of the request block. The IO parameters are used to determine IO failures.
[0081] Furthermore, the BMC 130 is also used to determine the location / cause of the IO fault based on these IO parameters. Exemplarily, the fault may include but is not limited to the following types:
[0082] 1. Storage device failure.
[0083] The BMC identifies whether the storage device is faulty based on whether the latency of the storage device is too large. For specific implementation, please refer to the relevant description in the following method embodiment.
[0084] 2. Access concentration on the server's application layer, that is, slow disk caused by problems at the application layer.
[0085] The BMC can identify whether access is concentrated on a single storage device based on the frame flow ratio of each storage device, and determine whether the application layer of the server has too concentrated access. For specific methods, please refer to the relevant description in the following method embodiment.
[0086] 3. The expander is faulty.
[0087] The BMC may identify whether the expander fails based on whether the forwarding delay of the expander is too large. For specific implementation, please refer to the relevant description in the following method embodiment.
[0088] 4. Too many small block accesses.
[0089] When small request blocks (such as 4kb request blocks) are accessed too much, it will also cause IO-related problems such as increased IO access latency and slow disk. The BMC can determine whether small request blocks are accessed too much based on the distribution information of the request blocks, such as the proportion of IO request frames of request blocks whose size is smaller than a preset value. For specific implementation, please refer to the relevant description in the following method embodiment.
[0090] Not limited to the above IO problems, BMC can also analyze more detailed IO problems.
[0091] Among them, the IO information of the IO frame (such as an uplink IO frame or a downlink IO frame) may include one or more items of the frame header information of the IO frame, and may also include the time information of the IO frame, wherein the time information of the IO frame may include the time when the positioning device captures the IO frame, the time when the expander receives the IO frame and / or the time when the IO frame is sent. Specifically, the time information of the downlink IO frame may include the time when the expander receives the downlink IO frame and the time when the expander sends the downlink IO frame, and the time information of the uplink IO frame may include the time when the expander receives the uplink IO frame and the time when the expander sends the uplink IO frame. It should be understood that in some embodiments, the time when the positioning device captures the IO frame is also the time when the expander receives the IO frame.
[0092] In some other embodiments, the positioning device 152 is not disposed on the hard disk backplane 150, but is disposed separately on the PCB board. In some other embodiments, the server may not include an expander.
[0093] Each device in the above server is also used to implement the IO problem positioning method provided in the embodiment of the present application, see the following for details Figure 4 The embodiments shown are not described in detail here.
[0094] The structure shown in the embodiment of the present application does not constitute a specific limitation on the server. In other embodiments of the present application, the server may include Figure 1A or Figure 1B More or fewer components are shown, or some components are combined, or some components are split, or different component arrangements are arranged. The components shown can be implemented in hardware, software, or a combination of software and hardware. Exemplarily, the server also includes at least one of a riser card, a fan, etc.
[0095] The present application embodiment provides a circuit board, which may include the above-mentioned positioning device 152. Optionally, as Figure 2 As shown, the circuit board is a hard disk backplane, and the circuit board also includes an expander 151, which is connected to a positioning device 152 to achieve the following Figure 4 The method implemented by the expander 151 and the positioning device 152 in the embodiment of the present application will not be described in detail here.
[0096] Before introducing the IO problem locating method provided in the embodiment of the present application, the principle of IO problem locating is first explained.
[0097] The RAID controller 141 and the expander 151, and the expander 151 and the storage device 160 are all connected through the SAS bus. The data transmission through the SAS bus follows the SSP (Serial Attached SCSI Protocol) protocol. The IO frame transmitted using the SSP protocol is also called an SSP frame. The frame header information of the SSP frame can be analyzed to obtain the read / write operation, delay, LBA address information, etc. corresponding to the SSP frame, thereby obtaining the key information required for positioning such as the number of read / write operations, completion time, and the corresponding LBA address.
[0098] The format of the SSP frame is shown in Table 1:
[0099] Table 1
[0100]
[0101] Among them, the maximum length of the SSP frame is 1052 bytes, including a 24-byte frame header (that is, bytes 0 to 23 in the above Table 1), 1024 bytes of data (that is, bytes 24 to (n-3) in the above Table 1) and a 4-byte CRC (that is, bytes (n-3) to n in the above Table 1).
[0102] The frame header information of an IO frame is the information stored in bytes 0 to 23 of the IO frame. As shown in Table 1 above, the frame header information includes fields such as frame type, hashed destination SAS address, hashed source SAS address, retry data frame, resend, change data, number of padding bytes, label, target port transmission label, data offset, etc. The following describes each field contained in the IO frame header information.
[0103] (1) Frame Type Field
[0104] The SSP protocol defines five frame types, as shown in Table 2 below, namely data (DATA), prepare to write (XFER_RDY), command (COMMAND), response (RESPONSE) and task (TASK).
[0105] Table 2
[0106]
[0107] Among them, an IO frame with a frame type of data (DATA) is also called a DATA frame; an IO frame with a frame type of ready for transmission (XFER_RDY) is also called an XFER_RDY frame; an IO frame with a frame type of command (COMMAND) is also called a COMMAND frame; an IO frame with a frame type of response (RESPONSE) is also called a RESPONSE frame; and an IO frame with a frame type of task (TASK) is also called a TASK frame.
[0108] Among them, the information unit field of the DATA frame is used to store data. The information unit field of the XFER_RDY frame stores information that is ready for transmission, that is, the target end is ready to receive and the initiator can transmit data. The information unit field of the COMMAND frame is used to indicate the command type, which may include but is not limited to read commands and write commands. The information unit of the RESPONSE frame is used to indicate the response type, which may include but is not limited to an acknowledgement character (ACK) and a negative acknowledgement (NAK). The information unit field of the TASK frame is used to indicate the task management function.
[0109] The above five frame types can be divided into interlocked frames and non-interlocked frames according to their lock types. Among them, DATA frame is a non-interlocked frame. XFER_RDY frame, COMMAND frame, RESPONSE frame and TASK frame are all interlocked frames. Interlocked frames must receive a response from the other end before the next IO frame can be processed. Non-interlocked frames allow multiple IO frames with the same tag (TAG) to be used, and they can be asynchronous.
[0110] (2) Destination SAS address field, source SAS address field
[0111] A SAS device usually includes one or more SAS ports. A SAS port can include one or more SASphys.
[0112] Each port of a SAS source device and a port of a SAS target device has a world wide name (WWN) as its port identifier, i.e., a SAS address. A SAS address is an identifier of 64 bits in length. In an embodiment of the present application, the SAS source device may be a RAID controller, and the target device may be a hard disk drive in a disk.
[0113] When the device receives an IO frame, it compares the destination SAS address carried in the IO frame with its own SAS address to see if they match. If they do not match, the IO frame is discarded.
[0114] When the device receives an IO frame, it will also compare the source SAS address carried by the IO frame with the source SAS address when the link is established to see if it matches. If they do not match, the IO frame will be discarded.
[0115] (3) Retry data frame field
[0116] The retry data frame field is only used for IO frames with a frame type of XFER_RDY (ie, XFER_RDY frames). When this field is set to 1, the port of the source device needs to resend the DATA frame.
[0117] (4) Resend field
[0118] The resend field is only used for IO frames with a frame type of RESPONSE (ie, RESPONSE frames). When the retry data frame field of an IO frame is set to 1, it indicates that the received IO frame is a retransmission packet of the RESPONSE frame.
[0119] (5) Change data fields
[0120] The changed data field is only used for IO frames with a frame type of DATA (ie, DATA frames). When this field is set to 1, it indicates that the received IO frame is a retransmission packet of the DATA frame.
[0121] (6) Padding Bytes Field
[0122] The padding byte number field is used for the other four frame types except the DATA frame, indicating the number of padding bits between the information unit field and the CRC field.
[0123] (7) Tag field
[0124] The tag field is used for the above four types of IO frames, namely, COMMAND frame, TASK frame, DATA frame, RESPONSE frame, and XFER_RDY frame, indicating the task to which the IO frame belongs. It is a unique number that will not be repeated and is used to distinguish data transmission tasks.
[0125] (8) Destination Port Transmission Tag Field
[0126] The destination port transmission tag field is a tag that the destination device needs to carry when notifying the source device to send a DATA frame when the destination device is allowed to write data. The unique number is not repeated and is used to manage the written data.
[0127] (9)Data offset field.
[0128] The data offset field is used to indicate the offset of the data.
[0129] (10) Information unit field
[0130] The information unit field is used for valid information of the IO frames of the above five frame types.
[0131] (11) Padding Byte Field
[0132] Since CRC needs to be aligned to a 4-byte boundary, if the number of bits after the information unit field is not an integer multiple of 4 bits, the padding byte field of the IO frame needs to be padded.
[0133] (12) CRC field
[0134] CRC is a check bit used to check the validity of the IO frame.
[0135] After obtaining the frame header information of the IO frame, the processing process of the IO task can be analyzed based on the frame header information of the IO frame. It should be understood that the processing process of IO has a specific timing. Based on the specific timing, the complete process of an IO task can be determined, that is, the processing process of the IO task can be analyzed. The timing of the SSP frame (that is, the IO frame) involved in task management, data writing, and data reading is introduced as follows. In an embodiment of the present application, the following initiator can be a RAID controller, and the target end can be a storage device.
[0136] (1) Task management
[0137] Task management process, such as Figure 3A As shown, the following steps may be included:
[0138] S101: The initiator sends a task management command to the target, and the frame type of the task management command is a TASK frame. The task management command is used to request the execution of a corresponding task function to implement task management.
[0139] S102: The target end receives the task management command.
[0140] S103: The target end executes the task management function corresponding to the task management command.
[0141] S104: The target end sends first response data to the initiator end. The frame type of the first response data is a RESPONSE frame, which can be ACK, NAK, etc.
[0142] S105: The initiator receives the first response data.
[0143] (ii) Data writing.
[0144] The process of data writing, such as Figure 3B As shown, the following steps may be included:
[0145] S201: The initiator sends a write command to the target, and the frame type of the write command is a COMMAND frame.
[0146] S202: The target end receives a write command.
[0147] S203: The target end sends an XFER_RDY frame to the initiator end, where the XFER_RDY frame is used to indicate that it is ready to receive data.
[0148] S204: The initiator receives the XFER_RDY frame.
[0149] S205: The initiator sends one or more data frames (DATA frames) to the target end, and the information unit field of the data frame includes the data to be written.
[0150] It should be understood that the initiator sends one or more data frames to the target in response to the XFER_RDY frame, and the target receives the data frames until all the write data are transmitted.
[0151] S206: The target end sends second response data to the initiator end. The frame type of the second response data is a RESPONSE frame, indicating that data writing is completed.
[0152] (iii) Data reading.
[0153] The process of data reading, such as Figure 3C As shown, the following steps may be included:
[0154] S301: the initiator sends a read command to the target, and the frame type of the read command is a COMMAND frame.
[0155] S302: The target end receives a read command.
[0156] S303: The target end sends one or more data frames (DATA frames) to the initiator end, wherein the information unit field of the DATA frame includes the read data, until the read data is completely transmitted.
[0157] S304: The target end sends third response data to the initiator end. The frame type of the third response data is a RESPONSE frame, indicating that the data reading is completed.
[0158] It should be noted that, during the processing of interlock frames (four frame types, namely XFER_RDY frame, COMMAND frame, RESPONSE frame, and TASK frame), the next frame can only be processed after receiving a response from the other end.
[0159] Exemplarily, Figure 3D The sending rules of interlock frames are explained by taking the example of the initiator sending an interlock frame to the target.
[0160] S401: The initiator sends a first interlock frame to the target.
[0161] S402: The target end sends an ACK or NAK for the first interlock frame to the initiator end.
[0162] S403: The initiator can send the second interlock frame only after receiving ACK or NAK for the first interlock frame.
[0163] S404: The target end sends an ACK or NAK for the second interlock frame to the initiator end.
[0164] The first interlock frame or the second interlock frame may be any one of an XFER_RDY frame, a COMMAND frame, a RESPONSE frame, and a TASK frame.
[0165] It should also be noted that, during the processing of non-interlocked frames (DATA frames), SSP frames with the same tag (i.e., multiple SSP frames conveying the same task) are allowed to be transmitted simultaneously, and can be asynchronous, such as Figure 3E However, different tags must receive a response from the other end before the next frame can be sent. Figure 3F shown.
[0166] S501: The initiator sends a first non-interlocking frame to the target end, and the tag field is Tag1.
[0167] S502: The initiator sends a second non-interlocking frame to the target end, and the tag field is Tag1.
[0168] S503: The initiator sends a third non-interlocking frame to the target end, and the tag field is Tag1.
[0169] S504: The initiator sends a fourth non-interlocking frame to the target end, and the tag field is Tag1.
[0170] It should be understood that the above Figure 3E Take S501 - S504 being executed in sequence as an example for explanation.
[0171] S505: The target end sends ACK1 or NAK1 for the first non-interlocking frame to the initiator end.
[0172] S506: The target end sends ACK2 or NAK2 for the second non-interlocking frame to the initiator end.
[0173] When the initiator receives one or more ACKs or NAKs for the first to fourth non-interlocked frames, it can trigger the sending of other non-interlocked frames with the same label to the target end, and can also send other non-interlocked frames with the same label to the target end when it does not receive one or more ACKs or NAKs for the first to fourth non-interlocked frames. Exemplarily, after S505 and S506, the following S507 and S508 are executed.
[0174] S507: The initiator sends a fifth non-interlocking frame to the target end, and the tag field is Tag1.
[0175] S508: The initiator sends a sixth non-interlocking frame to the target end, and the tag field is Tag1.
[0176] After S507 and S508, the following steps are performed.
[0177] S509: The target end sends ACK3 or NAK3 for the third non-interlocking frame to the initiator end.
[0178] S510: The target end sends ACK4 or NAK4 for the fourth non-interlocking frame to the initiator end.
[0179] S511: The target end sends ACK5 or NAK5 for the fifth non-interlocking frame to the initiator end.
[0180] S512: The target end sends ACK6 or NAK6 for the sixth non-interlocked frame to the initiator end.
[0181] If the initiator needs to send a non-interlocking frame with a different label from the non-interlocking frame that has been sent to the target, it needs to receive all ACKs or NAKs of the sent interlocking frames before sending. That is, after S511, it needs to execute:
[0182] S513: The initiator sends the seventh non-interlocking frame to the target end, and the tag field is Tag2.
[0183] S514: The initiator sends an eighth non-interlocking frame to the target end, and the tag field is Tag2.
[0184] S515: The target end sends ACK7 or NAK7 for the seventh non-interlocked frame to the initiator end.
[0185] S516: The target end sends ACK8 or NAK8 for the eighth non-interlocking frame to the initiator end.
[0186] The non-interlocking frame may be a DATA frame.
[0187] By utilizing the timing characteristics of the SSP frames involved in the above-mentioned task management, data writing, and data reading, as well as the transmission characteristics of interlocked frames and non-interlocked frames, the frame type, destination SAS address, source SAS address, label, etc. can be obtained by parsing the frame header information of the SSP frame, and then the complete IO processing process can be parsed, and then the IO parameters such as the latency of each storage device, the frame flow of each storage device, the total frame flow, the forwarding latency of the expander, and the distribution information of the request block can be analyzed.
[0188] In addition to capturing the frame header information of the IO frame, the time when the expander receives the IO frame can also be recorded, and then the delay of the IO request frame can be determined based on the time when the expander receives the command frame and the time when the corresponding response frame is received during the IO processing.
[0189] Exemplarily, for the IO process of data writing, the reception time of the corresponding write command and the reception time of the corresponding second response data can be recorded, and then the delay of the write request can be determined based on the difference between the reception time of the write command and the reception time of the second response data.
[0190] As another example, for the IO process of data reading, the reception time of the corresponding read command and the reception time of the corresponding third response data can be recorded, and then the delay of the read request can be determined based on the difference between the reception time of the read command and the reception time of the third response data.
[0191] Combine as follows Figure 4 The flowchart shown introduces a method for locating an IO problem involved in an embodiment of the present application. The method can be implemented by the above-mentioned server and may include but is not limited to some or all of the following steps:
[0192] S701: The RAID controller sends a downstream IO frame corresponding to an IO request to the expander.
[0193] S702: The expander sends the received downstream IO frame to the storage device corresponding to the destination SAS address.
[0194] S703: The storage device responds to the downstream IO frame and sends an upstream IO frame corresponding to the downstream IO frame to the expander.
[0195] S704: The expander sends the received uplink IO frame to the RAID controller.
[0196] For example, the processing method for each task management request can be found in Figure 3A As shown in the timing diagram of task management, at this time, the downlink IO frame at least includes the task management command, and the uplink IO frame at least includes the first response data.
[0197] For example, an IO request includes one or more read requests. For a method for processing each read request, see Figure 3B As shown in the timing diagram of task management, at this time, the downstream IO frame includes at least a write command and one or more data frames, and the upstream IO frame includes at least an XFER_RDY frame, second response data, etc.
[0198] As another example, the IO request includes one or more write requests. For the processing method of each write request, see Figure 3C As shown in the timing diagram of task management, at this time, the downstream IO frame at least includes a read command, and the upstream IO frame at least includes one or more data frames and third response data, etc.
[0199] S705: The positioning device captures the IO frame forwarded by the extender, and obtains IO information of the downlink IO frame and IO information of the uplink IO frame.
[0200] In the embodiment of the present application, the positioning device can capture the IO frames forwarded by the extender in real time to obtain the IO information of each captured IO frame, wherein the IO information of the captured IO frame includes the IO information of the downlink IO frame and the IO information of the uplink IO frame.
[0201] The IO information of the downlink IO frame may include the frame header information of the downlink IO frame and the time when the expander receives the downlink IO frame; the IO information of the uplink IO frame may include the frame header information of the uplink IO frame and the time when the expander receives the uplink IO frame.
[0202] In some embodiments, the positioning device is connected to the expander and can capture each IO frame (downlink IO frame and upstream IO frame) received by the expander in a mirroring manner. It can also parse the frame header information of these IO frames to obtain the frame type, destination SAS address, source SAS address and label, etc., and can also obtain the time when the expander receives the IO frame.
[0203] S706: The positioning device sends the IO information of the downstream IO frame and the IO information of the upstream IO frame to the BMC.
[0204] S707: The BMC calculates IO parameters based on the IO information of the downstream IO frame and the IO information of the upstream IO frame.
[0205] In some embodiments, the IO parameters include one or more of total frame traffic, total upstream frame traffic, total downstream frame traffic, frame traffic of each storage device, and frame traffic proportion of each storage device.
[0206] Specifically, the total uplink frame flow is the number of uplink IO frames received by the expander per unit time; the total downlink frame flow is the number of downlink IO frames received by the expander per unit time; the total frame flow is the total number of uplink IO frames and downlink IO frames received by the expander per unit time.
[0207] The frame flow of a storage device is the sum of the number of upstream IO frames sent by the storage device per unit time (i.e., the number of upstream IO frames received by the expander from the storage device) and the number of downstream IO frames received by the storage device per unit time (i.e., the number of downstream IO frames sent by the expander to the storage device). It should be understood that the BMC can distinguish the storage device corresponding to the downstream IO frame based on the destination SAS address of the downstream IO frame, and distinguish the storage device corresponding to the upstream IO frame based on the source SAS address in the upstream IO frame header information.
[0208] Optionally, the BMC may also determine the frame flow ratio of each storage device based on the frame flow of each storage device and the total frame flow, wherein, taking any storage device as an example, the frame flow ratio of a storage device is the ratio of the frame flow of the storage device to the total frame flow.
[0209] The above does not distinguish the frame type of the IO frame. In some embodiments, the frame type of the IO frame can be distinguished to obtain the frame flow of the IO frame of different frame types. The IO parameter can also include the total frame flow of the IO request frame.
[0210] The IO request frame may include a read command and a write command, and is an IO frame with a frame type of COMMAND. All IO request frames are downlink IO frames.
[0211] The BMC may also determine the IO request frame from the downstream IO frame based on the frame type of the downstream IO frame, and further determine the frame flow of the IO request frame as the number of IO request frames received by the expander within a unit time.
[0212] When the server does not include an expander, the frame flow of the IO request frame is the number of IO request frames captured by the positioning device within a unit time.
[0213] In some other embodiments, the IO parameters may include distribution information of the request blocks, and the distribution information may include size distribution, position distribution, etc. of the request blocks. The size distribution of the request blocks may include the proportion of IO request frames of request blocks of multiple sizes.
[0214] Optionally, the BMC may determine the IO request frame in the downstream IO frame based on the frame type of the downstream IO frame, that is, the downstream IO frame whose frame type is the COMMAND frame, and further determine the size of the request block to be requested by the IO request frame based on the target SAS address and offset of the IO request frame, and then count the proportion of IO request frames of request blocks of different sizes. Exemplarily, request blocks of different sizes may include 4kb, 8kb, 16kb, 32kb, 64kb, 128kb, etc. Exemplarily, the proportion of IO request frames of a request block of 4kb is the ratio of the frame flow of the IO request frame of the request block of 4kb to the total frame flow of the IO request frame.
[0215] Optionally, the BMC may also determine the logical block address of the request block of the statistical IO request frame based on the target SAS address and the offset of the IO request frame, and then obtain the position distribution of the request block of the IO request frame.
[0216] The above does not distinguish the transmission channels of the IO frames. In some embodiments, the transmission channels of the IO frames can be distinguished to obtain the frame flow, distribution information, etc. of the IO frames in different transmission channels.
[0217] Exemplarily, when the server includes an expander, the IO parameters may also include frame flow, distribution information, etc. of IO frames on the first transmission channel (i.e., from the RAID controller to the expander), and frame flow, distribution information, etc. of IO frames on the second transmission channel (i.e., from the expander to the storage device).
[0218] In some other embodiments, the IO parameters may include the latency of multiple storage devices, and the latency may be a maximum latency, an average latency, or the like.
[0219] Specifically, taking any one of the multiple storage devices as an example, the multiple storage devices include the first storage device. The BMC can also determine the first IO frame whose target SAS address is the first storage device and whose frame type is a task frame or a command frame from the downstream IO frame, and determine the response frame corresponding to the first IO frame from the upstream IO frame based on the destination SAS address of the first IO frame, the label of the first IO frame, the frame type of the first IO frame, the source SAS address of the upstream IO frame, the frame type of the upstream IO frame, and the label of the upstream IO frame. Among them, the IO frame in the upstream IO frame that has the same label as the first IO frame, the source SAS address is the destination SAS address of the first IO frame, and the frame type is RESPONSE is the response frame corresponding to the first IO frame.
[0220] Further, the BMC can determine the latency of the first IO frame based on the difference between the time when the expander receives the first IO frame and the time when the expander receives the response frame corresponding to the first IO frame, and determine the latency of the first storage device (such as the average latency) based on the average latency of the first IO frame in the downstream IO frame.
[0221] The BMC may search for the maximum delay from the delay of the first IO frame in the downstream IO frames, and further determine that the maximum delay is the maximum delay of the first storage device.
[0222] In some further embodiments, the IO parameter may include a delay of the IO request frame, and the delay may be a maximum delay, an average delay, or the like.
[0223] Specifically, in the same manner as above, in which the response frame corresponding to the first IO frame is searched from the uplink IO frame, the BMC can search for the response frame corresponding to each IO request frame in the downlink IO frame, and then determine the delay of the IO request frame based on the difference between the time when the expander receives the IO request frame and the time when the expander receives the corresponding response frame. Furthermore, the BMC can also determine the maximum delay and average delay of the IO request frame based on the delay of all IO request frames during the IO problem location period or per unit time.
[0224] In some other embodiments, the IO parameters may include the forwarding delay of the expander, such as the maximum forwarding delay, the average forwarding delay, etc.
[0225] At this time, the IO information of the downstream IO frame also includes the time when the expander receives the downstream IO frame and the time when the expander sends the downstream IO frame, and / or the IO information of the upstream IO frame also includes the time when the expander receives the upstream IO frame and the time when the expander sends the upstream IO frame.
[0226] The BMC may also determine the forwarding delay of the expander based on the difference between the time when the expander receives the downstream IO frame and the time when the expander sends the downstream IO frame, and / or the difference between the time when the expander receives the upstream IO frame and the time when the expander sends the upstream IO frame.
[0227] Exemplarily, the BMC can determine the forwarding delay of the expander for the IO frame based on the time when the expander receives the IO frame (including upstream IO frames and downstream IO frames) and the time when the IO frame is sent, and further determine the maximum forwarding delay and average forwarding delay of the expander based on the forwarding delay of the expander for all IO frames during the IO problem location period or per unit time.
[0228] The above does not distinguish the frame type of the IO frame. In some embodiments, the frame type of the IO frame can be distinguished to obtain the delay information of the extender for different frame types. Exemplarily, the BMC determines the maximum forwarding delay and average forwarding delay of the extender forwarding the IO request frame based on the forwarding delay of all IO request frames during the IO problem location.
[0229] S708: The BMC determines an IO problem based on the IO parameters.
[0230] Exemplarily, the BMC may also determine that the IO problem includes a failure of the first storage device when the latency of the first storage device is greater than a first threshold, wherein the first threshold may be 10ms, 20ms, etc., and the first threshold may be set differently for different types of storage devices.
[0231] As another example, the BMC may also determine that the IO problem includes a failure of the first storage device when the ratio of the latency of the first storage device to the frame flow of the first storage device is greater than a second threshold. Similarly, the second threshold setting may be different for different types of storage devices.
[0232] As another example, the BMC may also determine that the IO problem includes access concentration at the application layer of the server when there is a storage device among the multiple storage devices whose frame traffic ratio is greater than a third threshold. The third threshold may be 0.5, 0.7, 0.85, etc.
[0233] As another example, the BMC may determine that the forwarding delay of the expander is too large when the forwarding delay of the expander is greater than a fourth threshold, and may determine that the IO problem includes an expander failure. The fourth threshold may be 2ms, 4ms, 10ms, etc.
[0234] As another example, the BMC may also determine that the IO problem includes too many small block accesses when the proportion of IO request frames of request blocks with a size smaller than the fifth threshold is greater than a sixth threshold. Here, the fifth threshold may be 4kb, 8kb, or 16kb, etc. The sixth threshold may be 0.4, 0.5, 0.7, etc.
[0235] like Figure 5 As shown, another IO problem location method provided in an embodiment of the present application can be implemented by the above server, and can include but is not limited to some or all of the following steps:
[0236] S801: The BMC outputs an IO analysis interface, and receives a first user operation input on the interface for instructing to start a positioning device.
[0237] User devices, such as laptops, personal computers, and mobile phones, can access the BMC of the server and display the IO problem analysis interface provided by the BMC. For example, the IO analysis interface is as follows: Fig. 6A The user interface 61 shown includes a "start obtaining IO information" control 61a and a "stop obtaining IO information" control 61b. After receiving a click operation on the control 61a, the first user operation for instructing to start the positioning device is received.
[0238] S802: The BMC sends a start instruction to the positioning device in response to the first user operation.
[0239] S803: The positioning device captures the IO frame forwarded by the expander in response to the start instruction, and obtains IO information of the downlink IO frame and IO information of the uplink IO frame.
[0240] It should be understood that S803 is obtained during the execution of the above S701-S705. Figure 5 The process of S701 to S705 is not shown.
[0241] S804: The positioning device sends the acquired IO information of the downstream IO frame and the acquired IO information of the upstream IO frame to the BMC.
[0242] The specific implementation of the above steps S803 and S804 can refer to the above Figure 4 Steps S705 and S706 in the illustrated embodiment are not described in detail here.
[0243] S805: The BMC receives a second user operation input on the IO analysis interface for instructing to close the positioning device.
[0244] For example, Fig. 6A As shown, after receiving the click operation on the control 61b, the second user operation for instructing to close the positioning device is received.
[0245] S806: In response to the second user operation, the BMC sends a closing instruction to the positioning device.
[0246] S807: The positioning device stops capturing the IO frames forwarded by the expander in response to the closing instruction.
[0247] S808: The BMC calculates the IO parameters based on the IO information of the downstream IO frame and the IO information of the upstream IO frame in response to the third user operation input on the first IO problem analysis interface for instructing to calculate the IO parameters.
[0248] For example, Fig. 6A As shown, after receiving the click operation on the control 61c, the third user operation for instructing to calculate the IO parameters is received.
[0249] The specific implementation of the above step S808 can refer to the above Figure 4 Step S707 in the illustrated embodiment is not described in detail here.
[0250] S809: BMC determines the IO problem based on the IO parameters. The specific implementation can refer to the above step S708 and will not be repeated here.
[0251] S810: The BMC outputs IO parameters and IO problems on the IO analysis interface.
[0252] Exemplarily, the IO parameters and IO problems may be displayed in a list format or in other formats, which are not limited here.
[0253] For example, the BMC may provide Figure 6B The user interface 62 shown may list multiple IO problems, and the selected IO problem is the IO problem determined by the BMC based on the IO parameters.
[0254] It should be noted that the above Figure 4 and Figure 5 The data processing unit is taken as an example for description. It should be understood that in other embodiments, the BMC may be replaced by a processor or other devices or units capable of data processing.
[0255] The embodiment of the present application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be completed by computer instructions to instruct the relevant hardware, and the program can be stored in the above computer-readable storage medium. When the program is executed, it can implement part or all of the methods executed by the server in the above method embodiments. The computer-readable storage medium can be the memory of the server in any of the above embodiments. The above computer-readable storage medium can also be an external storage device on the above device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the above management server. Further, the above computer-readable storage medium can also include both the above internal storage unit and the external storage device. The above computer-readable storage medium is used to store the above computer program and other required programs and data. The above computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.
[0256] An embodiment of the present application also provides a computer program product, which includes a computer program. When the computer program product is run on a computer, the computer is enabled to execute part or all of the methods executed by the server provided in the above embodiment.
[0257] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media integration. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.
[0258] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
[0259] It should be noted that the flowcharts described in the various embodiments of the present invention are only one embodiment. Without departing from the spirit of the present invention, the steps in the various flowcharts may be modified or changed in a variety of ways, such as executing the steps in the flowcharts in a different order, or deleting, adding or modifying certain steps.
[0260] The technical terms used in the embodiments of the present invention are only used to illustrate specific embodiments and are not intended to limit the present invention. In this article, the singular forms "a", "the" and "said" are used to include plural forms at the same time, unless the context clearly states otherwise. Further, the terms "including" and / or "comprising" used in the specification refer to the presence of the features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements and / or components.
[0261] It should also be understood that in each embodiment of the present application, "at least one" and "one or more" refer to one, two or more than two. The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0262] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.
[0263] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for locating an input / output (IO) problem, characterized in that: The method is applied to a server, wherein the server comprises a data processing unit, a redundant disk array RAID controller, an expander, a positioning device and at least one storage device; the RAID controller is connected to the at least one storage device through the expander, and the positioning device is connected to the expander and the data processing unit; the method comprises: The RAID controller sends a downlink IO frame corresponding to the IO request to the storage device through the expander; The storage device sends an upstream IO frame to the RAID controller through the expander in response to the downstream IO frame; The positioning device captures the IO frame forwarded by the extender, obtains IO information, and sends the IO information to the data processing unit; The data processing unit determines an IO problem based on the IO information.
2. The method according to claim 1, characterized in that The IO information includes frame header information of the downstream IO frame and frame header information of the upstream IO frame, and the frame header information includes at least one of a frame type, a destination SAS address, a source SAS address, a label, and an offset; The data processing unit determines the IO problem based on the IO information, specifically including: The data processing unit determines an IO parameter based on the IO information; The data processing unit determines an IO problem based on the IO parameters.
3. The method according to claim 2, characterized in that The IO information also includes the time when the positioning device captures the downlink IO frame and the time when the positioning device captures the uplink IO frame; the multiple storage devices include a first storage device, the IO parameter includes a delay of the first storage device, and the data processing unit determines the IO parameter based on the IO information, specifically including: The data processing unit determines, based on the IO information, from the downstream IO frame a first IO frame whose target SAS address is the first storage device and whose frame type is a task frame or a command frame; The data processing unit determines a response frame corresponding to the first IO frame from the upstream IO frame based on the destination SAS address of the first IO frame, the label of the first IO frame, the frame type of the first IO frame, the source SAS address of the upstream IO frame, the frame type of the upstream IO frame and the label of the upstream IO frame; The data processing unit determines the delay of the first IO frame based on the difference between the time when the positioning device captures the first IO frame and the time when the positioning device captures the response frame corresponding to the first IO frame; The data processing unit determines a latency of the first storage device based on a latency of each of the first IO frames.
4. The method according to claim 3, characterized in that The IO parameter further includes the frame flow of the first storage device; the data processing unit determines the IO parameter based on the IO information, and further includes: The data processing unit determines, based on the IO information, the sum of the total number of downlink IO frames whose target SAS address is the first storage device captured by the positioning device in a unit time and the total number of uplink IO frames whose target SAS address is the first storage device captured by the positioning device in a unit time as the frame flow of the first storage device; The data processing unit determines IO parameters based on the IO information, and also includes: the data processing unit determines that the IO problem includes a failure of the first storage device when a ratio of the latency of the first storage device to the frame flow of the first storage device is greater than a second threshold.
5. The method according to any one of claims 2 to 4, characterized in that: The IO parameters also include the frame flow and the total frame flow of each storage device; the data processing unit determines the IO parameters based on the IO information, and also includes: The data processing unit determines the sum of the total number of the downlink IO frames captured by the positioning device within a unit time and the total number of the uplink IO frames captured by the positioning device within a unit time as the total frame flow; The data processing unit determines the IO parameters based on the IO information, and further includes: The data processing unit determines the frame flow rate proportion of each storage device based on the frame flow rate of each storage device in the multiple storage devices and the total frame flow rate; When there is a storage device whose frame traffic ratio is greater than a third threshold among the multiple storage devices, the data processing unit determines that the IO problem includes access concentration in the application layer of the server.
6. The method according to any one of claims 2 to 5, characterized in that: The IO information also includes the time when the extender receives the downlink IO frame and the time when the extender sends the downlink IO frame, and / or, the IO information of the uplink IO frame also includes the time when the extender receives the uplink IO frame and the time when the extender sends the uplink IO frame; the IO parameters also include the forwarding delay of the extender; The data processing unit determines the IO problem based on the IO information, including: The data processing unit determines the forwarding delay of the expander based on the difference between the time when the expander receives the downlink IO frame and the time when the expander sends the downlink IO frame, and / or the difference between the time when the expander receives the uplink IO frame and the time when the expander sends the uplink IO frame; When the forwarding delay is greater than a fourth threshold, it is determined that the IO problem includes a failure of the expander.
7. The method according to any one of claims 2 to 6, characterized in that: The IO parameters also include a ratio of IO request frames of request blocks of multiple sizes, where the IO request frames are downlink IO frames whose frame type is a command frame; The data processing unit determines the IO parameters based on the IO information, including: the data processing unit determines the size of the request block of each IO request frame in the downstream IO frame based on the frame type, target SAS address and offset of the downstream IO frame; The data processing unit determines the IO problem based on the IO parameters, including: when the proportion of IO request frames of request blocks with a size smaller than a fifth threshold is greater than a sixth threshold, determining that the IO problem includes excessive small block access.
8. The method according to any one of claims 2 to 7, characterized in that: The method further comprises: The data processing unit outputs prompt information on the management interface of the server, where the prompt information includes the IO parameters and / or the IO problems determined based on the IO parameters.
9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: The data processing unit sends a start instruction to the positioning device, wherein the start instruction is used to instruct the positioning device to start capturing the IO frame forwarded by the extender to obtain IO information; The data processing unit sends a closing instruction to the positioning device, where the closing instruction is used to instruct the positioning device to stop executing the capturing of the IO frames forwarded by the expander to obtain the IO information.
10. A server, characterized in that: include: A data processing unit, a redundant disk array RAID controller, an expander, a positioning device and at least one storage device; the RAID controller is connected to the at least one storage device through the expander, and the positioning device is connected to the expander and the data processing unit; the server is used to implement the method described in any one of claims 1-9.
