Scheduling strategy determination method and device, storage medium and program product
By determining the task type and RAID group identification in the RAID card and using multi-dimensional array matching scheduling strategy, the problem of only considering the priority of background tasks in the existing technology is solved, and a more applicable task scheduling strategy is implemented, and the tasks of RAID card are improved. Scheduling efficiency and applicability.
Patent Information
- Application Number
- CN202411118487.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-08-15
AI Technical Summary
Existing task scheduling methods only consider the priority of background tasks and cannot be applied to all scenarios, especially when multitasking is handled in RAID cards, which can lead to waste of resources and scheduling failures.
By determining the type of the newly triggered task and the execution task and its RAID group identity to which it belongs, using a multi-dimensional array to match the scheduling strategy, combining factors such as task type, RAID group relationship and workload, the most suitable scheduling strategy is determined to optimize task scheduling.
The optimal scheduling strategy is achieved based on multiple factors, which improves the applicability and efficiency of task scheduling, avoids resource waste and scheduling failures, and is suitable for different RAID card scenarios.
Smart Images

Figure CN118642666B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computers, and in particular, to a method and device for determining a scheduling strategy, a storage medium, and a program product. Background Art
[0002] With the rapid development of big data and artificial intelligence technology, the data on the Internet is becoming more and more diverse. In addition, the number of Internet users has also seen an unprecedented growth in the past decade. With the increasing number of Internet users, the number of visits to Internet companies has increased sharply, which has brought unprecedented challenges to companies.
[0003] Enterprises usually use storage servers to manage data. A large enterprise can have tens of thousands of storage servers. The RAID card is an important component of the storage server. The RAID card can manage hard disks in batches, creating RAID arrays and volumes on the upper layer of the array to provide storage services. Since the number of RAID groups managed by the RAID card is large, which may reach dozens or even hundreds, and the resources in the RAID card are limited, there may be only a few background tasks that can be processed at the same time. When the number of background tasks running at the same time reaches the upper limit, a new background task is triggered, and the new task needs to be scheduled.
[0004] The usual scheduling method is to proceed according to the priority of background tasks, that is, first determine the priority of background tasks according to their importance and urgency. When the number of tasks to be processed simultaneously reaches the upper limit, the newly triggered tasks are processed according to their priority. Tasks with higher priorities than the currently running background tasks can be interrupted. Tasks with the same or lower priorities are queued. The highest priority task in the queue will be executed after the currently running background tasks are completed.
[0005] However, this scheduling method is relatively simple and only considers the priority of background tasks. Scheduling in actual use may involve multiple factors. Scheduling based only on the priority of background tasks cannot be applied to all scenarios.
[0006] Regarding the technical problem in related technologies, the current task scheduling method only considers the priority of background tasks and cannot be applied to all scenarios, and no effective solution has been proposed yet. Summary of the invention
[0007] The embodiments of the present application provide a method and device for determining a scheduling strategy, a storage medium, and a program product to at least solve the problem in the related art that the current task scheduling method only considers the priority of background tasks and cannot be applied to all scenarios.
[0008] According to one embodiment of the present application, a method for determining a scheduling strategy is provided, which is applied to a RAID card, including: determining a first task type of a newly triggered task, and determining a first identifier of the RAID group to which the newly triggered task belongs; determining a second task type of an execution task in a task execution list, and determining a second identifier of the RAID group to which the execution task belongs; and determining a first scheduling strategy for task scheduling for the newly triggered task based on the first task type, the first identifier, the second task type and the second identifier.
[0009] In an exemplary embodiment, the first scheduling strategy for scheduling the newly triggered task based on the first task type, the first identifier, the second task type and the second identifier includes: determining whether the newly triggered task and the execution task belong to the same RAID group based on the first identifier and the second identifier, and obtaining a determination result; matching the first scheduling strategy in a multidimensional array based on the first task type, the second task type and the determination result, wherein the multidimensional array stores multiple second scheduling strategies, and the multiple second scheduling strategies include the first scheduling strategy.
[0010] In an exemplary embodiment, before determining the first scheduling strategy for scheduling the newly triggered task based on the first task type, the first identifier, the second task type and the second identifier, the method further includes: initializing the multidimensional array based on multiple task types and multiple determination results, wherein the multiple task types include the first task type and the second task type; configuring each element in the multidimensional array as a second scheduling strategy according to a first configuration operation to obtain the multiple second scheduling strategies.
[0011] In an exemplary embodiment, the multidimensional array is a three-dimensional array, and the multidimensional array includes: m*m*n elements and m*m*n indexes, wherein the index includes a first sub-index, a second sub-index and a third sub-index, the first sub-index is a first task identifier of the first task type, the second sub-index is a second task identifier of the second task type, and the third sub-index is the determination result. The value ranges of the first sub-index and the second sub-index are both [0, m), and the value range of the third sub-index is [0, n), and m and n are both positive integers.
[0012] In an exemplary embodiment, matching the first scheduling strategy in a multidimensional array according to the first task type, the second task type and the determination result includes: determining a first index according to the first task type, the second task type and the determination result; matching the first scheduling strategy in the three-dimensional array according to the first index.
[0013] In an exemplary embodiment, the multidimensional array is a four-dimensional array, and the multidimensional array includes: m*m*n*t elements and m*m*n*t indexes, wherein the index includes a first sub-index, a second sub-index, a third sub-index and a fourth sub-index, the first sub-index is a first task identifier of the first task type, the second sub-index is a second task identifier of the second task type, the third sub-index is the determination result, and the fourth sub-index is a load level corresponding to the workload of the RAID card. The value ranges of the first sub-index and the second sub-index are both [0, m), the value range of the third sub-index is [0, n), and the value range of the fourth sub-index is [0, t), and m, n, and t are all positive integers.
[0014] In an exemplary embodiment, matching the first scheduling strategy in a multidimensional array according to the first task type, the second task type and the determination result includes: obtaining a current workload of the RAID card and determining a current load level of the current workload; determining a second index according to the first task type, the second task type, the determination result and the current load level; matching the first scheduling strategy in the four-dimensional array according to the second index.
[0015] In an exemplary embodiment, there are multiple execution tasks, and the first scheduling strategy for scheduling the new trigger task based on the first task type, the first identifier, the second task type and the second identifier includes: determining a third scheduling strategy for scheduling the new trigger task and the multiple execution tasks based on the first task type, the first identifier, the second task type and the second identifier, respectively, to obtain multiple third scheduling strategies; determining the first scheduling strategy and the target execution task corresponding to the first scheduling strategy based on the priorities of the multiple third scheduling strategies.
[0016] In an exemplary embodiment, determining the first scheduling policy and the target execution task corresponding to the first scheduling policy according to the priorities of the multiple third scheduling policies includes: respectively determining the priorities of the multiple third scheduling policies; traversing the multiple third scheduling policies in sequence, determining the target third scheduling policy with the highest priority and the front traversal order among the multiple third scheduling policies as the first scheduling policy, and determining the execution task corresponding to the target third scheduling policy as the target execution task.
[0017] In an exemplary embodiment, after determining the first scheduling strategy for scheduling the new triggered task based on the first task type, the first identifier, the second task type and the second identifier, the method further includes: scheduling the new triggered task and the target execution task based on the first scheduling strategy.
[0018] In an exemplary embodiment, after configuring each element in the multidimensional array as a second scheduling strategy according to the configuration operation, the method further includes: scheduling the background tasks of the RAID card according to the multiple second scheduling strategies; when it is determined that there is a fourth scheduling strategy among the multiple second scheduling strategies, modifying the fourth scheduling strategy according to the second configuration operation, wherein the fourth scheduling strategy is a scheduling strategy that causes a scheduling failure in the background task.
[0019] According to another embodiment of the present application, a device for determining a scheduling strategy is provided, including: a first determination module, used to determine a first task type of a newly triggered task, and determine a first identifier of the RAID group to which the newly triggered task belongs; a second determination module, used to determine a second task type of an execution task in a task execution list, and determine a second identifier of the RAID group to which the execution task belongs; and a third determination module, used to determine a first scheduling strategy for task scheduling for the newly triggered task based on the first task type, the first identifier, the second task type and the second identifier.
[0020] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
[0021] According to another embodiment of the present application, an electronic device is provided, 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 steps in any one of the above method embodiments.
[0022] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.
[0023] Through the present application, the first task type of the newly triggered task is first determined, and the first identifier of the RAID group to which the newly triggered task belongs is determined; then the second task type of the execution task in the task execution list is determined, and the second identifier of the RAID group to which the execution task belongs is determined; thereby, a first scheduling strategy for task scheduling of the newly triggered task is determined based on the first task type, the first identifier, the second task type, and the second identifier; by adopting the above scheme, combined with various factors, a decision is made on the best scheduling strategy to complete the task scheduling of the newly triggered task; thereby solving the problem that the current task scheduling method in the related art only considers the priority of background tasks and cannot be applied to all scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a hardware structure block diagram of a method for determining a scheduling strategy according to an embodiment of the present application;
[0025] Figure 2 is a flow chart of a method for determining a scheduling strategy according to the present application;
[0026] Figure 3 is a schematic diagram of an optional three-dimensional matrix structure according to an embodiment of the present application;
[0027] Figure 4 It is a flowchart of an optional background task scheduling strategy decision method according to an embodiment of the present application;
[0028] Figure 5 This is a schematic diagram of an application scenario of an optional method for determining a scheduling strategy according to an embodiment of the present application;
[0029] Figure 6 It is a structural block diagram of a device for determining a scheduling strategy according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0032] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 1 1 is a hardware structure block diagram of a computer terminal for a method for determining a mapping relationship according to an embodiment of the present application. Figure 1 As shown, the computer terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned computer terminal may also include a transmission device 106 and an input and output device 108 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-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0033] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for determining the mapping relationship in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 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 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer 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.
[0034] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 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 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0035] The following is an explanation of the professional terms used in this application:
[0036] RAID: Redundant Array of Independent Disks, a redundant array composed of independent disks, which is composed of many independent disks, combined into a disk group with huge capacity, and uses the additive effect of individual disks to provide data to improve the performance of the entire disk system. Using this technology, data is cut into many segments and stored on each hard disk.
[0037] RAID card is a device that can create a hard disk RAID group. It can improve the data access speed by accessing multiple disks in parallel, and also provides the ability to perform redundant error correction on the data.
[0038] A well-created RAID array can not only speed up the reading and writing speed by striping the data, but also provide a certain degree of redundancy to ensure that the data is not lost when some hard disks suddenly fail, and the data can be restored through the redundancy algorithm. It is precisely because of these capabilities of the RAID array that the RAID card can be called one of the most important components in the storage server.
[0039] Stripe Unit: Stripe Unit is the smallest unit for reading and writing data on a single disk.
[0040] Stripe: Stripe is a collection of stripe units at the same "position" on multiple disks in the same RAID group.
[0041] Hot Spare: When a disk in the RAID group fails, a spare disk will replace the failed disk without affecting the normal operation of the current RAID group. The spare disk is the hot spare disk.
[0042] Background tasks: Different from the read and write operations issued by the foreground host, the read and write operations performed by the RAID card itself on the stripes on the RAID group require a certain amount of time to complete and are executed in the form of tasks in the background, such as reconstruction, copy back, level migration, and capacity expansion.
[0043] Reconstruction: When a disk in a RAID group fails, the data of the failed disk is regenerated using the data in other disks according to the parity algorithm or mirroring strategy in the RAID, and the data is eventually written to a hot spare disk or a new disk that is scheduled for replacement.
[0044] Copyback: After the reconstruction is completed, the data in the hot spare disk will be copied back to the new data disk after replacing the original failed disk. After the copyback is completed, the original hot spare disk will resume its hot spare status.
[0045] Level Migration: RAID levels can be modified without affecting data integrity, migrating from one RAID level to another.
[0046] Capacity expansion: Add new hard disks to an existing RAID group to expand the capacity of the RAID group.
[0047] Background initialization: BGI, ensures that the data segments on the stripe are consistent when the logical volume is created.
[0048] Consistency check: CC, after the logical volume is created, ensure that the data segments on the stripe are consistent.
[0049] The existing scheduling method is to proceed according to the priority of background tasks, that is, to determine the priority of various background tasks according to their importance and urgency. When the upper limit of tasks to be processed simultaneously is reached, the newly triggered tasks are processed according to the priority. Tasks with higher priority than the currently running background tasks can be interrupted. Tasks with the same or lower priority are queued. The highest priority task in the queue will be executed after the currently running background tasks are completed.
[0050] However, this scheduling method is relatively simple and only considers the priority of background tasks. The actual scheduling may involve multiple factors. Scheduling based only on the priority of background tasks is not applicable to all scenarios, such as the following scenarios:
[0051] 1. When the BGI task is being executed, the background task reconstruction is triggered. If the reconstruction and BGI belong to the background tasks of the same RAID group, since the reconstruction is more important and both reconstruction and BGI can make the stripes consistent, there is no need to execute GI after the reconstruction is completed. The reconstruction needs to be terminated and BGI is processed first. If the reconstruction and BGI belong to the background tasks of different RAID groups, the reconstruction needs to interrupt BGI and process it first. The traditional scheduling method does not distinguish whether the reconstruction and BGI belong to the same RAID group. The strategy of interrupting BGI when the reconstruction is used will cause repeated calculation of stripes in the scenario where the reconstruction and BGI belong to the same RAID group, resulting in a waste of resources.
[0052] 2. When the background task reconstruction is being executed, the background task copyback is triggered. Usually, reconstruction is more important than copyback and needs to be executed first. If the module disk in the RAID group reports an alarm, indicating that there is a problem and it may be damaged, the user manually triggers the RAID group to copyback, and the damaged disk will be copied back to a new disk. In this scenario, the copyback needs to interrupt the reconstruction for processing, otherwise once the disk is damaged, the reconstruction may not be possible.
[0053] In order to solve the problem that the current task scheduling method in the related art only considers the priority of background tasks and cannot be applied to all scenarios, a method for determining a scheduling strategy is provided in this embodiment. Figure 2 is a flow chart of a method for determining a scheduling strategy according to an embodiment of the present application, such as Figure 2 As shown, the method for determining the scheduling strategy includes:
[0054] Step S202, determining a first task type of a newly triggered task, and determining a first identifier of a RAID group to which the newly triggered task belongs;
[0055] Step S204, determining a second task type of the execution task in the task execution list, and determining a second identifier of the RAID group to which the execution task belongs;
[0056] It should be noted that the task execution list can be understood as a list of background tasks being executed in the RAID card, and the execution task can be understood as a background task being executed.
[0057] Step S206: determining a first scheduling strategy for scheduling the newly triggered task according to the first task type, the first identifier, the second task type, and the second identifier.
[0058] By adopting the above scheme, the first task type of the newly triggered task is first determined, and the first identifier of the RAID group to which the newly triggered task belongs is determined; then the second task type of the execution task in the task execution list is determined, and the second identifier of the RAID group to which the execution task belongs is determined; thereby, a first scheduling strategy for task scheduling of the newly triggered task is determined based on the first task type, the first identifier, the second task type and the second identifier; by adopting the above scheme, the best scheduling strategy is decided to complete the task scheduling of the newly triggered task by taking various factors into consideration; thereby solving the problem that the current task scheduling method in the related art only considers the priority of background tasks and cannot be applied to all scenarios.
[0059] Optionally, the first scheduling strategy for scheduling the newly triggered task based on the first task type, the first identifier, the second task type and the second identifier includes: determining whether the newly triggered task and the execution task belong to the same RAID group based on the first identifier and the second identifier, and obtaining a determination result; matching the first scheduling strategy in a multidimensional array based on the first task type, the second task type and the determination result, wherein the multidimensional array stores multiple second scheduling strategies, and the multiple second scheduling strategies include the first scheduling strategy.
[0060] In the process of determining the first scheduling strategy, it is necessary to first determine whether the newly triggered task and the executed task belong to the same RAID group according to the first identifier and the second identifier. In the embodiment of the present application, whether the two tasks belong to the same RAID group will also affect the scheduling strategy of the final decision. For example:
[0061] For the specific background task type being executed, such as copyback (i.e. the execution task mentioned above), all new task types are enumerated. If the new task is not as important as copyback, such as BGI, the strategy is set to queue processing; if the new task is more important than copyback, such as reconstruction, the strategy is specified to interrupt the current task processing. Expansion and copyback tasks are not allowed to be interrupted during the process, and other new tasks need to be queued or ignored. Different strategies are set based on whether the tasks belong to the same RAID group. Less important tasks under different RAID groups can be queued for processing, and important tasks interrupt the current task processing, and generally do not need to be ignored.
[0062] After determining whether the newly triggered task and the executed task belong to the same RAID group and obtaining a determination result, the first scheduling strategy is matched in the multidimensional array according to the first task type, the second task type and the determination result, wherein the multidimensional array stores multiple second scheduling strategies, including but not limited to the first scheduling strategy.
[0063] Through the above embodiments, different scheduling strategies are adopted according to whether two tasks belong to the same RAID group, so that the scheduling strategy finally decided is more in line with the optimal decision under comprehensive consideration of multiple dimensions.
[0064] Optionally, before determining the first scheduling strategy for scheduling the newly triggered task based on the first task type, the first identifier, the second task type and the second identifier, the method further includes: initializing the multidimensional array based on multiple task types and multiple determination results, wherein the multiple task types include the first task type and the second task type; configuring each element in the multidimensional array as a second scheduling strategy according to a first configuration operation to obtain the multiple second scheduling strategies.
[0065] Before determining the scheduling strategy based on these factors, it is necessary to first configure a scheduling strategy specifically for each situation. In the embodiment of the present application, a multidimensional array is generated, and a multidimensional array is initialized according to the different task types of the new trigger task and the execution task, and the determination result of whether the new trigger task and the execution task belong to the same RAID group. Then, a second scheduling strategy is configured for each element in the multidimensional array. The indexes of the multidimensional array correspond to different variable conditions, respectively, so that the RAID card is configured with a scheduling strategy that is most suitable under different conditions.
[0066] Through this embodiment, multiple factors are taken into consideration to pre-configure a scheduling strategy for the RAID card in different situations in a targeted manner, so as to facilitate subsequent decision-making.
[0067] In an optional embodiment, the multidimensional array is a three-dimensional array, and the multidimensional array includes: m*m*n elements and m*m*n indexes, wherein the index includes a first sub-index, a second sub-index and a third sub-index, the first sub-index is the first task identifier of the first task type, the second sub-index is the second task identifier of the second task type, and the third sub-index is the determination result. The value ranges of the first sub-index and the second sub-index are both [0, m), and the value range of the third sub-index is [0, n), and m and n are both positive integers.
[0068] In an optional embodiment, the multidimensional array can be set as a three-dimensional array, and its structure is shown as follows: Figure 3 As shown, it is divided into three dimensions: X, Y, and Z, wherein the X dimension represents the type of the currently ongoing background task, that is, the second task type mentioned above, corresponding to the second sub-index; the Y dimension represents the type of the newly triggered background task, that is, the first task type mentioned above, corresponding to the first sub-index; and the Z dimension represents whether the currently ongoing background task and the newly triggered background task belong to the same RAID group, that is, the above determination result, corresponding to the third sub-index, Figure 3 Each square in represents the scheduling strategy in three dimensions, X, Y, and Z, represented by A, which can be written as M[X][Y][Z]= A.
[0069] Based on the above steps, matching the first scheduling strategy in the multidimensional array according to the first task type, the second task type and the determination result includes: determining a first index according to the first task type, the second task type and the determination result; matching the first scheduling strategy in the three-dimensional array according to the first index.
[0070] In the three-dimensional array, the first task type corresponds to the first sub-index, the second task type corresponds to the second sub-index, and the determination result corresponds to the third sub-index, so that the first index is determined according to the first sub-index, the second sub-index and the third sub-index, and then the first scheduling strategy is matched among the multiple second scheduling strategies contained in the three-dimensional array according to the first index.
[0071] Through the above embodiment, the most suitable scheduling strategy is determined by considering the first task type of the newly triggered task, the second task type of the executed task, and the result of determining whether the newly triggered task and the executed task belong to the same RAID group.
[0072] Optionally, the multidimensional array is a four-dimensional array, comprising: m*m*n*t elements and m*m*n*t indexes, wherein the index comprises a first sub-index, a second sub-index, a third sub-index and a fourth sub-index, the first sub-index is a first task identifier of the first task type, the second sub-index is a second task identifier of the second task type, the third sub-index is the determination result, and the fourth sub-index is a load level corresponding to the workload of the RAID card, the value ranges of the first sub-index and the second sub-index are both [0, m), the value range of the third sub-index is [0, n), and the value range of the fourth sub-index is [0, t), and m, n, and t are all positive integers.
[0073] In another optional embodiment, the multidimensional array is a four-dimensional array, and correspondingly, the index of the four-dimensional array includes four sub-indexes, namely a first sub-index, a second sub-index, a third sub-index and a fourth sub-index; the first sub-index corresponds to a first task identifier of a first task type, the second sub-index corresponds to a second task identifier of a second task type, the third sub-index is the determination result, and the fourth sub-index is the load level of the workload of the RAID card.
[0074] Based on the above steps, matching the first scheduling strategy in the multidimensional array according to the first task type, the second task type and the determination result includes: obtaining the current workload of the RAID card and determining the current load level of the current workload; determining a second index according to the first task type, the second task type, the determination result and the current load level; matching the first scheduling strategy in the four-dimensional array according to the second index.
[0075] Based on the four-dimensional array, the process of determining the first scheduling strategy includes: first obtaining the current workload of the RAID card, and determining the current load level corresponding to the current workload; then using the first task type as the first sub-index, the second task type as the second sub-index, the determination result as the third sub-index, and the current load level as the fourth sub-index to determine the second index, and using the second index to match the first scheduling strategy among the multiple second scheduling strategies contained in the four-dimensional array.
[0076] Through the above embodiment, the most suitable scheduling strategy is determined by taking into account four factors: the first task type of the newly triggered task, the second task type of the executed task, the determination result of whether the newly triggered task and the executed task belong to the same RAID group, and the current load level of the current workload of the RAID card.
[0077] It should be noted that the multidimensional matrix can be further expanded to a five-dimensional array, a six-dimensional array, etc. The newly added dimensions include but are not limited to the foreground IO load, whether the task is manual type, array priority, etc. These newly added dimensions can also directly replace the dimensions in the above-mentioned three-dimensional matrix or four-dimensional matrix. This application does not impose any restrictions on this.
[0078] Optionally, there are multiple execution tasks, and the first scheduling strategy for scheduling the new triggered task based on the first task type, the first identifier, the second task type and the second identifier includes: determining a third scheduling strategy for scheduling the new triggered task and the multiple execution tasks based on the first task type, the first identifier, the second task type and the second identifier, respectively, to obtain multiple third scheduling strategies; determining the first scheduling strategy and the target execution task corresponding to the first scheduling strategy based on the priorities of the multiple third scheduling strategies.
[0079] The task execution list includes multiple execution tasks. The embodiment of the present application needs to match a third scheduling strategy in a multidimensional matrix according to each execution task and the newly triggered task, and obtain multiple third scheduling strategies. Different scheduling strategies have different priorities. The first scheduling strategy and the target execution task corresponding to the first scheduling strategy are determined according to the priorities of these multiple third scheduling strategies.
[0080] Through this embodiment, for each of the multiple background tasks being executed, a scheduling strategy decision is made for the newly triggered task, and then the first scheduling strategy and the corresponding target execution task are selected based on the priorities of the multiple third scheduling strategies obtained, so as to select the most suitable execution task from the multiple execution tasks and schedule it with the newly triggered task.
[0081] Optionally, determining the first scheduling policy and the target execution task corresponding to the first scheduling policy according to the priorities of the multiple third scheduling policies includes: respectively determining the priorities of the multiple third scheduling policies; traversing the multiple third scheduling policies in sequence, and determining the target third scheduling policy with the highest priority and the front traversal order among the multiple third scheduling policies as the first scheduling policy, and determining the execution task corresponding to the target third scheduling policy as the target execution task.
[0082] First, determine the priorities of these multiple third scheduling strategies, traverse them one by one, and select the third scheduling strategy with the highest priority. If there are multiple strategies with the same priority at the same time, and this priority is the highest, then the target third scheduling strategy with a higher ranking will be determined as the first scheduling strategy, and the execution task corresponding to the target third scheduling strategy will be determined as the target execution task.
[0083] Based on the above steps, after determining the first scheduling strategy for scheduling the new triggered task according to the first task type, the first identifier, the second task type and the second identifier, the method also includes: scheduling the new triggered task and the target execution task according to the first scheduling strategy.
[0084] After deciding the first scheduling strategy and the target execution task, the RAID card completes the task scheduling process for the newly triggered task and the target execution task according to the first scheduling strategy.
[0085] Through the above embodiment, a target execution task is selected from multiple execution tasks for the newly triggered task, and the most appropriate first scheduling strategy is determined for the target execution task, so that the impact of the scheduling process is minimized during the process of task scheduling for the newly triggered task by the RAID card.
[0086] Optionally, the present application embodiment also provides an optional background task scheduling strategy decision method, the process of which is as follows: Figure 4 As shown, the following steps are included:
[0087] 1. Obtain the newly triggered background task type (i.e., the first task type) and the RAID group ID to which it belongs (i.e., the first identifier), and set the scheduling strategy that needs to be executed in the end to be the strategy with the lowest priority;
[0088] 2. Traverse the currently executing background tasks (i.e. the execution tasks mentioned above) to obtain the background task type (i.e. the second task type mentioned above) and the RAID group ID to which it belongs (i.e. the second identifier mentioned above);
[0089] It should be noted that the background tasks and newly triggered background tasks in the embodiments of the present application may include the following types: reconstruction, copyback, level migration, capacity expansion, background initialization, consistency check, etc.
[0090] 3. According to the three dimensional values of the task type of the newly triggered background task (i.e., the first task type mentioned above), the task type of the currently executed background task (i.e., the second task type mentioned above), and whether the RAID group ID to which the newly triggered background task belongs and the RAID group ID to which the currently executed background task belongs are the same (i.e., the above determination result), obtain the scheduling strategy (i.e., the third scheduling strategy mentioned above) from the three-dimensional array and record it;
[0091] 4. Compare the scheduling strategy saved in the previous step (i.e., the third scheduling strategy mentioned above) with the scheduling strategy that needs to be executed in the end. If the scheduling strategy saved in the previous step has a higher priority, the scheduling strategy that needs to be executed in the end is changed to the scheduling strategy saved in the previous step.
[0092] It should be noted that the scheduling strategies and their priority rankings included in the embodiments of the present application are: directly executing a new task (i.e., a newly triggered task); queuing a new task; interrupting the current task to queue and starting to execute a new task; terminating the current task and starting to execute a new task; refusing to execute a new task, etc. In actual applications, other scheduling strategies of any priority may also be included, and the above are only used as examples, and the present application does not limit this.
[0093] 5. Determine whether all currently executing background tasks have been traversed. If the traversal is completed, proceed to the next step. If the traversal is not completed, return to step 2;
[0094] Through steps 2-5, the first scheduling strategy with the highest priority and the highest ranking can be determined.
[0095] 6. Execute the scheduling strategy (i.e. the first scheduling strategy mentioned above).
[0096] Based on the above steps, after configuring each element in the multidimensional array as the second scheduling strategy according to the configuration operation, the method also includes: scheduling the background tasks of the RAID card according to the multiple second scheduling strategies; when it is determined that there is a fourth scheduling strategy among the multiple second scheduling strategies, modifying the fourth scheduling strategy according to the second configuration operation, wherein the fourth scheduling strategy is the scheduling strategy that causes the background task to have a scheduling failure.
[0097] After completing the configuration of the scheduling strategy for each element in the multidimensional array, the scheduling strategy is matched and executed in the multidimensional array according to the above-mentioned scheduling strategy determination method within a period of time. If a certain failure of the RAID card occurs after a certain execution of the scheduling strategy, it can be determined that the scheduling strategy is unreasonable, and only the corresponding scheduling strategy needs to be modified.
[0098] Through this embodiment, when it is found that the scheduling strategy is unreasonable, it is only necessary to modify the corresponding scheduling strategy, and the whole multi-dimensional array has high reusability.
[0099] Figure 5 is a schematic diagram of an application scenario of an optional method for determining a scheduling strategy according to an embodiment of the present application, such as Figure 5 As shown, when a new trigger task is triggered in the RAID card, if the number of background tasks being executed in the task execution queue has reached the upper limit, it is necessary to perform a task scheduling for the new trigger task to ensure that the new trigger task can be executed in the correct order; the control center of the RAID card obtains the task-related information of the new trigger task and the task-related information of the execution task, combines this information to obtain an index, matches the scheduling strategy in the three-dimensional array pre-established in the RAID card, and executes the scheduling strategy.
[0100] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0101] In the present embodiment, a device for determining a scheduling strategy is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.
[0102] Figure 6 is a structural block diagram of a device for determining a scheduling strategy according to an embodiment of the present application, such as Figure 6 As shown, the device comprises:
[0103] A first determination module 62, configured to determine a first task type of a newly triggered task, and to determine a first identifier of a RAID group to which the newly triggered task belongs;
[0104] A second determination module 64 is used to determine a second task type of an execution task in the task execution list, and to determine a second identifier of a RAID group to which the execution task belongs;
[0105] The third determining module 66 is used to determine a first scheduling strategy for scheduling the newly triggered task according to the first task type, the first identifier, the second task type and the second identifier.
[0106] Through the present application, the first task type of the newly triggered task is first determined, and the first identifier of the RAID group to which the newly triggered task belongs is determined; then the second task type of the execution task in the task execution list is determined, and the second identifier of the RAID group to which the execution task belongs is determined; thereby, a first scheduling strategy for task scheduling of the newly triggered task is determined based on the first task type, the first identifier, the second task type, and the second identifier; by adopting the above scheme, combined with various factors, a decision is made on the best scheduling strategy to complete the task scheduling of the newly triggered task; thereby solving the problem that the current task scheduling method in the related art only considers the priority of background tasks and cannot be applied to all scenarios.
[0107] Optionally, the above-mentioned third determination module 66 is also used to determine whether the newly triggered task and the execution task belong to the same RAID group according to the first identifier and the second identifier to obtain a determination result; match the first scheduling strategy in a multidimensional array according to the first task type, the second task type and the determination result, wherein the multidimensional array stores multiple second scheduling strategies, and the multiple second scheduling strategies include the first scheduling strategy.
[0108] In the process of determining the first scheduling strategy, it is necessary to first determine whether the newly triggered task and the executed task belong to the same RAID group according to the first identifier and the second identifier. In the embodiment of the present application, whether the two tasks belong to the same RAID group will also affect the scheduling strategy of the final decision. For example:
[0109] For the specific background task type being executed, such as copyback (i.e. the execution task mentioned above), all new task types are enumerated. If the new task is not as important as copyback, such as BGI, the strategy is set to queue processing; if the new task is more important than copyback, such as reconstruction, the strategy is specified to interrupt the current task processing. Expansion and copyback tasks are not allowed to be interrupted during the process, and other new tasks need to be queued or ignored. Different strategies are set based on whether the tasks belong to the same RAID group. Less important tasks under different RAID groups can be queued for processing, and important tasks interrupt the current task processing, and generally do not need to be ignored.
[0110] After determining whether the newly triggered task and the executed task belong to the same RAID group and obtaining a determination result, the first scheduling strategy is matched in the multidimensional array according to the first task type, the second task type and the determination result, wherein the multidimensional array stores multiple second scheduling strategies, including but not limited to the first scheduling strategy.
[0111] Through the above embodiments, different scheduling strategies are adopted according to whether two tasks belong to the same RAID group, so that the scheduling strategy finally decided is more in line with the optimal decision under comprehensive consideration of multiple dimensions.
[0112] Optionally, the above-mentioned third determination module 66 is also used to initialize the multidimensional array according to multiple task types and multiple determination results, wherein the multiple task types include the first task type and the second task type; configure each element in the multidimensional array as a second scheduling strategy according to a first configuration operation to obtain the multiple second scheduling strategies.
[0113] Before determining the scheduling strategy based on these factors, it is necessary to first configure a scheduling strategy specifically for each situation. In the embodiment of the present application, a multidimensional array is generated, and a multidimensional array is initialized according to the different task types of the new trigger task and the execution task, and the determination result of whether the new trigger task and the execution task belong to the same RAID group. Then, a second scheduling strategy is configured for each element in the multidimensional array. The indexes of the multidimensional array correspond to different variable conditions, respectively, so that the RAID card is configured with a scheduling strategy that is most suitable under different conditions.
[0114] Through this embodiment, multiple factors are taken into consideration to pre-configure a scheduling strategy for the RAID card in different situations in a targeted manner, so as to facilitate subsequent decision-making.
[0115] Optionally, the multidimensional array is a three-dimensional array, comprising: m*m*n elements and m*m*n indexes, wherein the index comprises a first sub-index, a second sub-index and a third sub-index, the first sub-index is the first task identifier of the first task type, the second sub-index is the second task identifier of the second task type, the third sub-index is the determination result, the value ranges of the first sub-index and the second sub-index are both [0, m), the value range of the third sub-index is [0, n), and m and n are both positive integers.
[0116] In an optional embodiment, the multidimensional array can be set as a three-dimensional array, and its structure is shown as follows: Figure 3 As shown, it is divided into three dimensions: X, Y, and Z, wherein the X dimension represents the type of the currently ongoing background task, that is, the second task type mentioned above, corresponding to the second sub-index; the Y dimension represents the type of the newly triggered background task, that is, the first task type mentioned above, corresponding to the first sub-index; and the Z dimension represents whether the currently ongoing background task and the newly triggered background task belong to the same RAID group, that is, the above determination result, corresponding to the third sub-index, Figure 3 Each square in represents the scheduling strategy in three dimensions, X, Y, and Z, represented by A, which can be written as M[X][Y][Z]= A.
[0117] Optionally, the third determination module 66 is further used to determine a first index according to the first task type, the second task type and the determination result; and match the first scheduling strategy in the three-dimensional array according to the first index.
[0118] In the three-dimensional array, the first task type corresponds to the first sub-index, the second task type corresponds to the second sub-index, and the determination result corresponds to the third sub-index, so that the first index is determined according to the first sub-index, the second sub-index and the third sub-index, and then the first scheduling strategy is matched among the multiple second scheduling strategies contained in the three-dimensional array according to the first index.
[0119] Through the above embodiment, the most suitable scheduling strategy is determined by considering the first task type of the newly triggered task, the second task type of the executed task, and the result of determining whether the newly triggered task and the executed task belong to the same RAID group.
[0120] Optionally, the multidimensional array is a four-dimensional array, comprising: m*m*n*t elements and m*m*n*t indexes, wherein the index comprises a first sub-index, a second sub-index, a third sub-index and a fourth sub-index, the first sub-index is a first task identifier of the first task type, the second sub-index is a second task identifier of the second task type, the third sub-index is the determination result, and the fourth sub-index is a load level corresponding to the workload of the RAID card, the value ranges of the first sub-index and the second sub-index are both [0, m), the value range of the third sub-index is [0, n), and the value range of the fourth sub-index is [0, t), and m, n, and t are all positive integers.
[0121] In another optional embodiment, the multidimensional array is a four-dimensional array, and correspondingly, the index of the four-dimensional array includes four sub-indexes, namely a first sub-index, a second sub-index, a third sub-index and a fourth sub-index; the first sub-index corresponds to a first task identifier of a first task type, the second sub-index corresponds to a second task identifier of a second task type, the third sub-index is the determination result, and the fourth sub-index is the load level of the workload of the RAID card.
[0122] Based on the above steps, the above-mentioned third determination module 66 is also used to obtain the current workload of the RAID card and determine the current load level of the current workload; determine the second index according to the first task type, the second task type, the determination result and the current load level; match the first scheduling strategy in the four-dimensional array according to the second index.
[0123] Based on the four-dimensional array, the process of determining the first scheduling strategy includes: first obtaining the current workload of the RAID card, and determining the current load level corresponding to the current workload; then using the first task type as the first sub-index, the second task type as the second sub-index, the determination result as the third sub-index, and the current load level as the fourth sub-index to determine the second index, and using the second index to match the first scheduling strategy among the multiple second scheduling strategies contained in the four-dimensional array.
[0124] Through the above embodiment, the most suitable scheduling strategy is determined by taking into account four factors: the first task type of the newly triggered task, the second task type of the executed task, the determination result of whether the newly triggered task and the executed task belong to the same RAID group, and the current load level of the current workload of the RAID card.
[0125] It should be noted that the multidimensional matrix can be further expanded to a five-dimensional array, a six-dimensional array, etc. The newly added dimensions include but are not limited to the foreground IO load, whether the task is manual type, array priority, etc. These newly added dimensions can also directly replace the dimensions in the above-mentioned three-dimensional matrix or four-dimensional matrix. This application does not impose any restrictions on this.
[0126] Optionally, there are multiple execution tasks, and the above-mentioned third determination module 66 is also used to determine the third scheduling strategy for task scheduling between the new trigger task and the multiple execution tasks according to the first task type, the first identifier, the second task type and the second identifier, to obtain multiple third scheduling strategies; determine the first scheduling strategy according to the priorities of the multiple third scheduling strategies, and the target execution task corresponding to the first scheduling strategy.
[0127] The task execution list includes multiple execution tasks. The embodiment of the present application needs to match a third scheduling strategy in a multidimensional matrix according to each execution task and the newly triggered task, and obtain multiple third scheduling strategies. Different scheduling strategies have different priorities. The first scheduling strategy and the target execution task corresponding to the first scheduling strategy are determined according to the priorities of these multiple third scheduling strategies.
[0128] Through this embodiment, for each of the multiple background tasks being executed, a scheduling strategy decision is made for the newly triggered task, and then the first scheduling strategy and the corresponding target execution task are selected based on the priorities of the multiple third scheduling strategies obtained, so as to select the most suitable execution task from the multiple execution tasks and schedule it with the newly triggered task.
[0129] Optionally, the above-mentioned third determination module 66 is also used to respectively determine the priorities of the multiple third scheduling strategies; traverse the multiple third scheduling strategies in sequence, and determine the target third scheduling strategy with the highest priority and the front traversal order among the multiple third scheduling strategies as the first scheduling strategy, and determine the execution task corresponding to the target third scheduling strategy as the target execution task.
[0130] First, determine the priorities of these multiple third scheduling strategies, traverse them one by one, and select the third scheduling strategy with the highest priority. If there are multiple strategies with the same priority at the same time, and this priority is the highest, then the target third scheduling strategy with a higher ranking will be determined as the first scheduling strategy, and the execution task corresponding to the target third scheduling strategy will be determined as the target execution task.
[0131] Based on the above steps, the first determining module 66 is further configured to schedule the new triggering task and the target execution task according to the first scheduling strategy.
[0132] After deciding the first scheduling strategy and the target execution task, the RAID card completes the task scheduling process for the newly triggered task and the target execution task according to the first scheduling strategy.
[0133] Through the above embodiment, a target execution task is selected from multiple execution tasks for the newly triggered task, and the most appropriate first scheduling strategy is determined for the target execution task, so that the impact of the scheduling process is minimized during the process of task scheduling for the newly triggered task by the RAID card.
[0134] Based on the above steps, the above-mentioned third determination module 66 is also used to schedule the background tasks of the RAID card according to the multiple second scheduling strategies; when it is determined that there is a fourth scheduling strategy among the multiple second scheduling strategies, the fourth scheduling strategy is modified according to the second configuration operation, wherein the fourth scheduling strategy is the scheduling strategy that causes the background task to have a scheduling failure.
[0135] After completing the configuration of the scheduling strategy for each element in the multidimensional array, the scheduling strategy is matched and executed in the multidimensional array according to the above-mentioned scheduling strategy determination method within a period of time. If a certain failure of the RAID card occurs after a certain execution of the scheduling strategy, it can be determined that the scheduling strategy is unreasonable, and only the corresponding scheduling strategy needs to be modified.
[0136] Through this embodiment, when it is found that the scheduling strategy is unreasonable, it is only necessary to modify the corresponding scheduling strategy, and the whole multi-dimensional array has high reusability.
[0137] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0138] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0139] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0140] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0141] An embodiment of the present application further provides an electronic device, 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.
[0142] In an exemplary embodiment, 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.
[0143] An embodiment of the present application further provides a computer program product, comprising a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program product, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.
[0144] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0145] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0146] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for determining a scheduling strategy, applied to a RAID card, characterized in that: include: Determine a first task type of a newly triggered task, and determine a first identifier of a RAID group to which the newly triggered task belongs; Determine a second task type of the execution task in the task execution list, and determine a second identifier of the RAID group to which the execution task belongs; Determine a first scheduling strategy for scheduling the newly triggered task according to the first task type, the first identifier, the second task type, and the second identifier; The determining of a first scheduling strategy for scheduling the newly triggered task according to the first task type, the first identifier, the second task type, and the second identifier includes: Determine whether the new trigger task and the execution task belong to the same RAID group according to the first identifier and the second identifier, and obtain a determination result; matching the first scheduling strategy in a multidimensional array according to the first task type, the second task type and the determination result, wherein the multidimensional array stores a plurality of second scheduling strategies, and the plurality of second scheduling strategies include the first scheduling strategy; Before determining a first scheduling strategy for scheduling the newly triggered task according to the first task type, the first identifier, the second task type, and the second identifier, the method further includes: Initializing the multidimensional array according to a plurality of task types and a plurality of the determination results, wherein the plurality of task types include the first task type and the second task type; Each element in the multidimensional array is configured as a second scheduling strategy according to the first configuration operation to obtain the plurality of second scheduling strategies.
2. The method for determining a scheduling strategy according to claim 1, characterized in that: The multidimensional array is a three-dimensional array, and the multidimensional array includes: m*m*n elements and m*m*n indexes, wherein the index includes a first sub-index, a second sub-index and a third sub-index, the first sub-index is the first task identifier of the first task type, the second sub-index is the second task identifier of the second task type, the third sub-index is the determination result, the value ranges of the first sub-index and the second sub-index are both [0, m), the value range of the third sub-index is [0, n), and m and n are both positive integers.
3. The method for determining a scheduling strategy according to claim 2, characterized in that: The matching the first scheduling strategy in a multidimensional array according to the first task type, the second task type and the determination result includes: determining a first index according to the first task type, the second task type, and the determination result; The first scheduling strategy is matched in the three-dimensional array according to the first index.
4. The method for determining a scheduling strategy according to claim 1, characterized in that: The multidimensional array is a four-dimensional array, and the multidimensional array includes: m*m*n*t elements and m*m*n*t indexes, wherein the index includes a first sub-index, a second sub-index, a third sub-index and a fourth sub-index, the first sub-index is a first task identifier of the first task type, the second sub-index is a second task identifier of the second task type, the third sub-index is the determination result, and the fourth sub-index is a load level corresponding to the workload of the RAID card. The value ranges of the first sub-index and the second sub-index are both [0, m), the value range of the third sub-index is [0, n), and the value range of the fourth sub-index is [0, t), and m, n, and t are all positive integers.
5. The method for determining a scheduling strategy according to claim 4, characterized in that: The matching the first scheduling strategy in a multidimensional array according to the first task type, the second task type and the determination result includes: Obtaining a current workload of the RAID card, and determining a current load level of the current workload; determining a second index according to the first task type, the second task type, the determination result, and the current load level; The first scheduling policy is matched in the four-dimensional array according to the second index.
6. The method for determining a scheduling strategy according to claim 1, characterized in that: There are multiple execution tasks, and determining a first scheduling strategy for scheduling the newly triggered task according to the first task type, the first identifier, the second task type, and the second identifier includes: Determine a third scheduling strategy for scheduling tasks between the new trigger task and the plurality of execution tasks according to the first task type, the first identifier, the second task type, and the second identifier, and obtain a plurality of third scheduling strategies; The first scheduling strategy and the target execution task corresponding to the first scheduling strategy are determined according to the priorities of the multiple third scheduling strategies.
7. The method for determining a scheduling strategy according to claim 6, characterized in that: The determining the first scheduling strategy and the target execution task corresponding to the first scheduling strategy according to the priorities of the plurality of third scheduling strategies includes: respectively determining the priorities of the plurality of third scheduling strategies; The multiple third scheduling strategies are traversed in sequence, and the target third scheduling strategy with the highest priority and the front traversal order among the multiple third scheduling strategies is determined as the first scheduling strategy, and the execution task corresponding to the target third scheduling strategy is determined as the target execution task.
8. The method for determining a scheduling strategy according to claim 6, characterized in that: After determining a first scheduling strategy for scheduling the newly triggered task according to the first task type, the first identifier, the second task type, and the second identifier, the method further includes: The new trigger task and the target execution task are scheduled according to the first scheduling strategy.
9. The method for determining a scheduling strategy according to claim 1, characterized in that: After configuring each element in the multidimensional array as the second scheduling strategy according to the first configuration operation, the method further includes: Performing task scheduling on the background tasks of the RAID card according to the multiple second scheduling strategies; When it is determined that there is a fourth scheduling policy among the multiple second scheduling policies, the fourth scheduling policy is modified according to the second configuration operation, wherein the fourth scheduling policy is the scheduling policy that causes the scheduling failure of the background task.
10. A device for determining a scheduling strategy, characterized in that: include: A first determination module, used to determine a first task type of a newly triggered task, and to determine a first identifier of a RAID group to which the newly triggered task belongs; A second determination module, used to determine a second task type of an execution task in the task execution list, and to determine a second identifier of a RAID group to which the execution task belongs; A third determining module, used to determine a first scheduling strategy for scheduling the newly triggered task according to the first task type, the first identifier, the second task type and the second identifier; The third determination module is further used to determine whether the newly triggered task and the executed task belong to the same RAID group according to the first identifier and the second identifier, and obtain a determination result; match the first scheduling strategy in a multidimensional array according to the first task type, the second task type and the determination result, wherein the multidimensional array stores a plurality of second scheduling strategies, and the plurality of second scheduling strategies include the first scheduling strategy; Among them, the third determination module is also used to initialize the multidimensional array according to multiple task types and multiple determination results, wherein the multiple task types include the first task type and the second task type; configure each element in the multidimensional array as a second scheduling strategy according to the first configuration operation to obtain the multiple second scheduling strategies.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method according to any one of claims 1 to 9 when executed by a processor.
12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Method for establishing redundant magnetic disk array and control device thereof
CN101221485A
Multi-control and multi-activity RAID synchronization method and system
CN107239235A
