CN114936124A - Disk-based IO time-consuming monitoring method, system, storage medium and equipment - Google Patents

Disk-based IO time-consuming monitoring method, system, storage medium and equipment Download PDF

Info

Publication number
CN114936124A
CN114936124A CN202210466856.2A CN202210466856A CN114936124A CN 114936124 A CN114936124 A CN 114936124A CN 202210466856 A CN202210466856 A CN 202210466856A CN 114936124 A CN114936124 A CN 114936124A
Authority
CN
China
Prior art keywords
processing process
disk
time
monitoring
tracking point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210466856.2A
Other languages
Chinese (zh)
Inventor
刘骏
张旭芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210466856.2A priority Critical patent/CN114936124A/en
Publication of CN114936124A publication Critical patent/CN114936124A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0727Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a storage system, e.g. in a DASD or network based storage system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a disk-based IO time consumption monitoring method, a system, a storage medium and equipment, wherein the method comprises the following steps: responding to the monitored file system to generate an IO request, monitoring the total process of reading and writing data corresponding to the IO request to a disk through a monitoring program, wherein the total process sequentially comprises a system kernel processing process, an IO scheduling program processing process and a hardware processing process; respectively obtaining IO consumed time of a system kernel processing process, an IO scheduler processing process and a hardware processing process in the monitoring process, and respectively judging whether each IO consumed time exceeds a corresponding preset threshold value; and sending corresponding alarm information in response to the fact that the consumed time of the plurality of IO items exceeds the corresponding preset threshold value. The method and the device determine which process has a problem when the IO time consumption is high by monitoring the kernel processing process, the IO scheduler processing process and the hardware processing process of the system and monitoring the IO time consumption so as to take corresponding repair measures and ensure the normal read-write performance of the disk IO.

Description

Disk-based IO time-consuming monitoring method, system, storage medium and equipment
Technical Field
The invention relates to the technical field of storage, in particular to an IO time-consuming monitoring method, system, storage medium and device based on a disk.
Background
In the working process of the server, when the performance of the disk is reduced due to high time consumption of IO (data Input/Output) occurring in the disk, the possible causes are a problem of a system kernel, a problem of an IO scheduling policy, and a problem in the related hardware of the disk.
In the system kernel, the performance of the disk may be poor or the disk may not be read or written normally due to IO task backlog caused by too high processor occupancy rate, insufficient memory, and timeout interrupt processing, or due to the processor, PCIE (peripheral component interconnect express), power saving settings related to the operating system, or reasons related to the kernel BUG and the disk drive BUG.
In the aspect of the IO scheduling policy, since the IO scheduling policy is used to manage the request queue of the block device, it determines the queue order of the requests in the queue and at what time point to dispatch the requests to the disk device, so as to reduce the addressing time of the disk and improve the global throughput. The method mainly comprises a prediction IO (input/output) scheduling program, a completely fair queuing IO scheduling program, a deadline IO scheduling program, a no-operation IO scheduling program and the like. For different disk types, different IO schedulers are used, different IO performances can be achieved, for example, the performance of the IO scheduler for the use deadline of the solid state disk is higher, the performance of the IO scheduler for the mechanical hard disk to use a completely fair queuing is better, and the IO performance of the disk is affected if the improper IO scheduler is used.
In terms of disk-related hardware, although the capacity and performance of a disk are continuously improved along with the development of technology, a bad track of a mechanical hard disk and a bad block of a solid state hard disk are inevitable during the use process of the disk. The bad track of the mechanical hard disk is mostly caused by vibration, impact or abnormal power failure, and the like, when the hard disk is electrified to work, the magnetic recording material on the surface of the disk is possibly damaged due to slight vibration or extrusion because the distance between the disk which runs at a high speed and the magnetic head is very small, so that the bad track is generated; although the solid state disk has no mechanical moving part and does not have the problem of physical bad track, the flash memory particles of the solid state disk have the problems of erasing times and bad blocks, and the repeated erasing and writing of a specific memory unit can accelerate the generation of the bad blocks. When a bad track or a bad block occurs on the disk, the data at the corresponding position may have the problems of difficult reading and writing and repeated retry reading and writing of the magnetic head or the storage unit, which will affect the performance of the data IO and cause the problem of abnormal performance of the corresponding disk; and if the data is not repaired or isolated in time, the data can generate destructive influence on the capacity of the disk along with the continuous accumulation and diffusion of bad blocks or bad tracks of the disk, and even the disk can not be read or written or can fail.
When a disk IO exception is found and an IO performance problem of a disk is handled, a system monitoring tool iostat and blktrace are generally used for analysis. The iostat tool cannot distinguish the time consumption of system software and hardware and cannot be used as an index for evaluating the performance of the hardware. The blktrace tool can record the timestamp and the time consumption percentage of each stage of each IO experience in the monitored time interval, but it can only reflect the time consumption of a file system block (block) and cannot reflect the time consumption of reading and writing a physical disk sector (sector).
Disclosure of Invention
In view of the above, the present invention provides a disk-based IO time consumption monitoring method, system, storage medium and device, which are used to specifically and comprehensively monitor IO time consumption of a disk.
Based on the above purpose, the present invention provides a disk-based IO time-consuming monitoring method, which includes the following steps:
responding to the IO request generated by the file system, monitoring the total process of reading and writing data corresponding to the IO request to a disk through a monitoring program, wherein the total process sequentially comprises a system kernel processing process, an IO scheduling program processing process and a hardware processing process;
respectively obtaining IO consumed time of a system kernel processing process, an IO scheduler processing process and a hardware processing process in the monitoring process, and respectively judging whether each IO consumed time exceeds a corresponding preset threshold value;
and sending corresponding alarm information in response to the fact that the consumed time of the plurality of IO items exceeds the corresponding preset threshold value.
In some embodiments, the method further comprises:
and the total process is divided into a system kernel processing process, an IO scheduler processing process and a hardware processing process in sequence through a first tracking point function, a second tracking point function, a third tracking point function and a fourth tracking point function.
In some embodiments, obtaining the IO time consumption of the system kernel processing procedure, the IO scheduler processing procedure, and the hardware processing procedure in the monitoring procedure respectively includes:
responding to a system kernel processing process and an IO scheduling program processing process to process a disk block of a disk, sequentially calling a first tracking point function, a second tracking point function and a third tracking point function, and respectively recording first calling time;
calculating the time difference of the first calling time of the first tracking point function and the second tracking point function to be used as IO time consumption of the system kernel processing process;
calculating the time difference of the first calling time of the second tracking point function and the third tracking point function to be used as IO time consumption of the IO scheduling program processing process; and
responding to the hardware processing process to process the disk sector of the disk, sequentially calling a third tracking point function and a fourth tracking point function, and respectively recording second calling time;
and calculating the time difference of the second calling time of the third tracking point function and the fourth tracking point function to be used as the IO time consumption of the hardware processing process.
In some embodiments, the method further comprises:
and responding to the IO time consumption of the system kernel processing process, the IO dispatcher processing process and the hardware processing process, acquiring the name of the disk and the information of the disk block and the disk sector, and outputting the information to the monitoring result.
In some embodiments, the method further comprises:
and setting a preset threshold corresponding to each IO consumed time based on the time delay requirement of the service scene.
In some embodiments, the method further comprises:
and determining a corresponding repair strategy based on the corresponding alarm information.
In some embodiments, the repair policy includes upgrading a configuration of a system kernel and/or adjusting an IO scheduler and/or repairing a disk.
In another aspect of the present invention, a disk-based IO time-consuming monitoring system is further provided, including:
the monitoring module is configured to respond to the monitoring of the IO request generated by the file system, and monitor the total process of reading and writing data corresponding to the IO request to a disk through a monitoring program, wherein the total process sequentially comprises a system kernel processing process, an IO scheduling program processing process and a hardware processing process;
the IO time consuming module is configured to respectively obtain IO time consumption of a system kernel processing process, an IO scheduler processing process and a hardware processing process in the monitoring process, and respectively judge whether each IO time consumption exceeds a corresponding preset threshold; and
and the alarm module is configured to respond to the fact that the consumed time of the plurality of IO items exceeds the corresponding preset threshold value and send out corresponding alarm information.
In yet another aspect of the present invention, a computer-readable storage medium is also provided, storing computer program instructions, which when executed by a processor, implement the above-described method.
In yet another aspect of the present invention, a computer device is further provided, which includes a memory and a processor, the memory storing a computer program, and the computer program executing the method when executed by the processor.
The invention has at least the following beneficial technical effects:
according to the disk-based IO time consumption monitoring method, the whole process from the generation of the IO request by the file system to the reading and writing of the corresponding data to the physical disk is subjected to detailed positioning, so that the kernel processing process, the IO scheduler processing process and the hardware processing process of the system are monitored, and the specific process that the IO time consumption is high is determined by monitoring the IO time consumption, so that the corresponding solution is convenient to provide, the corresponding repair measures are taken early, the greater influence is avoided, and the reading and writing performance of the disk IO is ensured to be normal.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic diagram of a disk-based IO time-consuming monitoring method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a disk-based IO time-consuming monitoring system according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a computer-readable storage medium for implementing a disk-based IO time-consuming monitoring method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a hardware structure of a computer device executing a disk-based IO time-consuming monitoring method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two non-identical entities with the same name or different parameters, and it is understood that "first" and "second" are only used for convenience of expression and should not be construed as limiting the embodiments of the present invention. Furthermore, the terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements does not include all of the other steps or elements inherent in the list.
Based on the above purpose, a first aspect of the embodiments of the present invention provides an embodiment of a disk-based IO time-consuming monitoring method. Fig. 1 is a schematic diagram illustrating an embodiment of a disk-based IO time-consuming monitoring method according to the present invention. As shown in fig. 1, the embodiment of the present invention includes the following steps:
step S10, responding to the monitored file system to generate an IO request, monitoring the total process of reading and writing data corresponding to the IO request to a disk through a monitoring program, wherein the total process sequentially comprises a system kernel processing process, an IO scheduling program processing process and a hardware processing process;
step S20, respectively acquiring IO consumed time of a system kernel processing process, an IO scheduler processing process and a hardware processing process in the monitoring process, and respectively judging whether each IO consumed time exceeds a corresponding preset threshold;
and step S30, responding to the fact that the consumed time of a plurality of IO items exceeds the corresponding preset threshold value, and sending out corresponding alarm information.
In the embodiment of the present invention, IO represents data Input/Output. From the principle of disk IO correlation, a disk block (block) is the minimum storage unit for file system reading and writing in the system, and a sector (sector) is the minimum storage unit for physical disk reading and writing. When an IO request is generated from the file system to write to a physical disk, it goes through several processes, the most important of which are as follows:
q-to-be-generated bio read-write request (bio is a core data structure of a general block layer in the linux kernel, which describes IO operation of block devices, and links memory buffer areas and the block devices);
x-split IO request;
g-distributing and generating an IO request;
the I-IO request enters an IO scheduling queue;
m-scheduling a merged IO request;
d, submitting the final IO request to a driver;
c-driver submits the IO request to hardware;
the process from Q to i (Q to i) is mainly processed by the kernel in the system software layer (i.e. system kernel processing process); the process from I to D (I to D) is IO scheduler processing (i.e. IO scheduler processing process); the process from D to c (D to c) is a process of hardware layer processing (i.e., a hardware processing process).
According to the disk-based IO time consumption monitoring method, the whole process from the generation of the IO request by the file system to the reading and writing of the corresponding data to the physical disk is subjected to detailed positioning, so that the kernel processing process, the IO scheduler processing process and the hardware processing process of the system are monitored, and the specific process that the IO time consumption is high is determined by monitoring the IO time consumption, so that a corresponding solution is provided conveniently, the corresponding repair measures are taken as soon as possible, the greater influence is avoided, and the read and write performance of the disk IO is ensured to be normal.
In some embodiments, the method further comprises: and the total process is divided into a system kernel processing process, an IO scheduler processing process and a hardware processing process in sequence through a first tracking point function, a second tracking point function, a third tracking point function and a fourth tracking point function.
In some embodiments, obtaining the IO time consumption of the system kernel processing procedure, the IO scheduler processing procedure, and the hardware processing procedure in the monitoring procedure respectively includes: responding to a system kernel processing process and an IO scheduling program processing process to process a disk block of a disk, sequentially calling a first tracking point function, a second tracking point function and a third tracking point function, and respectively recording first calling time; calculating the time difference of the first calling time of the first tracking point function and the second tracking point function to be used as IO time consumption of the system kernel processing process; calculating the time difference of the first calling time of the second tracking point function and the third tracking point function to be used as IO time consumption of the IO scheduling program processing process; responding to the hardware processing process to process the disk sector of the disk, sequentially calling a third tracking point function and a fourth tracking point function, and respectively recording second calling time; and calculating the time difference of the second calling time of the third tracking point function and the fourth tracking point function to be used as the IO time consumption of the hardware processing process.
In some embodiments, the method further comprises: and responding to the IO time consumption of the system kernel processing process, the IO dispatcher processing process and the hardware processing process, acquiring the name of the disk and the information of the disk block and the disk sector, and outputting the information to the monitoring result.
In some embodiments, the method further comprises: and setting a preset threshold corresponding to each IO consumed time based on the time delay requirement of the service scene.
In some embodiments, the method further comprises: and determining a corresponding repair strategy based on the corresponding alarm information.
In some embodiments, the repair policy includes upgrading a configuration of a system kernel and/or adjusting an IO scheduler and/or repairing a disk.
The following is a specific embodiment of the IO time-consuming monitoring method based on a disk of the present invention:
1. the Systemtap environment is deployed (Systemtap is a dynamic method of monitoring and tracking the operation of the running linux kernel):
the following packages for the corresponding kernel versions need to be installed:
kernel-level, kernel-debug fo-common, gcc, and systemtap.
2. Using a built-in systetatap program of a system, compiling a disk IO time consumption monitoring program IOTimemonitoring. stp, and monitoring Q, I, D, C four stages of tracking point functions of an IO request processed by a kernel in the whole process from the generation of the IO request by a file system to the reading and writing of a physical disk, wherein the four tracking point functions are as follows:
q: trace _ block _ bio _ queue (i.e., the first trace point function);
i: trace _ block _ rq _ insert (i.e., the second trace point function);
d: trace _ block _ rq _ issue (i.e., the third tracepoint function);
c: trace _ block _ rq _ complete (i.e., the fourth tracepoint function);
for the system software processes of Q to I and I to D, the time consumed by monitoring the disk block (block) is monitored. The monitor records Q, I, D microsecond (us) system time stamps each time a processing disk block (block) calls three tracking point functions, which are obtained by calling the system function gettimeoffset _ us (), and calculates the time difference between the two processes Q to I and I to D, which is the time consumption of the two processes Q to I and I to D.
For the hardware process of D to C, it takes time to monitor the disk sector (sector). The monitor records the microsecond (us) system timestamp of each time the disk sector (sector) call D, C is processed for two tracking point functions, and calculates the time difference of the D to C process, which is the time consumption of the D to C process.
After the time consumption of the Q to I, I to D and D to C processes is obtained, the information of the currently called and processed disk name, disk block (block) and disk sector (sector) is analyzed through a request queue data structure request _ queue, a system function ctime () is called to obtain the current system time, and the information and the IO time consumption are output to a monitoring result.
3. In the monitoring process, for different service scenes, thresholds with high consumed time can be respectively set, when the time is higher than the threshold, an overtime alarm is sent, for example, for scenes requiring low time delay, such as database application, the threshold can be set to be lower, and for scenes requiring less sensitivity to the time delay, the threshold can be set to be higher, so as to avoid frequent alarm.
4. In the monitoring result, the problem of high time consumption caused by the system kernel, the IO scheduling policy or the disk related hardware (bad channel or bad block) can be distinguished through the process time consumption of Q to I, I to D and D to C, so that corresponding repair measures (configuration upgrading of the kernel, adjustment of the IO scheduling policy, upgrading of disk related drive/firmware, isolation or repair of bad block and bad channel, replacement of damaged disk and the like) can be taken as soon as possible, greater influence is avoided, and the read-write performance of the disk IO is ensured to be normal.
The concrete repair measures can be divided into:
problems for the system kernel: attempts may be made to adjust the energy saving settings of the processor, PCIE, operating system, upgrade kernel patches, etc.;
the problem aiming at the IO scheduling strategy is as follows: an attempt may be made to adjust the IO scheduling policy;
problems with disk related hardware: attempts may be made to upgrade disk-related drives/firmware, isolate or repair related bad block bad tracks, or replace damaged disks, etc.
5. And deploying a running disk IO time-consuming monitoring program IOTimeMonitoring.
6. The deployed disk IO time consumption monitoring program IOTimeMonitoring. stp can be compiled to generate an executable module file (such as a ko file), and the module file can be put to other machines without Systemtap environment for operation, so that deployment monitoring is facilitated. The module executable file can be directly run on other machines, and monitoring is started.
In the embodiment, through monitoring the consumed time of the disk blocks (blocks) and the sectors (sectors) in the whole process from the generation of the IO request by the file system to the reading and writing of the physical disk, the disk block (block) and the physical sector (sector) numbers with high read and write consumed time are obtained, the threshold values with high consumed time are respectively set, an alarm is given when the threshold values are higher, and the problem of high consumed time caused by a system kernel, an IO scheduling policy or disk related hardware (bad track or bad block) can be distinguished, so that a corresponding repair measure can be taken as soon as possible, the greater influence of IO is avoided, and the read and write performance of the disk is ensured to be normal.
In a second aspect of the embodiment of the present invention, a disk-based IO time-consuming monitoring system is further provided. Fig. 2 is a schematic diagram illustrating an embodiment of a disk-based IO time-consuming monitoring system provided in the present invention. As shown in fig. 2, an IO time-consuming monitoring system based on a disk includes: the monitoring module 10 is configured to respond to monitoring that the file system generates an IO request, and monitor a total process of reading and writing data corresponding to the IO request to a disk through a monitoring program, where the total process sequentially includes a system kernel processing process, an IO scheduler processing process, and a hardware processing process; the IO time consuming module 20 is configured to obtain IO time consumptions of the system kernel processing process, the IO scheduler processing process, and the hardware processing process in the monitoring process, and respectively determine whether each IO time consumption exceeds a corresponding preset threshold; and an alarm module 30 configured to send corresponding alarm information in response to that the plurality of items of IO consumed time exceed the corresponding preset threshold.
According to the disk-based IO time-consuming monitoring system, the whole process from the generation of the IO request by the file system to the reading and writing of the corresponding data to the physical disk is subjected to detailed positioning, so that the kernel processing process, the IO scheduler processing process and the hardware processing process of the system are monitored, and the specific process that the IO time-consuming process is high is determined by monitoring the IO time-consuming process, so that a corresponding solution is provided conveniently, the corresponding repair measures are taken as early as possible, the greater influence is avoided, and the read-write performance of the disk IO is ensured to be normal.
In a third aspect of the embodiment of the present invention, a computer-readable storage medium is further provided, and fig. 3 is a schematic diagram of a computer-readable storage medium for implementing a disk-based IO time-consuming monitoring method according to an embodiment of the present invention. As shown in fig. 3, the computer-readable storage medium 3 stores computer program instructions 31. The computer program instructions 31 when executed by a processor implement the steps of:
responding to the monitored file system to generate an IO request, monitoring the total process of reading and writing data corresponding to the IO request to a disk through a monitoring program, wherein the total process sequentially comprises a system kernel processing process, an IO scheduling program processing process and a hardware processing process;
respectively obtaining IO consumed time of a system kernel processing process, an IO scheduler processing process and a hardware processing process in the monitoring process, and respectively judging whether each IO consumed time exceeds a corresponding preset threshold value;
and sending corresponding alarm information in response to the fact that the consumed time of the plurality of IO items exceeds the corresponding preset threshold value.
In some embodiments, the steps further comprise:
and the total process is divided into a system kernel processing process, an IO scheduler processing process and a hardware processing process in sequence through a first tracking point function, a second tracking point function, a third tracking point function and a fourth tracking point function.
In some embodiments, obtaining the IO time consumption of the system kernel processing procedure, the IO scheduler processing procedure, and the hardware processing procedure in the monitoring procedure respectively includes:
responding to a system kernel processing process and an IO scheduling program processing process to process a disk block of a disk, sequentially calling a first tracking point function, a second tracking point function and a third tracking point function, and respectively recording first calling time;
calculating the time difference of the first calling time of the first tracking point function and the second tracking point function to be used as IO time consumption of the system kernel processing process;
calculating the time difference of the first calling time of the second tracking point function and the third tracking point function to be used as IO time consumption of the IO scheduling program processing process; and
responding to the hardware processing process to process the disk sector of the disk, sequentially calling a third tracking point function and a fourth tracking point function, and respectively recording second calling time;
and calculating the time difference of the second calling time of the third tracking point function and the fourth tracking point function to be used as IO time consumption of the hardware processing process.
In some embodiments, the steps further comprise: and responding to the IO time consumption of the system kernel processing process, the IO dispatcher processing process and the hardware processing process, acquiring the name of the disk and the information of the disk block and the disk sector, and outputting the information to the monitoring result.
In some embodiments, the steps further comprise: and setting a preset threshold corresponding to each IO consumed time based on the time delay requirement of the service scene.
In some embodiments, the steps further comprise: and determining a corresponding repair strategy based on the corresponding alarm information.
In some embodiments, the repair policy includes upgrading a configuration of a system kernel and/or adjusting an IO scheduler and/or repairing a disk.
It should be understood that all the embodiments, features and advantages set forth above with respect to the disk-based IO time-consuming monitoring method according to the present invention are equally applicable to the disk-based IO time-consuming monitoring system and the storage medium according to the present invention without conflicting with each other.
In a fourth aspect of the embodiments of the present invention, there is further provided a computer device, including a memory 402 and a processor 401 as shown in fig. 4, where the memory 402 stores therein a computer program, and the computer program, when executed by the processor 401, implements the method of any one of the above embodiments.
Fig. 4 is a schematic diagram of a hardware structure of an embodiment of a computer device for executing a disk-based IO time-consuming monitoring method according to the present invention. Taking the computer device shown in fig. 4 as an example, the computer device includes a processor 401 and a memory 402, and may further include: an input device 403 and an output device 404. The processor 401, the memory 402, the input device 403 and the output device 404 may be connected by a bus or other means, and fig. 4 illustrates an example of a connection by a bus. The input device 403 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the disk-based IO time-consuming monitoring system. The output device 404 may include a display device such as a display screen.
The memory 402, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the disk-based IO time-consuming monitoring method in this embodiment of the present application. The memory 402 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by use of the disk-based IO time-consuming monitoring method, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 402 may optionally include memory located remotely from processor 401, which may be connected to local modules via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor 401 executes various functional applications and data processing of the server by running the nonvolatile software program, instructions and modules stored in the memory 402, that is, the disk-based IO time-consuming monitoring method of the above-described method embodiment is implemented.
Finally, it should be noted that the computer-readable storage medium (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which can act as external cache memory. By way of example and not limitation, RAM is available in a variety of forms such as synchronous RAM (DRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items. The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant only to be exemplary, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. An IO time consumption monitoring method based on a disk is characterized by comprising the following steps:
responding to the monitored file system to generate an IO request, monitoring the total process of reading and writing data corresponding to the IO request to a disk through a monitoring program, wherein the total process sequentially comprises a system kernel processing process, an IO scheduling program processing process and a hardware processing process;
respectively obtaining IO consumed time of the system kernel processing process, the IO dispatcher processing process and the hardware processing process in the monitoring process, and respectively judging whether each IO consumed time exceeds a corresponding preset threshold value;
and sending corresponding alarm information in response to the fact that the consumed time of the plurality of IO items exceeds the corresponding preset threshold value.
2. The method of claim 1, further comprising:
and dividing the total process into the system kernel processing process, the IO dispatcher processing process and the hardware processing process in sequence through a first tracking point function, a second tracking point function, a third tracking point function and a fourth tracking point function.
3. The method according to claim 2, wherein obtaining IO time consumption of the system kernel processing procedure, the IO scheduler processing procedure, and the hardware processing procedure in a monitoring procedure respectively comprises:
responding to the system kernel processing process and the IO dispatcher processing process to process the disk block of the disk, sequentially calling the first tracking point function, the second tracking point function and the third tracking point function, and respectively recording first calling time;
calculating the time difference of the first calling time of the first tracking point function and the second tracking point function to be used as the IO time consumption of the system kernel processing process;
calculating the time difference of the first calling time of the second tracking point function and the third tracking point function to be used as the IO time consumption of the IO scheduling program processing process; and
responding to the hardware processing process to process the disk sector of the disk, sequentially calling the third tracking point function and the fourth tracking point function, and respectively recording second calling time;
and calculating the time difference of the second calling time of the third tracking point function and the fourth tracking point function to be used as the IO time consumption of the hardware processing process.
4. The method of claim 3, further comprising:
and responding to the IO time consumption of the system kernel processing process, the IO dispatcher processing process and the hardware processing process, acquiring the name of the disk and the information of the disk block and the disk sector, and outputting the information to a monitoring result.
5. The method of claim 1, further comprising:
and setting a preset threshold corresponding to each IO consumed time based on the time delay requirement of the service scene.
6. The method of claim 1, further comprising:
and determining a corresponding repair strategy based on the corresponding alarm information.
7. The method of claim 6, wherein the repair policy comprises upgrading a configuration of the system kernel and/or adjusting the IO scheduler and/or repairing the disk.
8. A disk-based IO time-consuming monitoring system is characterized by comprising:
the system comprises a monitoring module, a data reading and writing module and a data reading and writing module, wherein the monitoring module is configured to respond to monitoring that a file system generates an IO request, and monitor the total process of reading and writing data corresponding to the IO request to a disk through a monitoring program, and the total process sequentially comprises a system kernel processing process, an IO scheduling program processing process and a hardware processing process;
the IO time consuming module is configured to obtain IO time consumption of the system kernel processing process, the IO scheduler processing process and the hardware processing process in the monitoring process respectively, and judge whether each IO time consumption exceeds a corresponding preset threshold value respectively; and
and the alarm module is configured to respond to the fact that the consumed time of the plurality of IO items exceeds the corresponding preset threshold value and send out corresponding alarm information.
9. A computer-readable storage medium, characterized in that computer program instructions are stored which, when executed by a processor, implement the method according to any one of claims 1-7.
10. A computer arrangement comprising a memory and a processor, characterized in that a computer program is stored in the memory, which computer program, when being executed by the processor, is adapted to carry out the method of any one of the claims 1-7.
CN202210466856.2A 2022-04-29 2022-04-29 Disk-based IO time-consuming monitoring method, system, storage medium and equipment Pending CN114936124A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210466856.2A CN114936124A (en) 2022-04-29 2022-04-29 Disk-based IO time-consuming monitoring method, system, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210466856.2A CN114936124A (en) 2022-04-29 2022-04-29 Disk-based IO time-consuming monitoring method, system, storage medium and equipment

Publications (1)

Publication Number Publication Date
CN114936124A true CN114936124A (en) 2022-08-23

Family

ID=82861610

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210466856.2A Pending CN114936124A (en) 2022-04-29 2022-04-29 Disk-based IO time-consuming monitoring method, system, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN114936124A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101616174A (en) * 2009-07-09 2009-12-30 浪潮电子信息产业股份有限公司 A kind of storage system IO handles the method that the path dynamic tracking realizes the optimization system performance

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101616174A (en) * 2009-07-09 2009-12-30 浪潮电子信息产业股份有限公司 A kind of storage system IO handles the method that the path dynamic tracking realizes the optimization system performance

Similar Documents

Publication Publication Date Title
US8627158B2 (en) Flash array built in self test engine with trace array and flash metric reporting
CN100549967C (en) Be used for executive system and render a service the method and system of assessment
CN100440163C (en) Method and system for analysis processing of computer program
EP3216027B1 (en) Test of semiconductor storage power consumption on basis of executed access commands
CN111324303B (en) SSD garbage recycling method, SSD garbage recycling device, computer equipment and storage medium
US20130096880A1 (en) System test method
US11231854B2 (en) Methods and apparatus for estimating the wear of a non-volatile memory
US20090204946A1 (en) Intelligent software code updater
CN110610740A (en) Test unit, method and system, controller and storage device
US11366714B2 (en) Behavior-driven die management on solid-state drives
JP5308098B2 (en) Information processing apparatus test program and method
US20070050677A1 (en) Noise accommodation in hardware and software testing
CN113946499A (en) Micro-service link tracking and performance analysis method, system, equipment and application
CN115639971B (en) Data writing method, data writing device, electronic device, storage medium, and program product
CN115113890A (en) Automatic deployment method, system, equipment and medium of terminal software
CN108595323B (en) System testing method and related device
CN112133357B (en) eMMC test method and device
CN114936124A (en) Disk-based IO time-consuming monitoring method, system, storage medium and equipment
CN112965845A (en) Delay analysis method, electronic device, and storage medium
KR101575369B1 (en) Method for writing to and erasing a non-volatile memory
CN210984287U (en) Test unit, system, controller and storage device
WO2014155228A1 (en) A primary memory module with a record of usage history and applications of the primary memory module to a computer system
CN111404715B (en) Network service instantiation method and device, electronic equipment and storage medium
US9244832B1 (en) Cache learning model
JP2015108986A (en) Information processing apparatus, test instruction string for information processing apparatus, and testing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination