Input and output path information monitoring method, device, medium and program product

By monitoring and analyzing various information of the input and output paths, including command queues, hardware status and performance data, it is possible to accurately locate the cause of failure of the NVMe SSD in the input and output paths, solving the problem of insufficient positioning accuracy in the prior art, and improving the stability and reliability of the storage system.

CN119512884BActive Publication Date: 2025-04-25INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510098714.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-04-25
Estimated Expiration
2045-01-22

AI Technical Summary

Technical Problem

The prior art is difficult to accurately locate the specific cause of failure of NVMe SSD in the input and output path, resulting in insufficient accuracy of the cause of failure of the positioning command timeout.

Method used

By obtaining the command submission queue and command completion queue information, determining the hardware configuration and status in the input and output path, collecting performance information, monitoring memory resource consumption, extracting input and output stream characteristics, and statistically processing control information, so as to locate the cause of the input and output command timeout failure based on these monitoring information.

Benefits of technology

Improve the accuracy of positioning the cause of timeout failure of input and output commands, and enhances the stability and reliability of the storage system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512884B_ABST
    Figure CN119512884B_ABST
Patent Text Reader

Abstract

The present application discloses an input / output path information monitoring method, device, medium and program product, and relates to the field of computer technology. The method includes: obtaining the number of commands contained in the command submission queue and the command completion queue; determining the configuration information and status information of the hardware in the input / output path; collecting the performance information of the input / output path, including the delay information and / or service quality of the input / output command; monitoring the memory resource consumption of the input / output command; extracting the input / output flow characteristics, including any one or a combination of the read / write type, read / write ratio, and distribution of different read / write sizes of the input / output command; counting the input / output processing control information; locating the cause of the input / output command timeout failure according to the monitoring information of the input / output path. The present application realizes the statistics and monitoring of the information of each node in the input / output path, and improves the accuracy of locating the cause of the input / output command timeout failure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically, to an input and output path information monitoring method, device, medium and program product. Background Art

[0002] With the continuous development of storage systems and SSD (Solid State Disk), NVMe (Non-Volatile Memory Express) SSDs are becoming more and more common. When SSDs actually interact with storage hosts, data center latency and input / output (I / O) command timeout issues have always been highly valued. In most cases, the response time for a single read and write command between the storage host and NVMe is less than 1 second, but the maximum command response time designed for hard disks and SSDs is not the case. In actual applications, SSDs may have a response time greater than 10 seconds or 30 seconds, triggering the maximum response time processing mechanism for most applications and drivers. After the problem occurs, due to the long IO path, it is impossible to effectively determine which link in the IO path the problem occurs. In related technologies, the cause of the timeout failure is often directly located on the NVMe SSD, resulting in the inaccuracy of the cause of the command timeout failure.

[0003] Therefore, how to improve the accuracy of locating the cause of a command timeout failure is a technical problem that needs to be solved by those skilled in the art. Summary of the invention

[0004] The purpose of the present application is to provide an input and output path information monitoring method, device and equipment, storage medium and computer program product, which improves the accuracy of locating the cause of command timeout failure.

[0005] To achieve the above objectives, the present application provides an input and output path information monitoring method, comprising:

[0006] Obtain the number of first commands contained in the command submission queue and the number of second commands contained in the command completion queue;

[0007] Determine configuration and status information of hardware in the input and output paths;

[0008] Collecting performance information of input and output paths; wherein the performance information includes delay information and / or service quality of input and output commands;

[0009] Monitor memory resource consumption of input and output commands;

[0010] Extracting input and output flow features; wherein the input and output flow features include any one or a combination of the read and write type, read and write ratio, and distribution of different read and write sizes of the input and output commands;

[0011] Statistical input and output processing control information;

[0012] The cause of the input and output command timeout failure is located according to the monitoring information of the input and output path; wherein the monitoring information of the input and output path includes any one or a combination of any several of the first command number, the second command number, configuration information, status information, memory resource consumption, input and output flow characteristics, and input and output processing control information.

[0013] The method of obtaining the number of first commands contained in the command submission queue and the number of second commands contained in the command completion queue includes:

[0014] Obtain a first queue head position and a first queue tail position of a command submission queue, and calculate the number of first commands included in the command submission queue according to the first queue head position and the first queue tail position;

[0015] The second queue head position and the second queue tail position of the command completion queue are obtained, and the number of second commands included in the command completion queue is calculated according to the second queue head position and the second queue tail position.

[0016] The configuration information and status information of the hardware in the input and output paths are determined, including:

[0017] Determine the configuration information and status information of the submission queue engine and the completion queue engine; wherein the status information of the submission queue engine and the completion queue engine includes any one or a combination of any one of correctable errors, uncorrectable errors, and illegal protocol errors;

[0018] Determine status information of the data migration module; wherein the status information of the data migration module includes enabling or disabling;

[0019] Determines the interrupt configuration mode and interrupt aggregation time.

[0020] The delay information of input and output commands is collected, including:

[0021] Collect the minimum delay time, maximum delay time, and average delay time of input and output commands;

[0022] The command information of the target input / output command corresponding to the maximum delay time is recorded; wherein the command information of the target input / output command includes a logic block address and a system time corresponding to the target input / output command.

[0023] The service quality of the input and output paths is collected, including:

[0024] Counting the number of first target data blocks of a preset size read by each processor core within a preset time period, and the number of read commands within the preset time period;

[0025] Calculate the output bandwidth and the number of outputs per second of each processor core according to the number of first target data blocks and the number of read commands corresponding to each processor core;

[0026] Counting the number of second target data blocks of a preset size written by each processor core within a preset time period, and the number of write commands within the preset time period;

[0027] Calculate the input bandwidth and the number of inputs per second of each processor core according to the number of second target data blocks and the number of write commands corresponding to each processor core;

[0028] The output bandwidth of all processor cores is accumulated to obtain the output bandwidth of the entire processor, the input bandwidth of all processor cores is accumulated to obtain the input bandwidth of the entire processor, the output times per second of all processor cores is accumulated to obtain the output times per second of the entire processor, and the input times per second of all processor cores is accumulated to obtain the input times per second of the entire processor.

[0029] Among them, monitoring the memory resource consumption of input and output commands includes:

[0030] Monitor the status of input and output commands in the state machine and the number of commands corresponding to each status; wherein the status of the input and output commands in the state machine includes the status of the primary context and the status of the secondary context;

[0031] Monitors the queue ID corresponding to the input and output commands.

[0032] Among them, after monitoring the queue identifier corresponding to the input and output commands, it also includes:

[0033] Monitors the number of commands corresponding to each queue ID in each processor core.

[0034] Among them, extracting input and output flow features includes:

[0035] Count the number of read commands, write commands, input and output commands of different data block sizes, and input and output commands with non-preset size alignment corresponding to each processor core;

[0036] The number of read commands of all processor cores is accumulated to obtain the number of read commands of the entire processor, the number of write commands of all processor cores is accumulated to obtain the number of write commands of the entire processor, the number of input and output commands of different data block sizes corresponding to all processor cores are accumulated respectively to obtain the number of input and output commands of different data block sizes corresponding to the entire processor, and the number of input and output commands of non-preset size alignment corresponding to all processor cores is accumulated to obtain the number of input and output commands of non-preset size alignment corresponding to the entire processor.

[0037] Among them, statistical input and output processing control information includes:

[0038] Statistics are collected on the switch variables of each processor core for checking whether to process input and output commands, the mode of each input and output command queue, and the performance parameters of the preset bus protocol; wherein the performance parameters include any one or a combination of any one of the maximum read request size, the maximum data load size, the minimum credit update time, and the maximum credit update time.

[0039] Among them, it also includes:

[0040] The monitoring information of the input and output paths is saved at preset time intervals.

[0041] Among them, it also includes:

[0042] When an input or output command with a timeout failure is detected, the saving of the monitoring information is triggered.

[0043] Among them, it also includes:

[0044] When an input or output command with a delay greater than a preset value is detected, the saving of the monitoring information is triggered.

[0045] To achieve the above objectives, the present application provides an input and output path information monitoring device, comprising:

[0046] A queue monitoring module, used to obtain the number of first commands included in the command submission queue and the number of second commands included in the command completion queue;

[0047] A hardware monitoring module is used to determine the configuration and status information of the hardware in the input and output paths;

[0048] An input and output delay performance statistics module is used to collect performance information of input and output paths; wherein the performance information includes delay information and / or service quality of input and output commands;

[0049] Input and output memory observation module, used to monitor the memory resource consumption of input and output commands;

[0050] An input-output model statistics module is used to extract input-output flow features; wherein the input-output flow features include any one or a combination of the read-write type, read-write ratio, and distribution of different read-write sizes of the input-output commands;

[0051] Input and output processing control module, used to count input and output processing control information;

[0052] A positioning module is used to locate the cause of the input and output command timeout failure based on the monitoring information of the input and output path; wherein the monitoring information of the input and output path includes any one or a combination of any several of the first command number, the second command number, configuration information, status information, memory resource consumption, input and output flow characteristics, and input and output processing control information.

[0053] To achieve the above objectives, the present application provides an electronic device, including:

[0054] Memory for storing computer programs;

[0055] A processor is used to implement the steps of the above-mentioned input and output path information monitoring method when executing a computer program.

[0056] To achieve the above objectives, the present application provides a non-volatile storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the input and output path information monitoring method as described above are implemented.

[0057] To achieve the above objectives, the present application provides a computer program product, including a computer program, which implements the steps of the above-mentioned input and output path information monitoring method when executed by a processor.

[0058] Through the above scheme, it can be seen that the present application provides an input and output path information monitoring method, including: obtaining the number of first commands contained in the command submission queue and the number of second commands contained in the command completion queue; determining the configuration information and status information of the hardware in the input and output path; collecting the performance information of the input and output path; wherein the performance information includes the delay information and / or service quality of the input and output commands; monitoring the memory resource consumption of the input and output commands; extracting input and output flow characteristics; wherein the input and output flow characteristics include any one or a combination of any one of the read and write types, read and write ratios, and distribution of different read and write sizes of the input and output commands; counting input and output processing control information; locating the cause of the input and output command timeout failure according to the monitoring information of the input and output path; wherein the monitoring information of the input and output path includes any one or a combination of any one of the first command number, the second command number, configuration information, status information, memory resource consumption, input and output flow characteristics, and input and output processing control information.

[0059] The input / output path information monitoring method provided by the present application realizes the statistics and monitoring of the information of each node in the input / output path. When an input / output command timeout fault occurs, the node in the input / output path that caused the fault can be located based on the recorded monitoring information, thereby realizing comprehensive positioning of the input / output command timeout fault cause, improving the accuracy of positioning the input / output command timeout fault cause, and improving the stability and reliability of the storage system. The present application also discloses an input / output path information monitoring device, an electronic device, a non-volatile storage medium, and a computer program product, which can also achieve the above technical effects.

[0060] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. The drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific implementation methods, they are used to explain the present disclosure, but do not constitute a limitation to the present disclosure. In the drawings:

[0062] Figure 1 It is a flow chart of a method for monitoring input and output path information according to an exemplary embodiment;

[0063] Figure 2 The present invention is a structural diagram of a disk IO timeout fault diagnosis system according to an exemplary embodiment;

[0064] Figure 3 is a structural diagram of an input and output path information monitoring device according to an exemplary embodiment;

[0065] Figure 4 The figure is a structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0066] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In addition, in the embodiments of the present application, "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0067] The embodiment of the present application discloses a method for monitoring input and output path information, which improves the accuracy of locating the cause of a command timeout failure.

[0068] See also Figure 1 , according to an exemplary embodiment, a flowchart of a method for monitoring input and output path information is shown, such as Figure 1 As shown, including:

[0069] S101: Obtain the number of first commands included in a command submission queue and the number of second commands included in a command completion queue;

[0070] The command submission queue (SQ) is used to store I / O request commands sent by the host to the storage device. The host puts the I / O request into the SQ, and the storage device fetches (Fetch) the request from the SQ and executes it. The command completion queue (CQ) is used to store the results after the storage device completes the I / O request. The storage device puts the completed I / O request results into the CQ, and the host reads (Process) the results from the CQ to confirm the completion of the request. In this step, the number of commands contained in the command submission queue and the command completion queue is monitored in real time.

[0071] As a feasible implementation method, obtaining the number of first commands contained in a command submission queue and the number of second commands contained in a command completion queue includes: obtaining the first queue head position and the first queue tail position of the command submission queue, and calculating the number of first commands contained in the command submission queue according to the first queue head position and the first queue tail position; obtaining the second queue head position and the second queue tail position of the command completion queue, and calculating the number of second commands contained in the command completion queue according to the second queue head position and the second queue tail position.

[0072] In a specific implementation, by calculating the difference between the tail position (Tail) of the first queue of SQ and the head position (Head) of the first queue, the number of request commands in SQ that have not been acquired by the storage device (numOfUnfetchedSqEntry) can be obtained. For example, if the Tail value of SQ is 100 and the Head value is 80, then numOfUnfetchedSqEntry is 20, indicating that 20 request commands in SQ have not been acquired by the storage device. By calculating the difference between the tail position (Tail) of the second queue of CQ and the head position (Head) of the second queue, the number of completed commands in CQ that have not been processed by the host (numOfProcessedCqEntry) can be obtained. For example, if the Tail value of CQ is 100 and the Head value is 80, then numOfProcessedCqEntry is 20, indicating that 20 completed commands in CQ have not been processed by the host.

[0073] According to the values ​​of numOfProcessedCqEntry and numOfUnfetchedSqEntry, the status of SQ and CQ queues, such as whether they are idle or full, can be determined. For example, if numOfUnfetchedSqEntry is large and numOfProcessedCqEntry is small, it means that there are a large backlog of request commands in SQ and the host processes the completed commands quickly. In this case, the rate at which the host submits request commands to SQ can be appropriately increased; conversely, if numOfUnfetchedSqEntry is small and numOfProcessedCqEntry is large, it means that the host processes the completed commands slowly. In this case, the rate at which the host submits request commands to SQ can be appropriately slowed down.

[0074] If numOfUnfetchedSqEntry is greater than a certain threshold, that is, there are too many unprocessed IO commands in the current queue and it is always in a blocked state, an alarm is triggered in the disk and sent to the storage host. After the host receives this alarm, it can dynamically adjust the command delivery strategy according to the alarm information, such as reducing the rate of submitting request commands to SQ, or optimizing the logic of the host processing the completed commands, so as to achieve the overall balance of the system. This dynamic adjustment can avoid the performance degradation of the system due to queue congestion and ensure the efficient and stable operation of the storage system.

[0075] By monitoring the status of SQ and CQ queues in real time and performing back pressure and dynamic adjustment based on the queue status, queue congestion can be effectively avoided and the performance and stability of the storage system can be improved.

[0076] S102: Determine configuration information and status information of hardware in the input and output path;

[0077] In this step, the configuration information and status information of the hardware in the input and output path are monitored. The hardware in the input and output path may include the submission queue engine (SQE), completion queue engine (CQE), DMA (Direct Memory Access), interrupts, etc.

[0078] As a feasible implementation method, the configuration information and status information of the hardware in the input and output path are determined, including: determining the configuration information and status information of the submission queue engine and the completion queue engine; wherein the status information of the submission queue engine and the completion queue engine includes any one or a combination of correctable errors, uncorrectable errors, and illegal protocol errors; determining the status information of the data movement module; wherein the status information of the data movement module includes enabling or disabling; determining the interrupt configuration mode and the interrupt aggregation time.

[0079] In the specific implementation, the control configuration and corresponding status of the submission queue engine and the completion queue engine are recorded, including correctable errors, uncorrectable errors, and whether there are illegal protocol errors. At the same time, the status of the data migration module is also recorded, that is, whether it is enabled or disabled. In addition, the interrupt configuration mode is also recorded, such as whether it is MSI-X or INTx mode, and important configuration information such as interrupt aggregation time is also recorded, thereby providing key basis for system operation and troubleshooting.

[0080] S103: Collecting performance information of the input and output paths; wherein the performance information includes delay information and / or service quality of the input and output commands;

[0081] In this step, the timestamps of IO command requests and completions are recorded to collect statistics on the performance of the input and output paths to evaluate the performance of the system during data transmission. Key indicators of performance information include input and output command latency information, which is the time required from issuing a command to getting a response, which reflects the response speed of the system; and service quality, which covers multiple dimensions such as data transmission stability, accuracy, and throughput to measure the overall effectiveness of the system in meeting user needs.

[0082] As a feasible implementation method, the delay information of input and output commands is collected, including: collecting the minimum delay time, maximum delay time, and average delay time of the input and output commands; recording the command information of the target input and output commands corresponding to the maximum delay time; wherein the command information of the target input and output commands includes the logical block address and system time corresponding to the target input and output commands.

[0083] In the specific implementation, the statistics use microseconds (us) as the minimum time granularity, and the maximum can be counted up to 60 seconds to ensure that the maximum delay time can be captured before the kernel driver module is reset. The delay statistics are divided into two dimensions: read and write, and the minimum delay time (Tmin), maximum delay time (Tmax) and average delay time (Taver) on each CPU are recorded respectively. In order to avoid overflow due to the accumulation of IO counts when calculating the average delay, a weighted method of sliding time windows is used to calculate the average value. When counting the maximum delay time, it is also necessary to record the relevant information of the corresponding target input and output commands, including the logical block address (Logical Block Addressing, LBA) and system time (utc) of the command, so as to facilitate the subsequent matching of the command with the command issued by the host system, so as to more accurately analyze and locate the delay problem.

[0084] As a feasible implementation method, the service quality of the input and output paths is collected, including: counting the number of first target data blocks of a preset size read by each processor core within a preset time period, and the number of read commands within the preset time period; calculating the output bandwidth of each processor core and the number of outputs per second based on the number of first target data blocks and the number of read commands corresponding to each processor core; counting the number of second target data blocks of a preset size written by each processor core within the preset time period, and the number of write commands within the preset time period; calculating the input bandwidth of each processor core and the number of inputs per second based on the number of second target data blocks and the number of write commands corresponding to each processor core; accumulating the output bandwidth of all processor cores to obtain the output bandwidth of the entire processor, accumulating the input bandwidth of all processor cores to obtain the input bandwidth of the entire processor, accumulating the output times per second of all processor cores to obtain the output times per second of the entire processor, and accumulating the input times per second of all processor cores to obtain the input times per second of the entire processor.

[0085] In the specific implementation, the focus is on the quality of service (QoS) data in the two dimensions of read and write bandwidth and read and write IOPS (Input / Output Operations PerSecond). Taking read bandwidth and read IOPS as an example, by establishing a 100ms timer, the number of 4k data blocks (as the minimum statistical granularity) read by each processor core and the number of read commands are counted every 1 second. Each processor core updates the read bandwidth and read IOPS every 1 second, and then the bandwidth data counted by all processor cores are accumulated to obtain the read bandwidth and read IOPS of the entire processor. Similarly, for write operations, the number of data blocks of a preset size and the number of write commands written by each processor core within a preset time period are also counted, and then the write bandwidth and write IOPS of each processor core are calculated, and the write bandwidth and write IOPS of the entire processor are accumulated to comprehensively evaluate the service quality of the processor on the input and output path.

[0086] The bandwidth calculation formula is as follows:

[0087] ;

[0088] in, is the input / output bandwidth of the entire processor, is the input / output bandwidth of the ith processor core, and MaxCpu is the number of processor cores.

[0089] The IOPS calculation formula is as follows:

[0090] ;

[0091] in, is the number of input / output times per second for the entire processor, is the number of input / output times per second of the ith processor core, and MaxCpu is the number of processor cores.

[0092] S104: monitoring memory resource consumption of input and output commands;

[0093] In this step, the resource consumption and processing status of each internal IO command are recorded. In this way, when an abnormal situation occurs, the status of the outstanding (unfinished) IO command can be easily queried and its resource consumption can be counted, which is convenient for quickly locating and solving the problem.

[0094] As a feasible implementation method, the memory resource consumption of input and output commands is monitored, including: monitoring the status of the input and output commands in a state machine, and the number of commands corresponding to each status; wherein the status of the input and output commands in the state machine includes the status of the first-level context and the status of the second-level context; monitoring the queue identifier corresponding to the input and output commands.

[0095] In the process of monitoring input and output commands, since the IO commands will use the finite state machine (FSM) to transfer the primary context and secondary context of the command when processed by the internal firmware, the IO observation module needs to monitor these states in detail. Specifically, it is necessary to count the states of the primary and secondary contexts and the number of commands corresponding to each state, and also record the queue identification information corresponding to these context commands. In this way, the flow of input and output commands in the state machine can be fully understood, providing key data support for analyzing the command processing flow, troubleshooting potential problems, and optimizing system performance, ensuring efficient and accurate processing of IO commands.

[0096] As a feasible implementation manner, after monitoring the queue identifiers corresponding to the input and output commands, the method further includes: monitoring the number of commands corresponding to each queue identifier in each processor core.

[0097] In the specific implementation, for the current multi-core CPU (Central Processing Unit) architecture of NVMe disks, in order to better manage and monitor IO operations, each processor core will count the total number of IO commands processed under each queue ID. This statistical result can be used to compare with the number of IO requests issued by the host kernel to ensure the accurate processing of IO requests. At the same time, with the help of the memory observation module, the resource consumption of IO commands and the balance of host resource allocation can be deeply analyzed. Since different applications on the host storage will issue commands through different SQE (Submission Queue Engine) queue IDs, when abnormal situations such as IO timeouts occur, it is possible to quickly locate which application caused the problem based on the SQE queue ID, thereby facilitating targeted problem troubleshooting and resource optimization, ensuring the efficiency and stability of IO processing under the multi-core CPU architecture.

[0098] S105: extracting input and output flow features; wherein the input and output flow features include any one or a combination of the read and write type, read and write ratio, and distribution of different read and write sizes of the input and output commands;

[0099] In this step, the input and output flow characteristics are extracted, including the read and write types of the input and output commands, that is, distinguishing whether they are read operations or write operations; the read-write ratio, which is used to measure the proportion of read operations and write operations in the total operations; and the distribution of different read and write sizes, which involves statistical analysis of the frequency and proportion of read and write operations of various data block sizes.

[0100] As a feasible implementation method, the input and output flow features are extracted, including: counting the number of read commands, the number of write commands, the number of input and output commands of different data block sizes, and the number of input and output commands with non-preset size alignment corresponding to each processor core; adding the number of read commands of all processor cores to obtain the number of read commands of the entire processor, adding the number of write commands of all processor cores to obtain the number of write commands of the entire processor, adding the number of input and output commands of different data block sizes corresponding to all processor cores to obtain the number of input and output commands of different data block sizes corresponding to the entire processor, and adding the number of input and output commands of non-preset size alignment corresponding to all processor cores to obtain the number of input and output commands of non-preset size alignment corresponding to the entire processor.

[0101] In the specific implementation, a two-dimensional array gIOStatic[MaxCpu][MaxBlockSize] is constructed to count the input and output command information of the processor core, where MaxCpu represents the number of processor cores, and MaxBlockSize is defined according to different data block sizes such as 4k, 8k, and 12k to the maximum data block size of a single IO that can be processed. The number of read and write IO commands and the number of non-4k size alignments are counted on each processor core, because there is a difference between non-4k size alignment and 4k size in disk processing. When processing each IO command, statistics are performed based on the three dimensions of read and write type, data block size, and whether it is 4k or non-4k alignment. Finally, when outputting the IO model statistics, the corresponding data on all CPUs are summed to obtain the number of read commands, the number of write commands, the number of input and output commands of different data block sizes, and the number of input and output commands of non-preset size alignment for the entire processor, so as to fully understand the input and output command processing of the processor.

[0102] S106: Counting input and output processing control information;

[0103] In this step, the input and output processing control information is counted, including the execution status management of the IO command, that is, whether the command is in the normal (normal execution) or pause (pause) state, which helps to finely control the IO operation when needed, such as pausing certain IO operations when the system load is too high or an abnormality occurs to ensure the stable operation of the system. In addition, the input and output processing control information can also include the configuration of the size of the relevant parameters of the PCIe (Peripheral Component Interconnect Express) transport layer, which is the key to ensure efficient and accurate transmission of data on the PCIe link.

[0104] As a feasible implementation method, statistics on input and output processing control information include: statistics on switch variables of each processor core for checking whether to process input and output commands, the mode of each input and output command queue, and performance parameters of a preset bus protocol; wherein the performance parameters include any one or a combination of any one of the maximum read request size, the maximum data load size, the minimum credit update time, and the maximum credit update time.

[0105] In the specific implementation, key information related to input and output command processing is counted. It records the switch variable of whether each processor core processes the IO command, that is, it determines whether the processor core participates in the processing of the IO command. At the same time, the module also counts the mode of each IO queue command, whether it is in pause or normal state. In addition, it also involves the performance parameter statistics of the preset bus protocol, including the key performance parameters of PCIe MRRS (Maximum ReadRequest Size) and MPS (Maximum Payload Size). These two parameters determine the maximum request and load size of data transmission and have a direct impact on transmission efficiency. There are also minimum and maximum credit update times related to PCIe flow control. The credit update time affects the rhythm and efficiency of data transmission. By counting these parameters, the performance of the IO processing process can be fully understood and optimized.

[0106] S107: Locate the cause of the input / output command timeout failure according to the monitoring information of the input / output path; wherein the monitoring information of the input / output path includes any one or a combination of any several of the first command quantity, the second command quantity, configuration information, status information, memory resource consumption, input / output flow characteristics, and input / output processing control information.

[0107] It should be noted that the monitoring information in steps S101-S106 needs to be refreshed by the management CPU module in the multi-core CPU. As a feasible implementation, the management CPU module saves the monitoring information of the input and output paths at a preset time interval.

[0108] As another feasible implementation, when an input / output command with a timeout failure is detected, the saving of monitoring information is triggered. In a specific implementation, the management CPU module can detect the timeout command of the NVMe kernel and trigger the saving of monitoring information when the first input / output command with a timeout failure is received.

[0109] As another feasible implementation, when an input / output command with a delay greater than a preset value is detected, the monitoring information is saved. In a specific implementation, if the management CPU module detects an IO command with a delay greater than a preset value, the monitoring information is saved. For example, when an IO command with a delay greater than 10s is detected, the monitoring information is saved.

[0110] In this step, the cause of the input / output command timeout failure is located according to the monitoring information collected in steps S101-S106, including each node in the input / output path, such as the storage host application, storage kernel driver, storage component, etc.

[0111] For storage host application failures: If abnormalities are detected in IO characteristics related to a specific application (such as read / write type, read / write ratio, and statistical distribution of different read / write sizes), this may indicate that the problem originates from the host storage application layer. For example, if the IO request pattern of an application does not match expectations, it may indicate a problem with the application. If an abnormal number of IO commands processed under the command queue identifier related to a specific application is detected, this may also indicate a problem at the host storage application layer.

[0112] For storage kernel driver failures: Hardware control configuration and corresponding status (such as correctable errors, uncorrectable errors, illegal protocol errors) may indicate that there is a problem with the kernel driver's interaction with the hardware. Statistics on the switch variables for processing IO commands on each CPU, the pause or normal mode settings of IO queue commands, and the configuration of key performance parameters of PCIe. If abnormalities are found, it may indicate that there is a problem with the storage kernel driver.

[0113] For storage component failures: If numOfUnfetchedSqEntry is found to be greater than a certain threshold, that is, there are too many unprocessed IO commands in the current queue, it may indicate that the internal processing capacity of the SSD is insufficient or there is a fault. If the latency data (such as Tmin minimum time, Tmax maximum time, Taver average time) is abnormal, it may indicate that there is a delay or performance problem when the SSD component processes IO requests.

[0114] The embodiments of the present application implement statistics and monitoring of information of each node in the input and output path. When an input and output command timeout failure occurs, it is possible to locate which node in the input and output path caused the failure based on the recorded monitoring information, thereby achieving comprehensive positioning of the cause of the input and output command timeout failure, improving the accuracy of positioning the cause of the input and output command timeout failure, and improving the stability and reliability of the storage system.

[0115] The following introduces a disk IO timeout fault diagnosis system. Figure 2 As shown, it includes an NVMe queue monitoring module, an NVMe hardware monitoring module, an IO latency statistics module, an IO memory observation module, an IO model feature extraction module, an IO processing control module and an IO monitoring information storage module.

[0116] NVMe queue monitoring module: records the Head and Tail values ​​of each NVMe SQ-command submission queue and CQ-command completion queue to determine the number of corresponding IO commands in the SQ or CQ queue. It can also be used for the back pressure of the CQ completion queue on the SQ submission queue to adjust the IO command processing in the device and the flow control of IO commands sent by the storage host.

[0117] Specifically, the Head and Tail values ​​of each pair of SQ and CQ queues are recorded respectively, and the number of request commands that have not been fetched in the submission queue SQ (numOfUnfetchedSqEntry) is calculated based on the Head and Tail values ​​of SQ; the number of completed commands that have not been processed by the host in the completion queue CQ (numOfProcessedCqEntry) is calculated based on the Head and Tail values ​​of CQ; the status of the submission queue command and the status of the SQ / CQ queue in the queue (idle, full, etc.) can be back-pressured based on numOfProcessedCqEntry and numOfUnfetchedSqEntry; if numOfUnfetchedSqEntry is greater than a certain threshold, that is, there are too many unprocessed IO commands in the current queue and it has been in a blocked state, an alarm is triggered in the disk and sent to the storage host, and the host dynamically adjusts the issuance of commands based on this alarm to achieve an overall balanced state of the system.

[0118] NVMe hardware processing module: records the configuration and status of hardware units such as SQ, CQ, DMA, and interrupts to determine whether the hardware behavior processing meets work expectations.

[0119] Specifically, record the control configuration and corresponding status of each queue SQE and CQE, such as correctable errors and uncorrectable errors, whether there are illegal protocol errors, whether the DMA status of the data movement module is enabled or autodisabled, interrupt configuration mode (MSI-X / INTx), interrupt aggregation time and other key information.

[0120] IO latency performance statistics module: records the timestamps of IO command requests and completions, performs latency statistics and distribution, including minimum, maximum and average time data, and records the information of the current maximum latency IO, including the lba position and the corresponding UTC timestamp issued by the host; at the same time, it records the QoS of different dimensions of internal IO, such as read / write bandwidth and read / write IOPS, for analyzing the corresponding bottleneck points.

[0121] Specifically, the IO latency performance statistics module mainly includes latency statistics and performance QoS statistics in different dimensions;

[0122] (1) The latency statistics are calculated on each CPU with the minimum time granularity of us, and the maximum time granularity can be calculated up to 60s to ensure that the maximum time can be calculated before the kernel driver module is reset. The latency is calculated on each CPU according to the read and write dimensions, namely the minimum time Tmin, the maximum time Tmax, and the average time Taver. In order to effectively avoid overflow due to the accumulation of IO counts when calculating the average latency, the time window sliding method is used to perform the average weighting method. When calculating the maximum time, it is necessary to record the relevant information {lba, utc} in the current IO command, namely the lba and the corresponding system utc time information, so as to facilitate the subsequent correspondence with the host system to issue commands.

[0123] (2) Performance QoS data of different dimensions include read / write bandwidth and read / write IOPS. The statistical method is as follows, taking read bandwidth and read IOPS as an example: establish a 100ms timer, calculate the number of 4k data read by IO within 1s (with 4k as the minimum statistical granularity) and the number of IO read commands, and update the read bandwidth and read IOPS of each CPU at an interval of 1s, and accumulate the statistical bandwidth of each CPU.

[0124] IO memory resource observation module: records the resource consumption and processing status of each internal IO command, which is used for status query and resource consumption statistics of outstanding IO commands under abnormal circumstances; in addition, based on the multi-core CPU architecture of the current NVMe disk, the IO number statistics count of the IO front-end processing module of each CPU is added to determine the balance of IO internal resource allocation.

[0125] Specifically, since the FSM state machine is used to transfer the first-level context and the second-level context when IO commands are processed internally by the firmware, the IO observation module needs to count the status of the first-level and second-level contexts and the number of each state, as well as the queue identification information of these context commands; under the design of a multi-core CPU architecture, each CPU also needs to count the total number of IO commands processed under each queue identification for comparison with the number of IO requests issued by the host kernel. The memory observation module can be used to analyze the resource consumption of IO commands and the balance of host allocation. Different applications on the host storage will issue commands through different sqe queue identifications. If the IO times out, the sqe queue identification can be used to determine which application of the corresponding host storage caused the problem.

[0126] IO model statistics module: extracts IO flow features, including IO read / write types, read / write ratios, and statistical distribution of different read / write sizes;

[0127] Specifically, the host storage is sent to the disk through the file system, block device layer and kernel NVMe driver. It is necessary to extract features from the IO model sent to the disk by the host storage during the process, including the IO read and write type, read / write ratio, and statistical distribution of different read / write sizes. The specific statistics are as follows:

[0128] (1) A two-dimensional array gIOStatic[MaxCpu][MaxBlockSize] is constructed according to the maximum number of CPUs and the maximum types of different block sizes. MaxBlockSize is defined as 4k / 8k / 12k / 16k / 20k / 24k / 28k... to define the maximum block size of a single IO that can be processed;

[0129] (2) The IO counted on each CPU is of two types: read and write. The number of commands and the number of non-4k size alignment are counted respectively (non-4k size alignment and 4k size are different in disk processing);

[0130] (3) When processing each IO command, the firmware performs statistics on three dimensions based on (1) / (2) according to the read or write type, block size, and whether it is 4k or non-4k aligned;

[0131] (4) When outputting IO model statistics, sum the statistics on all CPUs:

[0132] IO processing control module: saves the internal CPU's IO processing control information, including the normal or pause control IO command and the size configuration of PCIe transport layer related parameters.

[0133] Specifically, statistics are collected on the switch variables of whether the IO commands are processed on each CPU; the pause or normal mode setting of each IO queue command, the key performance parameters of PCIe MRRS (maximum read request data) and MPS (maximum data payload size), and the minimum and maximum time for updating the credit related to PCIe flow control.

[0134] Monitoring information triggers the saving module: the management CPU module in the multi-core CPU writes the log, that is, the IO monitoring information is saved in the following way:

[0135] (1) Use a timed update method;

[0136] (2) The management CPU also needs to be able to detect the timeout command of the NVMe kernel and trigger the saving of IO monitoring information when receiving the first abort command;

[0137] (3) The management CPU also needs to regularly check the IO latency performance statistics module. If the IO latency is detected to be more than 10 seconds, the IO monitoring information needs to be saved regularly.

[0138] (4) The IO monitoring information storage module adopts a multi-fifo cache mechanism and an overwrite write method to retain the latest monitoring data information.

[0139] This embodiment adds multiple modules in the disk to complete the information statistics and monitoring of the entire internal IO path, thereby locating whether the IO timeout is introduced by the SSD failure and the corresponding timeout status information.

[0140] An input-output path information monitoring device provided in an embodiment of the present application is introduced below. The input-output path information monitoring device described below and the input-output path information monitoring method described above can be referenced to each other.

[0141] See also Figure 3 , according to an exemplary embodiment, a structural diagram of an input and output path information monitoring device is shown, such as Figure 3 As shown, including:

[0142] The queue monitoring module 100 is used to obtain the number of first commands included in the command submission queue and the number of second commands included in the command completion queue;

[0143] The hardware monitoring module 200 is used to determine the configuration information and status information of the hardware in the input and output paths;

[0144] An input / output delay performance statistics module 300 is used to collect performance information of input / output paths; wherein the performance information includes delay information and / or service quality of input / output commands;

[0145] An input / output memory observation module 400 is used to monitor the memory resource consumption of input / output commands;

[0146] The input-output model statistics module 500 is used to extract input-output flow features; wherein the input-output flow features include any one or a combination of the read-write type, read-write ratio, and distribution of different read-write sizes of the input-output commands;

[0147] An input / output processing control module 600 is used to collect statistics on input / output processing control information;

[0148] The positioning module 700 is used to locate the cause of the input and output command timeout failure based on the monitoring information of the input and output path; wherein the monitoring information of the input and output path includes any one or a combination of any several of the first command number, the second command number, configuration information, status information, memory resource consumption, input and output flow characteristics, and input and output processing control information.

[0149] The embodiments of the present application implement statistics and monitoring of information of each node in the input and output path. When an input and output command timeout failure occurs, it is possible to locate which node in the input and output path caused the failure based on the recorded monitoring information, thereby achieving comprehensive positioning of the cause of the input and output command timeout failure, improving the accuracy of positioning the cause of the input and output command timeout failure, and improving the stability and reliability of the storage system.

[0150] Based on the above embodiments, as a preferred implementation mode, the queue monitoring module 100 is specifically used to: obtain the first queue head position and the first queue tail position of the command submission queue, and calculate the number of first commands contained in the command submission queue according to the first queue head position and the first queue tail position; obtain the second queue head position and the second queue tail position of the command completion queue, and calculate the number of second commands contained in the command completion queue according to the second queue head position and the second queue tail position.

[0151] Based on the above embodiments, as a preferred implementation mode, the hardware monitoring module 200 is specifically used to: determine the configuration information and status information of the submission queue engine and the completion queue engine; wherein the status information of the submission queue engine and the completion queue engine includes any one or a combination of correctable errors, uncorrectable errors, and illegal protocol errors; determine the status information of the data movement module; wherein the status information of the data movement module includes enabling or disabling; determine the interrupt configuration mode and the interrupt aggregation time.

[0152] Based on the above embodiments, as a preferred implementation mode, the input / output delay performance statistics module 300 is specifically used to: collect the minimum delay time, maximum delay time, and average delay time of the input / output commands; record the command information of the target input / output commands corresponding to the maximum delay time; wherein the command information of the target input / output commands includes the logical block address and system time corresponding to the target input / output commands.

[0153] On the basis of the above embodiments, as a preferred implementation mode, the input and output delay performance statistics module 300 is specifically used to: count the number of first target data blocks of a preset size read by each processor core within a preset time period, and the number of read commands within the preset time period; calculate the output bandwidth and the number of outputs per second of each processor core according to the number of first target data blocks and the number of read commands corresponding to each processor core; count the number of second target data blocks of a preset size written by each processor core within a preset time period, and the number of write commands within the preset time period; calculate the input bandwidth and the number of inputs per second of each processor core according to the number of second target data blocks and the number of write commands corresponding to each processor core; accumulate the output bandwidth of all processor cores to obtain the output bandwidth of the entire processor, accumulate the input bandwidth of all processor cores to obtain the input bandwidth of the entire processor, accumulate the output times per second of all processor cores to obtain the output times per second of the entire processor, and accumulate the input times per second of all processor cores to obtain the input times per second of the entire processor.

[0154] Based on the above embodiments, as a preferred implementation mode, the input / output memory observation module 400 is specifically used to: monitor the status of input / output commands in the state machine, and the number of commands corresponding to each status; wherein the status of the input / output commands in the state machine includes the status of the first-level context and the status of the second-level context; monitor the queue identifier corresponding to the input / output commands.

[0155] Based on the above embodiment, as a preferred implementation mode, the input / output memory observation module 400 is specifically used to monitor the number of commands corresponding to each queue identifier in each processor core.

[0156] On the basis of the above embodiments, as a preferred implementation mode, the input-output model statistics module 500 is specifically used to: count the number of read commands, the number of write commands, the number of input-output commands of different data block sizes, and the number of input-output commands with non-preset size alignment corresponding to each processor core; add up the number of read commands of all processor cores to obtain the number of read commands of the entire processor, add up the number of write commands of all processor cores to obtain the number of write commands of the entire processor, add up the number of input-output commands of different data block sizes corresponding to all processor cores respectively to obtain the number of input-output commands of different data block sizes corresponding to the entire processor, and add up the number of input-output commands with non-preset size alignment corresponding to all processor cores to obtain the number of input-output commands with non-preset size alignment corresponding to the entire processor.

[0157] On the basis of the above embodiments, as a preferred implementation mode, the input / output processing control module 600 is specifically used to: count the switch variables of each processor core to check whether to process the input / output commands, the mode of each input / output command queue, and the performance parameters of the preset bus protocol; wherein the performance parameters include any one or a combination of any one of the maximum read request size, the maximum data load size, the minimum credit update time, and the maximum credit update time.

[0158] Based on the above embodiment, as a preferred implementation, it also includes:

[0159] The first trigger module is used to save the monitoring information of the input and output paths according to a preset time interval.

[0160] Based on the above embodiment, as a preferred implementation, it also includes:

[0161] The second trigger module is used to trigger the saving of monitoring information when an input / output command with a timeout failure is detected.

[0162] Based on the above embodiment, as a preferred implementation, it also includes:

[0163] The third trigger module is used to trigger the saving of monitoring information when an input / output command with a delay greater than a preset value is detected.

[0164] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0165] Based on the hardware implementation of the above program module, and in order to implement the method of the embodiment of the present application, the embodiment of the present application also provides an electronic device, Figure 4 FIG. 1 is a structural diagram of an electronic device according to an exemplary embodiment. Figure 4As shown, the electronic equipment includes:

[0166] Communication interface 1, capable of exchanging information with other devices such as network devices;

[0167] The processor 2 is connected to the communication interface 1 to realize information interaction with other devices, and is used to execute the input and output path information monitoring method provided by one or more technical solutions when running a computer program. The computer program is stored in the memory 3.

[0168] Of course, in actual application, the various components in the electronic device are coupled together through the bus system 4. It can be understood that the bus system 4 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 4 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 4 Various buses are labeled as bus system 4 .

[0169] The memory 3 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program used to operate on the electronic device.

[0170] It can be understood that the memory 3 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAMbus random access memory (DRRAM, Direct Rambus Random Access Memory).The memory 3 described in the embodiments of the present application is intended to include but is not limited to these and any other suitable types of memories.

[0171] The method disclosed in the above embodiment of the present application can be applied to the processor 2, or implemented by the processor 2. The processor 2 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 2 or the instruction in the form of software. The above processor 2 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 2 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the memory 3, and the processor 2 reads the program in the memory 3 and completes the steps of the above method in combination with its hardware.

[0172] When the processor 2 executes the program, the corresponding processes in the various methods of the embodiments of the present application are implemented, which will not be repeated here for the sake of brevity.

[0173] In an exemplary embodiment, the present application also provides a non-volatile storage medium storing a computer program, which can be executed by the processor 2 to complete the aforementioned method steps.

[0174] In an exemplary embodiment, the present application also provides a computer program product, including a computer program, which is executed by the processor 2 to complete the aforementioned method steps.

[0175] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to computer program instructions, and the aforementioned computer program can be stored in a non-volatile storage medium. When the computer program is executed, it executes the steps of the above-mentioned method embodiment. Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product, which is stored in a non-volatile storage medium and includes a number of instructions to enable an electronic device (which can be a personal computer, a server, a network device, etc.) to execute all or part of the methods of each embodiment of the present application.

[0176] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.

Claims

1. A method for monitoring input and output path information, characterized in that: include: Obtain the number of first commands contained in the command submission queue and the number of second commands contained in the command completion queue; Determine configuration and status information of hardware in the input and output paths; Collecting performance information of input and output paths; wherein the performance information includes delay information and / or service quality of input and output commands; Monitor memory resource consumption of input and output commands; Extracting input and output flow features; wherein the input and output flow features include any one or a combination of the read and write type, read and write ratio, and distribution of different read and write sizes of the input and output commands; Statistical input and output processing control information; The cause of the input / output command timeout failure is located according to the monitoring information of the input / output path; wherein the monitoring information of the input / output path includes any one or a combination of any several of the first command number, the second command number, the configuration information, the status information, the memory resource consumption, the input / output flow characteristics, and the input / output processing control information.

2. The input and output path information monitoring method according to claim 1, characterized in that: Get the number of first commands contained in the command submission queue and the number of second commands contained in the command completion queue, including: Obtaining a first queue head position and a first queue tail position of a command submission queue, and calculating the number of first commands included in the command submission queue according to the first queue head position and the first queue tail position; A second queue head position and a second queue tail position of a command completion queue are obtained, and the number of second commands included in the command completion queue is calculated according to the second queue head position and the second queue tail position.

3. The input and output path information monitoring method according to claim 1, characterized in that: Determine the configuration and status of the hardware in the input and output paths, including: Determine configuration information and status information of a submission queue engine and a completion queue engine; wherein the status information of the submission queue engine and the completion queue engine includes any one or a combination of any one of correctable errors, uncorrectable errors, and illegal protocol errors; Determine status information of a data migration module; wherein the status information of the data migration module includes enabling or disabling; Determines the interrupt configuration mode and interrupt aggregation time.

4. The input and output path information monitoring method according to claim 1, characterized in that: Collect input and output command latency information, including: Collect the minimum delay time, maximum delay time, and average delay time of input and output commands; Record the command information of the target input / output command corresponding to the maximum delay time; wherein the command information of the target input / output command includes the logic block address and system time corresponding to the target input / output command.

5. The input and output path information monitoring method according to claim 1, characterized in that: Collect the service quality of the input and output paths, including: Counting the number of first target data blocks of a preset size read by each processor core within a preset time period, and the number of read commands within the preset time period; Calculate the output bandwidth and the number of outputs per second of each processor core according to the number of the first target data blocks corresponding to each processor core and the number of read commands; Counting the number of second target data blocks of a preset size written by each processor core within a preset time period, and the number of write commands within the preset time period; Calculate the input bandwidth and the number of inputs per second of each processor core according to the number of the second target data blocks corresponding to each processor core and the number of write commands; The output bandwidth of all the processor cores is accumulated to obtain the output bandwidth of the entire processor, the input bandwidth of all the processor cores is accumulated to obtain the input bandwidth of the entire processor, the output times per second of all the processor cores is accumulated to obtain the output times per second of the entire processor, and the input times per second of all the processor cores is accumulated to obtain the input times per second of the entire processor.

6. The input and output path information monitoring method according to claim 1, characterized in that: Monitor memory resource consumption of input and output commands, including: Monitor the status of input and output commands in the state machine, and the number of commands corresponding to each status; wherein the status of the input and output commands in the state machine includes the status of the primary context and the status of the secondary context; Monitors the queue ID corresponding to the input and output commands.

7. The input and output path information monitoring method according to claim 6, characterized in that: After monitoring the queue identifiers corresponding to input and output commands, it also includes: Monitors the number of commands corresponding to each queue ID in each processor core.

8. The input and output path information monitoring method according to claim 1, characterized in that: Extract input and output stream features, including: Count the number of read commands, write commands, input and output commands of different data block sizes, and input and output commands with non-preset size alignment corresponding to each processor core; The number of read commands of all the processor cores is accumulated to obtain the number of read commands of the entire processor, the number of write commands of all the processor cores is accumulated to obtain the number of write commands of the entire processor, the numbers of input and output commands of different data block sizes corresponding to all the processor cores are accumulated respectively to obtain the number of input and output commands of different data block sizes corresponding to the entire processor, and the number of input and output commands with non-preset size alignment corresponding to all the processor cores is accumulated to obtain the number of input and output commands with non-preset size alignment corresponding to the entire processor.

9. The input and output path information monitoring method according to claim 1, characterized in that: Statistics of input and output processing control information, including: Statistics are collected on the switch variables of each processor core for checking whether to process the input and output commands, the mode of each input and output command queue, and the performance parameters of the preset bus protocol; wherein the performance parameters include any one or a combination of any one of the maximum read request size, the maximum data load size, the minimum credit update time, and the maximum credit update time.

10. The input and output path information monitoring method according to claim 1, characterized in that: Also includes: The monitoring information of the input and output paths is saved at preset time intervals.

11. The input and output path information monitoring method according to claim 1, characterized in that: Also includes: When an input or output command with a timeout failure is detected, the saving of the monitoring information is triggered.

12. The input and output path information monitoring method according to claim 1, characterized in that: Also includes: When an input or output command with a delay greater than a preset value is detected, the saving of the monitoring information is triggered.

13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, used to implement the steps of the input and output path information monitoring method as described in any one of claims 1 to 12 when executing the computer program.

14. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, and when the computer program is executed, the steps of the input-output path information monitoring method according to any one of claims 1 to 12 are implemented.

15. A computer program product, characterized in that It includes a computer program, which, when executed, implements the steps of the input and output path information monitoring method as described in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Data transmission system and method for SOC bus and chip

    CN116166595A

  • Distributed monitoring method and device, equipment and storage medium

    CN116795634A