A method, apparatus, device, and storage medium for I / O space statistics and retrieval.

By receiving and inserting IO requests into a space statistics circular queue in the storage cluster, fine-grained IO space statistics and scheduling are performed, solving the problems of IO write performance impact and low statistical accuracy in the storage cluster, and achieving efficient utilization of storage space.

CN115328636BActive Publication Date: 2026-06-30JINAN INSPUR DATA TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JINAN INSPUR DATA TECH CO LTD
Filing Date
2022-08-31
Publication Date
2026-06-30

Smart Images

  • Figure CN115328636B_ABST
    Figure CN115328636B_ABST
Patent Text Reader

Abstract

This invention discloses an IO space statistics and retrieval method, which includes the following steps: receiving a target IO request sent by distributed storage software; wherein the target IO request is read from the disk by the distributed storage software; inserting the target IO request into a space statistics circular queue; statistically analyzing the IO space occupancy of the space statistics circular queue to obtain IO space statistics information; and performing IO scheduling based on the IO space statistics information. Applying the IO space statistics and retrieval method provided by this invention significantly reduces the impact on IO write performance, improves the accuracy of statistical results, and thus enables full utilization of storage space. This invention also discloses an IO space statistics and retrieval device, equipment, and storage medium, which have corresponding technical effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of storage technology, and in particular to an I / O space statistics and retrieval method, apparatus, device, and computer-readable storage medium. Background Technology

[0002] Current methods for statistically analyzing disk space in storage clusters are based on space usage statistics at the storage pool and disk levels, obtaining space information through interaction with the disks. This method increases the software-hardware interaction process, severely impacting I / O write performance. Furthermore, statistics based on storage pool and disk levels have a large statistical granularity and low accuracy, resulting in underutilization of storage space.

[0003] In summary, how to effectively address the problems of existing storage cluster disk space statistical methods affecting IO write performance, low accuracy of statistical results, and underutilization of storage space is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0004] The purpose of this invention is to provide an IO space statistics and retrieval method, which significantly reduces the impact on IO write performance, improves the accuracy of statistical results, and thus enables full utilization of storage space; another purpose of this invention is to provide an IO space statistics and retrieval device, apparatus, and computer-readable storage medium.

[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0006] An I / O space statistics and retrieval method, comprising:

[0007] Receive a target I / O request sent by the distributed storage software; wherein the target I / O request is obtained by the distributed storage software from the disk;

[0008] Insert the target I / O request into the spatial statistics circular queue;

[0009] The IO space occupancy of the aforementioned spatial statistics circular queue is statistically analyzed to obtain IO space statistics information;

[0010] I / O scheduling is performed based on the I / O space statistics.

[0011] In one specific embodiment of the present invention, receiving a target I / O request sent by distributed storage software includes:

[0012] Each IO transmission thread receives target IO requests sent by the distributed storage software;

[0013] Inserting the target I / O request into the spatial statistics circular queue includes:

[0014] A multi-core algorithm is used to concurrently insert each target I / O request into the spatial statistics circular queue.

[0015] In one specific embodiment of the present invention, the statistical analysis of the IO space occupancy of the spatial statistical circular queue includes:

[0016] Obtain object information for each of the target I / O requests; wherein, the object information includes request size information and request identifier information;

[0017] The IO space occupancy of the spatial statistics circular queue is statistically analyzed based on the information of each object.

[0018] In one specific embodiment of the present invention, IO scheduling based on the IO space statistics includes:

[0019] For each IO transmission thread, the state of the previous IO request stored in the space statistics circular queue through the IO transmission thread is changed according to the IO space statistics information, so that the state of the previous IO request is changed from non-deletable to deletable.

[0020] In one specific embodiment of the present invention, after obtaining the IO space statistics, the method further includes:

[0021] Simulate statistical disk usage information based on the aforementioned I / O space statistics;

[0022] I / O scheduling is performed based on the I / O space statistics, including:

[0023] When disk space is insufficient based on the statistical disk usage information, IO requests in the deleteable state are deleted.

[0024] In one specific embodiment of the present invention, IO scheduling based on the IO space statistics includes:

[0025] When the system is powered off, if it is determined from the IO space statistics information that there are IO requests in the space statistics circular queue that are in a critical eviction state, then the IO state of the IO requests in the critical eviction state is saved.

[0026] In one specific embodiment of the present invention, IO scheduling based on the IO space statistics includes:

[0027] When it is determined that there is a blocked IO request based on the IO space statistics, the blocked IO request is transferred to a preset cache for IO fault recovery.

[0028] An I / O space statistics and retrieval device, comprising:

[0029] A request receiving module is used to receive a target I / O request sent by the distributed storage software; wherein the target I / O request is read by the distributed storage software from the disk;

[0030] The request insertion module is used to insert the target I / O request into the spatial statistics circular queue;

[0031] The space statistics module is used to count the IO space occupancy of the space statistics circular queue and obtain IO space statistics information.

[0032] The IO scheduling module is used to perform IO scheduling based on the IO space statistics.

[0033] An I / O space statistics and retrieval device, comprising:

[0034] Memory, used to store computer programs;

[0035] A processor, used to implement the steps of the aforementioned I / O space statistics and retrieval method when executing the computer program.

[0036] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the aforementioned I / O space statistics and retrieval method.

[0037] The IO space statistics and retrieval method provided by this invention receives a target IO request sent by distributed storage software; wherein the target IO request is read from the disk by the distributed storage software; the target IO request is inserted into a space statistics circular queue; the IO space occupancy of the space statistics circular queue is statistically analyzed to obtain IO space statistics information; and IO scheduling is performed based on the IO space statistics information.

[0038] As described in the above technical solution, the system receives target IO requests sent by distributed storage software, inserts these requests into a pre-set space statistics circular queue, and obtains IO space statistics by statistically analyzing the IO space occupancy of the queue. IO scheduling is then performed based on these statistics. This invention relies on distributed storage software, significantly reducing the impact on IO write performance compared to methods that interact directly with hardware disks to obtain space information. By performing storage space statistics at the IO dimension, fine-grained statistics on storage space are achieved, improving the accuracy of the statistical results and thus ensuring full utilization of storage space.

[0039] Accordingly, the present invention also provides an IO space statistics and retrieval device, apparatus and computer-readable storage medium corresponding to the above-mentioned IO space statistics and retrieval method, which have the above-mentioned technical effects, and will not be described in detail here. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is a flowchart illustrating one implementation of the IO space statistics and retrieval method in this invention.

[0042] Figure 2 This is a flowchart illustrating another implementation of the IO space statistics and retrieval method in this invention.

[0043] Figure 3 This is a schematic diagram of the I / O storage process of a spatial statistics circular queue in an embodiment of the present invention;

[0044] Figure 4 This is a structural block diagram of an IO space statistics and retrieval system according to an embodiment of the present invention;

[0045] Figure 5 This is a structural block diagram of an IO space statistics and retrieval device according to an embodiment of the present invention;

[0046] Figure 6 This is a structural block diagram of an IO space statistics and retrieval device according to an embodiment of the present invention;

[0047] Figure 7 This is a schematic diagram of the specific structure of an IO space statistics and retrieval device provided in this embodiment. Detailed Implementation

[0048] To enable those skilled in the art to better understand the present invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0049] See Figure 1 , Figure 1 This is a flowchart illustrating an implementation of the IO space statistics and retrieval method in this invention. The method may include the following steps:

[0050] S101: Receives target IO requests sent by distributed storage software.

[0051] The target I / O request is obtained by the distributed storage software from the disk.

[0052] When a target I / O request is generated on the disk, the distributed storage software reads the target I / O request from the disk and sends it to the I / O space statistics and retrieval center. The I / O space statistics and retrieval center receives the target I / O requests sent by the distributed storage software.

[0053] The target I / O request is any I / O request to be processed.

[0054] An IO space statistics and retrieval center can be a processor, controller, etc., capable of receiving, counting, and scheduling IO requests sent by distributed storage software.

[0055] S102: Insert the target IO request into the spatial statistics circular queue.

[0056] A pre-configured spatial statistics circular queue, as the name suggests, is set up with a circular structure, so that the deletion operation of the circular queue only requires changing the tail index, reducing the number of deletion operations and optimizing the process of spatial statistics.

[0057] After receiving the target IO request from the distributed storage software, the target IO request is inserted into the spatial statistics circular queue.

[0058] S103: Perform statistics on the IO space occupancy of the space statistics circular queue to obtain IO space statistics information.

[0059] After inserting the target I / O request into the space statistics circular queue, the I / O space occupancy of the space statistics circular queue is statistically analyzed to obtain I / O space statistics information. For example, the amount of I / O space that the target I / O request will occupy in the space statistics circular queue is calculated, and the amount of I / O space already occupied in the space statistics circular queue is obtained. The total space occupied by the space statistics circular queue is then added to the amount of I / O space to be occupied by the target I / O request.

[0060] S104: Perform I / O scheduling based on I / O space statistics.

[0061] After analyzing the IO space usage of the spatial statistics circular queue and obtaining IO space statistics, IO scheduling is performed based on these statistics. For example, the IO space statistics can determine whether IO request processing in the spatial statistics circular queue is normal, or whether the current IO request storage volume exceeds a preset threshold, potentially leading to insufficient disk space. Corresponding IO retrieval measures are then taken for IO scheduling. By performing IO-dimensional spatial statistics on the overall cluster usage, fine-grained management of IO request execution and space management strategies is achieved.

[0062] In one specific embodiment of the present invention, step S104 may include the following steps:

[0063] When it is determined from the IO space statistics that there is a blocked IO request, the blocked IO request is transferred to the preset cache for IO fault recovery.

[0064] After analyzing the IO space occupancy of the circular queue and obtaining IO space statistics, these statistics can include the status information of each IO request. For example, the status of each IO request in the circular queue can be continuously monitored over a preset time period. When an IO request is detected to be in a non-elimination state for an extended period, it is determined to be a blocked IO request. When a blocked IO request is identified based on the IO space statistics, it is transferred to a preset cache, thereby recovering from the IO failure and enabling the insertion of subsequent IO requests.

[0065] As described in the above technical solution, the system receives target IO requests sent by distributed storage software, inserts these requests into a pre-set space statistics circular queue, and obtains IO space statistics by statistically analyzing the IO space occupancy of the queue. IO scheduling is then performed based on these statistics. This invention relies on distributed storage software, significantly reducing the impact on IO write performance compared to methods that interact directly with hardware disks to obtain space information. By performing storage space statistics at the IO dimension, fine-grained statistics on storage space are achieved, improving the accuracy of the statistical results and thus ensuring full utilization of storage space.

[0066] It should be noted that, based on the above embodiments, the present invention also provides corresponding improvements. In subsequent embodiments, steps identical or corresponding to those in the above embodiments can be referenced interchangeably, and their respective beneficial effects can also be referred to each other. These improvements will not be elaborated upon in the following improved embodiments.

[0067] See Figure 2 , Figure 2This is a flowchart illustrating another implementation of the IO space statistics and retrieval method in this invention. The method may include the following steps:

[0068] S201: Utilize each IO transmission thread to receive target IO requests sent by the distributed storage software.

[0069] The target I / O request is obtained by the distributed storage software from the disk.

[0070] Multiple I / O transmission threads are pre-configured for interaction between the distributed storage software and the I / O space statistics and retrieval center. When the distributed storage software sends a target I / O request read from the disk to the I / O space statistics and retrieval center, the center utilizes each I / O transmission thread to receive the target I / O requests sent by the distributed storage software. This enables parallel reception of each target I / O request, improving I / O request processing efficiency.

[0071] S202: A multi-core algorithm is used to concurrently insert each target IO request into the spatial statistics circular queue.

[0072] After receiving the target I / O requests sent by the distributed storage software using each I / O transmission thread, a multi-core algorithm is employed to concurrently insert each target I / O request into the spatial statistics circular queue. By using a multi-core algorithm to concurrently insert each target I / O request, different elements in the multi-threaded spatial statistics circular queue are updated concurrently, improving the insertion performance of a large number of I / O requests, increasing the insertion speed of I / O requests into the spatial statistics circular queue, and improving the I / O request processing efficiency.

[0073] S203: Obtain object information for each target IO request.

[0074] The object information includes request size information and request identifier information.

[0075] After concurrently inserting each target I / O request into the spatial statistics circular queue using a multi-core algorithm, the object information of each target I / O request is obtained. The collected object information includes request size information and request identification information. The request identification information can contain both unique identification information for the current target I / O request and unique address information for the specific position of the current target I / O request inserted into the spatial statistics circular queue. This allows us to obtain information such as the request size, the specific I / O request being inserted, and the specific position of insertion into the spatial statistics circular queue for each target I / O request currently inserted into the spatial statistics circular queue.

[0076] S204: Based on the information of each object, the IO space occupancy of the space statistics circular queue is statistically analyzed to obtain IO space statistics information.

[0077] After obtaining the object information for each target IO request, the IO space occupancy of the spatial statistics circular queue is statistically analyzed based on the object information to obtain IO space statistics. Based on the request size and request identifier information contained in each object information, the IO space occupancy of the spatial statistics circular queue after inserting these target IO requests can be calculated. Furthermore, the correspondence between the request identifier information of the IO requests and their storage locations in the spatial statistics circular queue can also be determined.

[0078] S205: For each IO transfer thread, based on the IO space statistics information, change the state of the previous IO request stored in the space statistics circular queue through the IO transfer thread, so that the state of the previous IO request changes from non-deletable to deletable.

[0079] After statistically analyzing the IO space occupancy of the spatial statistics circular queue based on the information of each object to obtain IO space statistics, for each IO transmission thread, since the previous IO request has been completed only when the thread can insert a new IO request into the spatial statistics circular queue, the state of the previous IO request stored in the spatial statistics circular queue by the IO transmission thread is changed according to the IO space statistics, thus changing the state of the previous IO request from non-deletable to deletable. This achieves timely updates to the IO request status in the spatial statistics circular queue. The deletion operation in the spatial statistics circular queue only requires changing the tail index, reducing the number of element deletion operations and optimizing the statistical space process. This embodiment of the invention relies on distributed storage software, which significantly reduces the impact on IO write performance compared to methods that interact with hardware disks to obtain space information. By performing storage space statistics at the IO dimension, fine-grained statistics of storage space are achieved, improving the accuracy of statistical results and thus enabling full utilization of storage space.

[0080] See Figure 3 , Figure 3 This is a schematic diagram of the IO storage process of a spatial statistical circular queue in an embodiment of the present invention. In distributed storage software, associated IO requests are linked on a thread-by-thread basis. This scheme simulates a thread-based data structure to manage associated IO requests, using the flag status of preceding and following IO requests. The IO status and associated relationships are fully preserved, and a series of IO management steps are completed in conjunction with a space threshold. The space threshold can be a pre-set value that triggers an IO request deletion operation when the amount of statistically recorded IO request data reaches a certain upper limit. Specifically, this can be achieved by directly overwriting the status information of newly inserted IO requests that are in a deleteable state, thus enabling normal insertion of IO requests. Figure 3In this configuration, I / O requests marked with a value of 1 can be designated as Deleteable, while those marked with a value of 0 are temporarily not Deleteable. This enables I / O scheduling that depends on the I / O request status, while also allowing for efficient space allocation.

[0081] In one specific embodiment of the present invention, after step S204, the method may further include the following steps:

[0082] Step 1: Simulate and statistically analyze disk usage based on I / O space statistics;

[0083] Step 2: When it is determined that there is insufficient disk space based on the statistical disk usage information, delete the IO requests that are in the deleteable state.

[0084] For ease of description, the two steps above can be combined for explanation.

[0085] After statistically analyzing the IO space occupancy of the circular queue based on object information to obtain IO space statistics, disk occupancy information is simulated based on these statistics. When disk space is determined to be insufficient based on the statistical disk occupancy information, IO requests in a deleteable state are deleted. This achieves timely release of disk space, facilitating the processing of subsequent IO requests. This embodiment of the invention can effectively collect disk space information and identify IO status information at the software level, thereby enabling fast and efficient IO and space management.

[0086] In one specific embodiment of the present invention, after step S204, the method may further include the following steps:

[0087] When the system is powered off, if it is determined from the IO space statistics information that there are IO requests in the space statistics circular queue that are in a critical eviction state, then the IO state of the IO requests in the critical eviction state is saved.

[0088] When the system is powered down, it checks whether there are any I / O requests in the spatial statistics circular queue that are in a critical eviction state. If it is determined from the I / O space statistics information that there are I / O requests in the spatial statistics circular queue that are in a critical eviction state, the I / O state of the I / O requests in the critical eviction state is saved, so as to facilitate the restoration of the I / O request processing state before the system was powered down after the system is restarted.

[0089] In a specific application example, see Figure 4 , Figure 4 This is a structural block diagram of an IO space statistics and retrieval system according to an embodiment of the present invention. This solution relies on distributed cluster software, and its core module comprises three parts:

[0090] Concurrent Receiving Module: Uses a multi-core algorithm to concurrently count IO requests in the distributed storage software and concurrently inserts necessary IO information, such as object information of the IO requests, into the circular queue of the request space statistics module.

[0091] The request space statistics module simulates and counts disk usage based on the space occupancy of IO requests received by the concurrent receiving module, and notifies the IO scheduling and space scheduling modules to perform corresponding processing when threshold conditions are triggered.

[0092] IO scheduling and space scheduling module: When the preset blocking threshold conditions are met, the blocked IO is processed accordingly; unnecessary space in the recovery process is deleted; alarm operation is triggered when the alarm threshold conditions are met; notification operation is triggered when the notification threshold conditions are met; request processing operation is triggered when the request processing threshold conditions are met.

[0093] The scheduling scenarios covered by the IO scheduling and space scheduling module can include thread IO blocking, insufficient disk space, critical state IO, and associated IO.

[0094] Specific scheduling and processing: When a thread's IO is blocked, the distributed storage software is triggered to perform IO fault recovery or warning reporting; when disk space is insufficient, message blocking and cleanup of deletable space are triggered; when critical state IO is eliminated, IO state saving is triggered so that it can be restored at startup; when associated IO can be eliminated, the state change of the currently non-eliminable IO is triggered, realizing the simulation of the request completion state control of the elimination mechanism of IO before and after in the original process.

[0095] Corresponding to the above method embodiments, the present invention also provides an IO space statistics and retrieval device. The IO space statistics and retrieval device described below can be referred to in correspondence with the IO space statistics and retrieval method described above.

[0096] See Figure 5 , Figure 5 This is a structural block diagram of an IO space statistics and retrieval device according to an embodiment of the present invention. The device may include:

[0097] The request receiving module 51 is used to receive the target IO request sent by the distributed storage software; wherein the target IO request is obtained by the distributed storage software from the disk;

[0098] The request insertion module 52 is used to insert the target IO request into the spatial statistics circular queue;

[0099] The space statistics module 53 is used to collect statistics on the IO space occupancy of the space statistics circular queue and obtain IO space statistics information.

[0100] The IO scheduling module 54 is used to perform IO scheduling based on IO space statistics.

[0101] As described in the above technical solution, the system receives target IO requests sent by distributed storage software, inserts these requests into a pre-set space statistics circular queue, and obtains IO space statistics by statistically analyzing the IO space occupancy of the queue. IO scheduling is then performed based on these statistics. This invention relies on distributed storage software, significantly reducing the impact on IO write performance compared to methods that interact directly with hardware disks to obtain space information. By performing storage space statistics at the IO dimension, fine-grained statistics on storage space are achieved, improving the accuracy of the statistical results and thus ensuring full utilization of storage space.

[0102] In one specific embodiment of the present invention, the request receiving module 51 is specifically a module that uses each IO transmission thread to receive each target IO request sent by the distributed storage software;

[0103] The request insertion module 52 is specifically a module that uses a multi-core algorithm to concurrently insert each target IO request into the spatial statistics circular queue.

[0104] In one specific embodiment of the present invention, the spatial statistics module 53 includes:

[0105] The object information acquisition submodule is used to acquire the object information of each target IO request; the object information includes request size information and request identification information.

[0106] The Space Statistics submodule is used to perform statistics on the IO space usage of the space statistics circular queue based on the information of each object.

[0107] In one specific embodiment of the present invention, the IO scheduling module 54 is specifically a module that, for each IO transmission thread, changes the state of the previous IO request stored in the space statistics circular queue through the IO transmission thread according to the IO space statistics information, so that the state of the previous IO request is changed from a non-deletable state to a deletable state.

[0108] In one specific embodiment of the present invention, the device may further include:

[0109] The disk usage information simulation module is used to simulate and statistically analyze disk usage information based on the obtained IO space statistics.

[0110] Specifically, the IO scheduling module 54 is a module that deletes IO requests in a state of being deletable when it is determined that there is insufficient disk space based on the statistical disk usage information.

[0111] In one specific embodiment of the present invention, the IO scheduling module 54 is specifically a module that, when the system is powered down, if it is determined from the IO space statistics circular queue that there are IO requests in the critical elimination state, then saves the IO state of the IO requests in the critical elimination state.

[0112] In one specific embodiment of the present invention, the IO scheduling module 54 is specifically a module that, when it is determined from the IO space statistics that there is a blocked IO request, transfers the blocked IO request to a preset cache for IO fault recovery.

[0113] For the method embodiments described above, see [link to relevant documentation]. Figure 6 , Figure 6 This is a schematic diagram of the IO space statistics and retrieval device provided by the present invention. The device may include:

[0114] Memory 332 is used to store computer programs;

[0115] The processor 322 is used to implement the steps of the IO space statistics and retrieval method in the above method embodiment when executing a computer program.

[0116] For details, please refer to Figure 7 , Figure 7 This is a schematic diagram illustrating the specific structure of an I / O space statistics and retrieval device provided in this embodiment. This I / O space statistics and retrieval device can vary significantly due to different configurations or performance. It may include a processor (central processing unit, CPU) 322 (e.g., one or more processors) and a memory 332. The memory 332 stores one or more computer application programs 342 or data 344. The memory 332 can be temporary or persistent storage. The program stored in the memory 332 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the data processing device. Furthermore, the processor 322 may be configured to communicate with the memory 332 and execute the series of instruction operations stored in the memory 332 on the I / O space statistics and retrieval device 301.

[0117] The IO space statistics and retrieval device 301 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input / output interfaces 358, and / or one or more operating systems 341.

[0118] The steps in the IO space statistics and retrieval method described above can be implemented by the structure of the IO space statistics and retrieval device.

[0119] Corresponding to the above method embodiments, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can perform the following steps:

[0120] Receive target I / O requests sent by distributed storage software; wherein the target I / O request is read from the disk by the distributed storage software; insert the target I / O request into the space statistics circular queue; perform statistics on the I / O space occupancy of the space statistics circular queue to obtain I / O space statistics information; and perform I / O scheduling based on the I / O space statistics information.

[0121] The computer-readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0122] For a description of the computer-readable storage medium provided by the present invention, please refer to the above method embodiments; the present invention will not be described in detail here.

[0123] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatuses, devices, and computer-readable storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.

[0124] This article uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the technical solutions and core ideas of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

Claims

1. A method for I / O space statistics and retrieval, characterized in that, include: Receive a target I / O request sent by the distributed storage software; wherein the target I / O request is obtained by the distributed storage software from the disk; Insert the target I / O request into the spatial statistics circular queue; The IO space occupancy of the aforementioned spatial statistics circular queue is statistically analyzed to obtain IO space statistics information; I / O scheduling is performed based on the I / O space statistics. Receive target I / O requests sent by distributed storage software, including: Each IO transmission thread receives target IO requests sent by the distributed storage software; Inserting the target I / O request into the spatial statistics circular queue includes: A multi-core algorithm is used to concurrently insert each of the target I / O requests into the spatial statistics circular queue; The I / O space occupancy of the aforementioned spatial statistics circular queue is statistically analyzed, including: Obtain object information for each of the target I / O requests; wherein, the object information includes request size information and request identifier information; The IO space occupancy of the spatial statistics circular queue is statistically analyzed based on the information of each object. After obtaining the I / O space statistics, it also includes: Based on the aforementioned IO space statistics, simulated statistical disk usage information.

2. The IO space statistics and retrieval method according to claim 1, characterized in that, I / O scheduling is performed based on the I / O space statistics, including: For each IO transmission thread, the state of the previous IO request stored in the space statistics circular queue through the IO transmission thread is changed according to the IO space statistics information, so that the state of the previous IO request is changed from non-deletable to deletable.

3. The IO space statistics and retrieval method according to claim 2, characterized in that, I / O scheduling is performed based on the I / O space statistics, including: When disk space is insufficient based on the statistical disk usage information, IO requests in the deleteable state are deleted.

4. The IO space statistics and retrieval method according to claim 2, characterized in that, I / O scheduling is performed based on the I / O space statistics, including: When the system is powered off, if it is determined from the IO space statistics information that there are IO requests in the space statistics circular queue that are in a critical eviction state, then the IO state of the IO requests in the critical eviction state is saved.

5. The IO space statistics and retrieval method according to claim 1, characterized in that, I / O scheduling is performed based on the I / O space statistics, including: When it is determined that there is a blocked IO request based on the IO space statistics, the blocked IO request is transferred to a preset cache for IO fault recovery.

6. An I / O space statistics and retrieval device, characterized in that, include: A request receiving module is used to receive a target I / O request sent by the distributed storage software; wherein the target I / O request is read by the distributed storage software from the disk; The request insertion module is used to insert the target I / O request into the spatial statistics circular queue; The space statistics module is used to count the IO space occupancy of the space statistics circular queue and obtain IO space statistics information. The IO scheduling module is used to perform IO scheduling based on the IO space statistics. The request receiving module is specifically a module that uses each IO transmission thread to receive each target IO request sent by the distributed storage software; The request insertion module is specifically designed to use a multi-core algorithm to concurrently insert each target I / O request into the spatial statistics circular queue. The spatial statistics module includes: The object information acquisition submodule is used to acquire the object information of each target IO request; the object information includes request size information and request identification information. The Space Statistics submodule is used to perform statistics on the IO space usage of the space statistics circular queue based on the information of each object; Also includes: The disk usage simulation module is used to simulate and calculate disk usage information based on the obtained IO space statistics.

7. An I / O space statistics and retrieval device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the I / O space statistics and retrieval method as described in any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the IO space statistics and retrieval method as described in any one of claims 1 to 5.