Load request processing method and apparatus, and computer device and storage medium
By statistically analyzing load request characteristics in a hybrid storage system and using strategies to determine a model for adaptive scheduling, the problem of low load request processing efficiency in hybrid storage systems is solved, achieving efficient load request response and data scheduling, and improving system availability and resource utilization.
Patent Information
- Application Number
- PCT/CN2025/104064
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-12
- Filing Date
- 2025-06-26
- Publication Date
- 2026-01-15
AI Technical Summary
Hybrid storage systems often struggle to efficiently determine which storage device should respond to a load request and schedule the relevant data after receiving a load request, resulting in low access efficiency.
By statistically analyzing the characteristics of pending load requests and comparing them with the strategy-based model, a target request processing strategy is determined. Storage devices are dynamically allocated to respond to load requests, and adaptive scheduling is performed by combining reinforcement learning to train the model.
It improves the access efficiency of load requests, ensures the availability and reliability of the hybrid storage system, and enhances resource utilization and request response performance.
Smart Images

Figure CN2025104064_15012026_PF_FP_ABST
Abstract
Description
Load Request Processing Method, Apparatus, Computer Equipment and Storage Medium
[0001] Cross-reference to related applications
[0002] This application claims priority to Chinese Patent Application No. 202410932224.X, filed on July 12, 2024, entitled “Load Request Processing Method, Apparatus, Device, Storage Medium and Program Product”, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of hybrid storage technology, specifically to a load request processing method, apparatus, computer device, and non-volatile readable storage medium. Background Technology
[0004] Hybrid storage systems include storage devices with different flash memory media types, such as storage class memory (SCM) composed of SLC (Single-level Cell) and QLC (Quad-level Cell) media, and high-density storage SSDs (Solid State Disks). In a storage system composed of heterogeneous storage devices, different storage devices can respond to various load requests.
[0005] Because different flash memory media types have varying storage performance and costs, hybrid storage systems need to store different types of data across storage devices of different media types to achieve a balance between storage performance and cost. When receiving load requests such as I / O (Input / Output) requests, it's necessary to determine the appropriate storage device to respond to the load request, implementing adaptive scheduling to improve access efficiency and ensure the availability and reliability of the hybrid storage system. However, current hybrid storage systems lack a method to efficiently determine the appropriate storage device to respond to the load request and schedule the relevant data accordingly after receiving a load request.
[0006] Therefore, the relevant technologies have the problem of not being able to efficiently determine the storage device that should respond to the load request and schedule the relevant data after receiving the load request. Summary of the Invention
[0007] In view of this, this application provides a load request processing method, apparatus, computer device, and non-volatile readable storage medium to solve the problem of difficulty in efficiently determining the storage device that responds to the load request and scheduling the relevant data after receiving a load request.
[0008] Firstly, this application provides a load request processing method, including:
[0009] Analyze the first load characteristics corresponding to the pending load requests;
[0010] The first load feature is input into the strategy determination model, wherein the strategy determination model includes a first preset number of candidate request processing strategies and a second load feature corresponding to the candidate request processing strategies; the first load feature and the second load feature are compared using the strategy determination model, and the target request processing strategy is determined from the first preset number of candidate request processing strategies based on the comparison result;
[0011] The target request processing strategy is executed, and the storage device that responds to the load request to be processed is determined according to the target request processing strategy. The data corresponding to the load request to be processed is processed, wherein the storage device includes a hybrid storage system.
[0012] The load request processing method provided in this embodiment compares the first load characteristics corresponding to the load request to be processed with the second load characteristics corresponding to the candidate request processing strategies in the strategy determination model to determine the target request processing strategy. The strategy determination model is highly efficient and accurate in determining the target request processing strategy. By executing the target request processing strategy, the storage device responding to the load request is determined, and the data corresponding to the load request is processed, greatly improving the access efficiency of the load request and ensuring the availability and reliability of the hybrid storage system. This solves the problem of efficiently determining the storage device responding to the load request and scheduling the relevant data after receiving the load request.
[0013] In some alternative implementations, the method further includes, before inputting the first load feature into the strategy to determine the model:
[0014] Determine the state space and operation space of the hybrid storage system;
[0015] Get a second preset number of first preset load requests;
[0016] Create the model to be trained and initialize its parameters;
[0017] The model to be trained is trained using a preset optimizer based on the state space, operation space, first preset load request, and preset random policy to obtain a policy determination model. The first load feature is statistically derived from the first preset load request.
[0018] In this embodiment, a model to be trained is created and trained to obtain a strategy determination model that includes a first preset number of candidate request processing strategies and a second load feature. This facilitates the subsequent strategy determination model in determining the target request processing strategy by comparing the first load feature and the second load feature, thereby improving the accuracy and efficiency of the model.
[0019] In some alternative implementations, the state space and operating space of the hybrid storage system are determined, including:
[0020] Determine the first type of storage device and the second type of storage device included in the hybrid storage system;
[0021] Obtain the size of the first capacity space and the size of the second capacity space in the first type of storage device;
[0022] Obtain the amount of data migration and data eviction between the first type of storage device and the second type of storage device;
[0023] Obtain the first average response latency of the first type of storage device to the load request and the second average response latency of the second type of storage device to the load request;
[0024] The state space is determined based on the size of the first capacity space, the size of the second capacity space, the amount of data migration, the amount of data eviction, the first average response latency, and the second average response latency.
[0025] Determine a third preset number of operable modes for the hybrid storage system in response to load requests;
[0026] The operating space is determined based on the third preset number of operable methods.
[0027] In some optional implementations, the state space is determined based on the size of the first capacity space, the size of the second capacity space, the amount of data migration, the amount of data eviction, the first average response latency, and the second average response latency, including: summarizing the size of the first capacity space, the size of the second capacity space, the amount of data migration, the amount of data eviction, the first average response latency, and the second average response latency to determine the state space.
[0028] In some optional implementations, the first load characteristics corresponding to the load requests to be processed are statistically analyzed, including:
[0029] Based on the pending load requests and the processed load requests, we obtain the read / write ratio of the load requests, the average request size of the requested data, and the average number of accesses.
[0030] Get the unique number of pending load requests from the pending load requests;
[0031] The first load characteristic is obtained based on the read / write ratio, average request size, average number of accesses, and number of unique requests.
[0032] In some optional implementations, a first load characteristic is obtained based on the read / write ratio, average request size, average number of accesses, and number of unique requests, including: summarizing the read / write ratio, average request size, average number of accesses, and number of unique requests to obtain the first load characteristic.
[0033] In this embodiment, the first load characteristics corresponding to the load requests to be processed are statistically analyzed, which facilitates the matching of the strategy determination model with the corresponding target request processing strategy, realizes the adaptive scheduling of the load requests to be processed, and improves the resource utilization and request response performance of the hybrid storage system.
[0034] In some optional implementations, after determining the storage device responding to the load request to be processed according to the target request processing strategy and processing the data corresponding to the load request to be processed, the method further includes:
[0035] Get the update interval;
[0036] If the time interval between the current time and the time when the model was last determined by the update strategy reaches the update interval, determine the new state space and new operation space of the hybrid storage system.
[0037] Obtain the fourth preset number of second preset load requests;
[0038] The initialization strategy determines the model parameters;
[0039] The policy determination model is trained using a preset optimizer based on the new state space, the new operation space, the second preset load request, and the preset random policy, thus completing the update of the policy determination model.
[0040] In this embodiment, the strategy determination model is updated every update interval, which can reduce the difference between the actual load and the candidate request processing strategies in the strategy determination model, and improve the accuracy of determining the target request processing strategy.
[0041] In some optional implementations, the update interval is obtained, including:
[0042] Get the first read request ratio, first write request ratio, first request data average size, first average access count, and first unique request count for the load requests in the first time period. The first time period is the time period before the last update strategy determined the model.
[0043] Obtain the second read request ratio, second write request ratio, second average data size of the second request, second average number of accesses, and second unique request number in the second time period, where the second time period is the period after the model was determined by the last update strategy;
[0044] By comparing the first read request ratio with the second read request ratio, a first change value is obtained; by comparing the first write request ratio with the second write request ratio, a second change value is obtained; by comparing the average size of the first request data with the average size of the second request data, a third change value is obtained; by comparing the first average number of accesses with the second average number of accesses, a fourth change value is obtained; by comparing the first number of unique requests with the second number of unique requests, a fifth change value is obtained.
[0045] Based on the first, second, third, fourth, and fifth change values, the load request change is obtained, and the update interval is obtained based on the load request change. The load request change and the update interval are negatively correlated.
[0046] In this embodiment, the update interval is determined based on the changes in various load characteristics of the load requests during the first and second time periods. By dynamically adjusting the update interval, the hybrid storage system can update the candidate request processing strategy in a timely manner for loads with frequent feature changes, and can save a significant amount of system training overhead for load requests with minimal feature changes.
[0047] In some optional implementations, the load request change is obtained based on the first change value, the second change value, the third change value, the fourth change value, and the fifth change value, and the update interval time is obtained based on the load request change, including:
[0048] Based on the first change value, the second change value, the third change value, the fourth change value, the fifth change value, and the first objective formula, the update interval time is obtained;
[0049] The first objective formula satisfies:
[0050] Where T represents the update interval, and k is a preset parameter. Indicates the first change value. Indicates the proportion of first-read requests. Indicates the proportion of second read requests. Indicates the second change value. Indicates the proportion of the first write request. Indicates the proportion of the second write request. This represents the third change value. This indicates the average size of the first requested data. Indicates the average size of the second requested data. This indicates the fourth change value. This indicates the first average number of visits. This represents the second-highest average number of visits. This represents the fifth change value. Indicates the first unique request number. Let represent the second unique request number, n represent the second time period, and n-1 represent the first time period. The function d is used to calculate the change between the two parameters. This represents a change in load request. Function C is used to determine the correspondence between load request changes and update intervals.
[0051] In some alternative implementations, after determining the storage device to respond to the load request based on the target request processing strategy, the method further includes:
[0052] Based on the read / write ratio, average request size, average number of accesses, number of unique requests, and the second objective function in the first load characteristics, the first target size of the first capacity space and the second target size of the second capacity space in the first type of storage device are obtained.
[0053] The second objective function satisfies: (S) b ,S B )=min L[(r R ,r W ),s reques ,a ave ,a uniq ]
[0054] Among them, S b S represents the size of the first target. B Indicates the size of the second target, (r R ,r W ) represents the read / write ratio, r R r represents the proportion of read requests in the read / write ratio. W This represents the write request ratio in the read / write ratio, s reques Indicates the average request size, a ave a represents the average number of visits. uniq The unique number of requests is represented by L, which is the function that describes the impact of load characteristics on the system latency of the hybrid storage system.
[0055] In this embodiment, the first target size of the first capacity space and the second target size of the second capacity space are calculated based on the second objective function and the first load characteristics. The space of the first type of storage device is dynamically allocated according to the first target size and the second target size to improve resource utilization and system request response performance.
[0056] In some optional implementations, determining the storage device to respond to the pending load request based on the target request processing strategy includes:
[0057] The target response latency of the load requests to be processed is determined based on the average number of accesses in the first load characteristic, wherein the average number of accesses and the target response latency are negatively correlated.
[0058] If the target response latency is less than the first preset threshold, the storage device responding to the load request to be processed is the first type of storage device;
[0059] If the target response latency is greater than or equal to the first preset threshold, the storage device responding to the pending load request is a second type of storage device.
[0060] In this embodiment, based on the relationship between the target response latency of the pending load request and the first preset threshold, the storage device responding to the pending load request is determined to be either a first type of storage device or a second type of storage device, thereby improving request response efficiency and resource utilization.
[0061] In some optional implementations, determining the storage device to respond to the pending load request based on the target request processing strategy includes:
[0062] Based on the average number of accesses and the number of unique requests in the first load characteristic, determine the access frequency of the request data corresponding to the load request to be processed;
[0063] If the load request to be processed is a write request, and the average request size in the first load characteristic is not greater than the second preset threshold, then the storage device responding to the load request to be processed is a first type of storage device.
[0064] If the average request size is greater than the second preset threshold, determine whether the access frequency is greater than the third preset threshold; if the access frequency is greater than the third preset threshold, the storage device responding to the pending load request is a first type of storage device; if the access frequency is less than or equal to the third preset threshold, the storage device responding to the pending load request is a second type of storage device.
[0065] If the pending load request is a read request, and the average request size is not greater than the second preset threshold and the access frequency is greater than the third preset threshold, then the storage device responding to the pending load request is a first type of storage device.
[0066] In this embodiment, based on the access frequency and average request size of the requested data, it is determined whether the first type of storage device or the second type of storage device is responsible for responding to the pending load requests, so as to reasonably schedule the storage resources of the hybrid storage system and improve the request response efficiency and resource utilization.
[0067] In some optional implementations, the access frequency of the request data corresponding to the load request to be processed is determined based on the average number of accesses and the number of unique requests in the first load characteristics, including: determining the total number of accesses of different types of load requests to the request data corresponding to the load request to be processed based on the average number of accesses and the number of unique requests in the first load characteristics; and dividing the total number of accesses by the duration for which the hybrid storage system receives the load request to obtain the access frequency.
[0068] In some optional implementations, the storage device responding to the load request to be processed is determined according to the target request processing strategy, and the data corresponding to the load request to be processed is processed, including:
[0069] Determine the request data corresponding to the load requests to be processed;
[0070] Based on the average number of accesses and the number of unique requests in the first load characteristic, determine the access frequency of the request data corresponding to the load request to be processed;
[0071] Write the request data to the second type of storage device and create a cache layer on the first type of storage device;
[0072] If the pending load request is a write request, and the average request size in the first load characteristic is not greater than the fourth preset threshold, then the request data is copied to the cache layer.
[0073] If the average request size is greater than or equal to the fourth preset threshold, determine whether the access frequency is greater than the fifth preset threshold; if the access frequency is greater than the fifth preset threshold, copy the request data to the cache layer.
[0074] If the pending load request is a read request, and the average request size is no greater than the fourth preset threshold and the access frequency is greater than the fifth preset threshold, then the request data will be copied to the cache layer.
[0075] In this embodiment, the decision to copy the request data to the cache layer is made based on the access frequency and average request size of the requested data. This ensures that the cache layer's storage space is not wasted while meeting the frequent read and write data requirements of the load requests, thereby making reasonable use of the cache layer's storage space and improving request response efficiency and resource utilization.
[0076] In some optional implementations, a strategy determination model is used to compare a first load feature with a second load feature, and a target request processing strategy is determined from a first preset number of candidate request processing strategies based on the comparison result, including:
[0077] Determine the degree of difference between the first load characteristic and the second load characteristic;
[0078] The candidate request processing strategy with the smallest difference between the corresponding second load feature and the first load feature is taken as the target request processing strategy.
[0079] In some optional implementations, a target request processing strategy is executed, and a storage device is determined to respond to the load request to be processed based on the target request processing strategy. The data corresponding to the load request to be processed is processed, including: loading the target request processing strategy, combining the latest state space and operation space of the hybrid storage system, determining the storage device in the hybrid storage system to respond to the load request to be processed, responding to the load request to be processed through the determined storage device, and processing the data corresponding to the load request to be processed.
[0080] In this embodiment, by calculating the difference between the first load feature and the second load feature, the candidate request processing strategy corresponding to the second load feature with the smallest difference from the first load feature is selected as the target request processing strategy. The method is simple, easy to implement, and has high accuracy.
[0081] Secondly, this application provides a load request processing apparatus, comprising:
[0082] The statistics module is configured to collect statistics on the first load characteristics corresponding to the load requests to be processed;
[0083] The determination module is configured to input a first load feature into a strategy determination model, wherein the strategy determination model includes a first preset number of candidate request processing strategies and a second load feature corresponding to the candidate request processing strategies; the strategy determination model is used to compare the first load feature with the second load feature, and the target request processing strategy is determined from the first preset number of candidate request processing strategies based on the comparison result;
[0084] The execution module is configured to execute the target request processing strategy, determine the storage device that responds to the load request to be processed according to the target request processing strategy, and process the data corresponding to the load request to be processed. The storage device includes a hybrid storage system.
[0085] Thirdly, this application provides a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the load request processing method of the first aspect or any corresponding embodiment described above.
[0086] Fourthly, this application provides a computer non-volatile readable storage medium storing computer instructions, which are used to cause a computer to execute the load request processing method of the first aspect or any corresponding embodiment described above.
[0087] Fifthly, this application provides a computer program product, including computer instructions for causing a computer to execute the load request processing method of the first aspect or any corresponding embodiment described above. Attached Figure Description
[0088] To more clearly illustrate the technical solutions in the specific embodiments or related technologies of this application, the drawings used in the description of the specific embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0089] Figure 1 is a flowchart illustrating a load request processing method according to an embodiment of this application;
[0090] Figure 2 is a flowchart of data placement in a reinforcement learning-based hybrid storage system according to an embodiment of this application;
[0091] Figure 3 is a schematic diagram of the preparation of a reinforcement learning training environment according to an embodiment of this application;
[0092] Figure 4 is a flowchart of the training strategy for determining the model according to an embodiment of this application;
[0093] Figure 5 is a structural block diagram of a load request processing apparatus according to an embodiment of the present application;
[0094] Figure 6 is a schematic diagram of the hardware structure of a computer device according to an embodiment of this application. Detailed Implementation
[0095] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, 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, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0096] Hybrid storage systems incorporate storage devices with different flash memory media types, such as Storage Class Memory (SCM) composed of SLC and QLC media, and high-density storage SSDs. In a hybrid storage system composed of heterogeneous storage devices, different storage devices can respond to various load requests. By designing appropriate response strategies, the performance and efficiency of the hybrid storage system can be improved. Data placement is required during load request processing. In a hybrid storage system, data placement refers to storing different types of data on different storage media to achieve a balance between storage performance and cost. Based on the importance and access frequency of the data, data is stored in high-speed and low-speed storage devices respectively to improve the overall performance and efficiency of the storage system.
[0097] Based on the above, this application provides a load request processing method. By learning the storage device status and load characteristics in a hybrid storage system, an adaptive request scheduling scheme is constructed. The method compares the first load characteristics corresponding to the load request to be processed with the second load characteristics corresponding to the candidate request processing strategies in the strategy determination model to determine the target request processing strategy. This target strategy enables dynamic allocation of SCM space to byte-addressable and block-addressable capacity. Furthermore, based on the IO response characteristics of SCM and QLC, different access modes such as caching and tiering can be dynamically implemented according to the load situation. This achieves adaptive scheduling of IO requests, improves the IOPS (Input / output Operations Per Second) and bandwidth performance of the storage system, greatly enhances the access efficiency of load requests, and ensures the availability and reliability of the hybrid storage system.
[0098] According to an embodiment of this application, a load request processing embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer device with data processing capabilities, such as a computer, server, etc. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0099] This embodiment provides a load request processing method, which can be used in the aforementioned computer device. Figure 1 is a flowchart of the load request processing method according to an embodiment of this application. As shown in Figure 1, the process includes the following steps:
[0100] Step S101: Statistically analyze the first load characteristics corresponding to the load requests to be processed.
[0101] Optionally, when faced with multiple pending load requests, the hybrid storage system will first count the first load characteristics corresponding to these pending load requests. The first load characteristics include, for example, the proportion of read requests and write requests in the load requests, the average request size of the requested data, the average number of accesses, and the number of unique requests. The number of unique requests is used to count the total number of different types of load requests processed by the system within a certain period of time.
[0102] The above process is shown in Figure 2, which involves feature perception and statistics of the actual load.
[0103] Step S102: Input the first load feature into the strategy determination model, wherein the strategy determination model includes a first preset number of candidate request processing strategies and the second load feature corresponding to the candidate request processing strategies; use the strategy determination model to compare the first load feature with the second load feature, and determine the target request processing strategy from the first preset number of candidate request processing strategies based on the comparison result.
[0104] Optionally, in this embodiment, the offline-trained model is referred to as the strategy determination model. The strategy determination model includes a first preset number of candidate request processing strategies and second load features corresponding to the candidate request processing strategies. The first preset number represents multiple strategies, and no specific limit is imposed here. The second load features include the same data types as the first load features. The second load features may include: the proportion of read requests and write requests in the load request, the average request size of the requested data, the average number of accesses, and the number of unique requests. The strategy determination model can be used to compare the first load features and the second load features, calculate the difference in parameters included in the first load features and the second load features, and select the candidate request processing strategy with the smallest difference as the target request processing strategy.
[0105] The above process is shown in Figure 2, comparing features with offline strategies and models.
[0106] Step S103: Execute the target request processing strategy, determine the storage device that responds to the load request to be processed according to the target request processing strategy, and process the data corresponding to the load request to be processed. The storage device includes a hybrid storage system.
[0107] Optionally, a target request processing strategy is loaded, and the latest state space and operation space of the hybrid storage system are combined to determine a suitable storage device in the hybrid storage system to respond to the pending load request. The storage device then responds to the pending load request and processes the data corresponding to the pending load request.
[0108] The above process is shown in Figure 2, which loads the offline data placement model and strategy.
[0109] The load request processing method provided in this embodiment compares the first load characteristics corresponding to the load request to be processed with the second load characteristics corresponding to the candidate request processing strategies in the strategy determination model to determine the target request processing strategy. The strategy determination model is highly efficient and accurate in determining the target request processing strategy. By executing the target request processing strategy, the storage device responding to the load request is determined, and the data corresponding to the load request is processed, greatly improving the access efficiency of the load request and ensuring the availability and reliability of the hybrid storage system. This solves the problem of efficiently determining the storage device responding to the load request and scheduling the relevant data after receiving the load request.
[0110] In some alternative implementations, the method further includes, before inputting the first load feature into the strategy to determine the model:
[0111] Determine the state space and operation space of the hybrid storage system;
[0112] Get a second preset number of first preset load requests;
[0113] Create the model to be trained and initialize its parameters;
[0114] The model to be trained is trained using a preset optimizer based on the state space, operation space, first preset load request, and preset random policy to obtain a policy determination model. The first load feature is statistically derived from the first preset load request.
[0115] Optionally, the model training process of this embodiment will be described in conjunction with Figures 3 and 4. As shown in Figure 3, before training the model, it is necessary to determine the system state space (state_spec) and system operation space (action_spec) of the hybrid storage system. The system state space may include: SCM space allocation, data migration, data eviction, response latency, etc.; the system operation space may include: caching mode, tiered mode, fast device response, slow device response, etc. As shown in Figure 4, training the model also requires the use of various load types, such as: read / write ratio, average request size, average number of accesses, and number of unique requests. These various load types are obtained by statistically analyzing a second preset number of first preset load requests. The second preset number represents multiple load requests, and the second preset number is greater than the first preset number. The first preset load requests are the load request types that the hybrid storage system has processed multiple times within a certain period of time.
[0116] A trainable model is created using neural networks and Q-networks (Q-networks). Q-networks are based on reinforcement learning, which constructs an agent to learn through trial and error in a storage environment, achieving optimal decisions or operations for data placement within the storage system. The agent accumulates experience and gradually improves performance by continuously interacting with the storage environment, ultimately achieving efficient completion of complex tasks. After creating the trainable model, its parameters are initialized. This requires initializing the parameters of both the neural network and the Q-network, as well as initializing the agent and policy.
[0117] As shown in Figure 3, a training environment is constructed, including: an RMSprop algorithm optimizer, a random policy, a neural network, and a Q-network, as well as agent and policy initialization. The preset optimizer is, for example, the RMSprop algorithm optimizer, and the preset random policy is, for example, `random_policy`. Multiple load types are obtained by summarizing the first preset load requests. These load types are input into the model to be trained. The preset optimizer is used to train the model based on the state space, operation space, and preset random policy, resulting in a policy determination model. This includes: initializing an optimizer instance based on the RMSprop algorithm to optimize parameter convergence efficiency during training; using reinforcement learning to train the agent model and policy on various loads to obtain relevant model parameters; and persistently storing the obtained model and policy to obtain the policy determination model. The policy determination model includes a first preset number of candidate request processing policies and corresponding second load features. The second load features are statistically derived from the first preset load requests.
[0118] The above process is shown in Figure 4, which involves training agents and policies using various load types; obtaining offline agents and policies; and persisting various data placement models and policies.
[0119] In this embodiment, a model to be trained is created and trained to obtain a strategy determination model that includes a first preset number of candidate request processing strategies and a second load feature. This facilitates the subsequent strategy determination model in determining the target request processing strategy by comparing the first load feature and the second load feature, thereby improving the accuracy and efficiency of the model.
[0120] In some alternative implementations, the state space and operating space of the hybrid storage system are determined, including:
[0121] Determine the first type of storage device and the second type of storage device included in the hybrid storage system;
[0122] Obtain the size of the first capacity space and the size of the second capacity space in the first type of storage device;
[0123] Obtain the amount of data migration and data eviction between the first type of storage device and the second type of storage device;
[0124] Obtain the first average response latency of the first type of storage device to the load request and the second average response latency of the second type of storage device to the load request;
[0125] The state space is determined based on the size of the first capacity space, the size of the second capacity space, the amount of data migration, the amount of data eviction, the first average response latency, and the second average response latency.
[0126] Determine a third preset number of operable modes for the hybrid storage system in response to load requests;
[0127] The operating space is determined based on the third preset number of operable methods.
[0128] Optionally, the hybrid storage system includes a first type of storage device and a second type of storage device, such as an SCM and a high-density SSD.
[0129] The first capacity space is, for example, a byte-addressable allocation space; the second capacity space is, for example, a block-addressable allocation space. Obtain the size of the first capacity space and the size of the second capacity space in the first type of storage device.
[0130] Get the data migration amount (migration_count) and data eviction amount (eviction_count) between the first type of storage device and the second type of storage device. Get the first average response latency of the first type of storage device to the load request and the second average response latency of the second type of storage device to the load request.
[0131] By summarizing the size of the first capacity space, the size of the second capacity space, the amount of data migration, the amount of data eviction, the first average response latency, and the second average response latency, the state space (state_spec) of the hybrid storage system is determined.
[0132] For the action_spec, the hybrid storage system can categorize the location for responding to load requests into fast and slow devices based on factors such as access frequency, data size, and request priority. Furthermore, it can categorize data response modes into caching and tiered modes, allowing for flexible response to requests. Therefore, as shown in Figure 3, the action_spec can include operational modes such as caching mode, tiered mode, fast device response, and slow device response. The third preset quantity is, for example, 4 or 6, but no specific quantity limit is specified here.
[0133] In some optional implementations, the first load characteristics corresponding to the load requests to be processed are statistically analyzed, including:
[0134] Based on the pending load requests and the processed load requests, we obtain the read / write ratio of the load requests, the average request size of the requested data, and the average number of accesses.
[0135] Get the unique number of pending load requests from the pending load requests, and get the unique number of processed load requests from the processed load requests;
[0136] The first load characteristic is obtained based on the read / write ratio, average request size, average number of accesses, and number of unique requests.
[0137] Optionally, to enable the hybrid storage system to adapt to different load request types, the hybrid storage system needs to extract the load characteristics of the load requests received over a period of time. The pending load requests and processed load requests represent the load requests received by the hybrid storage system over a period of time. The hybrid storage system first statistically analyzes the read / write ratio, average request size, and average number of accesses among the pending and processed load requests. Statistical methods include, for example, first obtaining the request size for each load request, and then calculating the average to obtain the average request size.
[0138] The hybrid storage system obtains the number of unique requests from the pending load requests and the number of unique requests from the processed load requests. It then summarizes the read / write ratio, average request size, average number of accesses, and number of unique requests to obtain the first load characteristic.
[0139] In this embodiment, the first load characteristics corresponding to the load requests to be processed are statistically analyzed, which facilitates the matching of the strategy determination model with the corresponding target request processing strategy, realizes the adaptive scheduling of the load requests to be processed, and improves the resource utilization and request response performance of the hybrid storage system.
[0140] In some optional implementations, after determining the storage device responding to the load request to be processed according to the target request processing strategy and processing the data corresponding to the load request to be processed, the method further includes:
[0141] Get the update interval;
[0142] If the time interval between the current time and the time when the model was last determined by the update strategy reaches the update interval, determine the new state space and new operation space of the hybrid storage system.
[0143] Obtain the fourth preset number of second preset load requests;
[0144] The initialization strategy determines the model parameters;
[0145] The policy determination model is trained using a preset optimizer based on the new state space, the new operation space, the second preset load request, and the preset random policy, thus completing the update of the policy determination model.
[0146] Optionally, requests are responded to in the hybrid storage system; to reduce the difference between the real load and the offline placement strategy and model, a training thread is created, and the system status information and placement strategy and model parameters are updated periodically, and the model and strategy-related parameters are updated and optimized until convergence, or the load characteristics change beyond a threshold range, and the online reinforcement learning model and strategy are tuned. The steps are as follows:
[0147] Obtain the update interval T. If the time interval between the current time and the last time the strategy determination model was updated reaches the update interval T, it indicates that the strategy determination model needs to be updated again. Update the state of the hybrid storage system to determine the new state space and new operation space of the hybrid storage system.
[0148] Obtain a fourth preset number of second preset load requests, where the second preset load requests are load request types that have been processed multiple times by the hybrid storage system over a period of time.
[0149] The initialization strategy determines the model parameters. A preset optimizer, such as the RMSprop algorithm optimizer, and a preset random policy, such as `random_policy`, are used. Multiple load types are obtained by summarizing the second preset load requests. These load types are input into the model to be trained. The preset optimizer is used to train the model based on the state space, operation space, and preset random policy, resulting in a policy-determined model. This includes: initializing optimizer instances based on the RMSprop algorithm to optimize parameter convergence efficiency during training; using reinforcement learning to train the agent model and policy on various loads until convergence or load feature changes exceed a threshold range, obtaining relevant model parameters, and persistently storing the obtained model and policy, thus updating the policy-determined model. The updated policy-determined model includes a first preset number of updated candidate request processing policies and the corresponding second load features, which are statistically derived from the second preset load requests.
[0150] As shown in Figure 2, after loading the offline data placement model and strategy, the system state is updated. Based on the latest system state space and system operation space, data placement based on reinforcement learning is carried out with the goal of maximizing rewards. The model parameters are then updated based on the placement results.
[0151] In this embodiment, the strategy determination model is updated every update interval, which can reduce the difference between the actual load and the candidate request processing strategies in the strategy determination model, and improve the accuracy of determining the target request processing strategy.
[0152] In some optional implementations, the update interval is obtained, including:
[0153] Get the first read request ratio, first write request ratio, first request data average size, first average access count, and first unique request count for the load requests in the first time period. The first time period is the time period before the last update strategy determined the model.
[0154] Obtain the second read request ratio, second write request ratio, second average data size of the second request, second average number of accesses, and second unique request number in the second time period, where the second time period is the period after the model was determined by the last update strategy;
[0155] By comparing the first read request ratio with the second read request ratio, a first change value is obtained; by comparing the first write request ratio with the second write request ratio, a second change value is obtained; by comparing the average size of the first request data with the average size of the second request data, a third change value is obtained; by comparing the first average number of accesses with the second average number of accesses, a fourth change value is obtained; by comparing the first number of unique requests with the second number of unique requests, a fifth change value is obtained.
[0156] Based on the first, second, third, fourth, and fifth change values, the load request change is obtained, and the update interval is obtained based on the load request change. The load request change and the update interval are negatively correlated.
[0157] Optionally, this embodiment improves the updating of the policy determination model. Unlike the traditional periodic update method (e.g., updating once every 1000 requests), this embodiment considers the load characteristic changes between two adjacent time periods. If the load characteristic changes significantly, the update interval T is reduced. Otherwise, the update interval T of the reinforcement learning parameters and the model is appropriately extended according to the magnitude of the change. The steps of considering the load characteristic changes between two adjacent time periods include:
[0158] In this embodiment, the first time period is the period before the last update strategy determined the model, and the second time period is the period after the last update strategy determined the model.
[0159] Obtain the percentage of first read requests, percentage of first write requests, average data size of first requests, average number of accesses, and number of first unique requests for the load request in the first time period. Obtain the percentage of second read requests, percentage of second write requests, average data size of second requests, average number of accesses, and number of second unique requests for the load request in the second time period.
[0160] The first change value is obtained by comparing the first read request ratio with the second read request ratio. The second change value is obtained by comparing the first write request ratio with the second write request ratio. The third change value is obtained by comparing the average size of the first request data with the average size of the second request data. The fourth change value is obtained by comparing the first average number of accesses with the second average number of accesses. The fifth change value is obtained by comparing the first number of unique requests with the second number of unique requests. These change values can be differences, ratio changes, etc., and can be set according to actual needs.
[0161] The first, second, third, fourth, and fifth change values are integrated to obtain the load request change. To make the load request change more accurately reflect the changes in load requests, different weights can be assigned to different change values during integration. The update interval T is obtained based on the load request change. There is a negative correlation between load request change and update interval time; that is, the greater the load request change, the smaller the update interval T.
[0162] In this embodiment, the update interval is determined based on the changes in various load characteristics of the load requests during the first and second time periods. By dynamically adjusting the update interval, the hybrid storage system can update the candidate request processing strategy in a timely manner for loads with frequent feature changes, and can save a significant amount of system training overhead for load requests with minimal feature changes.
[0163] In some optional implementations, the load request change is obtained based on the first change value, the second change value, the third change value, the fourth change value, and the fifth change value, and the update interval time is obtained based on the load request change, including:
[0164] Based on the first change value, the second change value, the third change value, the fourth change value, the fifth change value, and the first objective formula, the update interval time is obtained;
[0165] The first objective formula satisfies:
[0166] Where T represents the update interval, and k is a preset parameter. Indicates the first change value. Indicates the proportion of first-read requests. Indicates the proportion of second read requests. Indicates the second change value. Indicates the proportion of the first write request. Indicates the proportion of the second write request. This represents the third change value. This indicates the average size of the first requested data. Indicates the average size of the second requested data. This indicates the fourth change value. This indicates the first average number of visits. This represents the second-highest average number of visits. This represents the fifth change value. Indicates the first unique request number. Let represent the second unique request number, n represent the second time period, and n-1 represent the first time period. The function d is used to calculate the change between the two parameters. This represents a change in load request. Function C is used to determine the correspondence between load request changes and update intervals.
[0167] Optionally, the first change value Second change value Third change value Fourth change value And the fifth change value Substituting into the first objective formula, the update interval T is calculated. In the first objective formula, function C dynamically adjusts the training cycle based on load changes; the greater the load change, the shorter the training cycle. Function d compares corresponding features between two adjacent cycles to quantify the change.
[0168] In some alternative implementations, after determining the storage device to respond to the load request based on the target request processing strategy, the method further includes:
[0169] Based on the read / write ratio, average request size, average number of accesses, number of unique requests, and the second objective function in the first load characteristics, the first target size of the first capacity space and the second target size of the second capacity space in the first type of storage device are obtained.
[0170] The second objective function satisfies: (S) b ,S B )=min L[(r R ,r W ),s reques ,a ave ,a uniq ]
[0171] Among them, S b S represents the size of the first target. B Indicates the size of the second target, (rR ,r W ) represents the read / write ratio, r R r represents the proportion of read requests in the read / write ratio. W This represents the write request ratio in the read / write ratio, s reques Indicates the average request size, a ave a represents the average number of visits. uniq The unique number of requests is represented by L, which is the function that describes the impact of load characteristics on the system latency of the hybrid storage system.
[0172] Optionally, the first capacity space may be, for example, a byte-addressable allocation space; the second capacity space may be, for example, a block-addressable allocation space.
[0173] The read / write ratio (r) in the first load characteristic of the pending load request R ,r W Average request size s reques Average number of visits a ave And the number of unique requests a uniq Substituting into the second objective function, under the influence of the L function and the minimum function min, we obtain the first objective size S. b Second target size S B .
[0174] In this embodiment, the first target size of the first capacity space and the second target size of the second capacity space are calculated based on the second objective function and the first load characteristics. The space of the first type of storage device is dynamically allocated according to the first target size and the second target size to improve resource utilization and system request response performance.
[0175] In some optional implementations, determining the storage device to respond to the pending load request based on the target request processing strategy includes:
[0176] The target response latency of the load requests to be processed is determined based on the average number of accesses in the first load characteristic, wherein the average number of accesses and the target response latency are negatively correlated.
[0177] If the target response latency is less than the first preset threshold, the storage device responding to the load request to be processed is the first type of storage device;
[0178] If the target response latency is greater than or equal to the first preset threshold, the storage device responding to the pending load request is a second type of storage device.
[0179] Optionally, this embodiment processes pending load requests using fast and slow device response methods according to the target request processing strategy. The first type of storage device is, for example, an SCM (Supply Chain Management System), and the second type of storage device is, for example, a high-density SSD (Supply Distributed SSD). The first type of storage device is a fast-response device, and the second type of storage device is a slow-response device.
[0180] The target response latency for the load requests to be processed is determined based on the average number of accesses in the first load characteristic. If the average number of accesses to a certain requested data is very high, reaching more than 10 times per minute, multiple load requests accessing the same requested data will affect each other, causing congestion. To address this, the target response latency for the load requests to be processed can be set to 0-50ms to allow for fast access completion. Furthermore, to meet this target response latency, the requested data can be placed on a fast-response device, i.e., a first-type storage device. If the average number of accesses to a certain requested data is low, reaching less than 2 times per minute, to conserve storage resources of the first-type storage devices in the hybrid storage system, the target response latency for the load requests to be processed can be set to 100ms.
[0181] Based on the above, a first preset threshold can be set, for example, 50ms. If the target response latency of the load request to be processed is less than the first preset threshold, in order to meet the target response latency, the request data can be placed on a fast response device, i.e., a first type of storage device. That is, the storage device responsible for responding to the load request to be processed is a first type of storage device.
[0182] If the target response latency is greater than or equal to the first preset threshold, in order to save storage resources of the first type of storage device in the hybrid storage system, the requested data is placed in the slow response device, i.e., the second type of storage device. That is, the storage device responsible for responding to the pending load request is the second type of storage device.
[0183] In this embodiment, based on the relationship between the target response latency of the pending load request and the first preset threshold, the storage device responding to the pending load request is determined to be either a first type of storage device or a second type of storage device, thereby improving request response efficiency and resource utilization.
[0184] In some optional implementations, determining the storage device to respond to the pending load request based on the target request processing strategy includes:
[0185] Based on the average number of accesses and the number of unique requests in the first load characteristic, determine the access frequency of the request data corresponding to the load request to be processed;
[0186] If the load request to be processed is a write request, and the average request size in the first load characteristic is not greater than the second preset threshold, then the storage device responding to the load request to be processed is a first type of storage device.
[0187] If the average request size is greater than the second preset threshold, determine whether the access frequency is greater than the third preset threshold; if the access frequency is greater than the third preset threshold, the storage device responding to the pending load request is a first type of storage device; if the access frequency is less than or equal to the third preset threshold, the storage device responding to the pending load request is a second type of storage device.
[0188] If the pending load request is a read request, and the average request size is not greater than the second preset threshold and the access frequency is greater than the third preset threshold, then the storage device responding to the pending load request is a first type of storage device.
[0189] Optionally, this embodiment employs a tiered approach to process load requests based on a target request processing strategy. The first type of storage device is, for example, an SCM (Supply Chain Management System), and the second type of storage device is, for example, a high-density SSD. The SCM serves as the performance layer of the hybrid storage system, and the high-density SSD serves as the flash memory capacity layer.
[0190] The unique request count is used to count the total number of different types of load requests processed by the system within a certain period of time. Based on the average number of accesses and the unique request count in the first load characteristic, the total amount of access to the request data corresponding to the load requests to be processed for different types of load requests can be determined. Dividing this by the duration for which the hybrid storage system receives these load requests yields the access frequency.
[0191] When the pending load request is a write request, if the average request size in the first load characteristic is not greater than the second preset threshold, for example, 32Mb, which indicates that the average request size is small, all the data in the write request can be placed in the performance layer, i.e., SCM, that is, the storage device responding to the pending load request is the first type of storage device.
[0192] If the average request size exceeds the second preset threshold, it indicates a large average request size. In this case, two scenarios need to be considered based on the access frequency. If the access frequency exceeds the third preset threshold (e.g., 10 times per minute), it means the write requests contain a significant amount of frequently read / write data. In this case, all data in the write requests can be placed in the performance layer (SCM), meaning the storage device responding to the pending load requests is a first-type storage device. If the access frequency is less than or equal to the third preset threshold, it means the data in the write requests is not frequently read / write data and does not require SCM storage space. In this case, all data in the write requests can be placed in the flash capacity layer (high-density SSD), meaning the storage device responding to the pending load requests is a second-type storage device.
[0193] Additionally, if the data stored in the SCM is no longer frequently read and written, it can be moved to a high-density SSD through data migration or data eviction.
[0194] If the pending load request is a read request, and the average request size is not greater than the second preset threshold and the access frequency is greater than the third preset threshold, it means that the data size to be read by the pending load request is small and needs to be read frequently. The read request is responded to from the performance layer, i.e., SCM. That is, the storage device responsible for responding to the pending load request is the first type of storage device. Otherwise, the read request is scheduled to the flash capacity layer for response.
[0195] In this embodiment, based on the access frequency and average request size of the requested data, it is determined whether the first type of storage device or the second type of storage device is responsible for responding to the pending load requests, so as to reasonably schedule the storage resources of the hybrid storage system and improve the request response efficiency and resource utilization.
[0196] In some optional implementations, the storage device responding to the load request to be processed is determined according to the target request processing strategy, and the data corresponding to the load request to be processed is processed, including:
[0197] Determine the request data corresponding to the load requests to be processed;
[0198] Based on the average number of accesses and the number of unique requests in the first load characteristic, determine the access frequency of the request data corresponding to the load request to be processed;
[0199] Write the request data to the second type of storage device and create a cache layer on the first type of storage device;
[0200] If the pending load request is a write request, and the average request size in the first load characteristic is not greater than the fourth preset threshold, then the request data is copied to the cache layer.
[0201] If the average request size is greater than or equal to the fourth preset threshold, determine whether the access frequency is greater than the fifth preset threshold; if the access frequency is greater than the fifth preset threshold, copy the request data to the cache layer.
[0202] If the pending load request is a read request, and the average request size is no greater than the fourth preset threshold and the access frequency is greater than the fifth preset threshold, then the request data will be copied to the cache layer.
[0203] Optionally, this embodiment uses a caching mode to process pending load requests according to the target request processing strategy. The first type of storage device is, for example, an SCM (Supply Chain Management System), and the second type of storage device is, for example, a high-density SSD (Supply Distributed Storage System).
[0204] Determine the request data corresponding to the load request to be processed, and write the request data to the second type of storage device. Create a cache layer in the SCM, i.e., the first type of storage device.
[0205] The unique request count is used to count the total number of different types of load requests processed by the system within a certain period of time. Based on the average number of accesses and the unique request count in the first load characteristic, the total amount of access to the request data corresponding to the load requests to be processed for different types of load requests can be determined. Dividing this by the duration for which the hybrid storage system receives these load requests yields the access frequency.
[0206] If the pending load request is a write request, and the average request size in the first load characteristic is not greater than the fourth preset threshold, for example, 16Mb, it means that the average request size is small. The request data can be copied to the cache layer for efficient access later.
[0207] If the average request size is greater than or equal to the fourth preset threshold, it indicates that the average request size is large. In this case, two situations need to be considered based on the access frequency. If the access frequency is greater than the fifth preset threshold, for example, 12 times per minute, it indicates that the request data of the pending load requests is currently frequently read and written. The request data is copied to the cache layer for efficient access in the future.
[0208] If the pending load requests are read requests, and the average request size is no greater than the fourth preset threshold and the access frequency is greater than the fifth preset threshold, it means that the size of the requested data is small and needs to be read frequently. The requested data is copied to the cache layer for efficient access later.
[0209] In addition, if the data stored in the cache layer is no longer frequently read and written, the data can be cleaned up in the cache layer through data migration, data eviction, or direct deletion to save storage space in the cache layer.
[0210] In this embodiment, the decision to copy the request data to the cache layer is made based on the access frequency and average request size of the requested data. This ensures that the cache layer's storage space is not wasted while meeting the frequent read and write data requirements of the load requests, thereby making reasonable use of the cache layer's storage space and improving request response efficiency and resource utilization.
[0211] In some optional implementations, a strategy determination model is used to compare a first load feature with a second load feature, and a target request processing strategy is determined from a first preset number of candidate request processing strategies based on the comparison result, including:
[0212] Determine the degree of difference between the first load characteristic and the second load characteristic;
[0213] The candidate request processing strategy with the smallest difference between the corresponding second load feature and the first load feature is taken as the target request processing strategy.
[0214] Optionally, in a real-world production environment, the first load characteristic of the pending load requests is statistically analyzed in real time. The strategy determination model calculates the difference between the first load characteristic and the second load characteristic of the candidate request processing strategy. For example, it calculates the difference between the average request size in the first and second load characteristics and uses this difference as the difference. After calculating the local difference between each parameter, the results are integrated to obtain the overall difference between the first and second load characteristics.
[0215] Select the candidate request processing strategy corresponding to the second load feature that has the smallest difference from the first load feature, and use it as the target request processing strategy.
[0216] In this embodiment, by calculating the difference between the first load feature and the second load feature, the candidate request processing strategy corresponding to the second load feature with the smallest difference from the first load feature is selected as the target request processing strategy. The method is simple, easy to implement, and has high accuracy.
[0217] This embodiment also provides a load request processing apparatus for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0218] This embodiment provides a load request processing device, as shown in Figure 5, including:
[0219] The statistics module 501 is configured to collect statistics on the first load characteristics corresponding to the load requests to be processed;
[0220] The determination module 502 is configured to input the first load feature into the strategy determination model, wherein the strategy determination model includes a first preset number of candidate request processing strategies and a second load feature corresponding to the candidate request processing strategies; the strategy determination model is used to compare the first load feature with the second load feature, and the target request processing strategy is determined from the first preset number of candidate request processing strategies based on the comparison result;
[0221] The execution module 503 is configured to execute the target request processing strategy, determine the storage device that responds to the load request to be processed according to the target request processing strategy, and process the data corresponding to the load request to be processed. The storage device is included in the hybrid storage system.
[0222] In some alternative implementations, the device is configured to: before inputting the first load characteristic into the strategy to determine the model.
[0223] Determine the state space and operation space of the hybrid storage system;
[0224] Get a second preset number of first preset load requests;
[0225] Create the model to be trained and initialize its parameters;
[0226] The model to be trained is trained using a preset optimizer based on the state space, operation space, first preset load request, and preset random policy to obtain a policy determination model. The first load feature is statistically derived from the first preset load request.
[0227] In some alternative implementations, the device determines the state space and operational space of the hybrid storage system, including:
[0228] Determine the first type of storage device and the second type of storage device included in the hybrid storage system;
[0229] Obtain the size of the first capacity space and the size of the second capacity space in the first type of storage device;
[0230] Obtain the amount of data migration and data eviction between the first type of storage device and the second type of storage device;
[0231] Obtain the first average response latency of the first type of storage device to the load request and the second average response latency of the second type of storage device to the load request;
[0232] The state space is determined based on the size of the first capacity space, the size of the second capacity space, the amount of data migration, the amount of data eviction, the first average response latency, and the second average response latency.
[0233] Determine a third preset number of operable modes for the hybrid storage system in response to load requests;
[0234] The operating space is determined based on the third preset number of operable methods.
[0235] In some optional implementations, the statistics module 501 counts the first load characteristics corresponding to the load requests to be processed, including:
[0236] Based on the pending load requests and the processed load requests, we obtain the read / write ratio of the load requests, the average request size of the requested data, and the average number of accesses.
[0237] Get the unique number of pending load requests from the pending load requests;
[0238] The first load characteristic is obtained based on the read / write ratio, average request size, average number of accesses, and number of unique requests.
[0239] In some optional implementations, after determining the storage device to respond to the load request based on the target request processing strategy and processing the data corresponding to the load request, the device is further configured to:
[0240] Get the update interval;
[0241] If the time interval between the current time and the time when the model was last determined by the update strategy reaches the update interval, determine the new state space and new operation space of the hybrid storage system.
[0242] Obtain the fourth preset number of second preset load requests;
[0243] The initialization strategy determines the model parameters;
[0244] The policy determination model is trained using a preset optimizer based on the new state space, the new operation space, the second preset load request, and the preset random policy, thus completing the update of the policy determination model.
[0245] In some alternative implementations, the device obtains the update interval time, including:
[0246] Get the first read request ratio, first write request ratio, first request data average size, first average access count, and first unique request count for the load requests in the first time period. The first time period is the time period before the last update strategy determined the model.
[0247] Obtain the second read request ratio, second write request ratio, second average data size of the second request, second average number of accesses, and second unique request number in the second time period, where the second time period is the period after the model was determined by the last update strategy;
[0248] By comparing the first read request ratio with the second read request ratio, a first change value is obtained; by comparing the first write request ratio with the second write request ratio, a second change value is obtained; by comparing the average size of the first request data with the average size of the second request data, a third change value is obtained; by comparing the first average number of accesses with the second average number of accesses, a fourth change value is obtained; by comparing the first number of unique requests with the second number of unique requests, a fifth change value is obtained.
[0249] Based on the first, second, third, fourth, and fifth change values, the load request change is obtained, and the update interval is obtained based on the load request change. The load request change and the update interval are negatively correlated.
[0250] In some optional embodiments, the device obtains the load request change based on a first change value, a second change value, a third change value, a fourth change value, and a fifth change value, and obtains the update interval time based on the load request change, including:
[0251] Based on the first change value, the second change value, the third change value, the fourth change value, the fifth change value, and the first objective formula, the update interval time is obtained;
[0252] The first objective formula satisfies:
[0253] Where T represents the update interval, and k is a preset parameter. Indicates the first change value. Indicates the proportion of first-read requests. Indicates the proportion of second read requests. Indicates the second change value. Indicates the proportion of the first write request. Indicates the proportion of the second write request. This represents the third change value. This indicates the average size of the first requested data. Indicates the average size of the second requested data. This indicates the fourth change value. This indicates the first average number of visits. This represents the second-highest average number of visits. This represents the fifth change value. Indicates the first unique request number. Let represent the second unique request number, n represent the second time period, and n-1 represent the first time period. The function d is used to calculate the change between the two parameters. This represents a change in load request. Function C is used to determine the correspondence between load request changes and update intervals.
[0254] In some alternative implementations, after determining the storage device to respond to the pending load request based on the target request processing strategy, the apparatus is further configured to:
[0255] Based on the read / write ratio, average request size, average number of accesses, number of unique requests, and the second objective function in the first load characteristics, the first target size of the first capacity space and the second target size of the second capacity space in the first type of storage device are obtained.
[0256] The second objective function satisfies: (S) b ,S B )=min L[(r R ,r W ),s reques ,a ave ,a uniq ]
[0257] Among them, S b S represents the size of the first target. B Indicates the size of the second target, (r R ,r W ) represents the read / write ratio, r R r represents the proportion of read requests in the read / write ratio. W This represents the write request ratio in the read / write ratio, s reques Indicates the average request size, a ave a represents the average number of visits. uniq The unique number of requests is represented by L, which is the function that describes the impact of load characteristics on the system latency of the hybrid storage system.
[0258] In some optional implementations, the execution module 503 determines the storage device that responds to the pending load request based on the target request processing strategy, including:
[0259] The target response latency of the load requests to be processed is determined based on the average number of accesses in the first load characteristic, wherein the average number of accesses and the target response latency are negatively correlated.
[0260] If the target response latency is less than the first preset threshold, the storage device responding to the load request to be processed is the first type of storage device;
[0261] If the target response latency is greater than or equal to the first preset threshold, the storage device responding to the pending load request is a second type of storage device.
[0262] In some optional implementations, the execution module 503 determines the storage device that responds to the pending load request based on the target request processing strategy, including:
[0263] Based on the average number of accesses and the number of unique requests in the first load characteristic, determine the access frequency of the request data corresponding to the load request to be processed;
[0264] If the load request to be processed is a write request, and the average request size in the first load characteristic is not greater than the second preset threshold, then the storage device responding to the load request to be processed is a first type of storage device.
[0265] If the average request size is greater than the second preset threshold, determine whether the access frequency is greater than the third preset threshold; if the access frequency is greater than the third preset threshold, the storage device responding to the pending load request is a first type of storage device; if the access frequency is less than or equal to the third preset threshold, the storage device responding to the pending load request is a second type of storage device.
[0266] If the pending load request is a read request, and the average request size is not greater than the second preset threshold and the access frequency is greater than the third preset threshold, then the storage device responding to the pending load request is a first type of storage device.
[0267] In some optional implementations, the execution module 503 determines the storage device that responds to the load request to be processed according to the target request processing strategy, and processes the data corresponding to the load request to be processed, including:
[0268] Determine the request data corresponding to the load requests to be processed;
[0269] Based on the average number of accesses and the number of unique requests in the first load characteristic, determine the access frequency of the request data corresponding to the load request to be processed;
[0270] Write the request data to the second type of storage device and create a cache layer on the first type of storage device;
[0271] If the pending load request is a write request, and the average request size in the first load characteristic is not greater than the fourth preset threshold, then the request data is copied to the cache layer.
[0272] If the average request size is greater than or equal to the fourth preset threshold, determine whether the access frequency is greater than the fifth preset threshold; if the access frequency is greater than the fifth preset threshold, copy the request data to the cache layer.
[0273] If the pending load request is a read request, and the average request size is no greater than the fourth preset threshold and the access frequency is greater than the fifth preset threshold, then the request data will be copied to the cache layer.
[0274] In some optional implementations, the determining module 502 uses a strategy determining model to compare the first load characteristics with the second load characteristics, and determines the target request processing strategy from a first preset number of candidate request processing strategies based on the comparison results, including:
[0275] Determine the degree of difference between the first load characteristic and the second load characteristic;
[0276] The candidate request processing strategy with the smallest difference between the corresponding second load feature and the first load feature is taken as the target request processing strategy.
[0277] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0278] In this embodiment, the load request processing device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0279] This application embodiment also provides a computer device having the load request processing apparatus shown in FIG5 above.
[0280] Please refer to Figure 6, which is a schematic diagram of the structure of a computer device provided in an optional embodiment of this application. As shown in Figure 6, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components communicate with each other using different buses and can be installed on a common motherboard or otherwise as needed. The processor can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 6 uses one processor 10 as an example.
[0281] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0282] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0283] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0284] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0285] The computer device also includes a communication interface 30, which is configured to communicate with other devices or communication networks.
[0286] This application also provides a computer non-volatile readable storage medium. The methods described in this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the methods shown in the above embodiments are implemented.
[0287] A portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer non-volatile readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer non-volatile readable medium can be any available computer non-volatile readable storage medium or communication medium accessible to a computer.
[0288] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and all such modifications and variations fall within the scope defined by the appended claims.
Claims
1. A load request processing method, characterized in that, The method includes: Analyze the first load characteristics corresponding to the pending load requests; The first load feature is input into the strategy determination model, wherein the strategy determination model includes a first preset number of candidate request processing strategies and a second load feature corresponding to the candidate request processing strategies; the first load feature is compared with the second load feature using the strategy determination model, and a target request processing strategy is determined from the first preset number of candidate request processing strategies based on the comparison result; The target request processing strategy is executed, and the storage device that responds to the pending load request is determined according to the target request processing strategy. The data corresponding to the pending load request is processed, wherein the storage device is included in the hybrid storage system.
2. The method according to claim 1, characterized in that, Before inputting the first load feature into the strategy to determine the model, the method further includes: Determine the state space and operation space of the hybrid storage system; Get a second preset number of first preset load requests; Create a model to be trained and initialize the model parameters of the model to be trained; The model to be trained is trained using a preset optimizer based on the state space, the operation space, the first preset load request, and a preset random policy to obtain the policy determination model, wherein the first load feature is statistically derived from the first preset load request.
3. The method according to claim 2, characterized in that, Determining the state space and operation space of the hybrid storage system includes: The hybrid storage system includes a first type of storage device and a second type of storage device. Obtain the size of the first capacity space and the size of the second capacity space in the first type of storage device; Obtain the amount of data migration and data eviction between the first type of storage device and the second type of storage device; Obtain the first average response latency of the first type of storage device to the load request and the second average response latency of the second type of storage device to the load request; The state space is determined based on the size of the first capacity space, the size of the second capacity space, the data migration amount, the data eviction amount, the first average response latency, and the second average response latency. Determine a third preset number of operable modes of the hybrid storage system in response to load requests; The operating space is determined according to the third preset number of operable methods.
4. The method according to claim 3, characterized in that, Determining the state space based on the size of the first capacity space, the size of the second capacity space, the data migration amount, the data eviction amount, the first average response latency, and the second average response latency includes: The state space is determined by summing the size of the first capacity space, the size of the second capacity space, the amount of data migration, the amount of data eviction, the first average response latency, and the second average response latency.
5. The method according to claim 1, characterized in that, The first load characteristic corresponding to the statistical pending load requests includes: Based on the pending load requests and the processed load requests, the read / write ratio of the load requests, the average request size of the requested data, and the average number of accesses are obtained. Obtain the unique number of requests from the pending load requests; The first load characteristic is obtained based on the read / write ratio, the average request size, the average number of accesses, and the number of unique requests.
6. The method according to claim 5, characterized in that, The process of obtaining the first load characteristic based on the read / write ratio, the average request size, the average number of accesses, and the number of unique requests includes: The first load characteristic is obtained by summing the read / write ratio, the average request size, the average number of accesses, and the number of unique requests.
7. The method according to claim 1, characterized in that, After determining the storage device that responds to the pending load request according to the target request processing strategy and processing the data corresponding to the pending load request, the method further includes: Get the update interval; If the time interval between the current time and the time of the last update of the strategy-determined model reaches the update interval, a new state space and a new operation space of the hybrid storage system are determined. Obtain the fourth preset number of second preset load requests; The strategy is initialized to determine the model parameters; The policy determination model is trained using a preset optimizer based on the new state space, the new operation space, the second preset load request, and the preset random policy, thereby updating the policy determination model.
8. The method according to claim 7, characterized in that, The update interval includes: Obtain the first read request ratio, the first write request ratio, the first average data size of the first request, the first average number of accesses, and the first unique request number in the first time period, wherein the first time period is the time period before the last update of the strategy to determine the model; Obtain the second read request ratio, second write request ratio, second average data size of the second request, second average number of accesses, and second unique request number during the second time period, wherein the second time period is the period after the last update of the strategy to determine the model; A first change value is obtained by comparing the first read request ratio and the second read request ratio; a second change value is obtained by comparing the first write request ratio and the second write request ratio; a third change value is obtained by comparing the average size of the first request data and the average size of the second request data; a fourth change value is obtained by comparing the first average number of accesses and the second average number of accesses; and a fifth change value is obtained by comparing the first number of unique requests and the second number of unique requests. The load request change is obtained based on the first change value, the second change value, the third change value, the fourth change value, and the fifth change value. The update interval time is obtained based on the load request change, wherein the load request change and the update interval time are negatively correlated.
9. The method according to claim 8, characterized in that, The step of obtaining the load request change based on the first change value, the second change value, the third change value, the fourth change value, and the fifth change value, and obtaining the update interval time based on the load request change, includes: The update interval time is obtained based on the first change value, the second change value, the third change value, the fourth change value, the fifth change value, and the first target formula; The first objective formula satisfies: Where T represents the update interval, and k is a preset parameter. This represents the first change value. This indicates the proportion of the first read request. Indicates the proportion of the second read request. This represents the second change value. This indicates the proportion of the first write request. This indicates the proportion of the second write request. This represents the third change value. This indicates the average size of the first requested data. This indicates the average size of the second requested data. This represents the fourth change value. This represents the first average number of visits. This represents the second average number of visits. This represents the fifth change value. This indicates the number of the first unique requests. Let n represent the second unique request number, n represent the second time period, n-1 represent the first time period, and the function d is used to calculate the change between the two parameters. This indicates a change in load request, and function C is used to determine the correspondence between the change in load request and the update interval.
10. The method according to claim 5, characterized in that, After determining the storage device that will respond to the pending load request according to the target request processing strategy, the method further includes: Based on the read / write ratio, average request size, average access count, unique request count, and second objective function in the first load characteristics, the first target size of the first capacity space and the second target size of the second capacity space in the first type of storage device are obtained. The second objective function satisfies: (S b ,S B )=min L[(r R ,r W ),s reques ,a ave ,a uniq ] Among them, S b S represents the size of the first target. B This represents the size of the second target, (r R ,r W ) represents the read / write ratio, r R r represents the proportion of read requests in the read / write ratio. W This represents the proportion of write requests in the read / write ratio, s reques Indicates the average request size, a ave a represents the average number of visits. uniq The number of unique requests is represented by L, and the L function is the function that describes the impact of load characteristics on the system latency of the hybrid storage system.
11. The method according to claim 5, characterized in that, The step of determining the storage device to respond to the pending load request according to the target request processing strategy includes: The target response latency of the load request to be processed is determined based on the average number of accesses in the first load characteristic, wherein the average number of accesses and the target response latency are negatively correlated. If the target response latency is less than a first preset threshold, then the storage device responding to the load request to be processed is a first type of storage device; If the target response latency is greater than or equal to the first preset threshold, then the storage device responding to the pending load request is a second type of storage device.
12. The method according to claim 5, characterized in that, The step of determining the storage device to respond to the pending load request according to the target request processing strategy includes: Based on the average number of accesses and the number of unique requests in the first load characteristics, the access frequency of the request data corresponding to the load request to be processed is determined; If the pending load request is a write request, and the average request size in the first load characteristic is not greater than the second preset threshold, then the storage device responding to the pending load request is a first type of storage device. If the average request size is greater than the second preset threshold, determine whether the access frequency is greater than the third preset threshold; if the access frequency is greater than the third preset threshold, the storage device responding to the pending load request is the first type of storage device; if the access frequency is less than or equal to the third preset threshold, the storage device responding to the pending load request is the second type of storage device. If the pending load request is a read request, and the average request size is not greater than the second preset threshold and the access frequency is greater than the third preset threshold, then the storage device responding to the pending load request is a first type of storage device.
13. The method according to claim 12, characterized in that, The step of determining the access frequency of the request data corresponding to the load request to be processed based on the average number of accesses and the number of unique requests in the first load characteristics includes: Based on the average number of accesses and the number of unique requests in the first load characteristics, determine the total number of accesses of the request data corresponding to the load request to be processed for different types of load requests; The access frequency is obtained by dividing the total number of accesses by the duration for which the hybrid storage system receives the load request.
14. The method according to claim 5, characterized in that, The step of determining the storage device to respond to the pending load request according to the target request processing strategy and processing the data corresponding to the pending load request includes: Determine the request data corresponding to the load request to be processed; Based on the average number of accesses and the number of unique requests in the first load characteristics, the access frequency of the request data corresponding to the load request to be processed is determined; The request data is written to a second type of storage device, and a cache layer is created on the first type of storage device; If the pending load request is a write request, and the average request size in the first load characteristic is not greater than the fourth preset threshold, then the request data is copied to the cache layer. If the average request size is greater than or equal to the fourth preset threshold, determine whether the access frequency is greater than the fifth preset threshold; if the access frequency is greater than the fifth preset threshold, then copy the request data to the cache layer. If the pending load request is a read request, and the average request size is not greater than the fourth preset threshold and the access frequency is greater than the fifth preset threshold, then the request data is copied to the cache layer.
15. The method according to claim 1, characterized in that, The step of using the strategy to determine the model to compare the first load feature with the second load feature, and determining the target request processing strategy from a first preset number of candidate request processing strategies based on the comparison result, includes: Determine the degree of difference between the first load characteristic and the second load characteristic; The candidate request processing strategy with the smallest difference between the corresponding second load feature and the first load feature is taken as the target request processing strategy.
16. The method according to claim 1, characterized in that, The execution of the target request processing strategy, determining the storage device responding to the pending load request according to the target request processing strategy, and processing the data corresponding to the pending load request includes: The target request processing strategy is loaded, and combined with the latest state space and operation space of the hybrid storage system, a storage device is determined in the hybrid storage system to respond to the pending load request. The pending load request is responded to by the determined storage device, and the data corresponding to the pending load request is processed.
17. A load request processing apparatus, characterized in that, The device includes: The statistics module is configured to collect statistics on the first load characteristics corresponding to the load requests to be processed; The determination module is configured to input the first load feature into the strategy determination model, wherein the strategy determination model includes a first preset number of candidate request processing strategies and a second load feature corresponding to the candidate request processing strategies; the strategy determination model is used to compare the first load feature with the second load feature, and a target request processing strategy is determined from the first preset number of candidate request processing strategies based on the comparison result; An execution module is configured to execute the target request processing strategy, determine the storage device that responds to the pending load request according to the target request processing strategy, and process the data corresponding to the pending load request, wherein the storage device is included in a hybrid storage system.
18. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the load request processing method according to any one of claims 1 to 16 by executing the computer instructions.
19. A computer non-volatile readable storage medium, characterized in that, The computer non-volatile readable storage medium stores computer instructions for causing the computer to perform the load request processing method according to any one of claims 1 to 16.
20. A computer program product, characterized in that, Includes computer instructions for causing a computer to perform the load request processing method according to any one of claims 1 to 16.
Citation Information
Patent Citations
Data storage method, scheduling device, system and device and storage medium
CN109375868A
Method and device for determining data placement strategy in SSD
CN111176564A
Data storage method and device, computer equipment and storage medium
CN114661249A
Load request processing method and device, equipment, storage medium and program product
CN118467185A
Workload performance in a multi-tier storage environment
US20180203614A1