Disk resource scheduling methods, devices, storage media and program products
By dynamically adjusting the queue resources and scheduling algorithm of solid-state drives (SSDs), the problem of low overall SSD performance and resource utilization is solved, achieving more efficient resource management.
Patent Information
- Application Number
- CN202511242335.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-09-02
AI Technical Summary
In existing technologies, the input/output request scheduling of solid-state drives mainly adopts fixed queue allocation and priority scheduling strategies, resulting in low overall performance and resource utilization.
By determining the service type of the target request, allocating initial queue resources and target scheduling algorithms, and obtaining queue parameter data corresponding to each service type in real time, the queue depth and bandwidth are dynamically adjusted, and the preset parameters of the target scheduling algorithm are adjusted to adapt to changes in service load.
It enables resource scheduling based on actual conditions, avoiding resource waste and improving the overall scheduling efficiency and resource utilization of solid-state drives.
Smart Images

Figure CN120723176B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to disk resource scheduling methods, devices, storage media and program products. Background Technology
[0002] With the rapid development of cloud computing, big data, and artificial intelligence technologies, the types of businesses supported by data centers are becoming increasingly diversified, and the performance requirements for storage systems are also showing highly differentiated and dynamic characteristics. Solid-state drives (SSDs), with their high-speed read and write capabilities, low latency, and high reliability, have become a core component of data center storage architectures.
[0003] Currently, the scheduling of input / output requests for solid-state drives mainly adopts fixed queue allocation and priority scheduling strategies, resulting in low overall performance and resource utilization. Summary of the Invention
[0004] This application provides a disk resource scheduling method, device, storage medium, and program product to at least solve the problem that the scheduling of input / output requests for solid-state drives in related technologies currently mainly adopts fixed queue allocation and priority scheduling strategies, resulting in low overall performance and resource utilization.
[0005] Firstly, this application provides a disk resource scheduling method, the method comprising:
[0006] In response to a received target request, the system determines the service type corresponding to the target request; the target request is an input / output request; there are multiple target requests; initial queue resources and target scheduling algorithms are allocated to the service type corresponding to each target request; real-time queue parameter data of the queues corresponding to each service type is obtained; based on the real-time queue parameter data of the queues corresponding to each service type, a first adjustment ratio of the target parameters of the queues corresponding to each service type is determined, and the target parameters corresponding to each service type are adjusted according to the first adjustment ratio; the target parameters include the first queue depth and bandwidth; preset parameter data corresponding to each target scheduling algorithm is obtained; and the preset scheduling parameters corresponding to each target scheduling algorithm are adjusted based on the preset parameter data corresponding to each target scheduling algorithm.
[0007] In a second aspect, this application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the disk resource scheduling method provided in the first aspect above.
[0008] Thirdly, this application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of the disk resource scheduling method provided in the first aspect.
[0009] Fourthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the disk resource scheduling method provided in the first aspect.
[0010] The disk resource scheduling method, device, storage medium, and program products provided in this application determine the service type corresponding to the received target request, allocate initial queue resources and target scheduling algorithms to each service type, and obtain real-time queue parameter data for each service type after allocation to observe the current resource usage in real time. Then, based on the real-time queue parameter data, a first adjustment ratio for the target parameters of each service type's queue is determined, and the target parameters for each service type are adjusted according to the first adjustment ratio, achieving dynamic adjustment of queue resources. Furthermore, preset parameter data corresponding to each target scheduling algorithm is obtained, and the preset scheduling parameters in each target scheduling algorithm are adjusted based on this preset parameter data, achieving differentiated dynamic adjustment. Compared to fixed queue resource allocation, this method schedules resources according to actual conditions, establishing a complete closed loop of service identification, resource allocation, and dynamic adjustment, avoiding resource waste caused by traditional fixed scheduling, and improving the overall scheduling efficiency of solid-state drives. Attached Figure Description
[0011] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is an application scenario diagram of the disk resource scheduling method provided in the embodiments of this application;
[0013] Figure 2 A schematic flowchart of a disk resource scheduling method provided in an embodiment of this application;
[0014] Figure 3 A schematic flowchart of a disk resource scheduling method provided in another embodiment of this application;
[0015] Figure 4 This is a schematic diagram of the structure of a disk resource scheduling device provided in an embodiment of this application;
[0016] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0018] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0019] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0020] With the rapid development of cloud computing, big data, and artificial intelligence technologies, the performance requirements of data centers for storage systems continue to rise. However, different business types have significantly different performance requirements for solid-state drives (SSDs). Currently, the scheduling of SSD input / output requests mainly involves pre-allocating a fixed number of input / output queues for different businesses. Resource parameters such as queue depth and bandwidth allocation are statically configured and cannot be dynamically adjusted according to changes in business load, resulting in low overall performance and resource utilization.
[0021] Therefore, when facing the aforementioned technical problems, the input and output requests are classified by business type, corresponding queues are allocated to each business type, and real-time queue parameter data for each business type's corresponding queue is acquired. Based on this real-time queue parameter data, the target parameters of each business type's corresponding queue are adjusted. Specifically, in response to a received target request, the business type corresponding to the target request is determined. Then, for each identified business type, basic resources and scheduling algorithms are set according to the typical requirements of that business type. Initial queue resources and target scheduling algorithms are allocated to each target request's corresponding business type. Real-time queue parameter data for each business type's corresponding queue is acquired, and a first adjustment ratio for the target parameters of each business type's corresponding queue is determined based on this data. The target parameters for each business type are then adjusted according to this first adjustment ratio, achieving dynamic resource reallocation. Furthermore, preset parameter data for each target scheduling algorithm is acquired, and the preset scheduling parameters for each target scheduling algorithm are adjusted based on this data. This achieves dynamic adjustment of algorithm parameters to adapt to the current load, improving overall performance and resource utilization.
[0022] Figure 1 This diagram illustrates an application scenario for the disk resource scheduling method provided in an embodiment of this application. Figure 1 As shown, the application scenario provided in this embodiment includes: server 10 and client 20. The disk resource scheduling method is applied to server 10. A user can trigger a target request on client 20 and send it to server 10. The target request is an input / output request. After receiving the target request from client 20, server 10 determines the service type corresponding to the target request. Server 10 allocates initial queue resources and target scheduling algorithms to the service type corresponding to each target request, and obtains real-time queue parameter data for each service type's corresponding queue. Further, server 10 determines a first adjustment ratio for the target parameters of each service type's corresponding queue based on the real-time queue parameter data, and adjusts the target parameters for each service type according to each first adjustment ratio. The target parameters include a first queue depth and bandwidth. Then, preset parameter data corresponding to each target scheduling algorithm is obtained, and the preset scheduling parameters corresponding to each target scheduling algorithm are adjusted based on the preset parameter data.
[0023] Figure 2 A schematic flowchart of a disk resource scheduling method provided in an embodiment of this application is shown below. Figure 2 As shown. The disk resource scheduling method provided in this embodiment is applied to a server. The disk resource scheduling method provided in this embodiment specifically includes the following steps:
[0024] S201: In response to the received target request, determine the business type corresponding to the target request.
[0025] The target requests are input / output requests. There are multiple target requests.
[0026] The business type refers to the business type corresponding to the input / output request.
[0027] Optionally, the service types may include Online Transaction Processing (OLTP), Online Analytical Processing (OLAP), Content Delivery Network (CDN) caching services, and video streaming services, and may also include other service requests, which are not limited in this embodiment.
[0028] Specifically, in this embodiment, after receiving a target request, the server reads the characteristics of the target request, inputs the characteristics of the target request into a preset business type determination model, and the preset business type determination model outputs the business type of the target request.
[0029] Optionally, the characteristics of the target request may include access interval, random / sequential access mode, service quality requirement identifier, etc., which are not limited in this embodiment.
[0030] Optionally, the preset business type determination model can be a pre-trained long short-term memory network or other models; this embodiment does not impose any limitations.
[0031] S202: Allocate initial queue resources and target scheduling algorithms to the business types corresponding to each target request.
[0032] The initial resource allocation includes queue depth allocation and bandwidth allocation.
[0033] Among them, the target scheduling algorithm refers to the preset scheduling algorithm corresponding to each business type.
[0034] It is understood that the allocation of initial queue resources and target scheduling algorithms for each business type are pre-set, and the specific allocation ratio and algorithm can be set independently according to the needs. This embodiment does not impose any restrictions.
[0035] For example, assume that during the initial resource allocation, the queue depth allocated to online transaction processing is 410, the queue depth allocated to video streaming services is 256, the queue depth allocated to content delivery network caching is 205, and the queue depth allocated to online analytics processing is 153. Assume the total bandwidth is 10GB / s, with 50% allocated to online transaction processing (5GB / s), 20% to video streaming services (2GB / s), 15% to content delivery network caching (1.5GB / s), and 15% to online analytics processing (1.5GB / s).
[0036] For example, assuming the business type is online transaction processing, the target scheduling algorithm would be either the Shortest Job First (SJF) algorithm or the Strict Priority (SJF) algorithm. Assuming the business type is online analytics processing, the target scheduling algorithm would be the Fair Queue scheduling algorithm. Assuming the business type is content delivery network (CDN) caching, the target scheduling algorithm would be a popularity-based scheduling algorithm. Assuming the business type is video streaming service, the target scheduling algorithm would be a deadline-based scheduling algorithm.
[0037] Specifically, in this embodiment, the mapping relationship between business types and initial resources in the configuration file in the server is read, a dedicated input / output queue is created for each business type and initial resources are allocated, and the corresponding scheduling algorithm is bound according to the business type.
[0038] S203: Obtain real-time queue parameter data for each business type's corresponding queue.
[0039] Optionally, the real-time queue parameter data may include queue utilization, latency exceedance rate, and bandwidth utilization, and may also include other parameters, which are not limited in this embodiment.
[0040] Queue utilization reflects the proportion of backlogged input / output requests in the current queue relative to the queue's maximum capacity, used to assess queue congestion. Latency exceedance rate determines the percentage of requests with latency exceeding a preset target, used to measure service quality compliance. Bandwidth utilization is the proportion of actual data transmission rate to allocated bandwidth, reflecting bandwidth resource utilization efficiency.
[0041] Queue utilization is equal to the ratio of the current number of queued requests to the queue depth. Latency exceedance rate is equal to the ratio of the number of requests with latency exceeding the target value to the total number of requests. Bandwidth utilization is equal to the ratio of actual bandwidth to allocated bandwidth.
[0042] Specifically, in this embodiment, the server obtains the corresponding parameters of the queues for each service type from the corresponding registers in real time, and calculates the real-time queue parameter data to obtain the real-time queue parameter data.
[0043] S204: Based on the real-time queue parameter data of the queues corresponding to each business type, determine the first adjustment ratio of the target parameters of the queues corresponding to each business type, and adjust the target parameters corresponding to each business type according to the first adjustment ratio.
[0044] The target parameters include the first queue depth and bandwidth. The first adjustment ratio refers to the adjustment ratio of the target parameters determined by the server based on the real-time queue parameter data corresponding to each service type.
[0045] Specifically, in this embodiment, the real-time queue parameter data of the queues corresponding to each service type are weighted and summed. Based on the interval of the weighted summed value, and according to the pre-set mapping relationship between the interval of each service type and the adjustment ratio, the adjustment ratio is matched to determine the first adjustment ratio corresponding to each service type. Then, the target parameters corresponding to each service type are adjusted according to the first adjustment ratio.
[0046] The first queue depth is the queue depth corresponding to each business type.
[0047] S205: Obtain the preset parameter data corresponding to each target scheduling algorithm.
[0048] Among them, the preset parameter data refers to the parameter data related to the parameters in the target scheduling algorithm.
[0049] Specifically, in this embodiment, preset parameter data corresponding to each target scheduling algorithm is obtained from a preset database.
[0050] For example, the preset parameter data for the shortest job first algorithm is the queue length, while the preset parameter data for the fair queue is throughput, etc., which vary depending on the target scheduling algorithm.
[0051] S206: Adjust the preset scheduling parameters of each target scheduling algorithm based on the preset parameter data corresponding to each target scheduling algorithm.
[0052] Among them, the preset scheduling parameters refer to the core configurable items of the target scheduling algorithm.
[0053] For example, the preset scheduling parameters for the Shortest Job First algorithm are the minimum request threshold and the preset scheduling parameters for the Fair Queue are time slices, which vary depending on the target scheduling algorithm.
[0054] Specifically, in this embodiment, the preset parameter data corresponding to each target scheduling algorithm is obtained, and then the preset parameter data corresponding to each target scheduling algorithm is compared with the corresponding threshold. An adjustment strategy is determined based on the threshold comparison result, and the preset scheduling parameters corresponding to each target scheduling algorithm are adjusted according to the determined adjustment strategy.
[0055] Specifically, after receiving a target request, the corresponding business type is determined. Initial queue resources and target scheduling algorithms are then allocated to each business type. Real-time queue parameter data for each business type is acquired after allocation, allowing for real-time monitoring of resource usage. Based on this data, a first adjustment ratio for the target parameters of each business type's queue is determined, and the target parameters are adjusted according to this first adjustment ratio, achieving dynamic adjustment of queue resources. Furthermore, preset parameter data for each target scheduling algorithm is acquired, and the corresponding preset scheduling parameters in each algorithm are adjusted accordingly, achieving differentiated dynamic adjustment. Compared to fixed queue resource allocation, this approach allows for resource scheduling based on actual conditions, establishing a complete closed loop of business identification, resource allocation, and dynamic adjustment. This avoids resource waste caused by traditional fixed scheduling and improves the overall scheduling efficiency of solid-state drives.
[0056] As an optional implementation, based on any of the above embodiments, in response to a received target request, the method for determining the service type corresponding to the target request includes:
[0057] Extract target features from the target request;
[0058] A preset business type determination model is used to determine the business type corresponding to the target request based on the target characteristics.
[0059] The target characteristics may include request size, access frequency, access address offset, arrival interval, access mode, and priority level.
[0060] Request size refers to the amount of data in a single input / output request operation, which varies depending on the business type. Access frequency refers to the number of requests to the same storage address per unit of time. Access address offset refers to the logical address difference between consecutive requests. Arrival interval refers to the timestamp difference between adjacent requests. Access pattern refers to the address distribution characteristics of the requests, which are divided into sequential access and random access. Priority level refers to the quality of service parameters carried in the request.
[0061] Specifically, in this embodiment, the server reads the target features corresponding to the target request, inputs the target features of the target request into a preset business type determination model, and the preset business type determination model determines the probability distribution of the target request belonging to each business type based on the calculation of the target features of the target request through multiple layers of neurons, and outputs the business type with the highest probability as the determination result, thereby determining the business type corresponding to the target request.
[0062] Optionally, the preset business type determination model can be a long short-term memory network or other models, which are not limited in this embodiment.
[0063] The preset business type determination model is a pre-trained model.
[0064] For example, the initial business type determination model and input / output requests for different preset business types within a preset historical time period are obtained and used as sample data. Each sample data item is labeled with a clear business type tag. Further, the labeled samples are divided into a training set, a validation set, and a test set in a 7:2:1 ratio. The training set samples are input into the initial business type determination model in batches. After each iteration, the validation set is input into the initial business type determination model. The performance of the initial business type determination model is evaluated using the business type recognition accuracy rate until the business type recognition accuracy rate corresponding to the validation set stabilizes above 95%, at which point the initial business type determination model is considered to have completed preliminary training. Then, the test set is used to perform a final evaluation of the preliminarily trained model. If the recognition accuracy rate for each type of business is greater than or equal to 95% and the latency is less than or equal to 1ms, the initial business type determination model is considered to have met the standards, and the qualified initial business type determination model is determined as the preset business type determination model.
[0065] The preset historical time period can be 3 months, and can be set independently according to needs. This embodiment does not impose any limitation.
[0066] Understandably, the training process for the initial business type determination model can vary depending on the model.
[0067] Specifically, by acquiring the target characteristics of the target request and using a preset business type determination model to capture the timing and key features of the target request based on the target characteristics, the accuracy and speed of business type identification are improved.
[0068] As an optional implementation, based on any of the above embodiments, the real-time queue parameter data includes queue utilization, latency exceedance rate, and bandwidth utilization.
[0069] Based on the real-time queue parameter data corresponding to each business type, a first adjustment ratio for the target parameters of the corresponding queues for each business type is determined, and the target parameters corresponding to each business type are adjusted according to the first adjustment ratio. The method includes:
[0070] Obtain the preset weights corresponding to queue utilization, latency exceedance rate, and bandwidth utilization for each service type;
[0071] The queue utilization rate, latency exceedance rate, and bandwidth utilization rate corresponding to each service type are multiplied by the corresponding preset weights to obtain the target score for each service type.
[0072] Based on the target score corresponding to each business type, the first adjustment ratio of the target parameter of the queue corresponding to each business type is determined, and the target parameter of each business type is adjusted according to the first adjustment ratio.
[0073] Optionally, the preset weight of the queue corresponding to each business type is different and can be set independently according to needs. This embodiment does not impose any restrictions.
[0074] Specifically, in this embodiment, the server obtains the preset weights corresponding to the queue utilization rate, latency exceedance rate, and bandwidth utilization rate for each service type from the preset weight configuration file. Then, it multiplies the queue utilization rate, latency exceedance rate, and bandwidth utilization rate for each service type by their corresponding preset weights, and adds the resulting real-time queue parameter data to obtain the target score for each service type. The target score for each service type is then matched with the target score range stored in the preset ratio configuration file to determine the score range in which the target score falls. A first adjustment ratio corresponding to the corresponding score range is obtained, and the target parameters for each service type are adjusted according to each first adjustment ratio.
[0075] Optionally, the preset weight configuration file can be set independently according to needs, and this embodiment does not impose any limitations.
[0076] Optionally, the preset ratio configuration file can be set independently according to needs, and this embodiment does not impose any limitations.
[0077] Understandably, after the adjustments to each business type, the total resource ratio for all business types will be 100%.
[0078] Specifically, by customizing preset weights according to business type, the needs of each business type can be adapted. The target score corresponding to each business type is calculated according to the preset weight, and the status of the queue resources corresponding to each business type is determined according to the target score. The first adjustment ratio of the target parameters of the queue corresponding to each business type is determined according to the target score, thereby realizing dynamic adjustment according to the actual situation of each business type.
[0079] As an optional implementation, based on any of the above embodiments, the first adjustment ratio is a first preset ratio or a second preset ratio;
[0080] Based on the target score corresponding to each business type, a first adjustment ratio for the target parameters of the corresponding queue for each business type is determined, and the target parameters corresponding to each business type are adjusted according to the first adjustment ratio. The method includes:
[0081] The target score for each business type is compared with the first preset threshold for each business type.
[0082] If the target score for each business type is less than the corresponding first preset threshold, the target parameters of the queues corresponding to each business type will be adjusted according to the first preset ratio.
[0083] The target score for each business type is compared with the second preset threshold for each business type; the second preset threshold is greater than the first preset threshold.
[0084] If the target score for each business type is greater than the corresponding second preset threshold, the target parameters of the queues corresponding to each business type will be adjusted according to the second preset ratio.
[0085] The first preset ratio is the adjustment ratio when the target score is less than the corresponding first preset threshold. The second preset ratio is the adjustment ratio when the target score is greater than the corresponding second preset threshold.
[0086] Specifically, a target score less than the corresponding first preset threshold indicates that the queue resources for that business type are idle. A target score greater than the corresponding second preset threshold indicates that the queue resources for that business type are strained.
[0087] Optionally, the first preset threshold may vary depending on the type of business and can be set independently according to needs; this embodiment does not impose any limitations.
[0088] Optionally, the second preset threshold may vary depending on the type of business and can be set independently according to needs; this embodiment does not impose any limitations.
[0089] Optionally, the first preset ratio may vary depending on the type of business and can be set independently according to needs; this embodiment does not impose any limitations.
[0090] Optionally, the second preset ratio may vary depending on the type of business and can be set independently according to needs; this embodiment does not impose any limitations.
[0091] Understandably, if the target score is greater than or equal to the corresponding first preset threshold and less than or equal to the corresponding second preset threshold, the target parameters of the queues corresponding to each business type will not be adjusted.
[0092] For example, if the target score of the queue for the business type of online transaction processing is greater than the corresponding second preset threshold, it indicates that the current resources are tight, and the queue depth and bandwidth of the queue for that business type are increased by a first preset ratio of +10%; if the target score of the queue for the business type of online transaction processing is less than the corresponding first preset threshold, it indicates that the current resources are idle, and the queue depth and bandwidth of the queue for that business type are decreased by a first preset ratio of -5%.
[0093] Specifically, in this embodiment, the server compares the target score corresponding to each service type with the first preset threshold corresponding to each service type. If the target score corresponding to each service type is less than the corresponding first preset threshold, the server obtains the first preset ratio corresponding to the lower first preset threshold from the preset ratio configuration file and adjusts the target parameters of the queue corresponding to each service type according to the first preset ratio. If the target score corresponding to each service type is greater than the corresponding first preset threshold, the server compares the target score corresponding to each service type with the second preset threshold corresponding to each service type. If the second preset threshold is greater than the first preset threshold, and the target score corresponding to each service type is greater than the corresponding second preset threshold, the server obtains the second preset ratio greater than the corresponding second preset threshold from the preset ratio configuration file and adjusts the target parameters of the queue corresponding to each service type according to the second preset ratio.
[0094] Specifically, the current state of the queue corresponding to the business type is quantified by the target score, and the adjustment range is divided by combining the first preset threshold and the second preset threshold, thereby realizing the hierarchical dynamic adjustment of parameters and thus achieving automated adjustment.
[0095] As an optional implementation, based on any of the above embodiments, the preset scheduling parameters in each target scheduling algorithm are adjusted according to the preset parameter data corresponding to each target scheduling algorithm, including:
[0096] The preset parameter data corresponding to each target scheduling algorithm is compared with the corresponding third preset threshold to obtain the first comparison result corresponding to each target scheduling algorithm.
[0097] If the first comparison result corresponding to each target scheduling algorithm meets the preset adjustment conditions, the preset scheduling parameters are adjusted according to the preset configuration file; the preset configuration file includes the mapping relationship between each target scheduling algorithm and the corresponding adjustment operation of the preset scheduling parameters.
[0098] The third preset threshold refers to the threshold for comparison with the preset parameter data corresponding to the target scheduling algorithm.
[0099] Optionally, the third preset threshold varies depending on the target scheduling algorithm. The third preset threshold can be set independently according to requirements, and is not limited in this embodiment.
[0100] For example, using the Shortest Job First (SJF) algorithm for online transaction processing, the preset parameters for SJF are queue length and minimum request threshold (64KB). Requests smaller than 64KB are prioritized. The queue length is compared with a corresponding third preset threshold (500). If the first comparison result is that the queue length is greater than 500, the preset adjustment condition is met, and the minimum request threshold is reduced to 32KB according to the configuration file, giving higher priority to smaller requests. Taking the Fair Queue Scheduling algorithm for online analytics processing as another example, the preset parameters for the fair queue are throughput and time slice. The throughput is compared with a corresponding third preset threshold (800MB / s). If the throughput is less than 800MB / s, the time slice is 10ms, and each queue executes for 10ms at a time. If the first comparison result is that the throughput is less than 800MB / s, the preset adjustment condition is met, and the time slice is increased to 20ms according to the configuration file to reduce switching overhead.
[0101] It is understandable that the preset adjustment conditions vary depending on the target scheduling algorithm and are limited according to the actual situation.
[0102] Specifically, by comparing the preset parameter data corresponding to each target scheduling algorithm with the corresponding third preset threshold, and when the first comparison result meets the preset adjustment conditions, the preset scheduling parameters are adjusted according to the preset configuration file, thereby matching the core requirements of different target scheduling algorithms and realizing real-time adjustment of the preset scheduling parameters of the target scheduling algorithm according to load changes.
[0103] As an optional implementation, based on any of the above embodiments, the method further includes:
[0104] The target number of operations for each business type in the corresponding queue is obtained within a preset first time interval.
[0105] The target number of operations is compared with the fourth, fifth, and sixth preset thresholds respectively to obtain a second comparison result; the fourth preset threshold is less than the fifth preset threshold; the fifth preset threshold is less than the sixth preset threshold.
[0106] Based on the second comparison result, the first parameter in the target protocol is adjusted accordingly.
[0107] The target number of operations refers to the target number of input / output operations per second (IOPS). IOPS is the total number of input / output requests completed by a certain service queue within a unit of time (1 second), and is a core indicator reflecting the concurrent processing capability of a solid-state drive (SSD). The target protocol refers to the Non-Volatile Memory Express (NVMe) protocol. The first parameter is a hardware-level parameter in the NVMe protocol that affects the target number of input / output operations per second performance.
[0108] Optionally, the fourth preset threshold, the fifth preset threshold, and the sixth preset threshold satisfy the condition that the fourth preset threshold is less than the fifth preset threshold and the fifth preset threshold is less than the sixth preset threshold. The specific values can be set independently and are not limited in this embodiment.
[0109] Optionally, the first time interval can be preset to 1 second, or it can be limited as needed. In this embodiment, no such limitation is made.
[0110] The number of solid-state drives (SSDs) can be multiple, with each SSD handling one type of business.
[0111] Specifically, in this embodiment, the server obtains the total number of completed input / output requests for a certain service type read once per second from the solid-state drive controller. The number of completed requests in the current second is subtracted from the number completed in the previous second to obtain the target number of operations for that second. The target number of operations is then compared with a fourth, fifth, and sixth preset threshold to obtain a second comparison result. Based on this second comparison result, the first parameter in the target protocol is adjusted according to a preset adjustment strategy.
[0112] Specifically, by collecting the target number of operations for each service type queue at preset time intervals and comparing it with three-level thresholds, the current load status of the queue can be accurately identified. Targeted adjustment of the first parameter of the target protocol based on different load statuses enables the protocol parameters to dynamically match real-time load demands. Furthermore, monitoring and adjusting queues for different service types separately ensures that load changes for each service are responded to accurately.
[0113] As an optional implementation, based on any of the above embodiments, the first parameter includes the second queue depth and the submission queue size;
[0114] Based on the second comparison result, the first parameter in the target protocol is adjusted accordingly, including the following methods:
[0115] If the second comparison result is that the number of target operations is greater than the sixth preset threshold, then the first parameter in the target protocol is adjusted according to the first adjustment strategy;
[0116] If the second comparison result is that the number of target operations is greater than the fifth preset threshold and less than or equal to the sixth preset threshold, then the first parameter in the target protocol is adjusted according to the second adjustment strategy.
[0117] If the second comparison result is that the target number of operations is greater than the fourth preset threshold and less than or equal to the fifth preset threshold, then the first parameter in the target protocol is adjusted according to the third adjustment strategy.
[0118] If the second comparison result shows that the number of target operations is less than the fourth preset threshold, then the first parameter in the target protocol will not be adjusted.
[0119] The second queue depth refers to the maximum number of concurrent hardware requests allocated by the SSD controller to the corresponding queue for each service type, determining the upper limit of requests that the queue can process simultaneously. A higher number of input / output operations per second requires a larger queue depth to avoid request queuing. The commit queue size refers to the hardware queue capacity for hosts to submit input / output requests to the SSD controller, determining the number of requests a host can send at once. A higher number of input / output operations per second requires a larger commit queue size to reduce request submission latency.
[0120] Optionally, there can be multiple solid-state drives (SSDs), with each SSD handling one type of business.
[0121] For example, a first adjustment strategy could increase the depth of the second queue by 50% and expand the size of the submission queue by 60%. A second adjustment strategy could increase the depth of the second queue by 30% and expand the size of the submission queue by 40%. A third adjustment strategy could keep the depth of the second queue unchanged and finely adjust the size of the submission queue by 10%.
[0122] Specifically, in this embodiment, the server obtains the second comparison result of the queues corresponding to each service type. If the second comparison result indicates that the target operation count is greater than the sixth preset threshold, it means that the queue corresponding to the service type is overloaded, and the first parameter in the target protocol is adjusted according to the first adjustment strategy. If the second comparison result indicates that the target operation count is greater than the fifth preset threshold and less than or equal to the sixth preset threshold, it means that the queue corresponding to the service type is under high load, and the first parameter in the target protocol is adjusted according to the second adjustment strategy. If the second comparison result indicates that the target operation count is greater than the fourth preset threshold and less than or equal to the fifth preset threshold, it means that the queue corresponding to the service type is under normal load, and the first parameter in the target protocol is adjusted according to the third adjustment strategy. If the second comparison result indicates that the target operation count is less than the fourth preset threshold, it means that the queue corresponding to the service type is under low load, and the first parameter in the target protocol is not adjusted.
[0123] Specifically, by comparing the target number of operations with the fourth, fifth, and sixth preset thresholds, the business load is divided into four gradients: low load (less than or equal to the fourth preset threshold), normal load (between the fourth and fifth preset thresholds), high load (between the fifth and sixth preset thresholds), and overload (greater than the sixth preset threshold). Each gradient corresponds to a different adjustment strategy. This hierarchical adjustment mechanism ensures that the second queue depth, submission queue size, and load changes are precisely matched, avoiding resource waste and performance bottlenecks, and improving protocol resource utilization.
[0124] As an optional implementation, based on any of the above embodiments, the method further includes:
[0125] The current latency rate of the queue corresponding to each service type is calculated during a preset second time interval;
[0126] The current latency rate is compared with the seventh, eighth, and ninth preset thresholds respectively to obtain the third comparison result; the seventh preset threshold is less than the eighth preset threshold; the eighth preset threshold is less than the ninth preset threshold.
[0127] Based on the third comparison result, the second parameter in the target protocol is adjusted accordingly.
[0128] Optionally, the seventh preset threshold, the eighth preset threshold, and the ninth preset threshold satisfy the condition that the seventh preset threshold is less than the eighth preset threshold and the eighth preset threshold is less than the ninth preset threshold. Their corresponding values can be set independently according to requirements, and are not limited in this embodiment.
[0129] The current latency rate of each business type's corresponding queue refers to the proportion of the number of requests in each business type's corresponding queue whose processing latency exceeds its business-specific baseline value to the total number of requests in that queue.
[0130] The second parameter refers to the parameter to be adjusted based on the third comparison result, which is the core parameter affecting latency in the target protocol.
[0131] Optionally, the preset second time interval can be 30 seconds, or it can be limited as needed. In this embodiment, no limitation is made.
[0132] Optionally, the current preset time range can be 10 seconds, or it can be limited according to needs. This embodiment does not impose any limitations.
[0133] Specifically, in this embodiment, the server obtains the number of timed-out requests in the queues corresponding to each service type within the current preset time range and the total number of requests in those queues. It then calculates the ratio of the number of timed-out requests in the queues corresponding to each service type to the total number of requests in those queues, thereby obtaining the current latency rate of each queue corresponding to each service type. The current latency rate is then compared with a seventh preset threshold, an eighth preset threshold, and a ninth preset threshold to obtain a third comparison result. Based on this third comparison result, the second parameter in the target protocol is adjusted according to a preset adjustment strategy.
[0134] Specifically, the server uses three threshold levels to classify latency rates and adjusts them accordingly to ensure that the adjustment of the second parameter matches the severity of the latency problem.
[0135] As an optional implementation, based on any of the above embodiments, the second parameter in the target protocol includes: arbitration weight, scheduling time slice, and priority level;
[0136] Based on the third comparison result, the second parameter in the target protocol is adjusted accordingly, including the following methods:
[0137] If the third comparison result shows that the current latency rate is greater than the ninth preset threshold, then the second parameter in the target protocol will be adjusted according to the fourth adjustment strategy.
[0138] If the third comparison result is that the current latency rate is greater than the eighth preset threshold and less than or equal to the ninth preset threshold, then the second parameter in the target protocol is adjusted according to the fifth adjustment strategy.
[0139] If the third comparison result is that the current latency rate is greater than the seventh preset threshold and less than or equal to the eighth preset threshold, then the second parameter in the target protocol is adjusted according to the sixth adjustment strategy.
[0140] If the third comparison result shows that the current latency rate is less than the seventh preset threshold, then the second parameter in the target protocol will not be adjusted.
[0141] The arbitration weight is the priority weight for the queue to acquire hardware resources such as solid-state drive controllers and bandwidth. The scheduling time slice is the maximum duration for which the queue can occupy hardware resources at a time. The priority level is the processing order of requests in the system scheduling queue.
[0142] For example, if the third comparison result shows that the current latency rate is greater than the ninth preset threshold, it indicates that the latency is severely excessive. The fourth adjustment strategy could be to raise the priority level from the default level (e.g., level 3) to the highest level, ensuring that this queue request is processed before other queues. The arbitration weight could be increased from the default value (e.g., 20%) to 60%, preempting more hardware resources. The scheduling time slice could be shortened from the default value (e.g., 10ms) to less than 5ms, reducing the duration of a single request and speeding up request turnaround. If the third comparison result shows that the current latency rate is greater than the eighth preset threshold and less than or equal to the ninth preset threshold, it indicates that the latency is excessive. The fifth adjustment strategy could be to raise the priority level by 1-2 levels from the default level (e.g., from level 3 to level 2), increasing the processing priority without excessive preemption. The arbitration weight could be increased from the default value to 30%-50%, moderately increasing the resource allocation ratio. The scheduling time slice could be shortened from the default value by 20%-30% (e.g., from 10ms to 8ms), speeding up turnaround but avoiding frequent switching overhead. If the third comparison result shows that the current latency rate is greater than the seventh preset threshold and less than or equal to the eighth preset threshold, it indicates that the latency is slightly exceeding the limit. The sixth adjustment strategy can keep the priority level unchanged at the default level to avoid affecting other queues. The arbitration weight remains unchanged at the default value to avoid preempting additional resources. The scheduling time slice is finely adjusted by ±10%.
[0143] Specifically, in this embodiment, the server obtains the third comparison result corresponding to each service type. If the third comparison result indicates that the current latency rate is greater than the ninth preset threshold, the second parameter in the target protocol is adjusted according to the fourth adjustment strategy. If the third comparison result indicates that the current latency rate is greater than the eighth preset threshold and less than or equal to the ninth preset threshold, the second parameter in the target protocol is adjusted according to the fifth adjustment strategy. If the third comparison result indicates that the current latency rate is greater than the seventh preset threshold and less than or equal to the eighth preset threshold, the second parameter in the target protocol is adjusted according to the sixth adjustment strategy. If the third comparison result indicates that the current latency rate is less than the seventh preset threshold, the second parameter in the target protocol is not adjusted.
[0144] Specifically, by comparing the current latency rate with the seventh, eighth, and ninth preset thresholds, the adjustment intensity is adjusted according to the different comparison results, thereby ensuring that the adjustment range of the second parameter is strictly matched with the severity of the latency problem.
[0145] As an optional implementation, based on any of the above embodiments, after determining the first adjustment ratio of the target parameters of the queues corresponding to each service type based on the real-time queue parameter data of the queues corresponding to each service type, the method further includes:
[0146] Send the adjustment ratio of the target parameters of the queues corresponding to each business type and the current queue parameter data of the queues corresponding to each business type to the preset intelligent agent;
[0147] The preset agent is trained using the adjustment ratio of the target parameters of the queues corresponding to each business type and the current queue parameter data of the queues corresponding to each business type.
[0148] If the second adjustment ratio of the target parameters of the queues corresponding to each business type, output by the preset agent based on the current queue parameter data of the queues corresponding to each business type, satisfies the preset target condition, then the preset agent is determined as the target agent.
[0149] The pre-defined agent is a reinforcement learning agent, a core component of the reinforcement learning framework. It interacts with the environment and learns optimal policies to maximize cumulative rewards, enabling it to complete specific tasks in dynamic environments. The target agent refers to the pre-defined agent that has been trained.
[0150] The current queue parameter data includes indicators reflecting the current operating status, such as current queue depth, actual bandwidth usage, number of input / output target operations per second, average latency, 99% tail latency, and queue length.
[0151] Specifically, in this embodiment, after determining the first adjustment ratio for each service type, the server sends the first adjustment ratio of the target parameters of the queue corresponding to each service type and the current queue parameter data of the queue corresponding to each service type to a preset agent. The preset agent uses the current queue parameter data corresponding to each service type as its input state and the first adjustment ratio corresponding to each service type as a reference sample to guide the agent to learn reasonable adjustment logic. During training, the preset agent autonomously explores better adjustment strategies by analyzing historical and real-time data. The adjustment ratios output by the agent are scored using preset evaluation indicators. If the output result is better than the first adjustment ratio, positive feedback is given; otherwise, the model parameters are adjusted and relearned to gradually optimize the adjustment strategy. During training, based on the input current queue parameter data, the preset agent autonomously outputs the second adjustment ratio of the target parameters of the queue corresponding to each service type. When the second adjustment ratio of the target parameters of the queue corresponding to each service type meets the preset target conditions up to a preset number, the preset agent is determined as the target agent.
[0152] Optionally, the preset evaluation indicators may be the reduction in latency of the adjusted service, the increase in throughput, etc., which are not limited in this embodiment.
[0153] The preset target condition refers to the condition that, if any one or all of the following conditions are met, the second adjustment ratio of the target parameters of the queues corresponding to each business type, output by the preset intelligent agent based on the current queue parameter data of the queues corresponding to each business type, is deemed to meet the preset target condition. The first condition is that, after adjustment based on the second adjustment ratio, the core performance indicators of the business are better than those adjusted based on the first adjustment ratio. The second condition is that the performance fluctuation corresponding to the second adjustment ratio in multiple consecutive outputs is less than the fluctuation of the first adjustment ratio. The third condition is that, under the premise of meeting performance requirements, the resource waste rate corresponding to the second adjustment ratio is lower than that of the first adjustment ratio.
[0154] Optionally, the preset number can be 10 times, or other positive integers; this embodiment does not impose any limitations.
[0155] Specifically, by learning the first adjustment ratio and real-time queue data, the pre-defined intelligent agent can uncover hidden patterns that are difficult to detect in the initial logic, thereby making the output second adjustment ratio more in line with the actual operating characteristics of the system and improving the accuracy of resource scheduling and adjustment.
[0156] As an optional implementation, based on any of the above embodiments, the method further includes:
[0157] The third parameter of the queue corresponding to each business type is obtained according to a preset period; the third parameter includes at least two parameter data.
[0158] If, within a consecutive preset number of periods, the third parameter corresponding to at least one business type exceeds the corresponding target threshold, then the real-time queue parameter data of the queue corresponding to each business type is obtained.
[0159] Input the real-time queue parameter data of the queues corresponding to each business type into the target agent to obtain the third adjustment ratio of the target parameters of the queues corresponding to each business type output by the target agent.
[0160] Adjust the target parameters corresponding to each business type according to the respective third adjustment ratio.
[0161] The third parameter is a core indicator reflecting the long-term operational status of the queue. This third parameter may include data from at least two parameters such as queue congestion rate, resource idle rate, latency growth rate, throughput volatility, target number of input / output operations per second, average latency, 99% tail latency, and queue length.
[0162] Among these, queue congestion rate is the ratio of the number of requests waiting to be processed per unit time to the total number of requests. Resource idle rate is the ratio of the unused resource capacity in the queue to the total resource capacity. Latency growth rate is the ratio of the difference between the average latency of the current period and the average latency of the previous period. Throughput volatility is the maximum fluctuation in throughput per unit time.
[0163] The preset cycle can be once every 5 minutes, or it can be set independently according to needs; this embodiment does not impose any limitations.
[0164] Specifically, in this embodiment, the server acquires the third parameter of the queue corresponding to each service type at a preset period, sets a corresponding target threshold for each parameter of the third parameter, and if, within a consecutive preset number of periods, at least one third parameter in the queue corresponding to at least one service type consistently exceeds its corresponding target threshold, then the server acquires the real-time queue parameter data of the queues corresponding to each service type, inputs the real-time queue parameter data of the queues corresponding to each service type into the target agent, and outputs the third adjustment ratio of the target parameter of the queue corresponding to each service type. The server will adjust the target parameter corresponding to each service type according to each third adjustment ratio.
[0165] Optionally, the preset quantity can be 3 or other positive integers, which can be set independently according to needs. This embodiment does not impose any limitations.
[0166] Specifically, by continuously judging whether the third parameter of the queue corresponding to each business type exceeds the standard by a preset number of cycles, occasional short-term fluctuations can be filtered out, and adjustments can be triggered only for continuous abnormal states, thus avoiding system fluctuations caused by frequent and ineffective adjustments.
[0167] As an optional implementation, based on any of the above embodiments, the method further includes:
[0168] If the third parameter corresponding to each business type does not exceed the corresponding target threshold within a consecutive preset number of periods, then the adjustment of the target parameter corresponding to each business type using the third adjustment ratio of the target parameter of the queue corresponding to each business type output by the target agent will be stopped.
[0169] Specifically, in this embodiment, the server continuously collects the third parameter of the queue corresponding to each service type according to a preset number of cycles, and compares it with the target threshold corresponding to each parameter. If the third parameter corresponding to each service type does not exceed the corresponding target threshold within a preset number of cycles, the target agent automatically terminates its right to adjust the target parameters of each service type queue, and no longer uses its output third adjustment ratio to update the parameters.
[0170] Specifically, when the corresponding queues of each business type are in a stable and compliant state for a long period of time, stopping the adjustment operation of the target agent can avoid the additional computing power consumption caused by the agent continuously calculating and outputting the adjustment ratio.
[0171] Figure 3 A flowchart illustrating a disk resource scheduling method provided in another embodiment of this application is shown below. Figure 3 As shown. The disk resource scheduling method provided in this embodiment is applied to a server. The disk resource scheduling method provided in this embodiment specifically includes the following steps:
[0172] S301, In response to the received target request, the business type corresponding to the target request is determined by using a preset business type determination model.
[0173] S302, allocate initial queue resources and target scheduling algorithms for the service type corresponding to each target request.
[0174] S303, obtain real-time queue parameter data for the queues corresponding to each business type.
[0175] S304, based on the real-time queue parameter data of the queues corresponding to each business type, determine the first adjustment ratio of the target parameters of the queues corresponding to each business type, and adjust the target parameters corresponding to each business type according to the first adjustment ratio.
[0176] S305, send the adjustment ratio of the target parameter of the queue corresponding to each business type and the current queue parameter data of the queue corresponding to each business type to the preset agent, train the preset agent, and in response to the preset agent outputting the second adjustment ratio of the target parameter of the queue corresponding to each business type based on the current queue parameter data of the queue corresponding to each business type satisfying the preset target condition, the preset agent is determined as the target agent.
[0177] S306, Obtain the preset parameter data corresponding to each target scheduling algorithm.
[0178] S307, Based on the preset parameter data corresponding to each target scheduling algorithm, adjust the preset scheduling parameters in each target scheduling algorithm.
[0179] S308, the server obtains the third parameter of the queue corresponding to each service type according to a preset period.
[0180] S309, if within a consecutive preset number of periods, at least one third parameter corresponding to a business type exceeds the corresponding target threshold, the server inputs the real-time queue parameter data of the queues corresponding to each business type into the target agent to obtain the third adjustment ratio of the target parameters of the queues corresponding to each business type output by the target agent, and adjusts the target parameters corresponding to each business type according to each third adjustment ratio.
[0181] S310, if the third parameter corresponding to each business type does not exceed the corresponding target threshold within a consecutive preset number of periods, then stop using the third adjustment ratio of the target parameter of each business type's corresponding queue output by the target agent to adjust the target parameter of each business type.
[0182] Figure 4 This is a schematic diagram of the structure of a disk resource scheduling device provided in an embodiment of this application. Figure 4 As shown, the execution entity of the above-mentioned disk resource scheduling method is a disk resource scheduling device, which can be implemented by a computer program; it can also be implemented by a medium storing the relevant computer program, such as a USB flash drive and / or optical disc, or it can be implemented by a physical device integrating or installing the relevant computer program, such as an electronic device. The electronic device can be a computer or a server. The disk resource scheduling device provided in this embodiment is located in an electronic device, therefore the disk resource scheduling device 40 provided in this embodiment includes: a determining module 41, an allocation module 42, an acquisition module 43, and an adjustment module 44.
[0183] Specifically, the determination module 41 is used to determine the service type corresponding to the received target request in response to the target request; the target request is an input / output request; the number of target requests is multiple. The allocation module 42 is used to allocate initial queue resources and target scheduling algorithms to the service type corresponding to each target request. The acquisition module 43 is used to acquire real-time queue parameter data of the queues corresponding to each service type. The determination module 41 is also used to determine a first adjustment ratio of the target parameters of the queues corresponding to each service type based on the real-time queue parameter data, and adjust the target parameters corresponding to each service type according to each first adjustment ratio; the target parameters include a first queue depth and bandwidth. The acquisition module 43 is also used to acquire preset parameter data corresponding to each target scheduling algorithm. The adjustment module 44 is used to adjust the preset scheduling parameters corresponding to each target scheduling algorithm based on the preset parameter data corresponding to each target scheduling algorithm.
[0184] Optionally, when determining the business type corresponding to the target request in response to the received target request, the determining module 41 is specifically used to: extract target features from the target request, adopt a preset business type determination model, and determine the business type corresponding to the target request based on the target features.
[0185] Optionally, the real-time queue parameter data includes queue utilization, latency exceedance rate, and bandwidth utilization.
[0186] Accordingly, when determining the first adjustment ratio of the target parameters of the queues corresponding to each service type based on the real-time queue parameter data of the queues corresponding to each service type, and adjusting the target parameters of each service type according to the first adjustment ratio, the module 41 is specifically used to: obtain the preset weights corresponding to the queue utilization rate, latency exceedance rate, and bandwidth utilization rate corresponding to each service type; multiply the queue utilization rate, latency exceedance rate, and bandwidth utilization rate corresponding to each service type by the corresponding preset weights to obtain the target score corresponding to each service type; determine the first adjustment ratio of the target parameters of the queues corresponding to each service type based on the target scores of each service type, and adjust the target parameters of each service type according to the first adjustment ratio.
[0187] Optionally, the first adjustment ratio is a first preset ratio or a second preset ratio.
[0188] Accordingly, when determining the first adjustment ratio of the target parameters of the queue corresponding to each business type based on the target score corresponding to each business type, and adjusting the target parameters of each business type according to the first adjustment ratio, the determining module 41 is specifically used to: compare the target score corresponding to each business type with the first preset threshold corresponding to each business type; if the target score corresponding to each business type is less than the corresponding first preset threshold, then adjust the target parameters of the queue corresponding to each business type according to the first preset ratio; compare the target score corresponding to each business type with the second preset threshold corresponding to each business type; the second preset threshold is greater than the first preset threshold; if the target score corresponding to each business type is greater than the corresponding second preset threshold, then adjust the target parameters of the queue corresponding to each business type according to the second preset ratio.
[0189] Optionally, when adjusting the preset scheduling parameters of each target scheduling algorithm based on the preset parameter data corresponding to each target scheduling algorithm, the adjustment module 44 is specifically used to: compare the preset parameter data corresponding to each target scheduling algorithm with the corresponding third preset threshold to obtain the first comparison result corresponding to each target scheduling algorithm; if the first comparison result corresponding to each target scheduling algorithm meets the preset adjustment conditions, then adjust the preset scheduling parameters according to the preset configuration file; the configuration file includes the mapping relationship between each target scheduling algorithm and the corresponding adjustment operation of the preset scheduling parameters.
[0190] Optionally, the disk resource scheduling device 40 also includes a comparison module and an adjustment module.
[0191] Accordingly, the acquisition module 43 is also used to acquire the target number of operations for each service type's corresponding queue within a preset first time interval. The comparison module is used to compare the target number of operations with a fourth preset threshold, a fifth preset threshold, and a sixth preset threshold, respectively, to obtain a second comparison result; the fourth preset threshold is less than the fifth preset threshold; the fifth preset threshold is less than the sixth preset threshold. The adjustment module is used to perform corresponding adjustment processing on the first parameter in the target protocol based on the second comparison result.
[0192] Optionally, the first parameter includes the second queue depth and the submission queue size.
[0193] Accordingly, when the adjustment module adjusts the first parameter in the target protocol based on the second comparison result, it specifically performs the following: if the second comparison result indicates that the number of target operations is greater than a sixth preset threshold, the first parameter in the target protocol is adjusted according to a first adjustment strategy; if the second comparison result indicates that the number of target operations is greater than a fifth preset threshold and less than or equal to a sixth preset threshold, the first parameter in the target protocol is adjusted according to a second adjustment strategy; if the second comparison result indicates that the number of target operations is greater than a fourth preset threshold and less than or equal to a fifth preset threshold, the first parameter in the target protocol is adjusted according to a third adjustment strategy; if the second comparison result indicates that the number of target operations is less than a fourth preset threshold, the first parameter in the target protocol is not adjusted.
[0194] Optionally, the disk resource scheduling device 40 also includes a computing module.
[0195] Accordingly, the calculation module is used to calculate the current latency rate of the queue corresponding to each service type at a preset second time interval. The comparison module is also used to compare the current latency rate with a seventh preset threshold, an eighth preset threshold, and a ninth preset threshold, respectively, to obtain a third comparison result; the seventh preset threshold is less than the eighth preset threshold; the eighth preset threshold is less than the ninth preset threshold. The adjustment module is also used to perform corresponding adjustment processing on the second parameter in the target protocol based on the third comparison result.
[0196] Optionally, the second parameter in the target protocol includes: arbitration weight, scheduling time slice, and priority level.
[0197] Accordingly, when the adjustment module adjusts the second parameter in the target protocol based on the third comparison result, it specifically performs the following: if the third comparison result indicates that the current latency rate is greater than the ninth preset threshold, the second parameter in the target protocol is adjusted according to the fourth adjustment strategy; if the third comparison result indicates that the current latency rate is greater than the eighth preset threshold and less than or equal to the ninth preset threshold, the second parameter in the target protocol is adjusted according to the fifth adjustment strategy; if the third comparison result indicates that the current latency rate is greater than the seventh preset threshold and less than or equal to the eighth preset threshold, the second parameter in the target protocol is adjusted according to the sixth adjustment strategy; if the third comparison result indicates that the current latency rate is less than the seventh preset threshold, the second parameter in the target protocol is not adjusted.
[0198] Optionally, the disk resource scheduling device 40 further includes a sending module and a training module.
[0199] Accordingly, the sending module is used to determine the first adjustment ratio of the target parameters of each service type's corresponding queue based on the real-time queue parameter data of each service type's corresponding queue, and then send the adjustment ratio of the target parameters of each service type's corresponding queue and the current queue parameter data of each service type's corresponding queue to the preset agent. The training module is used to train the preset agent using the adjustment ratio of the target parameters of each service type's corresponding queue and the current queue parameter data of each service type's corresponding queue. The determining module 41 is also used to determine the preset agent as the target agent in response to the preset agent outputting the second adjustment ratio of the target parameters of each service type's corresponding queue based on the current queue parameter data of each service type's corresponding queue, which satisfies the preset target condition.
[0200] Optionally, the disk resource scheduling device 40 also includes an input module.
[0201] Accordingly, the acquisition module 43 is also used to acquire the third parameter of the queue corresponding to each business type according to a preset period. The third parameter includes at least two parameter data. If, within a consecutive preset number of periods, the third parameter corresponding to at least one business type exceeds the corresponding target threshold, then the real-time queue parameter data of the queue corresponding to each business type is acquired. The input module is used to input the real-time queue parameter data of the queue corresponding to each business type into the target agent to obtain the third adjustment ratio of the target parameter of the queue corresponding to each business type output by the target agent. The adjustment module is also used to adjust the target parameter corresponding to each business type according to each third adjustment ratio.
[0202] Optionally, the adjustment module is further configured to stop adjusting the target parameters corresponding to each business type by using the third adjustment ratio of the target parameters of the queues corresponding to each business type output by the target agent if the third parameter corresponding to each business type does not exceed the corresponding target threshold within a consecutive preset number of periods.
[0203] For a description of the features in the embodiment corresponding to the page rendering device, please refer to the relevant description in the embodiment corresponding to the disk resource scheduling method, which will not be repeated here.
[0204] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device 50 provided in the embodiments of this application includes: a memory 52 and a processor 51.
[0205] The memory 52 stores a computer program, and the processor 51 is configured to run the computer program to perform the steps in any of the disk resource scheduling method embodiments described above.
[0206] The specific implementation process of processor 51 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0207] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0208] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0209] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0210] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the disk resource scheduling method embodiments described above when running.
[0211] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0212] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the disk resource scheduling method embodiments described above.
[0213] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the disk resource scheduling method embodiments described above.
[0214] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0215] The data transmission method provided in this application has been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A disk resource scheduling method, characterized in that, The method includes: In response to a received target request, the service type corresponding to the target request is determined; the target request is an input / output request; the number of target requests is multiple. Allocate initial queue resources and target scheduling algorithms to the service types corresponding to each of the target requests; Obtain real-time queue parameter data for the queues corresponding to each of the aforementioned business types; Obtain preset weights corresponding to queue utilization, latency exceedance rate, and bandwidth utilization for each of the aforementioned service types; multiply the queue utilization, latency exceedance rate, and bandwidth utilization for each of the aforementioned service types by their corresponding preset weights to obtain a target score for each of the aforementioned service types; determine a first adjustment ratio for the target parameters of the queues corresponding to each of the aforementioned service types based on the target scores for each of the aforementioned service types, and adjust the target parameters for each of the aforementioned service types according to each of the first adjustment ratios; the target parameters include a first queue depth and bandwidth; the real-time queue parameter data includes queue utilization, latency exceedance rate, and bandwidth utilization. Obtain the preset parameter data corresponding to each of the target scheduling algorithms; The preset scheduling parameters in each target scheduling algorithm are adjusted based on the preset parameter data corresponding to each target scheduling algorithm.
2. The disk resource scheduling method according to claim 1, characterized in that, The method for determining the service type corresponding to the received target request in response to the target request includes: Extract target features from the target request; A preset business type determination model is used to determine the business type corresponding to the target request based on the target characteristics.
3. The disk resource scheduling method according to claim 1, characterized in that, The first adjustment ratio is either a first preset ratio or a second preset ratio; The method of determining a first adjustment ratio for the target parameters of the queue corresponding to each of the business types based on the target score corresponding to each of the business types, and adjusting the target parameters corresponding to each of the business types according to the first adjustment ratio, includes: The target score corresponding to each of the aforementioned business types is compared with the first preset threshold corresponding to each of the aforementioned business types; If the target score corresponding to each of the business types is less than the corresponding first preset threshold, then the target parameter of the queue corresponding to each of the business types will be adjusted according to the first preset ratio; The target score corresponding to each of the aforementioned business types is compared with the second preset threshold corresponding to each of the aforementioned business types; the second preset threshold is greater than the first preset threshold; If the target score corresponding to each of the aforementioned business types is greater than the corresponding second preset threshold, then the target parameters of the queues corresponding to each of the aforementioned business types will be adjusted according to the second preset ratio.
4. The disk resource scheduling method according to claim 1, characterized in that, The adjustment of the preset scheduling parameters in each target scheduling algorithm based on the preset parameter data corresponding to each target scheduling algorithm includes: The preset parameter data corresponding to each target scheduling algorithm is compared with the corresponding third preset threshold to obtain the first comparison result corresponding to each target scheduling algorithm; If the first comparison result corresponding to each of the target scheduling algorithms meets the preset adjustment conditions, then the preset scheduling parameters are adjusted according to the preset configuration file; the preset configuration file includes the mapping relationship between each of the target scheduling algorithms and the corresponding adjustment operations of the preset scheduling parameters.
5. The disk resource scheduling method according to any one of claims 1-4, characterized in that, The method further includes: The target number of operations for each business type in the corresponding queue is obtained within a preset first time interval. The target number of operations is compared with a fourth preset threshold, a fifth preset threshold, and a sixth preset threshold to obtain a second comparison result; the fourth preset threshold is less than the fifth preset threshold; the fifth preset threshold is less than the sixth preset threshold. Based on the second comparison result, the first parameter in the target protocol is adjusted accordingly.
6. The disk resource scheduling method according to claim 5, characterized in that, The first parameter includes the second queue depth and the submission queue size; The method of adjusting the first parameter in the target protocol based on the second comparison result includes: If the second comparison result indicates that the target number of operations is greater than the sixth preset threshold, then the first parameter in the target protocol is adjusted according to the first adjustment strategy; If the second comparison result is that the target number of operations is greater than the fifth preset threshold and less than or equal to the sixth preset threshold, then the first parameter in the target protocol is adjusted according to the second adjustment strategy; If the second comparison result is that the target number of operations is greater than the fourth preset threshold and less than or equal to the fifth preset threshold, then the first parameter in the target protocol is adjusted according to the third adjustment strategy; If the second comparison result indicates that the number of target operations is less than the fourth preset threshold, then the first parameter in the target protocol will not be adjusted.
7. The disk resource scheduling method according to any one of claims 1-4, characterized in that, The method further includes: The current latency rate of the queue corresponding to each of the aforementioned service types is calculated during a preset second time interval; The current latency rate is compared with the seventh preset threshold, the eighth preset threshold, and the ninth preset threshold to obtain a third comparison result; the seventh preset threshold is less than the eighth preset threshold; the eighth preset threshold is less than the ninth preset threshold; Based on the third comparison result, the second parameter in the target protocol is adjusted accordingly.
8. The disk resource scheduling method according to claim 7, characterized in that, The second parameter in the target protocol includes: arbitration weight, scheduling time slice, and priority level; The method for adjusting the second parameter in the target protocol based on the third comparison result includes: If the third comparison result indicates that the current latency rate is greater than the ninth preset threshold, then the second parameter in the target protocol is adjusted according to the fourth adjustment strategy. If the third comparison result is that the current latency rate is greater than the eighth preset threshold and less than or equal to the ninth preset threshold, then the second parameter in the target protocol is adjusted according to the fifth adjustment strategy; If the third comparison result is that the current latency rate is greater than the seventh preset threshold and less than or equal to the eighth preset threshold, then the second parameter in the target protocol is adjusted according to the sixth adjustment strategy; If the third comparison result indicates that the current latency rate is less than the seventh preset threshold, then the second parameter in the target protocol will not be adjusted.
9. The disk resource scheduling method according to claim 1, characterized in that, After determining the first adjustment ratio of the target parameter of each queue corresponding to each service type based on the real-time queue parameter data of each queue corresponding to each service type, the method further includes: The adjustment ratio of the target parameters of the queues corresponding to each of the aforementioned business types and the current queue parameter data of the queues corresponding to each of the aforementioned business types are sent to the preset intelligent agent; The preset agent is trained using the adjustment ratio of the target parameters of the queues corresponding to each of the aforementioned business types and the current queue parameter data of the queues corresponding to each of the aforementioned business types. If the second adjustment ratio of the target parameter of each queue corresponding to each service type, output by the preset agent based on the current queue parameter data of each queue corresponding to the service type, satisfies the preset target condition, then the preset agent is determined as the target agent.
10. The disk resource scheduling method according to claim 9, characterized in that, The method further includes: The third parameter of each business type's corresponding queue is obtained according to a preset period; the third parameter includes at least two parameter data. If, within a consecutive preset number of periods, at least one of the third parameters corresponding to the business type exceeds the corresponding target threshold, then the real-time queue parameter data of the queue corresponding to each business type is obtained. The real-time queue parameter data of the queues corresponding to each of the aforementioned business types are input into the target agent to obtain the third adjustment ratio of the target parameters of the queues corresponding to each of the aforementioned business types output by the target agent. The target parameters corresponding to each of the aforementioned business types are adjusted according to the aforementioned third adjustment ratio.
11. The disk resource scheduling method according to claim 10, characterized in that, The method further includes: If, within a consecutive preset number of periods, the third parameter corresponding to each of the service types does not exceed the corresponding target threshold, then the adjustment of the target parameter corresponding to each service type using the third adjustment ratio of the target parameter of the queue corresponding to each service type output by the target agent is stopped.
12. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the disk resource scheduling method as described in any one of claims 1 to 11 when executing the computer program.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the steps of the disk resource scheduling method as described in any one of claims 1 to 11.
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 disk resource scheduling method as described in any one of claims 1 to 11.
Citation Information
Patent Citations
Job scheduling method, intelligent computing cloud operating system and computing platform
CN118034938A
Resource scheduling method and device, equipment, storage medium and computer program product
CN120235384A