Raid data processing method and system and electronic device
By setting memory buffers in the Raid system to schedule business IO tasks and synchronous IO tasks, the problem of unreasonable disk bandwidth scheduling in the Raid system is solved, and synchronization speed is maximized and synchronization performance is improved.
Patent Information
- Application Number
- CN202411111854.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-08-13
AI Technical Summary
The disk bandwidth scheduling of existing Raid systems is unreasonable during synchronization, resulting in too fast or too slow synchronization speed, affecting the normal execution of business IO tasks, and disk corruption during synchronization may lead to data loss.
By setting a memory buffer in Raid, service IO tasks are cached, service IO tasks and synchronous IO tasks are scheduled according to the existing situation of service IO tasks in the memory buffer, priority is given to meeting the disk bandwidth requirements of service IO tasks, and ensuring service IO tasks While doing it normally, make full use of disk bandwidth to improve synchronization speed.
It maximizes synchronization speed, improves synchronization performance, solves the problem of unreasonable disk bandwidth scheduling between business IO tasks and synchronous IO tasks, and improves the adaptive execution speed of synchronous IO tasks.
Smart Images

Figure CN119148929A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage technology, and in particular to a RAID data processing method, system and electronic device. Background Art
[0002] Raid (redundant arrays of independent disks) is a disk group with larger capacity, which is composed of multiple independent disks. It improves performance through disk concurrency and improves data security through data redundancy. The working principle of Raid is to construct redundant data as verification data through preset rules. When some data is lost, the lost data is recalculated from the remaining data through inverse operation. Therefore, in order to recover the lost data through inverse operation, it is necessary to ensure that the redundant verification data and the normal data meet the preset rules.
[0003] When the Raid is just created or a disk is dropped and a new disk is added during the use of the Raid, the internal data does not comply with this rule. The process of calculating and writing verification data according to this rule is called Raid synchronization. Generally, synchronization takes a while, and it is hoped that the synchronization process will be completed as quickly as possible. However, the read and write bandwidth of each disk is limited. The synchronization process will occupy a part of the bandwidth and cause the head to jump, which will affect the bandwidth of normal business. If the synchronization speed is too fast, normal business may not be able to write to the Raid normally; if the synchronization speed is too slow, the synchronization cycle will be too long. If the disk is damaged during the synchronization period, the Raid may fail and data may be lost.
[0004] The current treatment of this problem is usually not very intelligent. For example, Raid in the Linux kernel only provides the minimum and maximum speed settings, and then controls the synchronization speed to be within the minimum and maximum speed range. This treatment is flawed. If the speed is set too low, the synchronization speed will be too slow and the synchronization cycle will be too long; if the speed is set too high, the synchronization IO task will occupy too much disk bandwidth, affecting the business IO task.
[0005] With regard to the problem of unreasonable Raid disk bandwidth scheduling between business IO tasks and synchronous IO tasks in related technologies, no effective solution has been proposed yet. Summary of the invention
[0006] In this embodiment, a Raid data processing method, system and electronic device are provided to solve the problem of unreasonable disk bandwidth scheduling between business IO tasks and synchronous IO tasks in the related art.
[0007] In a first aspect, a Raid data processing method is provided in this embodiment, including:
[0008] Determine whether there is a business IO task in the memory buffer of the independent redundant disk array (Raid);
[0009] In the case where it is determined that there is a service IO task in the memory buffer in the independent redundant disk array, the service IO task in the memory buffer is allocated to the execution module of the independent redundant disk array;
[0010] 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.
[0011] In some embodiments, determining whether there is a service IO task in a memory buffer in a redundant independent disk array (Raid) includes:
[0012] Obtaining the count value of the business IO task in the memory buffer;
[0013] Determine 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 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.
[0015] In some embodiments, after allocating the service IO tasks in the memory buffer to the execution module, the method further includes:
[0016] Update the count value of the business IO task in the memory buffer.
[0017] In some embodiments, when the business IO tasks in the memory buffer are allocated, generating and allocating synchronous IO tasks to the execution module includes:
[0018] The synchronous IO task is allocated to the execution module based on a preset window value.
[0019] In some embodiments, when the business IO tasks in the memory buffer are allocated, generating and allocating synchronous IO tasks to the execution module includes:
[0020] Get the average execution time of the synchronous IO task in each window value;
[0021] Determine whether the average execution time of the synchronous IO task in each window value is greater than a time threshold;
[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, the synchronous IO task is allocated 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, the generation and allocation of the synchronous IO task of the current window value is suspended, and the average execution time of the synchronous IO task is set to 0.
[0025] In some embodiments, after allocating the synchronous IO task to the execution module based on a preset window value, the method further includes:
[0026] Obtaining the count value of the business IO task in the memory buffer;
[0027] Determine 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, 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.
[0029] In some of the embodiments, before determining whether there is a service IO task in the memory buffer of the independent redundant disk array (Raid), the method further includes:
[0030] When the independent redundant disk array receives a service IO task, it sends the service IO task to the memory buffer.
[0031] In a second aspect, a Raid data processing system is provided in this embodiment, including: a memory buffer, a scheduling module, an execution module and a storage area; wherein,
[0032] The memory buffer is used to cache business IO tasks;
[0033] The scheduling module is coupled to the memory buffer and the execution module respectively, and is used to execute the Raid data processing method described in the first aspect above;
[0034] 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.
[0035] In a third aspect, an electronic device is provided in this embodiment, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the Raid data processing method described in the first aspect.
[0036] The above-mentioned Raid data processing method, system and electronic device cache business IO tasks by setting a memory buffer in Raid, and schedule business IO tasks and synchronous IO tasks according to the inventory of business IO tasks in the memory buffer. While ensuring the normal completion of business IO tasks, the synchronous IO tasks can make full use of the disk bandwidth of Raid to maximize the performance of the disk, maximize the synchronization speed, improve the synchronization performance, solve the problem of unreasonable Raid disk bandwidth scheduling between business IO tasks and synchronous IO tasks, and improve the adaptive execution speed of synchronous IO tasks.
[0037] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0039] Figure 1 A hardware structure block diagram of a terminal of a Raid data processing method in one embodiment;
[0040] Figure 2 A flowchart of a Raid data processing method in one embodiment;
[0041] Figure 3 A flowchart of a Raid data processing method in another embodiment;
[0042] Figure 4 A structural diagram of a Raid data processing system in one embodiment;
[0043] Figure 5 A schematic diagram of the operating principle of a Raid data processing system in one embodiment;
[0044] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0045] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0046] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0047] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 FIG. 1 is a hardware structure diagram of a terminal of a Raid data processing method according to an embodiment of the present application. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 101 and memory 102 for storing data, wherein processor 101 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 103 and an input and output device 104 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0048] The memory 102 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the Raid data processing method in this embodiment. The processor 101 executes various functional applications and data processing by running the computer program stored in the memory 102, that is, to implement the above method. The memory 102 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 102 may further include a memory remotely arranged relative to the processor 101, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0049] The transmission device 103 is used to receive or distribute data via a network. The above network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 103 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 103 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0050] Raid in the Linux kernel provides the minimum speed and maximum speed settings to control the synchronization speed within the minimum speed and maximum speed range. This processing is flawed. If the speed is set too low, the synchronization speed will be too slow and the synchronization cycle will be too long; if the speed is set too high, the synchronization IO task will occupy too much disk bandwidth, affecting the normal reading and writing of the business. To solve this problem, a feasible solution is to periodically count the data volume 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, so that the two give priority to the performance of the business IO task in the process of competition, adjust the synchronization speed to the maximum as much as possible, and implement the automatic adjustment strategy of the synchronization speed. However, the disadvantage of this solution is that the adjustment strategy depends on the statistical data of the last few cycles, resulting in insufficient timeliness of adjustment and lag. In some cases, in order to ensure the normal execution of the business IO task, the strategy will be conservative and some synchronization performance will be sacrificed.
[0051] To solve the above problems, in one embodiment, Figure 2 As shown in the figure, a Raid data processing method is provided. The method automatically adjusts the Raid synchronization speed according to the business pressure (i.e. the data volume of the business IO task), optimizes the synchronization speed while ensuring the normal operation of the business, and realizes adaptive high-speed synchronization. Figure 1 The terminal in is used as an example to illustrate the process, including the following steps:
[0052] Step S201, determining whether there is a service IO task in a memory buffer in a redundant independent disk array (Raid).
[0053] The working principle of Raid is to construct redundant data as verification data through preset rules. When some data is lost, the lost data is recalculated from the remaining data through inverse operation. Therefore, in order to retrieve the lost data through inverse operation, it is necessary to ensure that the redundant verification 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] Among them, business IO tasks refer to the input / output operations (I / O) performed by applications or services when performing their core functions. These operations are related to the business logic processing of the system, such as database queries, file reading and writing, network communications, etc., which are all part of business IO 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 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. Allocating 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 temporary caching of 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 there is a service IO task in the memory buffer of the independent redundant disk array, the service IO task in the memory buffer is allocated to the 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] Among them, the count value of the business IO task in the memory buffer can be used as the 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 a 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, then the disk bandwidth demand of the business IO task should be met first, that is, the business IO task in the memory buffer is first allocated to the execution module. On the contrary, 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 has been allocated, then the subsequent step S203 can be entered.
[0062] In one embodiment, an initial count value may be set, and each time a service IO task is sent to Raid, the service IO tasks are first cached in the memory buffer, and the initial count value is accumulated. Each time a service IO task in the memory buffer is assigned to an execution module, the count value of the service IO task in the memory buffer is updated (decreased) to facilitate monitoring of the stock of service IO tasks in the memory buffer.
[0063] Step S203, when the business IO tasks in the memory buffer are allocated, generate and allocate synchronous IO tasks to the execution module, wherein the execution module is used to execute the business IO tasks and synchronous IO tasks, and read and write the business IO tasks and synchronous IO tasks to the storage area.
[0064] When the business IO tasks in the memory buffer are allocated, a synchronous IO task can be generated and allocated to the execution module to allocate disk bandwidth for the synchronous IO task.
[0065] In the above steps S201 to S203, a memory buffer is set in Raid as a temporary buffer to cache business IO tasks, and business IO tasks and synchronous IO tasks are scheduled according to the stock of business IO tasks in the memory buffer. While ensuring the normal completion of business IO tasks, synchronous IO tasks can make full use of the disk bandwidth of Raid to maximize the performance of the disk, maximize the synchronization speed, improve the synchronization performance, solve the problem of unreasonable Raid disk bandwidth scheduling between business IO tasks and synchronous IO tasks, and improve the adaptive execution speed of synchronous IO tasks.
[0066] In one embodiment, when the business IO tasks in the memory buffer are allocated, a synchronous IO task is generated and allocated to the execution module, including: allocating the synchronous IO task to the execution module based on a preset window value (window).
[0067] Allocating synchronous IO tasks to execution modules based on a preset window value means that the number of synchronous IO tasks allocated at a time is a window value, and accordingly, the disk size is adapted to the window value. The window value can be determined according to actual conditions, for example, 256KB, that is, the number of synchronous IO tasks allocated at a time is 256KB, and the disk size is also 256KB.
[0068] Furthermore, in the process of generating and assigning synchronous IO tasks to the execution module, the average execution time of the synchronous IO tasks in each window value can be obtained; it is determined whether the average execution time of the synchronous IO tasks in each window value is greater than the time threshold; if it is determined that the average execution time of the synchronous IO tasks in each window value is not greater than the time threshold, the synchronous IO tasks are assigned to the execution module based on the current window value. Conversely, if it is determined that the average execution time of the synchronous IO tasks in each window value is greater than the time threshold, the generation and assignment of the synchronous IO tasks of the current window value are suspended, and the average execution time of the synchronous IO tasks is set to 0.
[0069] In this embodiment, after a synchronous IO task of a window value is issued, it is paused and waited 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 preset time threshold (e.g., 15 milliseconds), it means that the disk performance can meet the current load, and then the synchronous IO task of a window value can continue to be generated and issued. On the contrary, if the average execution time of the synchronous IO task is greater than the preset time threshold (e.g., 15 milliseconds), it means that the disk performance can no longer meet the current load, then the generation and issuance of the synchronous IO task is suspended, and the average execution time of the synchronous IO task is set to 0. This setting allows the window value period to have a chance to regenerate and issue the synchronous IO task.
[0070] In one embodiment, after allocating the synchronous IO task to the execution module based on a preset window value, the method also includes: obtaining the count value of the business IO task in the memory buffer; determining 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, suspending the generation and allocation of the synchronous IO task of the next window value to the execution module, and allocating the business IO task in the memory buffer to the execution module.
[0071] In this embodiment, after a synchronous IO task of a window value is executed, if a new business IO task comes in (that is, the IO task count value in the memory buffer is not 0), it is necessary to first suspend the generation and allocation of the synchronous IO task of the next window value to the execution module, and then issue and execute the business IO task, giving priority to meeting the disk bandwidth requirements of the business IO task.
[0072] In one embodiment, Figure 3 Another Raid data processing method is provided, and the process includes the following steps:
[0073] Step S301, determine whether the count value of the business IO task is greater than 0; if so, execute step S302; if not, execute step S303;
[0074] Step S302, issuing and executing business IO tasks;
[0075] Step S303, updating the count value of the business IO task;
[0076] Step S304, determining whether the average execution time of the synchronous IO task is greater than the time threshold; if so, executing step S305; if not, executing step S306;
[0077] Step S305, suspend the synchronous IO task of generating and allocating the current window value, and set the average execution time of the synchronous IO task to 0; after setting, jump to step S301;
[0078] Step S306, issuing and executing a synchronous IO task of a window value;
[0079] Step S307, waiting for the synchronous IO task to be completed;
[0080] Step S308, calculate the average execution time of the synchronous IO task; after the calculation, jump to step S304.
[0081] In this embodiment, the Raid synchronization speed is automatically adjusted according to the business pressure, so that the synchronization speed reaches the optimal value under the premise of ensuring the normal operation of the business. In addition, when the disk performance can no longer meet the current load, the generation and issuance of synchronous IO tasks are suspended, and the average execution time of synchronous IO tasks is set to 0. This setting allows the window value period to have a chance to regenerate and issue synchronous IO tasks.
[0082] In one embodiment, Figure 4 A Raid data processing system is provided, which includes: a memory buffer 401, a scheduling module 402, an execution module 403 and a storage area 404; wherein the memory buffer 401 is used to cache business IO tasks; the scheduling module 402 is respectively coupled to the memory buffer 401 and the execution module 403, and is used to execute the Raid data processing method of any of the above-mentioned embodiments; the execution module 403 is respectively coupled to the scheduling module 402 and the storage area 404, and is used to execute business IO tasks and synchronous IO tasks, and read and write business IO tasks and synchronous IO tasks to the storage area 404.
[0083] Combination Figure 4 , Figure 5 A schematic diagram of the operation principle of the Raid data processing system is provided. In this embodiment, by setting a memory buffer 401 and a scheduling module 402 in the Raid module, the business IO task is first placed in the memory buffer 401 for caching, and the scheduling module 402 first allocates the business IO task to the execution module 403 according to the business IO task in the memory buffer 401. When the business IO task in the memory buffer 401 is allocated, the synchronous IO task is generated and allocated to the execution module 403, that is, the business IO task in the memory buffer 401 is processed first, and then the remaining disk bandwidth is allocated to the synchronous IO task. While ensuring the normal completion of the business IO task, the synchronous IO task can make full use of 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 Raid disk bandwidth scheduling between business IO tasks and synchronous IO tasks, and improve the adaptive execution speed of the synchronous IO task.
[0084] In this embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0085] Optionally, the electronic device may 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 this embodiment, the processor may be configured to perform the following steps through a computer program:
[0087] Determine whether there is a business IO task in the memory buffer of the independent redundant disk array (Raid);
[0088] When it is determined that there is a business IO task in the memory buffer of the independent redundant disk array, the business IO task in the memory buffer is allocated to the execution module of the independent redundant disk array;
[0089] 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 tasks and the synchronous IO tasks, and read and write the business IO tasks and the synchronous IO tasks to the storage area.
[0090] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program: determining whether there is a service IO task in a memory buffer in an independent redundant disk array (Raid), including:
[0091] Get the count value of the business IO task in the memory buffer;
[0092] Determine whether the count value of the business IO task in the memory buffer is greater than 0;
[0093] 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.
[0094] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program: after allocating the service IO tasks in the memory buffer to the execution module, the method further includes:
[0095] Update the count value of the business IO task in the memory buffer.
[0096] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program: when the service IO tasks in the memory buffer are allocated, generating and allocating a synchronous IO task to an execution module, including:
[0097] The synchronous IO tasks are assigned to the execution modules based on the preset window value.
[0098] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program: when the service IO tasks in the memory buffer are allocated, generating and allocating a synchronous IO task to an execution module, including:
[0099] Get the average execution time of the synchronous IO task in each window value;
[0100] Determine whether the average execution time of the synchronous IO task in each window value is greater than the time threshold;
[0101] 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.
[0102] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0103] If it is determined that the average execution time of the synchronous IO task in each window value is greater than the time threshold, the generation and allocation of the synchronous IO task of the current window value is suspended, and the average execution time of the synchronous IO task is set to 0.
[0104] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program: after allocating the synchronous IO task to the execution module based on the preset window value, the method further includes:
[0105] Get the count value of the business IO task in the memory buffer;
[0106] Determine whether the count value of the business IO task in the memory buffer is greater than 0;
[0107] 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 next window value of the synchronous IO task to the execution module is suspended, and the business IO task in the memory buffer is allocated to the execution module.
[0108] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program: before determining whether there is a service IO task in a memory buffer in an independent redundant disk array (Raid), the method further includes:
[0109] When the independent redundant disk array receives a service IO task, it sends the service IO task to the memory buffer.
[0110] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.
[0111] In addition, in combination with the Raid data processing method provided in the above embodiments, a storage medium may be provided in this embodiment to implement the Raid data processing method. The storage medium stores a computer program, and when the computer program is executed by a processor, any one of the Raid data processing methods in the above embodiments is implemented.
[0112] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used 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 operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store Raid data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a Raid data processing method is implemented.
[0113] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0114] It should be understood that the specific embodiments described above are only used to explain the relevant applications, rather than to limit them. According to the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.
[0115] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.
[0116] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this 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, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in 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 memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access 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 and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0118] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A Raid data processing method, characterized in that: include: Determine whether there is a business IO task in the memory buffer of the independent redundant disk array (Raid); In the case where it is determined that there is a service IO task in the memory buffer in the independent redundant disk array, the service IO task in the memory buffer is allocated to the 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.
2. The Raid data processing method according to claim 1, characterized in that: Determine whether there is a business IO task in the memory buffer of the independent redundant disk array (RAID), including: Obtaining the count value of the business IO task 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, characterized in that: 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, characterized in that: When the business IO tasks in the memory buffer are allocated, generating and allocating synchronous IO tasks to the execution module 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 4, characterized in that: When the business IO tasks in the memory buffer are allocated, generating and allocating synchronous IO tasks to the execution module 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 a time threshold; 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.
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 greater than the time threshold, the generation and allocation of the synchronous IO task of the current window value is suspended, and the average execution time of the synchronous IO task is set to 0.
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 task 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, characterized in that: Before determining whether there is a service IO task in the memory buffer of the independent redundant 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 described in 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
RAID reconstruction triggering method and apparatus
CN106980468A
Magnetic disk management method and apparatus, storage medium, and device
CN109164981A
Method, electronic device and program product for raid reconstruction
CN115237330A
Synchronization method and device of disk array, electronic equipment and medium
CN117472284A
Accessing data based on a dispersed storage network rebuilding issue
US20150355979A1
