A RAID 5 / 6 Disk I / O Request Sorting and Aggregation Method and Device

By decomposing I/O requests to temporary windows in the RAID 5/6 system and evaluating resources, registering or suspending relay windows, the problem of uneven resource allocation and low write efficiency in the system when handling multiple I/O requests is solved, and performance improvement and resource optimization are achieved.

CN118860282BActive Publication Date: 2025-05-27WUXI STARS MICRO SYSTEM TECHNOLOGIES CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410878331.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2025-05-27
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

When handling multiple disk I/O requests, the RAID 5/6 system has problems such as uneven resource allocation, low write efficiency, check disk life loss, I/O processing delay and low resource utilization.

Method used

By selecting the I/O request from multiple waiting queues, decompose it into a temporary window and evaluate whether there is a matching relay window. If resources are sufficient, register a new relay window; if resources are insufficient, suspend I/O request. When the monitoring window life cycle ends, match the relay window with the official window and send I/O requests to disk.

Benefits of technology

It significantly improves the performance of the RAID 5/6 system when processing multiple I/O requests, improves the probability of the entire write, reduces the write penalty operation, extends the disk life, and improves resource usage efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118860282B_ABST
    Figure CN118860282B_ABST
Patent Text Reader

Abstract

The present application provides a method and apparatus for reorganizing and aggregating RAID 5 / 6 disk I / O requests. The method includes: obtaining a disk I / O request stream from a waiting queue, decomposing the I / O requests, evaluating the resources of the I / O requests using a temporary window, and simultaneously determining whether there is a relay window with a matching access space; if not, suspending the I / O requests in the temporary window to a suspension queue; if so, aggregating the temporary window by the relay window, then matching the relay window with a formal window, dispatching the I / O requests associated with the formal window to the disk based on the matching result, and returning an acknowledgment message according to the execution result of the I / O requests. The technical solution of the present application improves the probability of the entire system write, and enhances the overall performance of the system and the disk life.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of disk read and write, and particularly relates to a method and device for sorting and aggregating RAID 5 / 6 disk I / O requests. Background Art

[0002] Redundant Array of Independent Disks (RAID) technology improves data reliability and system read / write performance by dispersing data among multiple disks. RAID 5 uses striping and parity checking to ensure data integrity in case of a single disk failure, while RAID 6 further improves the system's fault tolerance by adding an extra parity block.

[0003] In RAID 5 and RAID 6, if the data of a disk write operation exactly maps to a full stripe, the corresponding parity value can be directly calculated based on the values of the new data blocks. This process can be directly completed in the cache of the RAID, and the whole write does not require any extra read operations, which is the most efficient write operation. However, if the data of a disk write operation does not fill a stripe, it will cause write penalty behavior, and reconstruction write or read rewrite will be selected according to the amount of data.

[0004] Reconstruction write has one more operation of reading old data than the whole write, so its efficiency is lower than that of the whole write. Read rewrite has one more operation of reading old data and old parity than the whole write, so its efficiency is also lower than that of the whole write. The write penalty process increases the complexity of the write operation, especially in scenarios of frequent writes or high loads, and the negative impact of the write penalty on performance is more significant. Summary of the Invention

[0005] The purpose of this application is to provide a method and device for sorting and aggregating RAID 5 / 6 disk I / O requests, aiming to solve problems such as uneven resource allocation, low write efficiency, wear of parity disks, I / O processing delay, and low resource utilization.

[0006] According to the first aspect of this application, a method for sorting and aggregating RAID 5 / 6 disk I / O requests is provided, including:

[0007] Select one of multiple waiting queues to obtain disk I / O requests, decompose a single I / O into a temporary window according to stripe boundaries, then determine whether there is a relay window that matches the access space of the temporary window. When the monitoring window life cycle reaches, stop reading the current queue, switch to other waiting queues with I / O requests for reading, and restart the monitoring window timing;

[0008] If there is no relay window that matches the access space of the temporary window, the resources required by the temporary window are evaluated. If the evaluation results of all temporary windows are that the resources are sufficient, new relay windows are registered respectively and resources associated with the stripes are applied for. If the evaluation result of a temporary window is that the resources are insufficient and the current I / O request is not the first I / O request under the monitoring window, the disk I / O request is suspended in the suspension queue;

[0009] If there are matching relay windows in the access spaces of all temporary windows, the relay window aggregates the access information of the matching temporary windows and establishes an association relationship between the relay window and the I / O request; when the monitoring window life cycle ends, the I / O requests in the suspended queue are moved back to the waiting queue, and the relay window is matched with the formal window;

[0010] Based on the matching result between the relay window and the formal window, the I / O request associated with the formal window is dispatched to the disk, and a response message is returned according to the execution result of the I / O request.

[0011] In an optional implementation, if there is no relay window matching the access space of the temporary window, the resources required for the temporary window are evaluated, and if the evaluation results of all temporary windows are sufficient resources, new relay windows are registered respectively and resources associated with the stripe are applied for, and if the evaluation result of a temporary window is insufficient resources and the current I / O request is not the first I / O request under the monitoring window, the disk I / O request is suspended in a suspension queue, further comprising:

[0012] If there is no relay window matching the access space of the temporary window, register a new relay window according to the I / O request and apply for resources associated with the stripe, so that the resources of the new relay window meet the processing requirements of the temporary window;

[0013] If the resource application is successful, the relay window is matched with the formal window after the life cycle of the monitoring window ends;

[0014] If the resources are insufficient, the disk I / O request is suspended in a suspension queue;

[0015] After the life cycle of the monitoring window ends, the relay window is matched with the formal window.

[0016] In an optional implementation manner, the step of migrating the I / O requests in the suspended queue back to the waiting queue further includes:

[0017] All I / O requests in the suspended queue are moved back to the head of the waiting queue in order, and resources of the relay window are modified.

[0018] In an optional implementation manner, the registering a new relay window according to the I / O request and applying for resources associated with the stripe further includes:

[0019] For random I / O requests, register a random relay window and apply for resources based on the needs of each hitting I / O request;

[0020] For continuous I / O requests, register continuous relay windows, apply for full window resources, and count the total resources required for each hit I / O request. Correct the resources before the relay window is converted to a formal window to release excess resources.

[0021] In an optional implementation, after dispatching the I / O request associated with the formal window to the disk, the method further includes:

[0022] When the disk has processed all dispatched I / Os, the formal window and its corresponding resources are released.

[0023] According to a second aspect of the present application, a RAID 5 / 6 disk I / O request collation and aggregation device is provided, comprising:

[0024] A resource evaluation unit, configured to obtain a disk I / O request stream from a waiting queue, segment I / O requests from the disk I / O request stream through a monitoring window, decompose a single I / O request into temporary windows according to stripe boundaries, and determine whether there is a relay window that matches an access space of the temporary window;

[0025] A window management unit, configured to evaluate the resources of the temporary window when there is no relay window matching the access space of the temporary window, and to register new relay windows and apply for resources associated with the stripe if all temporary windows are evaluated to have sufficient resources;

[0026] If the evaluation result of a temporary window is insufficient resources and the current I / O request is not the first I / O request under the monitoring window, the disk I / O request is suspended in the suspension queue; if the access space of all temporary windows has a matching relay window (including newly registered ones), the relay window aggregates the access information of the matching temporary windows and establishes an association relationship between the relay window and the I / O request; when the monitoring window life cycle ends, the I / O requests in the suspension queue are moved back to the waiting queue, and the relay window is matched with the formal window;

[0027] A window execution unit is configured to dispatch I / O requests associated with the formal window to a disk based on a matching result between the relay window and the formal window, and return a response message according to an execution result of the I / O request.

[0028] Compared with the related art, the technical solution of the present application has the following advantages:

[0029] By optimizing and adjusting the order of I / O requests, the efficient aggregation of multiple requests is improved, the write probability of the entire strip is increased, thereby significantly improving the performance of the RAID 5 / 6 system in processing multi-VD multi-stream concurrent I / O request operations; by performing I / O resource evaluation and matching detection with the existing RWIN before processing the I / O request, optimizing and adjusting the order of I / O requests, avoiding excessive data occupying resources, making full use of limited resources, and significantly improving the resource utilization efficiency; reducing the disk write burden and extending the disk life; by inheriting the random / continuous characteristics of I / O, differentiating the processing of random RWIN and continuous RWIN, and at the same time adding a strategy of dynamically adjusting the life cycle to the random RWIN, it not only meets the business characteristics of the random I / O scenario and the continuous I / O scenario, but also enables the random I / O scenario to have a certain aggregation ability and can adapt to complex and changeable business scenarios. The solution of the present application adopts the idea of step-by-step processing and can apply the pipeline processing mechanism, which is convenient for conversion into a hardware circuit implementation.

[0030] Other features and advantages of the present application will be described in the following specification, and will be partially obvious from the specification, or will be understood by implementing the present application. The objectives and other advantages of the present application can be realized and obtained through the structures and processes pointed out in the specification and the drawings. Description of the Drawings

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the following will briefly introduce the drawings required for use in the description of the embodiments or the related art. Obviously, the following drawings are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0032] Figure 1 It is a schematic diagram of a method for sorting and aggregating RAID 5 / 6 disk I / O requests according to an exemplary embodiment of the present application.

[0033] Figure 2 It is an architecture diagram of a method for sorting and aggregating RAID 5 / 6 disk I / O requests according to an exemplary embodiment of the present application.

[0034] Figure 3 It is an overall flowchart of a method for sorting and aggregating RAID 5 / 6 disk I / O requests according to an exemplary embodiment of the present application.

[0035] Figure 4 It is a detailed flowchart of the RAID 5 / 6 disk I / O request sorting and aggregation method according to an exemplary embodiment of the present application. Specific embodiments

[0036] In order to make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0037] In a storage system, when there is only one space in the same virtual disk (VD) that generates continuous sequential I / O request access, it is called single-stream access; when there are two or more spaces, each space generates continuous sequential I / O request access, which is called multi-stream access. In the single-stream access scenario, the I / O request stream may have an out-of-order problem; in the multi-stream access scenario, not only will there be an out-of-order problem within a single I / O request stream, but due to the limitation of the storage access interface (usually there is only one access interface) between different I / O request streams, the I / O request streams generated by different spaces will be intertwined at the access interface. Therefore, whether it is single-stream access or multi-stream access, two adjacent I / O requests received by the storage device may not be continuous in space, and I / O requests for other stripes will be interspersed among the I / O requests for the same stripe. For the RAID 5 / 6 system to improve the performance of write operations, the key lies in whether it can efficiently utilize limited resources to optimize and sort I / O requests and effectively aggregate them, and try to avoid an operation that should be a full stripe at one time becoming two write penalty operations, so as to achieve a higher performance.

[0038] In the related art, full resources are applied for each stripe hit by an I / O request in sequence, and subsequent I / O requests are waited for to hit and aggregate. However, due to the overly scattered allocation of resources, the resource consumption speed is very fast. When the resources are lower than the system preset value, a forced elimination mechanism is triggered, and the stripe that was applied for earliest is written to the disk. At this time, the eliminated stripe has not reached the upper limit time of its aggregation life cycle and may be in a non-full stripe state. There may also be subsequent I / O requests that can make it reach the full stripe state within its life cycle, but due to the forced elimination, it is written to the disk in a non-full stripe state. At this time, a write penalty operation is introduced, increasing the processing duration of the I / O request. When subsequent I / O requests are executed, they may use the resources and data of previous stripes (for example, if reconstruction writes were previously used and the management mechanism permits), and at this time, it may be possible to satisfy the whole stripe write. However, since the stripe is operated twice, at least the parity disk executes 2 write operations, increasing the life loss of the parity disk. When subsequent I / O requests are executed, they may also not be able to use the resources and data of previous stripes (such as if read-write or the management mechanism does not permit), and at this time, it will still be written in a non-full stripe manner, introducing a write penalty operation again. In addition to affecting the life of the parity disk, it will also cause an extension of the processing time of the I / O request.

[0039] Generally speaking, the resource allocation of the traditional method is too scattered, resulting in a fast resource consumption speed and the inability to effectively utilize available resources. When the system resources are lower than the preset value, the forced elimination mechanism is triggered, causing some stripes that should have been able to be written as a whole to be written to the disk before reaching the upper limit of the aggregation life cycle, introducing a write penalty operation and increasing the processing duration of the I / O request. Due to the introduction of unnecessary reconstruction writes and read-writes, the parity disk executes multiple writes, increasing the life loss of the parity disk. The write penalty operation for non-full stripes will cause an extension of the I / O request processing time, reducing the overall processing efficiency. In addition, the resource utilization rate is not high, and the limitations of the management mechanism prevent the full utilization of the resources and data of previous stripes, affecting the performance. The intelligent management of the stripe life cycle is insufficient, unable to effectively predict and handle complex scenarios, resulting in waste of resources and time.

[0040] Based on the above analysis, the present application provides a RAID 5 / 6 disk I / O request sorting and aggregation method and device, which dynamically intercepts or sorts I / O requests according to the resource usage of the current system, ensuring that requests belonging to the same stripe in the out-of-order I / O stream can be quickly aggregated, thereby reducing the ineffective consumption of resources and the occurrence of write penalties. Further, the present application introduces a window and stripe mapping mechanism to accurately and efficiently pre-evaluate and plan resource consumption, enabling the system to more intelligently schedule I / O requests and achieve optimal resource allocation. Through this mechanism, the system's aggregation ability for I / O requests is improved, the probability of the whole stripe write operation is increased, and the performance loss caused by forced elimination and penalty writes is reduced.

[0041] This method realizes the intelligent aggregation of I / O requests by implementing windowed resource management, evaluation of I / O request resources, and an I / O request reordering mechanism, improving the probability of the entire system write, thereby enhancing the overall performance of the system and the disk life. Its principle is as Figure 1 shown.

[0042] The composition scheme of this application is as Figure 2 shown. This application uses a window (WIN) to manage the resources during the I / O request processing. The resources include a buffer (Buffer) and other elements related to I / O request processing. The window reflects the resource usage of a single stripe. The window can be implemented using a structure descriptor.

[0043] Windows are classified into a monitoring window (MWIN), a temporary window (TWIN), a relay window (RWIN), and a formal window (FWIN) according to their types. The MWIN is used to monitor I / O request inputs in real time and serves to split the I / O request stream; the TWIN is used to evaluate the resource consumption of a single I / O request operation; the RWIN is used to aggregate the I / O requests within a single window and manage the corresponding resources; the FWIN is used to manage the resources for a single window to execute I / O request operations and is the smallest operation unit for the I / O request to be calculated and processed on the disk.

[0044] The mapping between the window and the resource is a one-to-one relationship, and each resource is mapped only once in any one window. The mapping between the window and the I / O request is a many-to-many relationship. A single I / O request can be associated with multiple windows, and at the same time, a single window can also be associated with multiple I / O requests.

[0045] The registration of the window is triggered by an I / O request and is completed when the resources are sufficient. When the resources are insufficient, the system will decide whether to block and wait for resources or suspend the current I / O request according to the current situation to continue processing subsequent I / O requests. The window is released after all the operations in its contained space are completed, and the response of the I / O request is made after all the windows it is mapped to are released.

[0046] Before each I / O request is processed, it is first pre-decomposed and its resource consumption is evaluated according to the window. If the conditions are not met, it will be suspended and the subsequent I / O requests will continue to be evaluated; if the conditions are met, subsequent processing will be carried out.

[0047] WaitQ is used to cache I / O requests, receive user I / O requests and I / O requests migrated back from HoldQ. HoldQ is used to cache suspended I / O requests. The resource assessment unit is used to decompose I / O requests into temporary windows (TWIN) for analysis, and choose whether to suspend I / O requests or submit update requests to the window management unit based on the analysis results. The resource management unit is used for resource statistics, application and release. The window management unit is used for the application, release and information maintenance of RWIN and FWIN, as well as the mapping management of windows and I / O, windows and resources. The window execution unit is used to dispatch I / O requests associated with the formal window FWIN to the disk.

[0048] According to a further embodiment, a resource management unit is used to complete the statistics, application and release of resources.

[0049] According to a further embodiment, the window management unit may further include a window resource information unit for storing mapping information between windows and resources, and a window I / O request information unit for storing mapping information between windows and I / O requests.

[0050] The reply processing unit is used to retrieve the mapping relationship between the reply Reply corresponding to the I / O request and the window, and output the Reply at the same time.

[0051] See also Figure 3 The RAID5 / 6 disk I / O request arrangement and aggregation method provided by the present application includes:

[0052] Step 301: Obtain a disk I / O request stream from a waiting queue, segment I / O requests from the disk I / O request stream through a monitoring window, decompose a single I / O request into temporary windows according to stripe boundaries, and determine whether there is a relay window that matches the access space of the temporary window, wherein the relay window is used to apply for resources associated with the stripe.

[0053] For example, Figure 4 As shown in the process, the I / O request stream requests are first uniformly input into the waiting queue WaitQ for buffering. When WaitQ is not empty, a monitoring window MWIN is opened. MWIN is used to monitor the input I / O requests in real time, and plays the role of segmenting I / O requests. Preferably, the life cycle of MWIN can be in units of time, or in units of the number of I / O requests, or a combination of the two, and the length of the cycle depends on the business scenario. Each I / O request read from WaitQ has a unique window tag, which is used to distinguish between different MWINs. Furthermore, at the end of the current MWIN life cycle, if WaitQ is still not empty, the next MWIN is automatically opened.

[0054] A single I / O request may span multiple stripes, so multiple TWINs are needed to calculate the corresponding resource consumption. The evaluation of I / O request resources is completed through TWIN, that is, the evaluation between the space described by TWIN and the existing resources. TWIN releases and recycles resources after each resource evaluation.

[0055] Step 302: If there is no relay window matching the access space of the temporary window, the resources of the temporary window are evaluated. If the evaluation results of all temporary windows are that the resources are sufficient, new relay windows are registered respectively and resources associated with the stripe are applied for; if the evaluation result of a temporary window is that the resources are insufficient and the current I / O request is not the first I / O request under the monitoring window, the disk I / O request is suspended in the suspension queue;

[0056] If there is a matching relay window (including a newly registered window) in the access space of all temporary windows, the relay window aggregates the access information of the matching temporary windows and establishes an association relationship between the relay window and the I / O request; when the monitoring window life cycle ends, the I / O requests in the suspended queue are moved back to the waiting queue, and the relay window is matched with the formal window, which is used to manage resources for executing I / O request operations.

[0057] Specifically, if there is an RWIN that matches the TWIN space, the corresponding resources do not need to be applied for repeatedly. Unmatched spaces and resources need to apply for new RWINs and resources to correspond to them, and the information is updated in each RWIN that has changed.

[0058] If the system resources cannot meet the demand, the I / O request will be suspended in HoldQ until the end of the current MWIN cycle. To avoid the suspended I / O request being repeatedly suspended in extreme cases, the first I / O request in each MWIN adopts a blocking waiting strategy when it encounters insufficient resources.

[0059] In a further embodiment, if there is no relay window matching the access space of the temporary window, the resources of the temporary window are evaluated; if the evaluation results of all temporary windows are that the resources are sufficient, new relay windows are registered respectively and resources associated with the stripe are applied for; if the evaluation result of a temporary window is that the resources are insufficient and the current I / O request is not the first I / O request under the monitoring window, the disk I / O request is suspended in the suspension queue, further comprising:

[0060] If there is no relay window that matches the access space of the temporary window, register a new relay window according to the I / O request and apply for resources associated with the stripe, so that the resources of the new relay window meet the resource requirements of the temporary window; if the resources are insufficient, suspend the disk I / O request to the suspension queue; if the resource application is successful, after the life cycle of the MWIN ends, match the relay window with the formal window.

[0061] Through the above resource evaluation, I / O requests that do not match the existing RWIN can be screened out. Since only the I / O is parsed and the data of the I / O is not cached, both time and resources are saved, enabling the subsequent matching I / O to aggregate with the existing RWIN as soon as possible.

[0062] Exemplarily, at the end of the MWIN life cycle, all I / O requests in the HoldQ are migrated to the head of the WaitQ queue in sequence, ensuring that the I / O request that was suspended first is preferentially executed in the next MWIN cycle.

[0063] The RWIN is used for resource application and correction. Initial resource application is performed during RWIN registration. When an I / O request is hit again, the window information is updated and it is decided whether to continue applying for resources according to the specific situation. Resource correction is performed before the RWIN is converted to the FWIN. For example, the RWIN may apply for resources according to a full window (full stripe) during registration, but in fact the accessed space may not reach the full stripe, indicating that some resources are redundantly applied and need to be released during the correction process.

[0064] In addition, the RWIN inherits the characteristics of the current I / O request that triggers the application during registration. If the current I / O is a random I / O request, the RWIN characteristic is random. If the current I / O is a continuous I / O request, the RWIN characteristic is continuous. The identification of the random / continuous characteristics of I / O requests is prior art in the field and will not be elaborated herein.

[0065] Exemplarily, the random RWIN applies for resources according to the processing requirements for each hit I / O request, and does not apply for overlapping spaces. The continuous RWIN applies for full window (full stripe) resources during registration, and statistically records the total resources required for processing each hit I / O request. Resource correction is performed before the RWIN is converted to the FWIN to release redundant resources. The random RWIN generally does not require resource correction because it applies for resources according to the processing requirements of the I / O request itself. It only needs to be reconstructed when the aggregated spatial data volume reaches the condition from read-modify to rewrite-restructure boundary, and usually the probability of two random I / O requests hitting the same window is very small.

[0066] Exemplarily, RWIN describes the access space of a stripe. RWIN can occupy the necessary resources required for the entire stripe to process I / O. When continuous RWIN applies for resources according to the entire stripe write during registration, but it may only aggregate data from a part of the space and does not meet the condition of the entire stripe write, it is necessary to re-evaluate resources according to read rewrite or reconstruction write and release the redundant resources. If continuous RWIN is in the full stripe state or the MWIN window period has ended when it is in the non-full stripe state, the life cycle of continuous RWIN ends, and RWIN will be converted to FWIN. Ensure that there is no FWIN that matches other spaces before the conversion.

[0067] If the random RWIN and the continuous RWIN adopt the same life cycle strategy, it will cause a decline in system performance. Generally, it is difficult for random I / O requests to hit the same window. Therefore, it is difficult for random RWIN to form a full stripe condition. The long waiting time will not only delay the response time of I / O requests and increase the latency, but also reduce the resource transfer efficiency due to occupying resources for a long time without processing, thus affecting system performance. Therefore, in a further embodiment, the life cycle of random RWIN adopts a strategy of dynamically adjusting the life cycle according to the hit count, that is, the initial life cycle of random RWIN is A, and each time 1 I / O is hit, the time t is increased, while taking into account the life cycle conditions of continuous RWIN. Thus, it can not only meet the low-latency processing of random I / O requests, but also add the possibility of aggregation to a certain extent.

[0068] Step 303: Based on the matching result between the relay window and the formal window, dispatch the I / O requests associated with the formal window to the disk, and return a response message according to the execution result of the I / O requests.

[0069] Exemplarily, the relay window RWIN has a life cycle. If there is already a matching formal window FWIN, the life cycle of RWIN will be extended until the end of FWIN, and then RWIN will be converted to FWIN. RWIN can aggregate I / O requests during its life cycle. Once it is converted to FWIN, it locks the space and no longer aggregates I / O requests, but instead dispatches I / O requests.

[0070] FWIN is the window finally used to execute calculations and write to the disk. When it is generated, it enters the execution process. During the execution process, FWIN and the resources it manages are in a locked state until all the space data corresponding to FWIN is completely written to the disk, and the life cycle of FWIN will end, and then the corresponding resources will be released.

[0071] Furthermore, a single I / O request may have a mapping relationship with multiple FWINs. When all the mapped FWINs are completed, the I / O request will generate a completion response to the host.

[0072] It can be seen that the RAID 5 / 6 disk I / O request sorting and aggregation method provided by this application has the following advantages compared with the related art:

[0073] By optimizing and adjusting the order of I / O requests, the efficient aggregation of multiple requests is improved, and the probability of writing the entire strip is increased, thereby significantly improving the performance of the RAID 5 / 6 system when processing continuous concurrent I / O request operations; by performing I / O resource evaluation and matching detection with the existing RWIN before processing the I / O request, the order of I / O requests is optimized and adjusted to avoid excessive data occupying resources, so that limited resources are fully utilized, and the efficiency of resource utilization is significantly improved; the burden of disk writing is reduced and the life of the disk is extended; by inheriting the random / continuous characteristics of I / O, random RWIN and continuous RWIN are processed differently, and at the same time, the random RWIN is added with a strategy for dynamically adjusting the life cycle, which not only meets the business characteristics of random I / O scenarios and continuous I / O scenarios, but also enables random I / O scenarios to have certain aggregation capabilities and can adapt to complex and changeable business scenarios. The solution of this application adopts the idea of ​​step-by-step processing, and can apply the pipeline processing mechanism, which is easy to convert into hardware circuit implementation.

[0074] Accordingly, the present application provides a RAID 5 / 6 disk I / O request arrangement and aggregation device in a second aspect, comprising:

[0075] A resource evaluation unit, configured to obtain a disk I / O request stream from a waiting queue, segment I / O requests from the disk I / O request stream through a monitoring window, decompose a single I / O request into temporary windows according to stripe boundaries, and determine whether there is a relay window that matches an access space of the temporary window;

[0076] A window management unit, for evaluating the resources required by the temporary window when there is no relay window matching the access space of the temporary window; if the evaluation results of all temporary windows are that the resources are sufficient, registering new relay windows respectively and applying for resources associated with the stripe; if the evaluation result of a temporary window is that the resources are insufficient and the current I / O request is not the first I / O request under the monitoring window, suspending the disk I / O request to the suspension queue; if there are matching relay windows in the access spaces of all temporary windows, the access information of the temporary windows is aggregated by the relay window, and an association relationship between the relay window and the I / O request is established; when the monitoring window life cycle ends, the I / O requests in the suspension queue are moved back to the waiting queue, and the relay window is matched with the formal window;

[0077] A window execution unit, configured to dispatch I / O requests associated with the formal window to a disk based on a matching result between the relay window and the formal window, and return a response message according to an execution result of the I / O request.

[0078] The above device can be implemented by the RAID 5 / 6 disk I / O request sorting and aggregation method provided in the embodiments of the first aspect. For specific implementation manners, reference can be made to the descriptions in the embodiments of the first aspect, which will not be elaborated herein.

[0079] It can be understood that the circuit structures, names, and parameters described in the above embodiments are only examples. Those skilled in the art can also perform easily conceivable combinations and adjustments on the structural features of the above multiple embodiments according to actual needs, and should not limit the concept of this application to the specific details of the above examples.

[0080] Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A RAID 5 / 6 disk I / O request arrangement and aggregation method, characterized in that: include: Obtaining a disk I / O request stream from a waiting queue, segmenting I / O requests from the disk I / O request stream through a monitoring window, decomposing a single I / O request into a temporary window according to a stripe boundary, and determining whether there is a relay window that matches an access space of the temporary window; each disk I / O request in the waiting queue has a unique window tag for distinguishing the monitoring window to which it belongs; If there is no relay window matching the access space of the temporary window, the resources of the temporary window are evaluated; if the evaluation result is that the resources are sufficient, a new relay window is registered and used to apply for resources associated with the stripe; if the evaluation result is that the resources are insufficient and the current I / O request is not the first I / O request under the monitoring window, the disk I / O request is suspended in a suspension queue; The first I / O request under each monitoring window adopts a blocking waiting strategy when encountering insufficient resources; If there is a matching relay window in the access space of all temporary windows, the relay window aggregates the access information of the temporary windows and establishes an association relationship between the relay window and the I / O request; at the end of the monitoring window life cycle, the I / O request in the suspended queue is moved back to the waiting queue, and the relay window is matched with the formal window; Based on the matching result between the relay window and the formal window, the I / O request associated with the formal window is dispatched to the disk, and a response message is returned according to the execution result of the I / O request; The registering of a new relay window and applying for resources associated with the stripe further includes: For random I / O requests, register a random relay window and apply for resources based on the needs of each hitting I / O request; For continuous I / O requests, register continuous relay windows, apply for full window resources, and count the total resources required for each hit I / O request. Correct the resources before the relay window is converted to a formal window to release excess resources.

2. The RAID 5 / 6 disk I / O request arrangement and aggregation method according to claim 1, characterized in that: If there is no relay window matching the access space of the temporary window, the resources of the temporary window are evaluated; if the evaluation result is that the resources are sufficient, a new relay window is registered and used to apply for resources associated with the stripe; if the evaluation result is that the resources are insufficient and the current I / O request is not the first I / O request under the monitoring window, the disk I / O request is suspended in a suspension queue, further comprising: If there is no relay window matching the access space of the temporary window, register a new relay window according to the I / O request and use it to apply for resources associated with the stripe, so that the resources of the new relay window meet the resource requirements of the temporary window; If the resource application is successful, the relay window is matched with the formal window after the life cycle of the monitoring window ends; If the resources are insufficient, the disk I / O request is suspended in a suspension queue.

3. The RAID 5 / 6 disk I / O request arrangement and aggregation method according to claim 1, characterized in that: The step of migrating the I / O requests in the suspended queue back to the waiting queue further comprises: All I / O requests in the suspended queue are moved back to the head of the waiting queue in order, and resources of the relay window are modified.

4. The RAID 5 / 6 disk I / O request arrangement and aggregation method according to claim 1, characterized in that: After dispatching the I / O request associated with the formal window to the disk, the method further comprises: When the disk has processed all dispatched I / Os, the formal window and its corresponding resources are released.

5. A RAID 5 / 6 disk I / O request aggregation device, characterized in that: include: A resource evaluation unit is used to obtain a disk I / O request stream from a waiting queue, segment I / O requests from the disk I / O request stream through a monitoring window, decompose a single I / O request into a temporary window according to a stripe boundary, and determine whether there is a relay window that matches an access space of the temporary window; each disk I / O request in the waiting queue has a unique window tag for distinguishing the monitoring window to which it belongs; A window management unit, configured to evaluate resources required by a temporary window when there is no relay window matching the access space of the temporary window, and if the evaluation results of all temporary windows are that the resources are sufficient, register new relay windows respectively and apply for resources associated with the stripe, and if the evaluation result of a temporary window is that the resources are insufficient and the current I / O request is not the first I / O request under the monitoring window, suspend the disk I / O request to a suspension queue; The first I / O request under each monitoring window adopts a blocking waiting strategy when encountering insufficient resources; if the access space of all temporary windows has a matching relay window, the relay window aggregates the access information of the temporary window and establishes an association relationship between the relay window and the I / O request; when the monitoring window life cycle ends, the I / O requests in the suspended queue are moved back to the waiting queue, and the relay window is matched with the formal window; A window execution unit, configured to dispatch an I / O request associated with the formal window to a disk based on a matching result between the relay window and the formal window, and return a response message according to the I / O request execution result; The window management unit is further used for: For random I / O requests, register a random relay window and apply for resources based on the needs of each hitting I / O request; For continuous I / O requests, register continuous relay windows, apply for full window resources, and count the total resources required for each hit I / O request. Correct the resources before the relay window is converted to a formal window to release excess resources.

6. The RAID 5 / 6 disk I / O request arrangement and aggregation device according to claim 5, characterized in that: The window management unit is further used for: If there is no relay window matching the access space of the temporary window, register a new relay window according to the I / O request and apply for resources associated with the stripe, so that the resources of the new relay window meet the resource requirements of the temporary window; If the resource application is successful, the relay window is matched with the formal window after the life cycle of the monitoring window ends; If the resources are insufficient, the disk I / O request is suspended in a suspension queue.

7. The RAID 5 / 6 disk I / O request arrangement and aggregation device according to claim 5, characterized in that: The window management unit is further used for: All I / O requests in the suspended queue are moved back to the head of the waiting queue in order, and resources of the relay window are modified.

8. The RAID 5 / 6 disk I / O request arrangement and aggregation device according to claim 5, characterized in that: The window execution unit is further used for: After the I / O requests associated with the formal window are dispatched to the disk, when the disk has processed all dispatched I / Os, the formal window and its corresponding resources are released.

Citation Information

Patent Citations

  • Data writing method and device

    CN110471615A