A blocking dirty page write-back monitoring method, device, equipment and storage medium

By monitoring and recording the blocking information of target tasks in the operating system and recording relevant information in the system log, the defects in the prior art that it is difficult to quickly and accurately locate blocking dirty page writebacks lead to performance degradation, and fast and accurate positioning and analysis are achieved, and work efficiency is improved.

CN114201329BActive Publication Date: 2025-04-01INSPUR BUSINESS MACHINE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111553067.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-17
Publication Date
2025-04-01
Estimated Expiration
2041-12-17

AI Technical Summary

Technical Problem

The prior art is difficult to quickly and accurately locate application performance degradation caused by obstructive dirty page writeback, resulting in cumbersome analysis processes for users.

Method used

By monitoring the blocking information when the target task in the operating system is blocked and saving it to the target system file based on the process file system, it is determined whether the target task triggers the blocking dirty page write back operation, and records relevant information in the system log to quickly and accurately locate the specific cause.

Benefits of technology

It realizes rapid and accurate positioning of the specific reasons for writing back obstructive dirty pages, saves time in problem analysis and search, and improves the work efficiency of application developers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114201329B_ABST
    Figure CN114201329B_ABST
Patent Text Reader

Abstract

The present application discloses a blocking dirty page writeback monitoring method, device, equipment and storage medium, including: when it is monitored that a target task in the current operating system is blocked, then the blocking information related to the target task being blocked is obtained, and the blocking information is saved in a target system file created based on a process file system; according to the blocking information, it is determined whether the target task has triggered a blocking dirty page writeback operation; if the target task has triggered a blocking dirty page writeback operation, then the relevant target task information is recorded in a system log, so as to determine the specific cause of the blocking from the target system file through the target task information. The present application records the blocking information when a blocking dirty page writeback occurs in a target system file created by a process file system, and records the relevant information in a system log, so as to quickly and accurately locate the specific cause of the blocking dirty page writeback through the system log information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a blocking dirty page write-back monitoring method, device, equipment and storage medium. Background Art

[0002] At present, the operating system generates dirty pages when reading and writing files, and then writes the dirty pages back to the disk through a certain mechanism to ensure that data is not lost. For example, there are two mainstream write-back mechanisms in the Linux operating system. One is to periodically wake up the daemon thread for write-back; the other is to determine whether the current number of dirty pages exceeds the threshold when writing files. If it exceeds, the current task is blocked and the daemon thread is woken up to complete the data write operation. This mechanism will affect the performance of the current task.

[0003] However, when analyzing the blocking writeback of dirty pages, due to the lack of corresponding logs and information, even if the application has obvious performance degradation, it is impossible to locate the relevant problems in a timely and accurate manner. Users must go through a very tedious analysis process to locate the relevant problems, which is a great challenge for upper-level application developers. Therefore, it is very necessary to monitor the application performance degradation caused by blocking dirty page writeback in the system. Summary of the invention

[0004] In view of this, the purpose of this application is to provide a blocking dirty page write-back monitoring method, device, equipment and storage medium, which can quickly and accurately locate the specific cause of blocking dirty page write-back through system log information. The specific scheme is as follows:

[0005] In a first aspect, the present application discloses a blocking dirty page write-back monitoring method, comprising:

[0006] When it is detected that the target task in the current operating system is blocked, the blocking information related to the target task being blocked is obtained, and the blocking information is saved in a target system file created based on the process file system;

[0007] Determining whether the target task triggers a blocking dirty page write-back operation according to the blocking information;

[0008] If the target task triggers a blocking dirty page write-back operation, relevant target task information is recorded in the system log, so that the specific blocking cause can be determined from the target system file through the target task information.

[0009] Optionally, when it is detected that the target task in the current operating system is blocked, the blocking information related to the target task being blocked is obtained, and the blocking information is saved in a target system file created based on the process file system, including:

[0010] When it is monitored that the target task in the current Linux operating system is blocked, the number of dirty pages of the CPU where the target task is located and the number of residual dirty pages of the current Linux operating system are obtained, and the target number of dirty pages and the number of residual dirty pages are obtained respectively, and the target number of dirty pages and the number of residual dirty pages are saved in the target system file created based on the procfs process file system.

[0011] Optionally, judging whether the target task triggers a blocking dirty page write-back operation according to the blocking information includes:

[0012] Determine whether the target dirty page quantity exceeds a preset first system blocking write-back threshold;

[0013] If the target dirty page quantity exceeds the preset first system blocking write-back threshold, it is determined that the target task triggers a blocking dirty page write-back operation, and the target dirty page quantity and the first system blocking write-back threshold are saved in the target system file.

[0014] Optionally, after determining whether the target dirty page quantity exceeds a preset first system blocking write-back threshold, the method further includes:

[0015] If the target dirty page quantity does not exceed the preset first system blocking write-back threshold, determining whether the residual dirty page quantity exceeds the preset second system blocking write-back threshold;

[0016] If the number of residual dirty pages exceeds the preset second system blocking write-back threshold, it is determined that the target task has triggered a blocking dirty page write-back operation, and the target number of dirty pages, the first system blocking write-back threshold, the number of residual dirty pages and the second system blocking write-back threshold are saved to the target system file.

[0017] Optionally, recording relevant target task information in the system log includes:

[0018] Obtaining the process ID of the target task and the time point corresponding to when the target task is blocked;

[0019] The target task information including the process number and the time point is recorded in the system log.

[0020] Optionally, the blocking dirty page write-back monitoring method further includes:

[0021] If the target task triggers a blocking dirty page write-back operation, the specific information related to the target task and the total number of dirty pages of the current operating system are saved in the target system file; wherein, the specific information includes the process number of the target task, the time point corresponding to when the target task is blocked, and the duration for which the target task is blocked.

[0022] Optionally, after determining whether the target task triggers a blocking dirty page write-back operation according to the blocking information, the method further includes:

[0023] If the target task does not trigger a blocking dirty page write-back operation, the blocking information is deleted from the target system file.

[0024] In a second aspect, the present application discloses a blocking dirty page write-back monitoring device, comprising:

[0025] An information acquisition module, for acquiring relevant blocking information when a target task in the current operating system is blocked when monitoring the target task is blocked, and saving the blocking information to a target system file created based on a process file system;

[0026] A judgment module, used for judging whether the target task triggers a blocking dirty page write-back operation according to the blocking information;

[0027] The information recording module is used to record relevant target task information in the system log when the target task triggers a blocking dirty page write-back operation, so as to determine the specific blocking cause from the target system file through the target task information.

[0028] In a third aspect, the present application discloses an electronic device, comprising a processor and a memory; wherein the processor implements the aforementioned blocking dirty page write-back monitoring method when executing a computer program stored in the memory.

[0029] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned blocking dirty page write-back monitoring method is implemented.

[0030] It can be seen that when the present application detects that the target task in the current operating system is blocked, the blocking information related to the target task being blocked is obtained, and the blocking information is saved in the target system file created based on the process file system, and then the target task is judged whether the blocking dirty page writeback operation is triggered according to the blocking information. If the target task triggers the blocking dirty page writeback operation, the relevant target task information is recorded in the system log, so as to determine the specific blocking cause from the target system file through the target task information. It can be seen that the present application records the blocking information when the blocking dirty page writeback occurs in the target system file created by the process file system, and records the relevant information in the system log, so as to quickly and accurately locate the specific cause of the blocking dirty page writeback through the system log information, saving the time for problem analysis and search. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0032] Figure 1 A flowchart of a blocking dirty page write-back monitoring method disclosed in this application;

[0033] Figure 2 A flowchart of a specific blocking dirty page write-back monitoring method disclosed in this application;

[0034] Figure 3 A schematic diagram of the structure of a blocking dirty page write-back monitoring device disclosed in this application;

[0035] Figure 4 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

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

[0037] The present application embodiment discloses a method for monitoring the write-back of a blocking dirty page. Figure 1 As shown, the method includes:

[0038] Step S11: when it is detected that the target task in the current operating system is blocked, the blocking information related to the target task being blocked is obtained, and the blocking information is saved in the target system file created based on the process file system.

[0039] In this embodiment, after the operating system is started, a target system file can be added through the process file system (i.e., procfs, Process File System), and the target system file can be named according to a preset naming rule, such as creating / proc / sys / vm / dirty_writebackinfo, which is used to record specific information when a blocking dirty page is written back, indicating that a target system file named dirty_writebackinfo is created in the directory of the process file system / proc / sys / vm. The operating system includes but is not limited to the Linux operating system, the Unix operating system, the Red Hat operating system, etc.

[0040] After the target system file is created, when it is detected that the target task currently being written by the operating system is blocked, the blocking information related to the target task being blocked can be collected, and the collected blocking information can be recorded in the target system file. The blocking information includes but is not limited to the number of dirty pages of the CPU (Central Processing Unit) where the target task is currently located and the number of dirty pages remaining in the operating system.

[0041] Step S12: determining whether the target task triggers a blocking dirty page write-back operation according to the blocking information.

[0042] In this embodiment, after the blocking information is saved to a target system file created based on a process file system, the blocking information recorded in the target system file can be compared with a preset system blocking write-back threshold to determine whether the blocking information exceeds the system blocking write-back threshold. If so, it is determined that the target task has triggered a blocking dirty page write-back operation, that is, the target task is currently blocked and the operating system is performing a dirty page write-back operation. If not, it is determined that the target task has not triggered a blocking dirty page write-back operation.

[0043] Step S13: If the target task triggers a blocking dirty page write-back operation, relevant target task information is recorded in the system log, so as to determine the specific blocking cause from the target system file through the target task information.

[0044] In this embodiment, after determining whether the target task has triggered a blocking dirty page writeback operation based on the blocking information, if the determination result indicates that the target task has triggered a blocking dirty page writeback operation, the information related to the target task, i.e., the target task information, is recorded in the system log, so that the application developer can quickly obtain the specific blocking cause pre-recorded when the blocking dirty page writeback occurs from the target system file through the target task information recorded in the system log. The specific blocking cause includes, but is not limited to, the number of dirty pages of the CPU where the target task is currently located, the number of dirty pages remaining in the current operating system, the system blocking writeback threshold, and the target task information.

[0045] In this embodiment, the recording of relevant target task information in the system log may specifically include: obtaining the process number of the target task and the time point corresponding to when the target task is blocked; recording the target task information including the process number and the time point in the system log. It is understandable that after determining that the target task has triggered a blocking dirty page writeback operation, the target task information including the process number of the target task where the blocking dirty page writeback occurs and the time point corresponding to when it is blocked may be recorded in the system log (i.e., log file), so that when it is necessary to find the cause, the specific blocking cause corresponding to the target task that has been pre-saved can be directly found from the target system file through the process number and the time point recorded in the above-mentioned system log.

[0046] Furthermore, the blocking dirty page writeback monitoring method specifically includes: if the target task triggers a blocking dirty page writeback operation, then the specific information related to the target task and the total number of dirty pages of the current operating system are saved to the target system file; wherein the specific information includes the process number of the target task, the time point corresponding to when the target task is blocked, and the duration for which the target task is blocked. In this embodiment, if it is determined based on the blocking information that the target task has triggered a blocking dirty page writeback operation, the specific information including the process number of the target task, the time point corresponding to when the target task is blocked, and the duration for which the target task is blocked, and the total number of dirty pages of the current operating system can be saved to the target system file.

[0047] In this embodiment, after judging whether the target task has triggered a blocking dirty page write-back operation according to the blocking information, the method further includes: if the target task has not triggered a blocking dirty page write-back operation, deleting the blocking information from the target system file. It is understandable that in order to prevent the target system file from occupying too many space resources, when judging that the target task has not triggered a blocking dirty page write-back operation according to the blocking information, the blocking information can be deleted from the target system file.

[0048] It can be seen that when the embodiment of the present application monitors that the target task in the current operating system is blocked, the blocking information related to the target task being blocked is obtained, and the blocking information is saved in the target system file created based on the process file system, and then the target task is judged whether the blocking dirty page writeback operation is triggered according to the blocking information. If the target task triggers the blocking dirty page writeback operation, the relevant target task information is recorded in the system log, so as to determine the specific blocking cause from the target system file through the target task information. It can be seen that the embodiment of the present application records the blocking information when the blocking dirty page writeback occurs in the target system file created by the process file system, and records the relevant information in the system log, so as to quickly and accurately locate the specific cause of the blocking dirty page writeback through the system log information, saving the time for problem analysis and search.

[0049] The present application embodiment discloses a specific blocking dirty page write-back monitoring method, see Figure 2 As shown, the method includes:

[0050] Step S21: When it is monitored that the target task in the current Linux operating system is blocked, the number of dirty pages of the CPU where the target task is located and the number of residual dirty pages of the current Linux operating system are obtained, and the target number of dirty pages and the number of residual dirty pages are obtained respectively, and the target number of dirty pages and the number of residual dirty pages are saved in the target system file created based on the procfs process file system.

[0051] In this embodiment, when it is monitored that the target task performing a write operation in the current Linux operating system is blocked, the current number of dirty pages of the CPU where the above target task is located and the number of residual dirty pages of the current Linux operating system are obtained, that is, the number of dirty pages in other storage resources except the CPU where the above target task is located, and then the target number of dirty pages and the residual number of dirty pages are obtained, and the target number of dirty pages and the residual number of dirty pages are saved in the target system file created based on the procfs process file system of the Linux operating system.

[0052] Step S22: Determine whether the target dirty page quantity exceeds a preset first system blocking write-back threshold.

[0053] In this embodiment, after the target number of dirty pages and the residual number of dirty pages are saved to the target system file created based on the procfs process file system, the above-mentioned target number of dirty pages is compared with the preset CPU dirty page number threshold, that is, the first system blocking write-back threshold, and it is determined whether the target number of dirty pages exceeds the first system blocking write-back threshold.

[0054] Step S23: If the target dirty page quantity exceeds the preset first system blocking write-back threshold, it is determined that the target task triggers a blocking dirty page write-back operation, and the target dirty page quantity and the first system blocking write-back threshold are saved in the target system file.

[0055] In this embodiment, if the above-mentioned target dirty page number exceeds the preset first system blocking write-back threshold, it indicates that the currently blocked target task triggers a blocking dirty page write-back operation. Furthermore, the above-mentioned target dirty page number and the above-mentioned first system blocking write-back threshold are saved in the above-mentioned target system file.

[0056] Step S24: If the target dirty page quantity does not exceed the preset first system blocking write-back threshold, determine whether the remaining dirty page quantity exceeds the preset second system blocking write-back threshold.

[0057] In this embodiment, if the above-mentioned target number of dirty pages does not exceed the preset first system blocking write-back threshold, the number of residual dirty pages is compared with the preset system residual dirty page number threshold, that is, compared with the second system blocking write-back threshold, and it is determined whether the number of residual dirty pages exceeds the second system blocking write-back threshold.

[0058] Step S25: If the number of residual dirty pages exceeds the preset second system blocking write-back threshold, it is determined that the target task has triggered a blocking dirty page write-back operation, and the target number of dirty pages, the first system blocking write-back threshold, the number of residual dirty pages and the second system blocking write-back threshold are saved in the target system file.

[0059] In this embodiment, if the number of residual dirty pages exceeds the preset blocking write-back threshold of the second system, it is determined that the target task has triggered a blocking dirty page write-back operation, and the target number of dirty pages, the first system blocking write-back threshold, the residual number of dirty pages and the second system blocking write-back threshold are further saved together in the target system file.

[0060] Step S26: If the target task triggers a blocking dirty page write-back operation, relevant target task information is recorded in the system log, so that the specific blocking cause can be determined from the target system file through the target task information.

[0061] For more specific processing procedures of the above steps S21 and S26, reference may be made to the corresponding contents disclosed in the above embodiments, which will not be described in detail here.

[0062] It can be seen that the embodiment of the present application compares the number of CPU dirty pages where the target task is located when blocking occurs and the number of dirty pages remaining in the current Linux operating system with the preset first system blocking write-back threshold and the second system blocking write-back threshold, respectively, and then determines that the currently blocked operation is caused by the ongoing dirty page write-back. By recording the relevant blocking information when the blocking dirty page write-back occurs in the target system file created based on the procfs process file system, and recording the target task information in the system log, the specific cause of the blocking dirty page write-back can be located more quickly and accurately.

[0063] Correspondingly, the present application embodiment also discloses a blocking dirty page write-back monitoring device, see Figure 3 As shown, the device comprises:

[0064] The information acquisition module 11 is used for acquiring the blocking information related to the target task being blocked when monitoring that the target task in the current operating system is blocked, and saving the blocking information to the target system file created based on the process file system;

[0065] A judgment module 12, used for judging whether the target task triggers a blocking dirty page write-back operation according to the blocking information;

[0066] The information recording module 13 is used to record relevant target task information in the system log when the target task triggers a blocking dirty page write-back operation, so as to determine the specific blocking cause from the target system file through the target task information.

[0067] Among them, the specific working processes of the above-mentioned modules can refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.

[0068] It can be seen that in the embodiment of the present application, when it is monitored that the target task in the current operating system is blocked, the blocking information related to the target task being blocked is obtained, and the blocking information is saved in the target system file created based on the process file system, and then it is determined whether the target task has triggered a blocking dirty page writeback operation based on the blocking information. If the target task has triggered a blocking dirty page writeback operation, the relevant target task information is recorded in the system log, so that the specific cause of the blocking can be determined from the target system file through the target task information. It can be seen that the embodiment of the present application records the blocking information when a blocking dirty page writeback occurs in the target system file created by the process file system, and records the relevant information in the system log, so that the specific cause of the blocking dirty page writeback can be quickly and accurately located through the system log information, saving time for problem analysis and search.

[0069] In some specific embodiments, the information acquisition module 11 may specifically include:

[0070] A first information acquisition unit is used to acquire the number of dirty pages of the CPU where the target task is located and the number of dirty pages remaining in the current Linux operating system when it is detected that the target task in the current Linux operating system is blocked, and obtain the target number of dirty pages and the number of remaining dirty pages respectively;

[0071] The first information saving unit is used to save the target dirty page quantity and the residual dirty page quantity into a target system file created based on the procfs process file system.

[0072] In some specific embodiments, the determination module 12 may specifically include:

[0073] A first judging unit, configured to judge whether the target dirty page quantity exceeds a preset first system blocking write-back threshold;

[0074] A first determination unit, configured to determine that the target task has triggered a blocking dirty page write-back operation when the number of the target dirty pages exceeds a preset first system blocking write-back threshold;

[0075] The second information storage unit is used to save the target dirty page quantity and the first system blocking write-back threshold into the target system file.

[0076] In some specific embodiments, after the first determining unit, the following may also be included:

[0077] A second judgment unit, configured to judge whether the number of residual dirty pages exceeds a preset second system blocking write-back threshold when the number of target dirty pages does not exceed the preset first system blocking write-back threshold;

[0078] A second determination unit, configured to determine that the target task has triggered a blocking dirty page write-back operation when the number of the remaining dirty pages exceeds a preset blocking write-back threshold of the second system;

[0079] The third information storage unit is used to save the target dirty page quantity, the first system blocking write-back threshold, the residual dirty page quantity and the second system blocking write-back threshold into the target system file.

[0080] In some specific embodiments, the information recording module 13 may specifically include:

[0081] A second information acquisition unit, used to acquire the process number of the target task and the time point corresponding to when the target task is blocked;

[0082] The information recording unit is used to record the target task information including the process number and the time point in the system log.

[0083] In some specific embodiments, the blocking dirty page write-back monitoring device may further include:

[0084] The fourth information saving unit is used to save the specific information related to the target task and the total number of dirty pages of the current operating system to the target system file when the target task triggers a blocking dirty page write-back operation; wherein the specific information includes the process number of the target task, the time point corresponding to when the target task is blocked, and the duration for which the target task is blocked.

[0085] In some specific embodiments, after the determination module 12, the following may also be included:

[0086] An information deleting unit is used to delete the blocking information from the target system file when the target task does not trigger a blocking dirty page write-back operation.

[0087] Furthermore, the present application also discloses an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.

[0088] Figure 4 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the blocking dirty page write-back monitoring method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0089] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0090] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0091] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the blocking dirty page write-back monitoring method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0092] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned blocking dirty page write-back monitoring method is implemented. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.

[0093] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0094] Professionals may further 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 the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may 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.

[0095] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0096] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0097] The above is a detailed introduction to a blocking dirty page write-back monitoring method, device, equipment and storage medium provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A blocking dirty page write-back monitoring method, characterized in that: include: When it is detected that the target task in the current operating system is blocked, the blocking information related to the target task being blocked is obtained, and the blocking information is saved in a target system file created based on the process file system; Determining whether the target task triggers a blocking dirty page write-back operation according to the blocking information; If the target task triggers a blocking dirty page write-back operation, relevant target task information is recorded in the system log, so as to determine the specific blocking cause from the target system file through the target task information; The method also includes: if the target task triggers a blocking dirty page write-back operation, saving specific information related to the target task and the total number of dirty pages of the current operating system to the target system file; wherein the specific information includes the process number of the target task, the time point corresponding to when the target task is blocked, and the duration for which the target task is blocked.

2. The blocking dirty page write-back monitoring method according to claim 1, characterized in that: When it is detected that the target task in the current operating system is blocked, the blocking information related to the target task being blocked is obtained, and the blocking information is saved in a target system file created based on the process file system, including: When it is monitored that the target task in the current Linux operating system is blocked, the number of dirty pages of the CPU where the target task is located and the number of residual dirty pages of the current Linux operating system are obtained, and the target number of dirty pages and the number of residual dirty pages are obtained respectively, and the target number of dirty pages and the number of residual dirty pages are saved in the target system file created based on the procfs process file system.

3. The blocking dirty page write-back monitoring method according to claim 2, characterized in that: The determining, according to the blocking information, whether the target task triggers a blocking dirty page write-back operation includes: Determine whether the target dirty page quantity exceeds a preset first system blocking write-back threshold; If the target dirty page quantity exceeds the preset first system blocking write-back threshold, it is determined that the target task triggers a blocking dirty page write-back operation, and the target dirty page quantity and the first system blocking write-back threshold are saved in the target system file.

4. The blocking dirty page write-back monitoring method according to claim 3 is characterized in that: After determining whether the target dirty page quantity exceeds a preset first system blocking write-back threshold, the method further includes: If the target dirty page quantity does not exceed the preset first system blocking write-back threshold, determining whether the residual dirty page quantity exceeds the preset second system blocking write-back threshold; If the number of residual dirty pages exceeds the preset second system blocking write-back threshold, it is determined that the target task has triggered a blocking dirty page write-back operation, and the target number of dirty pages, the first system blocking write-back threshold, the number of residual dirty pages and the second system blocking write-back threshold are saved to the target system file.

5. The blocking dirty page write-back monitoring method according to claim 1, characterized in that: The relevant target task information is recorded in the system log, including: Obtaining the process ID of the target task and the time point corresponding to when the target task is blocked; The target task information including the process number and the time point is recorded in the system log.

6. The blocking dirty page write-back monitoring method according to any one of claims 1 to 5, characterized in that: After determining whether the target task triggers a blocking dirty page write-back operation according to the blocking information, the method further includes: If the target task does not trigger a blocking dirty page write-back operation, the blocking information is deleted from the target system file.

7. A blocking dirty page write-back monitoring device, characterized in that: include: An information acquisition module, for acquiring relevant blocking information when a target task in the current operating system is blocked when monitoring the target task is blocked, and saving the blocking information to a target system file created based on a process file system; A judgment module, used for judging whether the target task triggers a blocking dirty page write-back operation according to the blocking information; An information recording module, used for recording relevant target task information in a system log when the target task triggers a blocking dirty page write-back operation, so as to determine a specific blocking cause from the target system file through the target task information; The device is also used to save specific information related to the target task and the total number of dirty pages of the current operating system to the target system file if the target task triggers a blocking dirty page write-back operation; wherein the specific information includes the process number of the target task, the time point corresponding to when the target task is blocked, and the duration for which the target task is blocked.

8. An electronic device, characterized in that: It comprises a processor and a memory; wherein, when the processor executes the computer program stored in the memory, the blocking dirty page write-back monitoring method as described in any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the blocking dirty page write-back monitoring method as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • File system page cache writeback method, system and device and storage medium

    CN107590287A

  • Dirty page refreshing method and device, storage medium and electronic equipment

    CN112182010A