Disk pressure regulation and control method and device, equipment, storage medium and program product
By setting a counter for the target disk in a distributed storage system that corresponds to the task priority, and adjusting the voltage regulation window value and the upper limit of the counter, the problem of important tasks not being processed first in high-concurrency scenarios is solved, thereby improving system performance and stability while reducing disk pressure.
Patent Information
- Application Number
- CN202511332830.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-17
- Publication Date
- 2026-01-02
AI Technical Summary
In high-concurrency business scenarios, existing distributed storage systems cannot effectively distinguish between important real-time business and low-priority background tasks, which affects system efficiency and response time.
By setting multiple counters on the target disk, each corresponding to a task priority, and adjusting the stabilization window value and the upper limit of the counters according to the current disk pressure value, task allocation is restricted, high-priority tasks are processed first, and disk pressure is reduced.
While reducing disk pressure, it ensures the processing efficiency of high-priority tasks, improves system performance and stability, and avoids performance bottlenecks caused by excessive disk pressure.
Smart Images

Figure CN121255431A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of distributed storage technology, and in particular to a disk pressure control method, apparatus, device, storage medium, and program product. Background Technology
[0002] In distributed storage systems, disk I / O management is crucial in high-concurrency business scenarios. To effectively handle high-concurrency read and write storage requests, many distributed storage systems employ different technical strategies. For example, to optimize disk I / O, HDFS (Hadoop Distributed File System) uses data replication and data locality strategies to distribute data across different nodes and balance the load among them; in high-concurrency scenarios, Ceph dynamically adjusts data access paths through automatic redirection and load balancing mechanisms to prevent a single disk from becoming a performance bottleneck; and when handling high-concurrency write requests, GlusterFS reduces the direct disk load through client caching and asynchronous write mechanisms.
[0003] However, although systems such as Ceph and GlusterFS optimize disk allocation through load balancing, when faced with high-concurrency write requests, all requests may be treated equally. This results in important real-time services and low-priority background tasks not being prioritized according to actual needs, thus affecting system efficiency and response time, and impacting system performance. Summary of the Invention
[0004] Therefore, it is necessary to provide a disk pressure control method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can ensure system performance while reducing the pressure on the target disk, in order to address the above-mentioned technical problems.
[0005] On one hand, this application provides a disk pressure control method applied to storage nodes in a distributed storage system, comprising: determining a current task to be allocated to a target disk and obtaining the current disk pressure value of the target disk, wherein the target disk corresponds to multiple counters, each counter being one-to-one with a task priority, each counter having an upper limit value, the upper limit value of the counter being divided from the pressure stabilization window value of the target disk according to the task priority corresponding to the counter, the pressure stabilization window value representing the maximum number of concurrent tasks allowed by the target disk, and the initial value of the counter being the upper limit value of the counter; when the current disk pressure value is greater than or equal to a first pressure threshold, reducing the pressure stabilization window value to reduce the upper limit value of each counter, and updating the value of the first counter based on the upper limit value of the first counter corresponding to the first task priority to which the current task belongs; when the value of the first counter is greater than a lower limit value, decreasing the value of the first counter and allocating the current task to the target disk; when the value of the first counter is equal to the lower limit value, refusing to allocate the current task to the target disk.
[0006] In this embodiment, the current task to be assigned to the target disk is determined. The target disk has multiple counters, each corresponding to a task priority. Each counter has an upper limit. The current disk pressure value of the target disk is obtained. If the current disk pressure value reaches a first pressure threshold, the voltage stabilization window value of the target disk is reduced, and the upper limit value of each counter is reduced simultaneously. Based on the upper limit value of the first counter corresponding to the first task priority of the current task, the value of the first counter is updated. If the value of the first counter is greater than the lower limit value, the value of the first counter is reduced, and the current task is assigned to the target disk. If the value of the first counter is equal to the lower limit value, the assignment to the target disk is rejected. The system allocates tasks to the target disk, thus limiting task allocation through the value of a counter. This allows the first counter to be reduced when the target disk is under heavy load, by decreasing the voltage regulation window value. This reduces the number of tasks allocated to the target disk, thereby alleviating the load on the target disk. The upper limit of the counter is determined from the voltage regulation window value of the target disk based on the priority of the corresponding task. The voltage regulation window value represents the maximum number of concurrent tasks allowed on the target disk. The initial value of the counter is the upper limit of the counter. This approach ensures that while reducing the load on the target disk, the processing efficiency of high-priority tasks can be maintained, thus guaranteeing system performance and stability.
[0007] In some embodiments, the method further includes at least one of the following: if the current disk pressure value is less than the pressure alarm value, and if the value of the first counter is equal to the count lower limit, then search for a second counter with a value greater than the count lower limit from the remaining counters of the plurality of counters, wherein the pressure alarm value is less than the first pressure threshold; if the second counter is found, decrease the value of the second counter and assign the current task to the target disk.
[0008] In this embodiment, a second counter with a value greater than the lower limit of the count is searched from the remaining counters of multiple counters. If the second counter is found, its value is reduced, and the current task is assigned to the target disk. This allows a task with the first priority to preempt the counter of the second priority, thus achieving the effect of preempting the window to acquire disk resources. Therefore, when the disk pressure is low, tasks of various priorities can be executed in sequence.
[0009] In some embodiments, searching for a second counter whose value is greater than the lower limit of the count from the remaining counters of the plurality of counters includes: searching for a second counter whose value is greater than the lower limit of the count from the remaining counters of the plurality of counters in ascending order of task priority.
[0010] In this embodiment, the second counter with a value greater than the lower limit of the count is searched from the remaining counters of multiple counters in order of task priority from low to high. This can minimize the impact on the allocation of high-priority tasks and ensure system stability.
[0011] In some embodiments, obtaining the current disk pressure value of the target disk includes: determining a first duration between the current time and the time when the disk pressure value of the target disk was last obtained; if the first duration is less than the duration of the pressure update cycle, then the disk pressure value of the target disk obtained last time is used as the current disk pressure value of the target disk; if the first duration is greater than or equal to the duration of the pressure update cycle, then the current disk pressure value of the target disk is calculated; the method further includes: if the current disk pressure value is greater than or equal to the pressure alarm value, reducing the duration of the pressure update cycle.
[0012] In this embodiment, if the first duration is less than the duration of the pressure update cycle, the disk pressure value of the target disk obtained last time is used as the current disk pressure value of the target disk, thereby reducing the number of times the current disk pressure value is calculated and saving computer resources. If the first duration is greater than or equal to the duration of the pressure update cycle, the current disk pressure value of the target disk is calculated, thereby ensuring the accuracy of the current disk pressure value. When the current disk pressure value is greater than or equal to the pressure alarm value, reducing the duration of the pressure update cycle can increase the frequency of obtaining disk pressure values when the pressure is relatively high, thereby improving the accuracy of the disk pressure value.
[0013] In some embodiments, the method further includes: when the current disk pressure value is greater than or equal to a second pressure threshold, reducing the stabilization window value of the target disk to a lower limit of the number of concurrent tasks, setting the upper limit of one of the plurality of counters to the lower limit of the number of concurrent tasks, setting the upper limits of the other counters to the lower limit of the count, and updating the value of each of the counters; the second pressure threshold is greater than the first pressure threshold; determining a second duration between the current time and the last time a task was allocated to the target disk; when the value of the first counter is greater than the lower limit of the count and the second duration is less than the period duration of the task allocation cycle, waiting until the second duration reaches the period duration of the task allocation cycle, decreasing the value of the first counter, and allocating the current task to the target disk.
[0014] In this embodiment, if the current disk pressure value is greater than or equal to the second pressure threshold, it indicates that the current disk pressure value is relatively high. In this case, the target disk's stabilization window value is reduced to the lower limit of the number of concurrent tasks, and tasks are periodically scheduled according to a certain time delay to ensure the stable operation of the disk.
[0015] In some embodiments, reducing the voltage regulation window value to reduce the upper limit of each of the counters includes: reducing the voltage regulation window value to reduce the upper limit of each of the counters based on a reduction function when the current disk pressure value has not reached a second pressure threshold.
[0016] In this embodiment, if the current disk pressure value does not reach the second pressure threshold, it means that the current disk pressure is not particularly high. Therefore, the shrinking function is used to shrink the pressure, which can reduce the number of concurrent tasks, ensure the stable operation of the disk, and avoid reducing the number of concurrent tasks too much.
[0017] In some embodiments, obtaining the current disk pressure value of the target disk includes: determining the current number of active tasks on the target disk, wherein the current number of active tasks is the number of active tasks currently being carried by the target disk, and the active tasks are requests triggered by users to access the target disk; obtaining the maximum number of tasks that the target disk can carry, wherein the maximum number of tasks that the target disk can carry is the upper limit of the number of tasks that the target disk can carry; and determining the current disk pressure value of the target disk based on the current number of active tasks and the maximum number of tasks that can be carried.
[0018] In this embodiment, since the current number of valid tasks can accurately reflect the current load of the target disk, the current disk pressure value of the target disk can be determined based on the current number of valid tasks and the maximum number of tasks that can be carried, thus accurately determining the current disk pressure value.
[0019] In some embodiments, determining the current number of valid tasks on the target disk includes: obtaining the current total number of tasks and the current number of non-user tasks on the target disk, wherein the current total number of tasks is the total number of various types of tasks currently carried by the target disk, and the number of non-user tasks is the number of non-user tasks currently carried by the target disk; and determining the current number of valid tasks on the target disk based on the current total number of tasks and the current number of non-user tasks.
[0020] In this embodiment, the current number of valid tasks on the target disk is determined based on the current total number of tasks and the current number of non-user tasks, which can ensure the accuracy of the current number of valid tasks.
[0021] In some embodiments, determining the current disk pressure value of the target disk based on the current number of active tasks and the maximum number of tasks to be carried includes: determining the ratio of the current number of active tasks to the maximum number of tasks to be carried; and multiplying the ratio by a baseline pressure value as the current disk pressure value of the target disk.
[0022] In this embodiment, the product of the ratio and the baseline pressure value is used as the current disk pressure value of the target disk. The ratio is converted into the current disk pressure value through the baseline pressure value, so that the current disk pressure value can be quickly determined.
[0023] In some embodiments, updating the value of the first counter based on the upper limit of the first counter corresponding to the first task priority to which the current task belongs includes: obtaining the number of assigned tasks corresponding to the first task priority, wherein the number of assigned tasks refers to the number of tasks of the first task priority that have been assigned to the target disk and have not been completed; if the number of assigned tasks is greater than or equal to the upper limit of the first counter, then setting the value of the first counter to a lower limit; if the number of assigned tasks is less than the upper limit of the first counter, then setting the value of the first counter to the difference between the upper limit of the first counter and the number of assigned tasks.
[0024] In this embodiment, if the number of assigned tasks is greater than or equal to the upper limit of the first counter, the value of the first counter is set to the lower limit of the count. If the number of assigned tasks is less than the upper limit of the first counter, the value of the first counter is set to the difference between the upper limit of the first counter and the number of assigned tasks, so that the value of the first counter can be updated accurately.
[0025] On the other hand, this application also provides a disk pressure control device, comprising: a disk pressure determination module, configured to determine the current task to be allocated to a target disk and obtain the current disk pressure value of the target disk, wherein the target disk has a plurality of counters, each counter being one-to-one with a task priority, each counter having an upper limit value, the upper limit value of the counter being divided from the voltage regulation window value of the target disk according to the task priority corresponding to the counter, the voltage regulation window value representing the maximum number of concurrent tasks allowed by the target disk, and the initial value of the counter being the upper limit value of the counter; a window shrinking module, configured to shrink the voltage regulation window value to shrink the upper limit value of each counter when the current disk pressure value is greater than or equal to a first pressure threshold, and update the value of the first counter based on the upper limit value of the first counter corresponding to the first task priority to which the current task belongs; and a task allocation module, configured to decrease the value of the first counter when the value of the first counter is greater than a lower limit value, and allocate the current task to the target disk, and refuse to allocate the current task to the target disk when the value of the first counter is equal to the lower limit value.
[0026] On the other hand, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the disk pressure control method described above.
[0027] On the other hand, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the disk pressure control method described above.
[0028] On the other hand, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps in the disk pressure control method described above.
[0029] The aforementioned disk pressure control method, apparatus, computer equipment, computer-readable storage medium, and computer program product determine the current task to be allocated to the target disk. The target disk has multiple counters, each corresponding to a task priority. Each counter has an upper limit. The current disk pressure value of the target disk is obtained. If the current disk pressure value reaches a first pressure threshold, the pressure stabilization window of the target disk is reduced, and the upper limit of each counter is simultaneously reduced. Based on the upper limit of the first counter corresponding to the first task priority of the current task, the value of the first counter is updated. If the value of the first counter is greater than the lower limit, the value of the first counter is reduced, and the current task is allocated to the target disk. If the value of the first counter is equal to... If the count reaches the lower limit, the current task will not be assigned to the target disk. Therefore, the task allocation is limited by the counter value. When the target disk is under heavy load, the value of the first counter can be reduced by shrinking the voltage regulation window, thereby reducing the number of tasks assigned to the target disk and alleviating the pressure on the target disk. Since the upper limit of the counter is divided from the voltage regulation window of the target disk according to the priority of the corresponding task, the voltage regulation window represents the maximum number of concurrent tasks allowed on the target disk. The initial value of the counter is the upper limit of the counter. Thus, while reducing the pressure on the target disk, the processing efficiency of high-priority tasks can be taken into account, thereby ensuring system performance and stability while reducing the pressure on the target disk. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 This is a diagram illustrating the application environment of the disk pressure control method in some embodiments;
[0032] Figure 2 This is a flowchart illustrating the disk pressure control method in some embodiments;
[0033] Figure 3 This is a flowchart illustrating the process of assigning the current task in some embodiments;
[0034] Figure 4This is a flowchart illustrating the process of determining the current disk pressure value in some embodiments;
[0035] Figure 5 This is a structural block diagram of the disk pressure control device in some embodiments;
[0036] Figure 6 This is a diagram showing the internal structure of a computer device in some embodiments. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0038] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0039] The disk pressure control method provided in this application embodiment can be applied to, for example, Figure 1The application environment shown includes a distributed storage system. This system comprises multiple data sending modules, designated as data sending module 1 to data sending module m, where m is an integer greater than or equal to 1. Each data sending module acts as a storage system client, serving as the system's I / O interface and providing support for data metadata read / write operations. For example, it can be a client module. Each data sending module is responsible for sending tasks to storage nodes. A task can be a disk I / O (Input / Output) request, which can be split into multiple tasks. The distributed storage system also includes multiple storage nodes, designated as storage node 1 to storage node n, where n is an integer greater than or equal to 2. One data sending module can correspond to multiple storage nodes. For example, if there is a data backup relationship between the storage nodes, the data sending module will send the task to each storage node. Each storage node includes a disk group, and each disk group can include multiple disks. The storage node also includes a voltage regulator module corresponding to each disk. This module forwards or distributes tasks from the task data sending module to the data service module, which then executes the tasks by performing read or write operations on the corresponding disk. The voltage regulator module can determine whether to distribute the task to the data service module based on the disk pressure of the corresponding disk, thereby controlling disk pressure through task distribution. Figure 1 The dashed arrow pointing from the disk to the voltage regulator module does not indicate that the disk is feeding data back to the voltage regulator, but rather that the voltage regulator module issues tasks based on disk pressure control. The disk pressure control method provided in this application can be implemented through a voltage regulator module, which can also be called a voltage regulator.
[0040] In some embodiments, such as Figure 2 As shown, a disk pressure control method is provided, which is executed by any storage node in a distributed storage system, and includes the following steps:
[0041] Step 202: Determine the current tasks to be assigned to the target disk and obtain the current disk pressure value of the target disk. The target disk has multiple counters, which correspond one-to-one with the task priority. Each counter has an upper limit value. The upper limit value of the counter is divided from the voltage regulation window value of the target disk according to the task priority corresponding to the counter. The voltage regulation window value represents the maximum number of concurrent tasks allowed by the target disk. The initial value of the counter is the upper limit value of the counter.
[0042] The target disk is, for example, Figure 1Any disk in the target system. Steps 202 to 206 can be implemented by the voltage regulator module corresponding to the target disk. The counter can be an atomic counter. The current task can be a read / write request or a read / write task. The regulator window value is the window value of the voltage regulator or voltage regulator module.
[0043] Typically, when faced with high-concurrency write requests, all requests or tasks may be treated equally. This results in important real-time business (such as real-time data writing and big data analysis) and low-priority background tasks (such as load balancing, scaling down, data repair, deletion tasks, and log cleanup) not being prioritized according to actual needs, thus affecting system efficiency and response time.
[0044] Specifically, the upper limit of the counter is positively correlated with the priority of the corresponding task; that is, the higher the task priority, the larger the upper limit. The voltage regulation window value is the maximum number of concurrent tasks on the target disk. Therefore, under high concurrency conditions, high-priority real-time read and write tasks can be processed first to ensure read and write performance.
[0045] In some embodiments, each task priority corresponds to a weight, and the higher the task priority, the greater the weight. For example, the weight corresponding to task priority 1 is w1, the weight corresponding to task priority 2 is w2, the weight corresponding to task priority 3 is w3, and the weight corresponding to task priority 4 is w4. The priorities of task priority 1, task priority 2, task priority 3, and task priority 4 decrease in sequence, and w1, w2, w3, and w4 increase in sequence.
[0046] In some embodiments, the upper limit of the counter corresponding to a task priority can be determined based on the weight corresponding to the task priority and the voltage regulation window value. For example, the product of the weight corresponding to the task priority and the voltage regulation window value can be used as the upper limit of the counter corresponding to the task priority. For example, if the voltage regulation window value is N, then the upper limit of the counter corresponding to task priority 1 = N×w1.
[0047] Step 204: If the current disk pressure value is greater than or equal to the first pressure threshold, reduce the voltage regulation window value to reduce the upper limit value of each counter, and update the value of the first counter based on the upper limit value of the first counter corresponding to the first task priority to which the current task belongs.
[0048] The first pressure threshold is less than or equal to the baseline pressure value. The current disk pressure value is calculated based on the target disk's load and the baseline pressure value.
[0049] In some embodiments, updating the value of the first counter based on the upper limit of the first counter corresponding to the first task priority of the current task includes: obtaining the number of assigned tasks corresponding to the first task priority, where the number of assigned tasks refers to the number of tasks of the first task priority that have been assigned to the target disk but not yet completed; if the number of assigned tasks is greater than or equal to the upper limit of the first counter, then setting the value of the first counter to a lower limit; if the number of assigned tasks is less than the upper limit of the first counter, then setting the value of the first counter to the difference between the upper limit of the first counter and the number of assigned tasks. The lower limit is 0.
[0050] For example, if the number of assigned tasks is m1, and the upper limit of the first counter after reduction is n1, if m1 is greater than or equal to n1, it means that the reduction has made the upper limit of the first counter n1 less than or equal to m1. Therefore, the value of the first counter needs to be set to the lower limit, and the system waits for the number of assigned tasks to decrease (i.e., waits for the assigned tasks to complete). When the number of assigned tasks m1 becomes less than the upper limit of the first counter n1, the value of the first counter is increased accordingly. The sum of the value of the first counter and the number of assigned tasks equals the upper limit of the first counter n1. In this embodiment, if the number of assigned tasks is greater than or equal to the upper limit of the first counter, the value of the first counter is set to the lower limit; if the number of assigned tasks is less than the upper limit of the first counter, the value of the first counter is set to the difference between the upper limit of the first counter and the number of assigned tasks, thus accurately updating the value of the first counter.
[0051] In some embodiments, after the voltage regulator in the storage node delivers or allocates a task, it can record the task's metadata, which includes the task's identifier, type, and status. The metadata can be used to identify the task and record the task's execution status, thereby determining the number of tasks that have been allocated.
[0052] Step 206: If the value of the first counter is greater than the lower limit of the count, decrease the value of the first counter and allocate the current task to the target disk; if the value of the first counter is equal to the lower limit of the count, refuse to allocate the current task to the target disk.
[0053] "Assign the current task to the target disk" can be understood as performing disk partitioning for the current task, or as sending the current task to the target disk.
[0054] When a task with the highest priority is assigned to the target disk, the value of the first counter decreases; when a task with the highest priority assigned to the target disk is completed, the value of the first counter increases. Therefore, the value of the first counter represents the number of tasks currently allowed to be assigned the highest priority to the target disk.
[0055] Specifically, allocating the current task to the target disk includes: the voltage regulator module in the storage node corresponding to the target disk can issue the current task to the data service module. The data service module can then perform read or write operations on the target disk according to the current task.
[0056] In high-concurrency storage scenarios, background tasks such as data repair, deletion, and log cleanup are often hampered or even completely unable to execute due to their lower priority being affected by higher-priority tasks. This "starvation" problem can lead to data inconsistency or the inability to complete data recovery and cleanup tasks in a timely manner, thus affecting system stability. Therefore, in some implementations, for background tasks (such as logical disk balancing, logical disk shrinking, deletion, and repair), the voltage regulator in the storage node can provide the function of manually adjusting the window value. In certain special scenarios, administrators can manually adjust the voltage regulator's window value according to business needs. Especially when it is necessary to ensure the smooth completion of a certain type of task (such as background repair and data migration), administrators can manually adjust the voltage regulator's window size for different types of background services according to actual needs, ensuring that these tasks can obtain sufficient resources under high load, avoiding prolonged delays, and ensuring the stability and efficiency of system operation.
[0057] Therefore, the voltage regulator not only supports automatic adjustment of the window size (window value) but also allows for manual intervention by administrators, providing a flexible resource scheduling strategy. Administrators can flexibly adjust window settings and optimize resource allocation based on business needs and system load, ensuring that various tasks are processed appropriately. Furthermore, in high-load scenarios, background tasks such as logical disk balancing, deletion tasks, and repair tasks may face "starvation," meaning they cannot obtain sufficient processing resources. Through the voltage regulator's dynamic scheduling and manual window adjustment functions, it is ensured that these background tasks receive sufficient resources at the appropriate time, avoiding task backlog or delays and guaranteeing the normal operation of the system.
[0058] In the aforementioned disk pressure control method, the current task to be assigned to the target disk is determined. The target disk has multiple counters, each corresponding to a task priority. Each counter has an upper limit. The current disk pressure value of the target disk is obtained. If the current disk pressure value reaches a first pressure threshold, the target disk's pressure stabilization window is reduced, and the upper limit of each counter is simultaneously reduced. Based on the upper limit of the first counter corresponding to the first task priority of the current task, the value of the first counter is updated. If the value of the first counter is greater than the lower limit, the value of the first counter is reduced, and the current task is assigned to the target disk. If the value of the first counter is equal to the lower limit, the task is not assigned to the target disk. The target disk is assigned current tasks, so the allocation of tasks is limited by the value of the counter. This allows the value of the first counter to be reduced when the target disk is under heavy load, by decreasing the voltage regulation window value. This reduces the number of tasks assigned to the target disk, thereby alleviating the load on the target disk. Since the upper limit of the counter is divided from the voltage regulation window value of the target disk according to the priority of the corresponding task, and the voltage regulation window value represents the maximum number of concurrent tasks allowed on the target disk, the initial value of the counter is the upper limit of the counter. This allows the processing efficiency of high-priority tasks to be taken into account while reducing the load on the target disk, thus ensuring system performance and stability.
[0059] The disk pressure control method provided in this application implements an optimized scheduling method based on a voltage regulator, enabling the system to quickly respond to and process a large number of requests under high concurrency. The voltage regulator's priority scheduling and load balancing mechanism effectively reduces resource contention and queuing latency, improving the overall throughput and response time of the system. Furthermore, through intelligent task allocation control, it can intelligently control the issuance of I / O requests to the disk, effectively reducing disk I / O overload under high concurrency and improving system performance and stability. When processing read and write requests, it ensures that high-priority tasks are processed first, avoiding performance bottlenecks caused by excessive disk pressure.
[0060] In some embodiments, the method further includes at least one of the following: if the current disk pressure value is less than the pressure alarm value, and if the value of the first counter is equal to the count lower limit, then search for a second counter with a value greater than the count lower limit from the remaining counters of the plurality of counters, and the pressure alarm value is less than the first pressure threshold; if the second counter is found, decrease the value of the second counter and assign the current task to the target disk.
[0061] The lower limit for counting is 0. "Decrease the value of the first counter" means decreasing the value of the first counter by 1. "Current disk pressure value is less than the pressure alarm value" indicates that the target disk is under relatively low pressure. The pressure alarm value can also be equal to the first pressure threshold.
[0062] In some embodiments, if the current disk pressure value is less than the pressure alarm value, and the value of the first counter is greater than the count lower limit, then the value of the first counter is decreased, and the current task is assigned to the target disk.
[0063] In this embodiment, a second counter with a value greater than the lower limit of the count is searched from the remaining counters of multiple counters. If the second counter is found, its value is reduced, and the current task is assigned to the target disk. This allows a task with the first priority to preempt the counter of the second priority, thus achieving the effect of preempting the window to acquire disk resources. Therefore, when the disk pressure is low, tasks of various priorities can be executed in sequence.
[0064] In some embodiments, searching for a second counter whose value is greater than the lower limit of the count from the remaining counters of a plurality of counters includes: searching for a second counter whose value is greater than the lower limit of the count from the remaining counters of a plurality of counters in ascending order of task priority.
[0065] The remaining counters refer to all counters except the first counter.
[0066] Specifically, the remaining counters can be traversed in order of task priority from low to high. For the current remaining counter that is traversed, if the value of the current remaining counter is greater than the lower limit of the count, then the current remaining counter is used as the second counter.
[0067] In this embodiment, the second counter with a value greater than the lower limit of the count is searched from the remaining counters of multiple counters in order of task priority from low to high. This can minimize the impact on the allocation of high-priority tasks and ensure system stability.
[0068] In some embodiments, obtaining the current disk pressure value of the target disk includes: determining a first duration between the current time and the time when the disk pressure value of the target disk was last obtained; if the first duration is less than the duration of the pressure update cycle, then the disk pressure value of the target disk obtained last time is used as the current disk pressure value of the target disk; if the first duration is greater than or equal to the duration of the pressure update cycle, then the current disk pressure value of the target disk is calculated; the method further includes: reducing the duration of the pressure update cycle when the current disk pressure value is greater than or equal to the pressure alarm value.
[0069] The duration of the pressure update cycle can be set as needed. The pressure alarm value must be less than or equal to the reference pressure value.
[0070] In this embodiment, if the first duration is less than the duration of the pressure update cycle, the disk pressure value of the target disk obtained last time is used as the current disk pressure value of the target disk, thereby reducing the number of times the current disk pressure value is calculated and saving computer resources. If the first duration is greater than or equal to the duration of the pressure update cycle, the current disk pressure value of the target disk is calculated, thereby ensuring the accuracy of the current disk pressure value. When the current disk pressure value is greater than or equal to the pressure alarm value, reducing the duration of the pressure update cycle can increase the frequency of obtaining disk pressure values when the pressure is relatively high, thereby improving the accuracy of the disk pressure value.
[0071] In some embodiments, such as Figure 3 As shown, the method further includes: step 302, when the current disk pressure value is greater than or equal to the second pressure threshold, reducing the stabilization window value of the target disk to the lower limit of the number of concurrent tasks, setting the upper limit of one of the multiple counters to the lower limit of the number of concurrent tasks, setting the upper limit of the other counters to the lower limit of the count, and updating the value of each counter, wherein the second pressure threshold is greater than the first pressure threshold; step 304, determining the second duration of the time interval between the current moment and the last time a task was allocated to the target disk; step 306, when the value of the first counter is greater than the lower limit of the count and the second duration is less than the period duration of the task allocation cycle, waiting until the second duration reaches the period duration of the task allocation cycle, decreasing the value of the first counter, and allocating the current task to the target disk.
[0072] The minimum number of concurrent tasks is 1. After reducing the voltage regulation window value of the target disk to 1, only one counter among the counters can have an upper limit value of 1, because the sum of the upper limit values of all counters equals the voltage regulation window value. The duration of the task allocation cycle can be represented as TR. The duration of the task allocation cycle can be set according to actual needs and can be in the millisecond range.
[0073] Specifically, if the value of the first counter is greater than 0 and the second duration is less than TR, the system waits until the second duration reaches the period of the task allocation cycle before allocating the current task. This allows for periodic scheduling of tasks with a certain time delay, reducing the number of tasks allocated to the target disk.
[0074] In this embodiment, if the current disk pressure value is greater than or equal to the second pressure threshold, it indicates that the current disk pressure value is relatively high. In this case, the target disk's stabilization window value is reduced to the lower limit of the number of concurrent tasks, and tasks are periodically scheduled according to a certain time delay to ensure the stable operation of the disk.
[0075] In some embodiments, reducing the voltage regulation window value to reduce the upper limit of each counter includes: reducing the voltage regulation window value to reduce the upper limit of each counter based on a reduction function when the current disk pressure value has not reached a second pressure threshold.
[0076] Specifically, after reducing the upper limit of each counter, the upper limit of each counter is greater than or equal to 1. The reduction function can be set as needed. The reduction function can reduce the voltage regulation window value according to the current disk pressure value, and the higher the current disk pressure value, the greater the reduction.
[0077] In some embodiments, each task priority has a corresponding weight, with higher task priorities having greater weights. After narrowing the voltage regulation window, the reduced upper limit of the counter can be determined based on the weights corresponding to the task priorities and the narrowed voltage regulation window.
[0078] In this embodiment, if the current disk pressure value does not reach the second pressure threshold, it means that the current disk pressure is not particularly high. Therefore, the shrinking function is used to shrink the pressure, which can reduce the number of concurrent tasks, ensure the stable operation of the disk, and avoid reducing the number of concurrent tasks too much.
[0079] In some embodiments, such as Figure 4 As shown, obtaining the current disk pressure value of the target disk includes: Step 402, determining the current number of valid tasks on the target disk, where the current number of valid tasks is the number of valid tasks currently carried by the target disk, and valid tasks are requests triggered by users to access the target disk; Step 404, obtaining the maximum number of tasks that the target disk can carry, where the maximum number of tasks is the upper limit of the number of tasks that the target disk can carry; Step 406, determining the current disk pressure value of the target disk based on the current number of valid tasks and the maximum number of tasks carried.
[0080] The number of currently active tasks can also be referred to as the number of currently active requests. The maximum number of tasks that can be supported can be determined based on the disk type. The disk type can be, but is not limited to, hard disk drives (HDDs) and solid-state drives (SSDs).
[0081] In some embodiments, the current disk pressure value of the target disk can be determined based on the ratio of the current number of active tasks to the maximum number of tasks that can be carried. This ratio is positively correlated with the current disk pressure value.
[0082] In some embodiments, if the first duration is greater than or equal to the period of the pressure update cycle, the step of determining the current number of active tasks on the target disk is initiated, so as to determine the current disk pressure value of the target disk in accordance with the method provided in this embodiment.
[0083] In this embodiment, since the current number of valid tasks can accurately reflect the current load of the target disk, the current disk pressure value of the target disk can be determined based on the current number of valid tasks and the maximum number of tasks that can be carried, thus accurately determining the current disk pressure value.
[0084] In some embodiments, determining the current number of valid tasks on the target disk includes: obtaining the current total number of tasks and the current number of non-user tasks on the target disk, wherein the current total number of tasks is the total number of all types of tasks carried by the current target disk, and the number of non-user tasks is the number of non-user tasks carried by the current target disk; and determining the current number of valid tasks on the target disk based on the current total number of tasks and the current number of non-user tasks.
[0085] Non-user tasks refer to background tasks generated in the system. The current total number of tasks is the sum of user requests and non-user tasks currently hosted on the target disk. Hosted tasks can be understood as tasks allocated to the target disk but not yet completed.
[0086] Specifically, the current number of valid tasks on the target disk can be determined by the difference between the current total number of tasks and the current number of non-user tasks.
[0087] In this embodiment, the current number of valid tasks on the target disk is determined based on the current total number of tasks and the current number of non-user tasks, which can ensure the accuracy of the current number of valid tasks.
[0088] In some embodiments, determining the current disk pressure value of the target disk based on the current number of active tasks and the maximum number of tasks to be carried includes: determining the ratio of the current number of active tasks to the maximum number of tasks to be carried; and multiplying the ratio by a baseline pressure value as the current disk pressure value of the target disk.
[0089] For example, if the baseline pressure is A, the maximum number of tasks can be handled is a, and the number of currently active tasks is b, then the current disk pressure value = (a / b) / A. The pressure alarm value is less than or equal to the baseline pressure value. The first pressure threshold is greater than the pressure alarm value but less than the baseline pressure value, and the second pressure threshold is greater than the baseline pressure value.
[0090] In some embodiments, the reference pressure value is equal to the voltage regulator's stabilization ratio multiplied by 100, where the stabilization ratio is a percentage. The stabilization ratio can be set according to actual needs.
[0091] In this embodiment, the product of the ratio and the baseline pressure value is used as the current disk pressure value of the target disk. The ratio is converted into the current disk pressure value through the baseline pressure value, so that the current disk pressure value can be quickly determined.
[0092] The disk pressure control method provided in this application allows the regulator's window value to be dynamically adjusted based on disk pressure (such as the current disk read / write load) and system disk resource status (such as the number of disks). When disk pressure is low, the regulator can not restrict business operations, and all requests can be processed smoothly on disk. At this time, the regulator allows the system to process requests freely and efficiently to ensure read / write performance. When disk pressure is high, the regulator begins to limit the number of disk requests for different types of business operations. At this time, the regulator intelligently adjusts the allocation ratio of business requests according to the priority and type of the business. For read / write requests, the regulator prioritizes their processing to ensure that read / write performance is not affected. The regulator restricts and prioritizes business operations to different degrees under high disk pressure based on the type and priority of the business. In high-concurrency scenarios, read / write operations are crucial to the system's real-time performance and user experience. The regulator prioritizes the disk processing of read / write operations to ensure that disk I / O response time is not affected by excessive pressure. The regulator dynamically allocates more resources to read / write operations to avoid disk resource contention under high load and improve system responsiveness.
[0093] A voltage regulator is introduced at the network end of the data service layer and during disk offloading. The regulator determines whether business tasks can be offloaded, effectively controlling disk I / O load and preventing overload. The regulator's window value can be dynamically adjusted in real-time based on disk pressure and resource availability such as the number of disks. When disk pressure is low and below the window value, no restrictions are imposed; when disk pressure exceeds the window value, the regulator allocates resources according to business priority, prioritizing read and write operations. This application provides the function of manually adjusting the regulator window for different types of backend services. Administrators can adjust the regulator window value according to actual needs to ensure the processing of critical businesses and avoid long delays for low-priority tasks. The regulator window adjustment strategy can also be adaptively adjusted based on historical data and system operating status. Through machine learning or rule engines, the regulator can intelligently predict future load and adjust the window in advance, further optimizing resource allocation and business processing.
[0094] The disk pressure control method provided in this application is based on granting a token ring to each individual traffic flow. By leveraging real-time traffic statistics and a comprehensive assessment of the actual load and health of the nodes, nodes with low load and low traffic are selected for upgrades in sequence. This improves the efficiency of rolling upgrades and keeps the entire storage array in optimal working condition during the rolling upgrade process. It also realizes an intelligent scheduling strategy on the controller to shorten the rolling upgrade time and improves the efficiency of rolling upgrades.
[0095] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0096] Based on the same inventive concept, this application also provides a disk pressure control device for implementing the disk pressure control method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more disk pressure control device embodiments provided below can be found in the limitations of the disk pressure control method described above, and will not be repeated here.
[0097] In some embodiments, such as Figure 5 As shown, a disk pressure control device is provided, including: a disk pressure determination module 502, a window shrinking module 504, and a task allocation module 506, wherein:
[0098] The disk pressure determination module 502 is used to determine the current tasks to be assigned to the target disk and obtain the current disk pressure value of the target disk. The target disk has multiple counters, and each counter corresponds to a task priority. Each counter has an upper limit value, which is divided from the voltage regulation window value of the target disk according to the task priority corresponding to the counter. The voltage regulation window value represents the maximum number of concurrent tasks allowed by the target disk. The initial value of the counter is the upper limit value of the counter.
[0099] The window shrinking module 504 is used to shrink the voltage regulation window value to reduce the upper limit value of each counter when the current disk pressure value is greater than or equal to the first pressure threshold, and to update the value of the first counter based on the upper limit value of the first counter corresponding to the first task priority to which the current task belongs.
[0100] The task allocation module 506 is used to decrease the value of the first counter and allocate the current task to the target disk when the value of the first counter is greater than the lower limit of the count; and to refuse to allocate the current task to the target disk when the value of the first counter is equal to the lower limit of the count.
[0101] In some embodiments, the task allocation module 506 is further configured to: if the current disk pressure value is less than the pressure alarm value, and if the value of the first counter is equal to the count lower limit, then search for a second counter with a value greater than the count lower limit from the remaining counters of the plurality of counters, and the pressure alarm value is less than the first pressure threshold; if the second counter is found, decrease the value of the second counter and allocate the current task to the target disk.
[0102] In some embodiments, the task allocation module 506 is further configured to: search for a second counter whose value is greater than the lower limit of the count from the remaining counters of a plurality of counters in order of task priority from low to high.
[0103] In some embodiments, the disk pressure determination module 502 is further configured to: determine a first duration between the current time and the time when the disk pressure value of the target disk was last obtained; if the first duration is less than the duration of the pressure update cycle, then the disk pressure value of the target disk obtained last time is used as the current disk pressure value of the target disk; if the first duration is greater than or equal to the duration of the pressure update cycle, then the current disk pressure value of the target disk is calculated; the device further includes a cycle reduction module, which is configured to: reduce the duration of the pressure update cycle when the current disk pressure value is greater than or equal to the pressure alarm value.
[0104] In some embodiments, the window shrinking module is further configured to, when the current disk pressure value is greater than or equal to the second pressure threshold, shrink the stabilization window value of the target disk to the lower limit of the number of concurrent tasks, set the upper limit of one of the multiple counters to the lower limit of the number of concurrent tasks, set the upper limit of the other counters to the lower limit of the count, and update the value of each counter; the second pressure threshold is greater than the first pressure threshold; the task allocation module is further configured to: determine the second duration of the time interval between the current moment and the last time a task was allocated to the target disk; when the value of the first counter is greater than the lower limit of the count and the second duration is less than the period duration of the task allocation cycle, wait until the second duration reaches the period duration of the task allocation cycle, decrease the value of the first counter, and allocate the current task to the target disk.
[0105] In some embodiments, the window shrinking module 504 is further configured to: shrink the voltage regulation window value to reduce the upper limit value of each counter based on the shrinking function when the current disk pressure value has not reached the second pressure threshold.
[0106] In some embodiments, the disk pressure determination module 502 is further configured to: determine the current number of valid tasks on the target disk, wherein the current number of valid tasks is the number of valid tasks currently carried by the target disk, and a valid task is a request triggered by a user to access the target disk; obtain the maximum number of tasks that the target disk can carry, wherein the maximum number of tasks that the target disk can carry is the upper limit of the number of tasks that the target disk can carry; and determine the current disk pressure value of the target disk based on the current number of valid tasks and the maximum number of tasks that can be carried.
[0107] In some embodiments, the disk pressure determination module 502 is further configured to: obtain the total number of current tasks and the number of current non-user tasks of the target disk, wherein the total number of current tasks is the total number of various types of tasks carried by the current target disk, and the number of non-user tasks is the number of non-user tasks carried by the current target disk; and determine the number of current effective tasks of the target disk based on the total number of current tasks and the number of current non-user tasks.
[0108] In some embodiments, the disk pressure determination module 502 is further configured to: determine the ratio of the current number of valid tasks to the maximum number of tasks that can be carried; and multiply the ratio by the baseline pressure value as the current disk pressure value of the target disk.
[0109] In some embodiments, the window shrinking module 504 is further configured to: obtain the number of assigned tasks corresponding to the first task priority, wherein the number of assigned tasks refers to the number of tasks of the first task priority that have been assigned to the target disk but have not been completed; if the number of assigned tasks is greater than or equal to the upper limit of the first counter, then set the value of the first counter to the lower limit of the count; if the number of assigned tasks is less than the upper limit of the first counter, then set the value of the first counter to the difference between the upper limit of the first counter and the number of assigned tasks.
[0110] Each module in the aforementioned disk pressure control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0111] In some embodiments, a computer device is provided, which may be a storage node, and its internal structure diagram may be as follows: Figure 6As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores at least some of the data involved in the disk pressure control method. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a disk pressure control method.
[0112] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0113] In some embodiments, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0114] In some embodiments, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0115] In some embodiments, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0116] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory 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), magnetic 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. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0117] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0118] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A disk pressure control method, characterized in that, The method, applied to storage nodes in a distributed storage system, includes: The current tasks to be assigned to the target disk are determined, and the current disk pressure value of the target disk is obtained. The target disk has multiple counters, each corresponding to a task priority. Each counter has an upper limit value, which is determined from the voltage regulation window value of the target disk based on the task priority corresponding to the counter. The voltage regulation window value represents the maximum number of concurrent tasks allowed by the target disk. The initial value of the counter is the upper limit value of the counter. If the current disk pressure value is greater than or equal to the first pressure threshold, the voltage stabilization window value is reduced to reduce the upper limit value of each counter, and the value of the first counter is updated based on the upper limit value of the first counter corresponding to the first task priority to which the current task belongs; If the value of the first counter is greater than the lower limit of the count, the value of the first counter is decreased, and the current task is allocated to the target disk. If the value of the first counter is equal to the lower limit of the count, the allocation of the current task to the target disk is rejected.
2. The method according to claim 1, characterized in that, The method further includes at least one of the following: If the current disk pressure value is less than the pressure alarm value, and the value of the first counter is equal to the count lower limit, then a second counter with a value greater than the count lower limit is searched from the remaining counters of the plurality of counters, and the pressure alarm value is less than the first pressure threshold. If a second counter is found, the value of the second counter is decreased, and the current task is assigned to the target disk.
3. The method according to claim 2, characterized in that, The step of searching for a second counter whose value is greater than the lower limit from the remaining counters of the plurality of counters includes: In order of task priority from low to high, find the second counter whose value is greater than the lower limit of the count from the remaining counters of the plurality of counters.
4. The method according to any one of claims 1 to 3, characterized in that, The step of obtaining the current disk pressure value of the target disk includes: Determine the first time interval between the current moment and the moment when the disk pressure value of the target disk was last obtained; If the first duration is less than the duration of the pressure update cycle, then the disk pressure value of the target disk obtained last time will be used as the current disk pressure value of the target disk. If the first duration is greater than or equal to the duration of the pressure update cycle, then the current disk pressure value of the target disk is calculated. The method further includes: If the current disk pressure value is greater than or equal to the pressure alarm value, the duration of the pressure update cycle is reduced.
5. The method according to any one of claims 1 to 3, characterized in that, The method further includes: If the current disk pressure value is greater than or equal to the second pressure threshold, the stabilization window value of the target disk is reduced to the lower limit of the number of concurrent tasks, and the upper limit value of one of the multiple counters is set to the lower limit of the number of concurrent tasks, the upper limit values of the other counters are set to the lower limit values of the count, and the value of each counter is updated; the second pressure threshold is greater than the first pressure threshold; Determine a second duration between the current time and the time of the last time a task was allocated to the target disk; If the value of the first counter is greater than the lower limit of the count and the second duration is less than the duration of the task allocation cycle, wait until the second duration reaches the duration of the task allocation cycle, then decrease the value of the first counter and allocate the current task to the target disk.
6. The method according to claim 5, characterized in that, The step of reducing the voltage regulation window value to reduce the upper limit value of each of the counters includes: If the current disk pressure value does not reach the second pressure threshold, the voltage regulation window value is reduced based on the reduction function to reduce the upper limit value of each of the counters.
7. The method according to any one of claims 1 to 3, characterized in that, The step of obtaining the current disk pressure value of the target disk includes: Determine the current number of active tasks on the target disk. The current number of active tasks is the number of active tasks currently carried by the target disk. The active tasks are requests triggered by users to access the target disk. Obtain the maximum number of tasks that the target disk can support, where the maximum number of tasks is the upper limit of the number of tasks that the target disk can support. The current disk pressure value of the target disk is determined based on the current number of active tasks and the maximum number of tasks that can be carried.
8. The method according to claim 7, characterized in that, Determining the number of currently active tasks on the target disk includes: Obtain the total number of current tasks and the number of current non-user tasks of the target disk. The total number of current tasks is the total number of various types of tasks currently carried by the target disk, and the number of non-user tasks is the number of non-user tasks currently carried by the target disk. The number of currently active tasks on the target disk is determined based on the total number of current tasks and the number of current non-user tasks.
9. The method according to claim 7, characterized in that, Determining the current disk pressure value of the target disk based on the current number of active tasks and the maximum number of tasks it can handle includes: Determine the ratio of the current number of valid tasks to the maximum number of tasks that can be carried; The product of the ratio and the baseline pressure value is taken as the current disk pressure value of the target disk.
10. The method according to any one of claims 1 to 3, characterized in that, Updating the value of the first counter based on the upper limit value of the first counter corresponding to the priority of the first task to which the current task belongs includes: Obtain the number of assigned tasks corresponding to the first task priority, wherein the number of assigned tasks refers to the number of tasks of the first task priority that have been assigned to the target disk but have not been completed; If the number of assigned tasks is greater than or equal to the upper limit of the first counter, then the value of the first counter is set to the lower limit of the count. If the number of assigned tasks is less than the upper limit of the first counter, then the value of the first counter is set to the difference between the upper limit of the first counter and the number of assigned tasks.
11. A disk pressure regulation device, characterized in that, The device includes: The disk pressure determination module is used to determine the current tasks to be assigned to the target disk and obtain the current disk pressure value of the target disk. The target disk has multiple counters, each corresponding to a task priority. Each counter has an upper limit value, which is determined from the voltage regulation window value of the target disk based on the task priority corresponding to the counter. The voltage regulation window value represents the maximum number of concurrent tasks allowed by the target disk. The initial value of the counter is the upper limit value of the counter. The window shrinking module is used to shrink the voltage stabilization window value to shrink the upper limit value of each counter when the current disk pressure value is greater than or equal to the first pressure threshold, and to update the value of the first counter based on the upper limit value of the first counter corresponding to the first task priority to which the current task belongs; The task allocation module is configured to decrease the value of the first counter and allocate the current task to the target disk when the value of the first counter is greater than the lower limit of the count, and refuse to allocate the current task to the target disk when the value of the first counter is equal to the lower limit of the count.
12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 10.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 10.
14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 10.