Raid data processing method, system, and electronic device

By setting up a memory buffer and scheduling module in Raid, business and synchronous IO tasks are scheduled according to the inventory of business IO tasks, giving priority to meeting the disk bandwidth requirements of business IO tasks, and adjusting synchronous IO tasks using window values ​​and time thresholds, the problem of unreasonable bandwidth scheduling between business IO tasks and synchronous IO tasks in Raid data processing is solved, and the execution speed of synchronous IO tasks is improved.

CN119148929BActive Publication Date: 2025-10-17ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411111854.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2025-10-17
Estimated Expiration
2044-08-13

AI Technical Summary

Technical Problem

In the prior art, the disk bandwidth scheduling between business IO tasks and synchronization IO tasks in Raid data processing is unreasonable, resulting in slow synchronization speed or excessive bandwidth occupation, affecting the execution of normal business IO tasks.

Method used

By setting up a memory buffer in Raid to cache business IO tasks, business IO tasks and synchronous IO tasks are scheduled according to the inventory of business IO tasks in the memory buffer, giving priority to meeting the disk bandwidth requirements of business IO tasks, and allocating synchronous IO tasks after the business IO tasks are completed. The allocation of synchronous IO tasks is adjusted using preset window values ​​and time thresholds to ensure that synchronous IO tasks fully utilize the disk bandwidth.

Benefits of technology

While ensuring the normal completion of business IO tasks, it maximizes the execution speed of synchronous IO tasks, improves synchronization performance, solves the problem of unreasonable Raid disk bandwidth scheduling, and achieves adaptive execution speed of synchronous IO tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119148929B_ABST
    Figure CN119148929B_ABST
Patent Text Reader

Abstract

The application relates to a Raid data processing method, system and electronic device, wherein the method comprises the following steps: judging whether a business IO task exists in a memory buffer area in a redundant array of independent disks (Raid); in the case that it is judged that the business IO task exists in the memory buffer area in the redundant array of independent disks, the business IO task in the memory buffer area is distributed to an execution module of the redundant array of independent disks; when the distribution of the business IO task in the memory buffer area is completed, a synchronous IO task is generated and distributed to the execution module, wherein the execution module is used for executing the business IO task and the synchronous IO task, and the business IO task and the synchronous IO task are read and written to a storage area, so that the problem of unreasonable Raid disk bandwidth scheduling between the business IO task and the synchronous IO task is solved, and the adaptive execution speed of the synchronous IO task is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of storage, in particular to a raid data processing method and system and electronic device. BACKGROUND

[0002] Raid(redundant arrays of independent disks,independent redundant disk array) is composed of multiple independent disks to form a larger capacity disk group, improves performance through disk concurrency, and improves data security through data redundancy. The working principle of Raid is to construct redundant data as check data through a preset rule, and when part of the data is lost, the lost part of the data is recalculated from the remaining data through inverse operation. Therefore, in order to inverse operation to retrieve the lost data, it is necessary to ensure that the redundant check data and the normal data comply with the preset rule.

[0003] When the Raid is just created or the Raid has a disk drop and a new disk is added during use, the internal data does not comply with this rule. The process of calculating and writing the check data according to this rule is called Raid synchronization. Generally, synchronization needs a period of time, and it is hoped that the synchronization process is completed as soon as possible. However, the read-write bandwidth of each disk is limited, the synchronization process will occupy a part of the bandwidth, and the head jump will be caused, which will affect the bandwidth of normal business. If the synchronization speed is too fast, it may cause the normal business to be unable to normally write to the Raid; if the synchronization speed is too slow, it will cause the synchronization period to be too long, and in case of disk damage during synchronization, it may cause the Raid to fail and lose data.

[0004] Currently, the processing of this problem is usually not very intelligent. For example, the Raid in the Linux kernel only provides the setting of the minimum speed and the maximum speed, and then controls the synchronization speed to be within the interval of the minimum speed and the maximum speed. Such processing has defects, such as too small speed setting, which will cause slow synchronization speed and long synchronization period; and too large speed setting, which will cause the synchronization IO task to occupy too much disk bandwidth and affect the business IO task.

[0005] In view of the problem of unreasonable Raid disk bandwidth scheduling between business IO tasks and synchronization IO tasks in the related art, there is currently no effective solution. SUMMARY

[0006] A Raid data processing method, system and electronic device are provided in the embodiment to solve the problem of unreasonable disk bandwidth scheduling between business IO tasks and synchronization IO tasks in the related art.

[0007] The first aspect, in the present embodiment provides a Raid data processing method, comprising:

[0008] determining whether there is a business IO task in a memory buffer in a redundant array of independent disks (Raid);

[0009] in a case where it is determined that there is a business IO task in the memory buffer in the redundant array of independent disks, allocating the business IO task in the memory buffer to an execution module of the redundant array of independent disks;

[0010] when the business IO task in the memory buffer is allocated, generating and allocating a synchronous IO task to the execution module, wherein the execution module is configured to execute the business IO task and the synchronous IO task, and read and write the business IO task and the synchronous IO task to a storage area.

[0011] In some embodiments, determining whether there is a business IO task in a memory buffer in a redundant array of independent disks (Raid) comprises:

[0012] obtaining a count value of the business IO task in the memory buffer;

[0013] determining whether the count value of the business IO task in the memory buffer is greater than 0;

[0014] if it is determined that the count value of the business IO task in the memory buffer is greater than 0, allocating the business IO task in the memory buffer to the execution module.

[0015] In some embodiments, after the business IO task in the memory buffer is allocated to the execution module, the method further comprises:

[0016] updating the count value of the business IO task in the memory buffer.

[0017] In some embodiments, when the business IO task in the memory buffer is allocated, generating and allocating a synchronous IO task to the execution module comprises:

[0018] allocating the synchronous IO task to the execution module based on a preset window value.

[0019] In some embodiments, when the business IO task in the memory buffer is allocated, generating and allocating a synchronous IO task to the execution module comprises:

[0020] obtaining an average execution time of the synchronous IO task at each window value;

[0021] determining whether the average execution time of the synchronous IO task in each window value is greater than a time threshold value;

[0022] if it is determined that the average execution time of the synchronous IO task in each window value is not greater than the time threshold value, then assigning the synchronous IO task to the execution module based on the current window value.

[0023] In some embodiments, the method further comprises:

[0024] if it is determined that the average execution time of the synchronous IO task in each window value is greater than the time threshold value, then pausing the generation and assignment of the synchronous IO task of the current window value, and setting the average execution time of the synchronous IO task to 0.

[0025] In some embodiments, after assigning the synchronous IO task to the execution module based on the preset window value, the method further comprises:

[0026] obtaining a count value of the business IO task in the memory buffer;

[0027] determining whether the count value of the business IO task in the memory buffer is greater than 0;

[0028] if it is determined that the count value of the business IO task in the memory buffer is greater than 0, then pausing the generation and assignment of the synchronous IO task of the next window value to the execution module, and assigning the business IO task in the memory buffer to the execution module.

[0029] In some embodiments, before determining whether there is a business IO task in the memory buffer in a redundant array of independent disks (Raid), the method further comprises:

[0030] when the redundant array of independent disks receives a business IO task, sending the business IO task to the memory buffer.

[0031] In a second aspect, a Raid data processing system is provided in the embodiments, comprising: a memory buffer, a scheduling module, an execution module and a storage area; wherein,

[0032] the memory buffer is configured to cache a business IO task;

[0033] the scheduling module is coupled to the memory buffer and the execution module respectively, and is configured to execute the Raid data processing method of the first aspect;

[0034] the execution module is coupled to the scheduling module and the storage area respectively, and is configured to execute the business IO task and the synchronous IO task, and read and write the business IO task and the synchronous IO task to the storage area.

[0035] In a third aspect, an electronic device is provided in the present embodiment, comprising a memory and a processor, the memory storing a computer program, and the processor is configured to run the computer program to execute the Raid data processing method of the first aspect.

[0036] The above-mentioned Raid data processing method, system and electronic device, by setting a memory buffer in the Raid to cache business IO tasks, and according to the inventory of business IO tasks in the memory buffer, scheduling business IO tasks and synchronous IO tasks, while ensuring the normal completion of business IO tasks, the synchronous IO tasks can fully utilize the disk bandwidth of the Raid, to maximize the performance of the disk, maximize the synchronization speed, improve the synchronization performance, solve the problem of unreasonable scheduling of Raid disk bandwidth between business IO tasks and synchronous IO tasks, and improve the adaptive execution speed of the synchronous IO tasks.

[0037] The details of one or more embodiments of the present application are presented in the following drawings and description to make other features, objects and advantages of the present application more apparent. BRIEF DESCRIPTION OF DRAWINGS

[0038] The accompanying drawings illustrated herein are used to provide further understanding of the present application, and constitute a part of the present application. The illustrative embodiments of the present application and their description serve to explain the present application, and do not constitute an improper limitation of the present application. In the drawings:

[0039] Figure 1 It is a hardware structure block diagram of the terminal of the Raid data processing method in one embodiment;

[0040] Figure 2 It is a flowchart of the Raid data processing method in one embodiment;

[0041] Figure 3 It is a flowchart of the Raid data processing method in another embodiment;

[0042] Figure 4 It is a structure diagram of the Raid data processing system in one embodiment;

[0043] Figure 5 It is a schematic diagram of the operation principle of the Raid data processing system in one embodiment;

[0044] Figure 6 It is an internal structure diagram of the computer device in one embodiment. DETAILED DESCRIPTION

[0045] In order to clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and explained below in conjunction with the accompanying drawings and embodiments.

[0046] Unless otherwise defined, technical terms or scientific terms used in the present application shall have the general meaning understood by a person skilled in the art to which the present application belongs. In the present application, "one", "a", "an", "the", "these" and similar words do not represent a quantitative limitation, and they can be singular or plural. In the present application, the terms "include", "contain", "have" and any variants thereof are intended to cover non-exclusive inclusion; for example, a process, method and system, product or device containing a series of steps or modules (units) are not limited to the listed steps or modules (units), but can include steps or modules (units) not listed, or can include other steps or modules (units) inherent to the process, method, product or device. In the present application, the terms "connected", "connected", "coupled" and the like do not limit to physical or mechanical connection, but can include electrical connection, whether direct or indirect. In the present application, "multiple" means two or more. The association between the associated objects is described as "and / or", which means that there can be three relationships, for example, "A and / or B" can mean that A exists alone, A and B exist together, and B exists alone. In general, the character " / " represents the relationship between the front and rear associated objects as "or". In the present application, the terms "first", "second", "third" and the like are only used to distinguish similar objects, and do not represent a specific order of the objects.

[0047] The method embodiments provided in the present embodiment can be executed in a terminal, a computer or a similar computing device. For example, the method is executed on a terminal, Figure 1 is a hardware structure block diagram of a terminal of the Raid data processing method of an embodiment of the present application. As shown in Figure 1 , the terminal can include one or more (only one is shown in Figure 1 ) processor 101 and memory 102 for storing data, wherein the processor 101 can include but not limited to processing devices such as microprocessor MCU or programmable logic device FPGA. The above terminal can also include transmission device 103 for communication function and input / output device 104. Those skilled in the art can understand that Figure 1 The structure shown is only schematic, which does not limit the structure of the above terminal. For example, the terminal can include more or less components than Figure 1 shown, or have a different configuration from Figure 1 shown.

[0048] The memory 102 can be used to store computer programs, such as software programs of application software and modules, such as a computer program corresponding to the Raid data processing method in the embodiment, and the processor 101 can execute various functions and data processing by running the computer programs stored in the memory 102, that is, implement the method described above. The memory 102 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 102 can further include a memory remotely arranged with respect to the processor 101, and the remote memory can be connected to the terminal through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0049] The transmission device 103 is used to receive or distribute data via a network. The network includes a wireless network provided by a communication provider of the terminal. In an example, the transmission device 103 includes a network adapter (NIC) which can be connected to other network devices through a base station so as to communicate with the Internet. In an example, the transmission device 103 can be a radio frequency (RF) module which is used to communicate with the Internet in a wireless manner.

[0050] The Raid in the Linux kernel controls the synchronization speed to be in the interval between the minimum speed and the maximum speed by providing the settings of the minimum speed and the maximum speed. Such processing is defective, for example, if the speed setting is too small, the synchronization speed is too slow, and the synchronization period is too long; if the speed setting is too large, the synchronization IO task occupies too much disk bandwidth, and the read and write of normal business are affected. To solve the problem, a feasible solution is to periodically count the data amount of the business IO task and the synchronization IO task, control and coordinate the relationship between the business IO task and the synchronization IO task, make the two in the process of competition to preferentially meet the performance of the business IO task, and as much as possible adjust the synchronization speed to the maximum, so as to realize the automatic adjustment strategy of the synchronization speed. However, the disadvantage of the solution is that the adjustment strategy depends on the statistical data of the last few periods, which leads to the adjustment not being timely enough and has hysteresis. In some cases, in order to ensure the normal execution of the business IO task, the strategy will be conservative, and part of the synchronization performance will be sacrificed.

[0051] To solve the above problems, in an embodiment, as shown in Figure 2 a Raid data processing method is provided, which automatically adjusts the Raid synchronization speed according to the business pressure (that is, the data amount of the business IO task), makes the synchronization speed optimal under the premise of ensuring the normal work of the business, and realizes the adaptive high-speed synchronization.Figure 1 The following steps are used as an example to illustrate the terminal in the example:

[0052] Step S201 , determining whether there is a service IO task in a memory buffer in a redundant array of independent disks (Raid).

[0053] Raid works by constructing redundant data as checksum data based on preset rules. When some data is lost, the lost data is recalculated from the remaining data through inverse calculations. Therefore, in order to recover the lost data through inverse calculations, it is necessary to ensure that the redundant checksum data and the normal data meet the preset rules.

[0054] During the data processing process of Raid, Raid contains two types of IO tasks, namely business IO tasks and synchronous IO tasks.

[0055] Business I / O tasks refer to the input / output (I / O) operations performed by applications or services when performing their core functions. These operations, such as database queries, file reading and writing, and network communications, are related to the system's business logic processing and are all part of business I / O tasks.

[0056] A synchronous IO task is a process in which the internal data does not conform to the preset rules when the RAID is just created or when a disk is dropped and a new disk is added during RAID use. The process of calculating and writing verification data according to the preset rules is called a synchronous IO task.

[0057] Whether it is a business IO task or a synchronous IO task, disk bandwidth needs to be allocated for processing during execution. Assigning business IO tasks or synchronous IO tasks to execution modules and having the execution modules execute these IO tasks is equivalent to the process of allocating disk bandwidth for them.

[0058] Optionally, before step S201, a memory buffer can be set in Raid. When the independent redundant disk array receives a business IO task, the business IO task is sent to the memory buffer for temporarily caching the business IO task. The cached data structure can be a queue or a linked list, which is not limited here.

[0059] Step S202 : when it is determined that a service IO task exists in the memory buffer of the independent redundant disk array, the service IO task in the memory buffer is allocated to an execution module of the independent redundant disk array.

[0060] When there are business IO tasks in the memory buffer, these business IO tasks are first assigned to the execution module, that is, disk bandwidth is allocated to business IO tasks first.

[0061] The count value of the business IO task in the memory buffer can be used as a scheduling basis between the business IO task and the synchronous IO task. Optionally, the count value of the business IO task in the memory buffer is obtained; it is determined whether the count value of the business IO task in the memory buffer is greater than 0; if it is determined that the count value of the business IO task in the memory buffer is greater than 0, the business IO task in the memory buffer is allocated to the execution module. In this embodiment, by setting the count value for the business IO task in the memory buffer, if the count value is 0, it means that there is a business IO task in the memory buffer, and the disk bandwidth demand of the business IO task should be met in priority, that is, the business IO task in the memory buffer is allocated to the execution module first. Otherwise, if it is determined that the count value of the business IO task in the memory buffer is 0, that is, the business IO task in the memory buffer is allocated, the subsequent step S203 can be entered.

[0062] In one embodiment, an initial count value can be set, and each time the business IO task is issued to the Raid, the business IO task is cached in the memory buffer, and the initial count value is accumulated. After the business IO task in the memory buffer is allocated to the execution module, the count value of the business IO task in the memory buffer is updated (decreased) so as to monitor the inventory of the business IO task in the memory buffer.

[0063] Step S203, when the business IO task in the memory buffer is allocated, the synchronous IO task is generated and allocated to the execution module, wherein the execution module is used to execute the business IO task and the synchronous IO task, and the business IO task and the synchronous IO task are read and written to the storage area.

[0064] When the business IO task in the memory buffer is allocated, the synchronous IO task can be generated and allocated to the execution module to allocate the disk bandwidth for the synchronous IO task.

[0065] In the above steps S201 to S203, by setting the memory buffer as a temporary buffer in the Raid to cache the business IO task, according to the inventory of the business IO task in the memory buffer, the business IO task and the synchronous IO task are scheduled, the synchronous IO task can fully utilize the disk bandwidth of the Raid to maximize the performance of the disk, to maximize the synchronization speed, to improve the synchronization performance, to solve the problem of unreasonable scheduling of the Raid disk bandwidth between the business IO task and the synchronous IO task, and to improve the adaptive execution speed of the synchronous IO task.

[0066] In one embodiment, when the business IO task in the memory buffer is allocated, the synchronous IO task is generated and allocated to the execution module, including: the synchronous IO task is allocated to the execution module based on a preset window value (window).

[0067] The assigning of the synchronous IO task to the execution module based on the preset window value refers to that the number of the synchronous IO task assigned at one time is one window value, and accordingly, the disk size and the window value are adapted to each other. The window value can be determined according to actual conditions, for example, 256 KB, that is, the number of the synchronous IO task assigned at one time is 256 KB, and the disk size is also 256 KB.

[0068] Further, in the process of generating and assigning the synchronous IO task to the execution module, the average execution time of the synchronous IO task in each window value can be obtained; it is judged whether the average execution time of the synchronous IO task in each window value is greater than a time threshold; if it is judged that the average execution time of the synchronous IO task in each window value is not greater than the time threshold, the synchronous IO task is assigned to the execution module based on the current window value. Otherwise, if it is judged that the average execution time of the synchronous IO task in each window value is greater than the time threshold, the generation and assignment of the synchronous IO task of the current window value are suspended, and the average execution time of the synchronous IO task is set to 0.

[0069] In the embodiment, after the synchronous IO task of one window value is issued, it is suspended and waits for completion, and the average execution time of all IO tasks in the current window value is monitored. If the average execution time of the IO task is not greater than the pre-set time threshold (for example, 15 ms), it is indicated that the disk performance can meet the current load, and the synchronous IO task of one window value can be continuously generated and issued. Otherwise, if the average execution time of the synchronous IO task is greater than the pre-set time threshold (for example, 15 ms), it is indicated that the disk performance cannot meet the current load, and the generation and issuance of the synchronous IO task are suspended, and the average execution time of the synchronous IO task is set to 0, so that the window value has an opportunity to re-generate and issue the synchronous IO task.

[0070] In one embodiment, after the synchronous IO task is assigned to the execution module based on the preset window value, the method further comprises: obtaining the count value of the service IO task in the memory buffer; judging whether the count value of the service IO task in the memory buffer is greater than 0; if it is judged that the count value of the service IO task in the memory buffer is greater than 0, the generation and assignment of the synchronous IO task of the next window value to the execution module are suspended, and the service IO task in the memory buffer is assigned to the execution module.

[0071] In the embodiment, after the synchronous IO task of one window value is executed, if there is a new service IO task (that is, the count value of the IO task in the memory buffer is not 0), the generation and assignment of the synchronous IO task of the next window value to the execution module are suspended, and the service IO task is issued and executed, so as to preferentially meet the disk bandwidth requirement of the service IO task.

[0072] In one embodiment, Figure 3 Another Raid data processing method is provided, which comprises the following steps:

[0073] Step S301, judging whether the count value of the service IO task is greater than 0; if yes, executing step S302; if no, executing step S303;

[0074] Step S302, issuing and executing the service IO task;

[0075] Step S303, updating the count value of the service IO task;

[0076] Step S304, judging whether the average execution time of the synchronous IO task is greater than the time threshold; if yes, executing step S305; if no, executing step S306;

[0077] Step S305, suspending the generation and distribution of the synchronous IO task of the current window value, and setting the average execution time of the synchronous IO task as 0; after setting, jumping to step S301;

[0078] Step S306, issuing and executing a window value of the synchronous IO task;

[0079] Step S307, waiting for the completion of the execution of the synchronous IO task;

[0080] Step S308, calculating the average execution time of the synchronous IO task; after calculation, jumping to step S304.

[0081] In the embodiment, the Raid synchronization speed is automatically adjusted according to the service pressure, so that the synchronization speed is optimized under the premise of ensuring the normal work of the service. When the disk performance cannot meet the current load, the generation and distribution of the synchronous IO task are suspended, and the average execution time of the synchronous IO task is set as 0, so that the window value has the opportunity to generate and distribute the synchronous IO task again.

[0082] In one embodiment, Figure 4 A Raid data processing system is provided, which comprises a memory buffer 401, a scheduling module 402, an execution module 403 and a storage area 404; wherein the memory buffer 401 is used for caching the service IO task; the scheduling module 402 is coupled to the memory buffer 401 and the execution module 403 respectively, and is used for executing the Raid data processing method of any one of the above embodiments; the execution module 403 is coupled to the scheduling module 402 and the storage area 404 respectively, and is used for executing the service IO task and the synchronous IO task, and reading and writing the service IO task and the synchronous IO task to the storage area 404.

[0083] In combinationFigure 4 , Figure 5 A schematic diagram of the operation principle of the Raid data processing system is provided. In the embodiment, by setting a memory buffer 401 and a scheduling module 402 in the Raid module, the service IO task is first placed in the memory buffer 401 for caching, the scheduling module 402 first allocates the service IO task to the execution module 403 according to the service IO task in the memory buffer 401, and when the service IO task in the memory buffer 401 is allocated, the synchronization IO task is generated and allocated to the execution module 403, that is, the service IO task in the memory buffer 401 is preferentially processed, and the remaining disk bandwidth is allocated to the synchronization IO task, which can fully utilize the disk bandwidth of the Raid to maximize the performance of the disk, maximize the synchronization speed, improve the synchronization performance, and solve the problem of unreasonable scheduling of the Raid disk bandwidth between the service IO task and the synchronization IO task, thereby improving the adaptive execution speed of the synchronization IO task.

[0084] In the embodiment, an electronic device is also provided, which includes a memory and a processor, the memory stores a computer program, and the processor is configured to execute the computer program to perform the steps in any of the above method embodiments.

[0085] Optionally, the electronic device can further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0086] Optionally, in the embodiment, the processor can be configured to execute the following steps through the computer program:

[0087] determine whether there is a service IO task in a memory buffer in a redundant array of independent disks (Raid);

[0088] in a case where it is determined that there is a service IO task in the memory buffer in the redundant array of independent disks, allocate the service IO task in the memory buffer to an execution module of the redundant array of independent disks;

[0089] when the service IO task in the memory buffer is allocated, generate and allocate a synchronization IO task to the execution module, wherein the execution module is configured to execute the service IO task and the synchronization IO task, and read and write the service IO task and the synchronization IO task to a storage area.

[0090] Optionally, in the embodiment, the processor can be configured to execute the following steps through the computer program: determine whether there is a service IO task in a memory buffer in a redundant array of independent disks (Raid), including:

[0091] obtaining a count value of the service IO tasks in the memory buffer;

[0092] determining whether the count value of the service IO tasks in the memory buffer is greater than 0;

[0093] if it is determined that the count value of the service IO tasks in the memory buffer is greater than 0, allocating the service IO tasks in the memory buffer to the execution module.

[0094] Optionally, in the embodiment, the processor can be configured to execute the following steps by using a computer program: after the service IO tasks in the memory buffer are allocated to the execution module, the method further comprises:

[0095] updating the count value of the service IO tasks in the memory buffer.

[0096] Optionally, in the embodiment, the processor can be configured to execute the following steps by using a computer program: when the service IO tasks in the memory buffer are allocated, generating and allocating a synchronization IO task to the execution module, comprising:

[0097] allocating the synchronization IO task to the execution module based on a preset window value.

[0098] Optionally, in the embodiment, the processor can be configured to execute the following steps by using a computer program: when the service IO tasks in the memory buffer are allocated, generating and allocating a synchronization IO task to the execution module, comprising:

[0099] obtaining an average execution time of the synchronization IO task at each window value;

[0100] determining whether the average execution time of the synchronization IO task at each window value is greater than a time threshold value;

[0101] if it is determined that the average execution time of the synchronization IO task at each window value is not greater than the time threshold value, allocating the synchronization IO task to the execution module based on a current window value.

[0102] Optionally, in the embodiment, the processor can be configured to execute the following steps by using a computer program:

[0103] if it is determined that the average execution time of the synchronization IO task at each window value is greater than the time threshold value, suspending generation and allocation of the synchronization IO task of the current window value, and setting the average execution time of the synchronization IO task to 0.

[0104] Optionally, in the embodiment, the processor can be configured to execute the following steps by using a computer program: after the synchronization IO task is allocated to the execution module based on the preset window value, the method further comprises:

[0105] obtaining a count value of the service IO task in the memory buffer;

[0106] determining whether the count value of the service IO task in the memory buffer is greater than 0;

[0107] If it is determined that the count value of the service IO task in the memory buffer is greater than 0, suspending the generation and distribution of the next window value synchronization IO task to the execution module, and distributing the service IO task in the memory buffer to the execution module.

[0108] Optionally, in the embodiment, the processor can be configured to execute the following steps by means of a computer program: before determining whether there is a service IO task in the memory buffer in the redundant array of independent disks (Raid), the method further comprises:

[0109] When the redundant array of independent disks receives the service IO task, sending the service IO task to the memory buffer.

[0110] It should be noted that the specific examples in the embodiment can refer to the examples described in the above embodiments and optional implementation manners, and will not be described herein again.

[0111] In addition, in combination with the Raid data processing method provided in the above embodiments, a storage medium can also be provided in the embodiment to implement the same. The storage medium has a computer program stored thereon; the computer program is executed by a processor to implement any one of the Raid data processing methods in the above embodiments.

[0112] In one embodiment, a computer device is provided, which can be a server, and an internal structure diagram of the computer device can be as shown in Figure 6 The computer device includes a processor, a memory and a network interface connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store Raid data. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement a Raid data processing method.

[0113] Those skilled in the art can understand that Figure 6 the structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0114] It is to be understood that the specific embodiments described above are merely illustrative of the application and that various modifications can be introduced without departing from the spirit of the application. Accordingly, the scope of the application is to be construed as not being limited to the embodiments described above.

[0115] Obviously, the drawings in the present application are only some examples or embodiments of the present application, and those skilled in the art can also apply the present application to other similar situations without creative labor. In addition, it can be understood that although the work done in the development process may be complex and long, but for those skilled in the art, some design, manufacture or production changes according to the technical content disclosed in the present application are only routine technical means, and should not be regarded as insufficient disclosure of the present application.

[0116] The word "embodiment" in the present application means that the specific features, structures or characteristics described in combination with the embodiments can be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily mean the same embodiment, nor does it mean independence or alternatives to other embodiments. It can be clearly or implicitly understood by those skilled in the art that the embodiments described in the present application can be combined with other embodiments without conflict.

[0117] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0118] The above-mentioned embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the scope of patent protection. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of protection of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.

Claims

1. A Raid data processing method, characterized in that: include: Determine whether there are business IO tasks in the memory buffer of the independent redundant disk array (RAID); In the case of determining that a service IO task exists in a memory buffer of the independent redundant disk array, allocating the service IO task in the memory buffer to an execution module of the independent redundant disk array; When the business IO tasks in the memory buffer are allocated, a synchronous IO task is generated and allocated to the execution module, wherein the execution module is used to execute the business IO task and the synchronous IO task, and read and write the business IO task and the synchronous IO task to the storage area; when the business IO tasks in the memory buffer are allocated, the synchronous IO task is generated and allocated to the execution module, including: if it is determined that the average execution time of the synchronous IO task in each window value is greater than the time threshold, suspending the generation and allocation of the synchronous IO task of the current window value, and setting the average execution time of the synchronous IO task to 0.

2. The Raid data processing method according to claim 1, wherein: Determine whether there are business I / O tasks in the memory buffer of the independent redundant disk array (RAID), including: Obtaining the count value of the business IO tasks in the memory buffer; Determine whether the count value of the business IO task in the memory buffer is greater than 0; If it is determined that the count value of the service IO tasks in the memory buffer is greater than 0, the service IO tasks in the memory buffer are allocated to the execution module.

3. The Raid data processing method according to claim 2, wherein: After allocating the service IO tasks in the memory buffer to the execution module, the method further includes: Update the count value of the business IO task in the memory buffer.

4. The Raid data processing method according to claim 1, wherein: When the business IO tasks in the memory buffer are allocated, generating and allocating synchronous IO tasks to the execution module also includes: The synchronous IO task is allocated to the execution module based on a preset window value.

5. The Raid data processing method according to claim 1, wherein: If it is determined that the average execution time of the synchronous IO task in each window value is greater than the time threshold, suspending the generation and allocation of the synchronous IO task of the current window value and setting the average execution time of the synchronous IO task to 0, the method includes: Get the average execution time of the synchronous IO task in each window value; Determine whether the average execution time of the synchronous IO task in each window value is greater than the time threshold.

6. The Raid data processing method according to claim 5, characterized in that: The method further comprises: If it is determined that the average execution time of the synchronous IO task in each window value is not greater than the time threshold, the synchronous IO task is allocated to the execution module based on the current window value.

7. The Raid data processing method according to claim 4, characterized in that: After allocating the synchronous IO task to the execution module based on the preset window value, the method further includes: Obtaining the count value of the business IO tasks in the memory buffer; Determine whether the count value of the business IO task in the memory buffer is greater than 0; If it is determined that the count value of the business IO task in the memory buffer is greater than 0, the generation and allocation of the synchronization IO task of the next window value to the execution module is suspended, and the business IO task in the memory buffer is allocated to the execution module.

8. The Raid data processing method according to claim 1, wherein: Before determining whether a service IO task exists in a memory buffer in a redundant independent disk array (RAID), the method further includes: When the independent redundant disk array receives the service IO task, it sends the service IO task to the memory buffer.

9. A Raid data processing system, characterized in that: include: Memory buffer, scheduling module, execution module and storage area; among them, The memory buffer is used to cache business IO tasks; The scheduling module is coupled to the memory buffer and the execution module respectively, and is used to execute the Raid data processing method according to any one of claims 1 to 8; The execution module is coupled to the scheduling module and the storage area respectively, and is used to execute the service IO task and the synchronous IO task, and read and write the service IO task and the synchronous IO task to the storage area.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the Raid data processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Magnetic disk management method and apparatus, storage medium, and device

    CN109164981A

  • Method, electronic device and program product for raid reconstruction

    CN115237330A