SSD (Solid State Disk) slow read-write operation statistical method and device, computer equipment and storage medium

By implementing the slow read and write statistics module inside the SSD, the problem that the existing technology cannot accurately determine the root cause of SSD slow read and write operations is solved, and accurate statistics and fault analysis of SSD slow read and write operations are realized, improving the stability and performance of the system.

CN119645316APending Publication Date: 2025-03-18成都芯忆联信息技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411870220.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The existing technology cannot accurately determine the root causes of slow read and write operations of solid-state drives (SSDs), making it difficult to effectively solve system performance problems.

Method used

The slow read and write statistics module is implemented inside the SSD. By generating configuration instructions, storing configuration information, issuing read and write operation instructions, and comparing configuration information with read and write information, we accurately count slow read and write operations, and record relevant information for subsequent analysis.

Benefits of technology

It realizes accurate statistics of SSD slow read and write operations, provides reliable basis for operation and maintenance personnel to determine the root cause of failure, and improves the stability and performance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645316A_ABST
    Figure CN119645316A_ABST
Patent Text Reader

Abstract

The invention provides an SSD low-speed read-write operation statistical method and device, computer equipment and a storage medium, and the method comprises the following steps: starting a low-speed read-write statistical process, starting a low-speed read-write statistical module in an SSD, and generating a configuration instruction; generating configuration information according to the configuration instruction, and storing the configuration information in the low-speed read-write statistical module; issuing a read-write operation instruction based on the configuration information, and generating read-write information; and comparing the configuration information with the read-write information to obtain a corresponding statistical result or execute a corresponding operation. The invention aims to solve the technical problem that an existing external monitoring tool cannot accurately judge a low-speed read-write source.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of solid state drive read design technology, and more specifically to a method and device for counting slow read and write operations of an SSD, a computer device, and a storage medium. Background Art

[0002] Solid-state drive (SSD) technology has become mainstream in today's data centers and high-performance computing fields. However, it still faces many challenges in practical applications, especially performance issues, among which the slow input / output (Slow IO) problem needs to be solved urgently.

[0003] Slow IO refers to host input / output operations whose internal processing time of the SSD exceeds expectations, that is, host read and write operations. The cause may be defects at the firmware level. Faults in the firmware or congestion in the internal queue may cause Slow IO, which in turn causes IO glitches in the business software. In severe cases, queue congestion may even cause the system to stagnate, greatly affecting the stability and overall performance of the system.

[0004] At present, the existing detection and positioning methods mainly rely on external monitoring tools. However, these tools have obvious limitations and cannot penetrate deep into the SSD, making it difficult to accurately identify the root cause of Slow IO. This urgently requires a technical solution that can implement the Slow IO statistics function inside the SSD, so as to provide a reliable basis for operation and maintenance personnel when troubleshooting, help them accurately determine the root cause of the fault, effectively solve system performance problems, and ensure the stable operation of the system. Summary of the invention

[0005] The purpose of the present invention is to overcome the defects of the prior art and provide a method, device, computer equipment and storage medium for counting slow read and write operations of SSD, which aims to solve the technical problem that existing external monitoring tools cannot accurately determine the root cause of slow read and write.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] A method for counting slow read and write operations of an SSD comprises the following steps:

[0008] Enable the slow read and write statistics process, open the slow read and write statistics module inside the SSD and generate configuration instructions;

[0009] Generate configuration information according to the configuration instruction, and store the configuration information in the slow read and write statistics module;

[0010] Based on the configuration information, read and write operation instructions are issued to generate read and write information;

[0011] The configuration information is compared with the read / write information to obtain corresponding statistical results or perform corresponding operations.

[0012] In one embodiment, the step of generating configuration information according to the configuration instruction and storing the configuration information in the slow read / write statistics module includes:

[0013] Determine whether it is necessary to set the slow read / write threshold module configuration;

[0014] If necessary, the time threshold of the slow read / write threshold module is set to define the slow read / write time boundary value, and determine whether a statistical error reporting module needs to be configured;

[0015] If not, determine whether the statistical error reporting module needs to be configured.

[0016] In one embodiment, the step of determining whether the statistical error reporting module needs to be configured includes:

[0017] If necessary, configure the statistical error reporting module and issue read and write operation instructions based on the configuration information;

[0018] If not necessary, a read / write operation instruction is issued based on the existing configuration information.

[0019] In one embodiment, the step of configuring the statistical error reporting module includes:

[0020] Set the overflow threshold of the slow read / write statistics overflow module to determine the threshold to prevent overflow when recording slow read / write event information;

[0021] A read and write operation instruction is issued based on the overflow threshold.

[0022] In one embodiment, the step of comparing the configuration information with the read / write information to obtain a corresponding result includes:

[0023] Determining whether the operation speed of reading and writing information exceeds the time threshold;

[0024] If yes, determining whether the read / write information is recorded in the slow read / write statistics module;

[0025] If not, the read and write information is executed and the operation is completed.

[0026] In one embodiment, the step of determining whether the read / write information is recorded in the slow read / write statistics module includes:

[0027] If yes, the read / write information is slow read / write information, which is recorded in the statistical error reporting module;

[0028] If not, run the read and write information and complete the operation.

[0029] In one embodiment, the step after recording the read / write information to the statistical error reporting module includes:

[0030] Check whether the error reporting mode in the statistical error reporting module configuration is turned on;

[0031] If yes, automatic reporting is enabled, the read / write information is compared with the overflow threshold and recorded as an overflow threshold event;

[0032] If not, manual reporting is enabled, the read and write information is recorded as the first event and waits for manual processing.

[0033] In one embodiment, a device for counting slow read and write operations of an SSD includes:

[0034] Slow read and write statistics module, used to control the statistics process of SSD slow read and write operations;

[0035] Configuration instruction generation module, used for configuring instructions of working parameters of slow read and write statistics module;

[0036] The slow read / write threshold module is used to set the time threshold of slow read / write operations to determine whether the read / write operation belongs to the slow read / write category;

[0037] The statistical error reporting module is used to record the read and write information of slow read and write events and determine the error reporting method based on the configuration information;

[0038] Slow read and write statistics overflow module, used to set overflow thresholds to prevent data overflow when recording read and write information;

[0039] The read / write operation instruction issuing module is used to issue read / write operation instructions to the SSD according to the configuration information stored in the slow read / write statistics module, so that the SSD performs the read / write operation.

[0040] A computer device comprises a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above method when executing the computer program.

[0041] A computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the above method can be implemented.

[0042] The beneficial effects of the present invention compared with the prior art are:

[0043] (1) By adding a slow read / write statistics module inside the SSD, the slow read / write delays that exceed the threshold set by the user can be accurately counted. Users can flexibly set appropriate time thresholds based on the actual usage scenarios and performance requirements of the SSD. For example, in database application scenarios with high real-time requirements, the threshold can be set lower to accurately capture slow read / write events that may affect the response speed of database operations;

[0044] (2) When a slow read / write event occurs, the relevant information is recorded in the slow read / write statistics module. The operation and maintenance personnel can query these statistical results through the SSD management software or command line interface. Based on the recorded slow read / write occurrence time, the type of read / write operation involved, the specific data block and other detailed information, combined with the internal architecture and working principle of the SSD, the cause of the slow read / write can be analyzed;

[0045] (3) Operation and maintenance personnel can easily and quickly adjust various configurations according to actual needs through SSD management software or command line interface, which simplifies the operation and maintenance process and reduces the workload and operation complexity of operation and maintenance personnel.

[0046] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following preferred embodiments are specifically cited and described in detail as follows. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 A schematic diagram of a method for counting slow read and write operations of an SSD provided in an embodiment of the present invention Figure 1 ;

[0048] Figure 2 A schematic diagram of a method for counting slow read and write operations of an SSD provided in an embodiment of the present invention Figure 2 ;

[0049] Figure 3 A schematic diagram of a method for counting slow read and write operations of an SSD provided in an embodiment of the present invention Figure 3 ;

[0050] Figure 4 A schematic diagram of a method for counting slow read and write operations of an SSD provided in an embodiment of the present invention Figure 4 ;

[0051] Figure 5 A schematic diagram of a method for counting slow read and write operations of an SSD provided in an embodiment of the present invention Figure 5 ;

[0052] Figure 6A schematic diagram of a method for counting slow read and write operations of an SSD provided in an embodiment of the present invention Figure 6 ;

[0053] Figure 7 A schematic diagram of a method for counting slow read and write operations of an SSD provided in an embodiment of the present invention Figure 7 ;

[0054] Figure 8 A schematic block diagram of a device for counting slow read and write operations of an SSD provided by an embodiment of the present invention;

[0055] Fig. 9 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0058] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0059] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0060] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0061] See also Figure 1 As shown, the embodiment of the present invention discloses a method for counting slow read and write operations of an SSD, comprising the following steps:

[0062] S100, enabling the slow read / write statistics process, opening the slow read / write statistics module inside the SSD and generating configuration instructions;

[0063] Specifically, when it is necessary to collect statistics on the slow IO operations of the SSD, the corresponding statistical process is first started inside the SSD, during which the slow IO statistics module is started, and the slow IO statistics module will be responsible for a series of subsequent statistical work. At the same time, instructions for configuring the working parameters and behaviors of the module are generated, and the configuration instructions can be determined according to the system preset rules or the user's specific needs.

[0064] S200, generating configuration information according to the configuration instruction, and storing the configuration information in the slow read / write statistics module;

[0065] Specifically, after receiving the configuration instruction, the slow IO statistics module (Slow IO statistics module) determines the specific configuration information according to the instruction content. It can be understood that the configuration instruction includes determining whether the configuration information of the slow IO threshold module needs to be set, and after setting or not setting the configuration information of the slow IO threshold module, determining whether the information of the statistics error reporting module needs to be configured, etc. Finally, the generated complete configuration information is stored in the slow IO statistics module, so that these configurations can be used for determination and processing in subsequent read and write operations.

[0066] S300, issuing a read / write operation instruction based on the configuration information to generate read / write information;

[0067] Specifically, the slow read and write statistics module sends read and write operation instructions to the SSD based on the stored configuration information. The operation instructions will prompt the SSD to perform data read and write operations in a predetermined mode, such as sequential read, sequential write, mixed read and write, and different data volumes and frequencies. During the process of the SSD performing read and write operations, detailed read and write information will be generated. This read and write information includes the time of the read and write operations (accurate to microseconds or even nanoseconds, used to determine whether it is slow), the amount of data (the size of the data involved in each read and write operation), the operation type (read operation or write operation), etc. This information will be used for subsequent comparative analysis with the configuration information.

[0068] S400: Compare the configuration information with the read / write information to obtain corresponding statistical results or perform corresponding operations.

[0069] Specifically, the slow read and write statistics module obtains the read and write information generated by the read and write operations in real time, and compares and counts it with the pre-stored configuration information. By counting the slow read and write operations inside the SSD, it can monitor the time of each read and write operation in real time and accurately, and compare it with the threshold set by the user, avoiding the problem of inaccurate detection caused by external monitoring tools due to factors such as network delay and system load. At the same time, through detailed read and write information records and statistical results, including the time, data volume, operation type, etc. of slow read and write events, it provides operation and maintenance personnel with rich information to analyze the causes of Slow IO. Combined with the internal architecture and working principle of the SSD, operation and maintenance personnel can quickly locate whether Slow IO is caused by firmware problems, hardware failures (such as flash chip wear, controller failure), or improper internal queue management, so as to solve the problem in time and improve the stability of the system.

[0070] See also Figure 2 As shown, in one embodiment, the step of generating configuration information according to the configuration instruction and storing the configuration information in the slow read / write statistics module includes:

[0071] S210, determining whether it is necessary to set a slow read / write threshold module configuration;

[0072] Specifically, after receiving the configuration instruction, the first operation performed by the slow read / write statistics module is to check whether there is a need to set the slow read / write threshold module configuration. It is understandable that this judgment may be based on factors such as the system default settings, the rules pre-set by the user, or the current operating status of the system. For example, in some application scenarios with strict requirements on the read / write speed, the system may enable the setting of the slow read / write threshold module configuration by default; while in some ordinary office application scenarios with low sensitivity to the read / write speed, it may not be set by default unless the user manually chooses to enable it.

[0073] By judging whether it is necessary to set the slow read / write threshold module configuration, the system can perform personalized configuration according to the needs of different application scenarios. It can set accurate thresholds to ensure the ultimate optimization of system performance and timely discover and solve Slow IO problems that may affect the accuracy and efficiency of calculation results. It can also simplify the configuration, reduce the occupation of system resources and the complexity of configuration, avoid unnecessary system overhead, and still provide certain Slow IO monitoring capabilities when necessary.

[0074] S220, if necessary, setting the time threshold of the slow reading and writing threshold module to define the slow reading and writing time limit;

[0075] Specifically, if it is determined that the slow read and write threshold module configuration needs to be set, the user or system will set the time threshold based on factors such as the performance characteristics of the SSD and the requirements of the application scenario. The time threshold is used to clearly distinguish between normal read and write operations and slow read and write operations. Different time thresholds can be set for different types of read and write operations (such as sequential read, random read, sequential write, random write, etc.). For example, for a sequential read operation, the time threshold may be set to 200 microseconds, which means that if the processing time of a sequential read operation exceeds 200 microseconds, it is regarded as a slow read operation; and for a random write operation, since it is relatively slow in itself, the time threshold may be set to 500 microseconds.

[0076] Furthermore, reasonably setting the time threshold of the slow read and write threshold module and accurately defining the Slow IO event can provide a clear basis for subsequent troubleshooting and performance optimization. Setting different thresholds for different types of read and write operations can more accurately reflect actual read and write performance issues. For example, in database applications, by setting a lower threshold for query operations (mainly read operations), Slow IO problems that may affect query response speed can be discovered in a timely manner, while setting appropriate thresholds for data update operations (write operations) can balance performance and data integrity requirements. In this way, operation and maintenance personnel can quickly locate which type of read and write operation has Slow IO based on the threshold judgment, and then conduct in-depth analysis of whether it is caused by hardware, firmware or software.

[0077] S230, determining whether a statistical error reporting module needs to be configured;

[0078] Specifically, after setting the time threshold of the slow read / write threshold module, the system then determines whether it is necessary to configure the statistical error reporting module. This judgment needs to consider multiple factors, such as whether the system needs to obtain notifications of Slow IO events in a timely manner, whether it needs to automatically record detailed error information for subsequent analysis, etc. If the system is in a critical business environment, it is usually necessary to understand Slow IO events in a timely manner and automatically process them, so it may be necessary to configure the statistical error reporting module; while in some test environments or temporary storage scenarios of non-critical businesses, it may not be necessary to configure this module to reduce unnecessary system resource usage. Further, the statistical error reporting module is selectively configured to avoid unnecessary system resource consumption in scenarios where detailed error reporting is not required. In some non-critical businesses or resource-constrained environments, not configuring this module can save system memory, CPU time and other resources, and improve the overall operating efficiency of the system. In critical business scenarios, the reasonable configuration of the statistical error reporting module can ensure timely acquisition of Slow IO event information, perform effective fault handling, prevent the problem from further expanding, and ensure the stable operation of the system.

[0079] S230: If not, determine whether a statistical error reporting module needs to be configured.

[0080] Specifically, if the slow read / write threshold module configuration does not need to be set in the first step, the system directly enters the step of determining whether the statistical error reporting module needs to be configured. This process is similar to the considerations for determining the statistical error reporting module configuration requirements after setting the thresholds, which is mainly based on the system's business needs, performance requirements, and management policies. For example, in a scenario where a personal computer is used for daily office software (such as document editing, email sending and receiving, etc.), if the user just wants to get a general idea of ​​the SSD's read / write performance, it may not be necessary to set a complex slow read / write threshold, but may still want to obtain some basic information about Slow IO in certain situations (such as when the system feels noticeably slow). At this time, it is necessary to determine whether to configure the statistical error reporting module.

[0081] This step-by-step, selective configuration method simplifies the overall configuration process, allowing operators to configure the system more quickly and accurately according to actual needs. Operators do not need to perform a complex full set of configurations in all cases, but can perform targeted settings based on specific scenarios and needs.

[0082] See also Figure 3 As shown, in one embodiment, the step of determining whether the statistical error reporting module needs to be configured includes:

[0083] S231. If necessary, configure the statistical error reporting module;

[0084] Specifically, when it is determined that the statistical error reporting module needs to be configured, a series of parameter settings must be made first, including whether to enable the automatic error reporting function. If automatic error reporting is enabled, the system will automatically collect, organize and report error information according to preset rules when a Slow IO event is detected. For example, in order to ensure that Slow IO problems that affect the storage and access of many user data are discovered and handled in a timely manner, the automatic error reporting function may be enabled so that the system can notify the operation and maintenance team of the Slow IO event as soon as possible.

[0085] S232, issuing a read / write operation instruction based on the configuration information;

[0086] Specifically, after completing the configuration of the statistical error reporting module, the system will integrate all current configuration information, including the configuration information of the slow read and write threshold module and the configuration information of the statistical error reporting module that has just been configured, to form a complete set of configuration instructions. Based on this set of configuration information, read and write operation instructions are issued to the SSD. These read and write operation instructions will enable the SSD to perform corresponding read and write operations according to the configuration requirements, such as reading and writing data according to specific read and write modes (sequential read, random read, read and write mixed, etc.), data size, operation frequency, etc. In this process, the SSD will generate detailed read and write information based on these instructions, providing a data basis for subsequent statistics and analysis.

[0087] S232: If not necessary, issue read and write operation instructions based on the existing configuration information.

[0088] Specifically, if it is determined that there is no need to configure the statistical error reporting module, the system will directly issue read and write operation instructions based on other currently existing configuration information. It is understandable that the current configuration information only contains the configuration information of the slow read and write threshold module, or other partial configuration information that already existed in the previous process. The read and write operation instructions will prompt the SSD to perform read and write operations according to the established mode and parameters, and generate read and write information. Although there is no configuration for the statistical error reporting module, the system can still monitor whether the read and write operations exceed the threshold based on the existing configurations such as the settings of the slow read and write threshold module, thereby determining whether there is a Slow IO situation. However, in this case, the system will not perform detailed error report recording and processing, and can only provide basic Slow IO monitoring functions.

[0089] See also Figure 4 As shown, in one embodiment, the step of configuring the statistical error reporting module includes:

[0090] S2311, setting an overflow threshold of a slow read / write statistics overflow module to determine a threshold for preventing overflow when recording slow read / write event information;

[0091] Specifically, when configuring the statistical error reporting module, the overflow threshold of the slow read / write statistical overflow module must be set first. The overflow threshold is a key parameter used to control when recording Slow IO event information to prevent the amount of recorded data from exceeding the system's tolerance and causing data loss or errors, thereby ensuring that during system operation, even if a large number of Slow IO events occur, important event information can be accurately recorded and key data will not be lost due to data overflow. The system will determine this threshold based on a variety of factors, such as the storage capacity of the SSD, the frequency of Slow IO events that the system expects to process, and the memory space available for storing Slow IO event records.

[0092] For example, in a storage system of a large data center, if the storage capacity of the SSD is large and the system has enough memory to store Slow IO event records, and considering the importance of the business and the requirements for the fineness of Slow IO event monitoring, the overflow threshold may be set relatively high, such as 1,000 records, which means that when recording Slow IO events, the system can accommodate up to 1,000 event records to more comprehensively record possible Slow IO situations and provide rich data for subsequent in-depth analysis. On the contrary, in some resource-constrained embedded storage systems, such as small SSDs in industrial automation equipment, the overflow threshold may be set lower, such as 50 records, due to limited storage capacity and memory resources. In this case, the system needs to balance the requirements of Slow IO event recording and other system functions within limited resources. Once the number of recorded Slow IO events reaches 50, appropriate measures need to be taken to prevent data overflow, such as overwriting the earliest record, or pausing recording and issuing an alarm to prompt users to handle the recorded events in a timely manner.

[0093] S2312. Issue read and write operation instructions based on the overflow threshold.

[0094] Specifically, after setting the overflow threshold of the slow read / write statistics overflow module, the system will integrate the overflow threshold information into the overall configuration information, and then send read / write operation instructions to the SSD based on the complete configuration information including the overflow threshold. The purpose of sending read / write operation instructions is to prompt the SSD to perform actual read / write operations, so as to monitor whether Slow IO events occur during the operation, and perform corresponding processing according to the overflow threshold and other configurations.

[0095] For example, the system may generate read and write operation instructions based on preset read and write modes (such as sequential read and write, mixed read and write, etc.), data block size, operation frequency and other parameters. At the same time, the instructions will carry configuration information such as overflow thresholds, so that the SSD can know the current system's restrictions and requirements on Slow IO event recording when performing read and write operations.

[0096] See also Figure 5 As shown, in one embodiment, the step of comparing the configuration information with the read-write information to obtain a corresponding result includes:

[0097] S410, determining whether the operation speed of reading and writing information exceeds the time threshold;

[0098] Specifically, when the SSD performs a read / write operation and generates read / write information, the system obtains the operation speed related data in the read / write information (usually the time required to complete the operation) and compares it with the time threshold pre-set in the slow read / write statistics module. This time threshold is set during the configuration phase based on factors such as the SSD's performance and application scenario requirements, and is used to determine whether the read / write operation falls into the slow read / write category.

[0099] For example, if the read time threshold is set to 100 microseconds, the system will monitor the operation time of each read and write data in real time and compare it with the threshold of 100 microseconds. If a read operation takes 120 microseconds, it is initially judged that the read operation may be a slow read and write operation; if it only takes 80 microseconds, it is temporarily considered that the operation speed is normal.

[0100] S420: If yes, determine whether the read / write information is recorded in the slow read / write statistics module;

[0101] Specifically, if the operation speed of reading and writing information exceeds the time threshold, the system will then check whether the read and write information has been recorded in the slow read and write statistics module to determine whether the Slow IO event is the first occurrence or a persistent problem that has been recorded. There is a list or database that records Slow IO events in the slow read and write statistics module. The system will search for the same or similar event records based on the characteristics of the read and write operations (such as operation type, data block addresses involved, timestamps, etc.). For example, in an enterprise-level file storage server, some Slow IO events have been recorded before, involving file read and write operations under specific folders. When a new read and write operation is judged to exceed the time threshold, the system will check whether the operation is for the same folder or a similar type of file. If so, it means that this may be a persistent Slow IO problem; if not, it means that this is a newly discovered Slow IO event.

[0102] S430: If not, execute the read and write information and complete the operation.

[0103] Specifically, if the operation speed of reading and writing information does not exceed the time threshold, it means that the read and write operation is within the normal speed range. At this time, the system allows the read and write operation to continue to execute normally, complete the data reading or writing task, and does not perform special processing related to Slow IO. The system will release relevant resources and prepare to process the next read and write operation request. For example, in an everyday office computer, the user opens an ordinary document for editing, and the read and write operation speeds of the document are within the preset threshold range. The system will successfully complete the reading and writing operations of the document data, and the user can perform editing work normally without being disturbed by the Slow IO monitoring and processing mechanism.

[0104] See also Figure 6 As shown, in one embodiment, the step of determining whether the read / write information is recorded in the slow read / write statistics module includes:

[0105] S421, if yes, the read / write information is slow read / write information, and is recorded in the statistical error reporting module;

[0106] Specifically, when it is determined that the read / write information is slow read / write information (i.e., the read / write operation speed exceeds the time threshold and the information has not been recorded in the slow read / write statistics module, or although it has been recorded, the Slow IO event has new features or requires further attention), the system will record the read / write information in the statistical error reporting module. The statistical error reporting module is specifically used to collect and manage detailed information related to Slow IO for subsequent analysis and processing. The recorded information usually includes detailed parameters of the read / write operation, such as the operation type (read or write), the data block address involved in the operation, the start and end time of the operation, the operation speed (actual time consumed), and other contextual information that may be related to the operation (such as the current system load, other running processes, etc.).

[0107] For example, in an enterprise-level database server, a write operation to a key business table is judged as slow read and write information. The system will record the specific information of the write operation, including the location of the written data block in the database, the precise time from the initiation to the completion of the write operation, the actual write speed, and the overall load of the current database server (such as CPU usage, memory occupancy, the number of other database transactions in progress at the same time, etc.). These detailed information will provide rich data support for subsequent analysis of the cause of the Slow IO event, helping database administrators determine whether the Slow IO is caused by hardware failure (such as storage device performance degradation), software problems (such as database index damage), or system resource competition (such as too many concurrent transactions causing write queue congestion).

[0108] S422: If not, execute the read and write information and complete the operation.

[0109] Specifically, if the read / write information is not slow read / write information (i.e., the read / write operation speed does not exceed the time threshold), the system will directly allow the read / write operation to continue according to the normal process, complete the data reading or writing task, and then release the relevant resources to prepare for the next read / write operation request. During this process, the system will not perform special processing related to Slow IO on the read / write operation, such as recording it in the statistical error reporting module or performing additional analysis. This ensures that normal read / write operations can be completed at the fastest speed without introducing unnecessary delays due to the Slow IO monitoring mechanism.

[0110] For example, on an ordinary office computer, a user opens an office document for editing, and the document read and write operation speed is within the preset normal range. The system will smoothly read the document data from the SSD to the memory for the user to edit. When the user saves the edited document, the system will write the modified data back to the SSD. During the whole process, the read and write operations can be completed efficiently, and the user will not notice any freeze or delay caused by Slow IO monitoring.

[0111] See also Figure 7 As shown, in one embodiment, the step after recording the read and write information to the statistical error reporting module includes:

[0112] S4211, checking whether the error reporting mode in the statistical error reporting module configuration is turned on;

[0113] Specifically, after recording the read and write information to the statistical error reporting module, the system will first query the configuration parameters of the module to determine the setting status of the error reporting mode. This configuration parameter is pre-set during system initialization or user configuration, and is used to determine how the system reports errors when a Slow IO event occurs. The error reporting mode mainly has two options: automatic reporting and manual reporting.

[0114] S4212: If yes, enable automatic reporting, compare the read / write information with the overflow threshold and record it as an overflow threshold event;

[0115] Specifically, if the error reporting mode is turned on (i.e., automatic reporting mode), the system will enter the automatic reporting process. First, the system will obtain relevant data in the read and write information (such as the number of recorded Slow IO events, the frequency of event occurrence, etc.), and compare it with the overflow threshold pre-set in the slow read and write statistical overflow module. This overflow threshold is used to control the upper limit of the number of Slow IO event information recorded in the statistical error reporting module to prevent data overflow from causing information loss or system abnormalities.

[0116] If the relevant data in the read / write information reaches or exceeds the overflow threshold, the system will mark the current Slow IO event as an overflow threshold event and process it according to the pre-set automatic reporting rules. This usually includes generating detailed error report information, such as the time when the event occurred, the details of the read / write operations involved, the specific circumstances of reaching the overflow threshold, etc., and sending this information to the designated recipient, such as the system administrator's console, operation and maintenance management system or other related monitoring platforms.

[0117] S4213: If not, enable manual reporting, record the read and write information as the first event and wait for manual processing.

[0118] Specifically, if the error reporting mode is off (i.e., manual reporting mode), the system will execute the manual reporting process. At this time, the system will record the current read and write information as the first event in the statistical error reporting module (if there are no other Slow IO event records in the module), or record it in a certain order in the existing event list (if there are other event records). Then, the system will wait for the administrator or relevant operation and maintenance personnel to manually query the statistical error reporting module to obtain the Slow IO event information and process it.

[0119] While waiting for manual processing, the system may perform some basic prompts or record operations to remind the operation and maintenance personnel to check the Slow IO event records at an appropriate time. For example, a prompt message is recorded in the system log to indicate that there are unprocessed Slow IO events in the statistical error reporting module, or an unread event mark is displayed on the management interface, but no notification is actively sent to the operation and maintenance personnel.

[0120] Compared with the prior art, the method for counting slow read and write operations of SSD provided by this solution has the following advantages:

[0121] Beneficial effects:

[0122] Figure 8 Schematic block diagram of a device for counting slow read and write operations of an SSD provided in an embodiment of the present application. Figure 8 As shown, corresponding to the above-mentioned method for counting slow read and write operations of SSD, the present application further provides a device 400 for counting slow read and write operations of SSD. The device 400 for counting slow read and write operations of SSD includes a unit for executing the above-mentioned method for counting slow read and write operations of SSD, and the device can be configured in a terminal such as a desktop computer, a tablet computer, a laptop computer, etc.

[0123] Specifically, see Figure 8 As shown, the SSD slow read and write operation statistics device 500 includes:

[0124] The slow read / write statistics module 510 is used to control the statistics process of the slow read / write operation of the SSD; specifically, as the core control unit of the entire SSD slow read / write operation statistics device, the slow read / write statistics module 510 is responsible for coordinating and managing the interaction between other modules to ensure the smooth progress of the entire statistics process. From starting the statistics process to finally performing corresponding processing according to the comparison results of the read / write information and the configuration information, the slow read / write statistics module runs through the entire process and plays a key scheduling and decision-making role.

[0125] The configuration instruction generation module 520 is used to generate instructions for configuring the working parameters of the slow read and write statistics module; specifically, the configuration instruction generation module 520 is mainly responsible for generating instructions for configuring the working parameters of the slow read and write statistics module according to user requirements or system preset rules. These instructions determine the initial working mode and subsequent behavior of the entire SSD slow read and write operation statistics device, and are the basis for the entire statistics device to operate accurately and efficiently.

[0126] The slow read / write threshold module 530 is used to set a time threshold for slow read / write operations, so as to define whether the read / write operation belongs to the slow read / write category; specifically, the core function of the slow read / write threshold module 530 is to set a clear time standard for the read / write operation, so as to determine whether the read / write operation belongs to the slow read / write category. By setting this time threshold reasonably, the system can accurately identify slow read / write events that may affect system performance, and provide a key basis for subsequent statistics and processing.

[0127] The statistical error reporting module 540 is used to record the read and write information of slow read and write events and determine the error reporting method according to the configuration information; specifically, the statistical error reporting module 540 undertakes the important tasks of recording the detailed information of slow read and write events and determining the error reporting method according to the configuration. It not only provides a rich data source for subsequent troubleshooting and performance optimization, but also ensures that the system can promptly and effectively notify relevant personnel or systems about the occurrence of Slow IO events through flexible error reporting methods.

[0128] The slow read and write statistics overflow module 550 is used to set an overflow threshold to prevent data overflow when recording read and write information; specifically, the slow read and write statistics overflow module 550 is mainly used to manage the storage space of the statistical error reporting module when recording slow read and write event information, to prevent data overflow caused by recording too much Slow IO event information, thereby ensuring that the system can stably and reliably record and process Slow IO events, and at the same time take corresponding measures to optimize data storage and processing when the data volume is close to the overflow threshold.

[0129] The read / write operation instruction sending module 560 is used to send read / write operation instructions to the SSD according to the configuration information stored in the slow read / write statistics module, so that the SSD performs the read / write operation. Specifically, the read / write operation instruction sending module 560 serves as a bridge between the configuration information and the actual read / write operation. It is responsible for sending accurate read / write operation instructions to the SSD according to the configuration information stored in the slow read / write statistics module, ensuring that the SSD performs the read / write operation according to the predetermined requirements, thereby providing the entire statistics device with accurate read / write information for subsequent analysis and processing.

[0130] It should be noted that technicians in the relevant field can clearly understand that the specific implementation process of the above-mentioned SSD slow read and write operation statistics device and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.

[0131] The above-mentioned SSD slow read and write operation statistics device 500 can be implemented in the form of a computer program, and the computer program can be run on the computer device as shown in the figure.

[0132] See also Fig. 9 , Fig. 9 600 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 600 can be a terminal or a server, wherein the terminal can be an electronic device with communication functions such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device. The server can be an independent server or a server cluster composed of multiple servers.

[0133] See also Fig. 9 As shown, the computer device 600 includes a processor 620 , a memory, and a network interface 650 connected via a system bus 610 , wherein the memory may include a non-volatile storage medium 630 and an internal memory 640 .

[0134] The non-volatile storage medium 630 can store an operating system 631 and a computer program 632. The computer program 632 includes program instructions, and when the program instructions are executed, the processor 320 can execute a method for counting slow read and write operations of an SSD.

[0135] The processor 620 is used to provide computing and control capabilities to support the operation of the entire computer device 600 .

[0136] The internal memory 640 provides an environment for the operation of the computer program 632 in the non-volatile storage medium 630. When the computer program 632 is executed by the processor 620, the processor 620 can execute a method for counting slow read and write operations of an SSD.

[0137] The network interface 650 is used to communicate with other devices through a network. Fig. 9 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 600 to which the solution of the present application is applied. The specific computer device 600 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0138] It should be understood that in the embodiment of the present application, the processor 620 may be a central processing unit (CPU), and the processor 320 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0139] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0140] Therefore, the present application also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the following steps:

[0141] S100, enabling the slow read / write statistics process, opening the slow read / write statistics module inside the SSD and generating configuration instructions;

[0142] S200, generating configuration information according to the configuration instruction, and storing the configuration information in the slow read / write statistics module;

[0143] S300, issuing a read / write operation instruction based on the configuration information to generate read / write information;

[0144] S400: Compare the configuration information with the read / write information to obtain corresponding statistical results or perform corresponding operations.

[0145] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.

[0146] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0147] The non-Company software tools or components appearing in the embodiments of this application are merely examples and do not represent actual use.

[0148] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0149] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present application can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0150] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present application.

[0151] The above are only specific implementations 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 various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for counting slow read and write operations of SSD, characterized in that: The following steps are involved: Enable the slow read and write statistics process, open the slow read and write statistics module inside the SSD and generate configuration instructions; Generate configuration information according to the configuration instruction, and store the configuration information in the slow read and write statistics module; Based on the configuration information, read and write operation instructions are issued to generate read and write information; The configuration information is compared with the read / write information to obtain corresponding statistical results or perform corresponding operations.

2. The method for counting slow read and write operations of SSD according to claim 1, characterized in that: The step of generating configuration information according to the configuration instruction and storing the configuration information in the slow read / write statistics module comprises: Determine whether it is necessary to set the slow read / write threshold module configuration; If necessary, the time threshold of the slow read / write threshold module is set to define the slow read / write time boundary value, and determine whether a statistical error reporting module needs to be configured; If not, determine whether the statistical error reporting module needs to be configured.

3. The method for counting slow read and write operations of SSD according to claim 2, characterized in that: The step of determining whether the statistical error reporting module needs to be configured comprises: If necessary, configure the statistical error reporting module and issue read and write operation instructions based on the configuration information; If not necessary, a read / write operation instruction is issued based on the existing configuration information.

4. The method for counting slow read and write operations of SSD according to claim 3, characterized in that: The step of configuring the statistical error reporting module comprises: Set the overflow threshold of the slow read / write statistics overflow module to determine the threshold to prevent overflow when recording slow read / write event information; A read and write operation instruction is issued based on the overflow threshold.

5. The method for counting slow read and write operations of SSD according to claim 4, characterized in that: The step of comparing the configuration information with the read-write information to obtain a corresponding result includes: Determining whether the operation speed of reading and writing information exceeds the time threshold; If yes, determining whether the read / write information is recorded in the slow read / write statistics module; If not, the read and write information is executed and the operation is completed.

6. The method for counting slow read and write operations of SSD according to claim 5, characterized in that: The step of determining whether the read / write information is recorded in the slow read / write statistics module comprises: If yes, the read / write information is slow read / write information, which is recorded in the statistical error reporting module; If not, run the read and write information and complete the operation.

7. The method for counting slow read and write operations of SSD according to claim 6, characterized in that: The step after recording the read and write information to the statistical error reporting module includes: Check whether the error reporting mode in the statistical error reporting module configuration is turned on; If yes, automatic reporting is enabled, the read / write information is compared with the overflow threshold and recorded as an overflow threshold event; If not, manual reporting is enabled, the read and write information is recorded as the first event and waits for manual processing.

8. A device for counting slow read and write operations of SSD, characterized in that: The device comprises: Slow read and write statistics module, used to control the statistics process of SSD slow read and write operations; Configuration instruction generation module, used for configuring instructions of working parameters of slow read and write statistics module; The slow read / write threshold module is used to set the time threshold of slow read / write operations to determine whether the read / write operation belongs to the slow read / write category; The statistical error reporting module is used to record the read and write information of slow read and write events and determine the error reporting method based on the configuration information; Slow read and write statistics overflow module, used to set overflow thresholds to prevent data overflow when recording read and write information; The read / write operation instruction sending module is used to send the read / write operation instructions to the SSD according to the configuration information stored in the slow read / write statistics module, so that the SSD performs the read / write operation.

9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method according to any one of claims 1 to 7 can be implemented.