Data access scheduling method and device for memory
By deploying an access scheduler in the data storage system, filtering and scheduling memory to match data access requirements, the problem of SSD performance bottlenecks and HDD idleness is solved, and data access performance and system efficiency are improved.
Patent Information
- Application Number
- CN202410959027.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-07-17
AI Technical Summary
In the existing data storage system, the SSD reaches a performance bottleneck, resulting in low data access performance, and the HDD is idle and cannot perform optimally.
By deploying an access scheduler in the data storage system, the target memory with high matching degree is selected based on the memory's data access performance and data access information, data scheduling is performed, and the data distribution status between memories is adjusted to improve the target memory's access to data. Operational responsiveness.
It improves the data access performance of the data storage system, ensures efficient execution of data access operations, and avoids waste of memory resources and performance bottlenecks.
Smart Images

Figure CN118502679B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the computer field, and in particular, to a method and device for scheduling data access to a memory. Background Art
[0002] As the amount of data grows, the capacity and performance of data storage systems are also growing rapidly. For this reason, the industry often uses tiered storage to cope with this data storage demand. Currently, the most commonly used tiered storage solutions, such as Linuxbcache, use SSD (Solid State Drive) to cache multiple HDDs (Hard Disk Drives) and map them to independent hybrid devices. In this storage solution, hot data is placed in SSD, cold data is cached from SSD to HDD, and SSD is used as cache to accelerate client access. This not only takes advantage of HDD's large capacity and low cost, but also uses SSD's high performance to improve the performance of integrated devices and the entire system. For this solution, designers will statically adjust the workload parameters based on empirical analysis during design, and expect these static parameters to be equally effective for various dynamic workload requirements and system configurations. However, in actual use, the SSD may reach a performance bottleneck and cannot accept data access instructions, but the HDD is relatively idle at this time, resulting in the data storage system not achieving optimal data access performance. Summary of the invention
[0003] The embodiments of the present application provide a method and device for scheduling data access to a memory, so as to at least solve the problem of low data access performance of a data storage system in the related art.
[0004] According to an embodiment of the present application, a method for data access scheduling of a memory is provided. A data storage system includes multiple memories and an access scheduler. Different memories have different data access performances. The access scheduler is connected to each memory respectively. The access scheduler is used to schedule access to the multiple memories. The method is applied to the access scheduler. The method includes:
[0005] Receiving a data access request to the data storage system, wherein the data access request is used to request to perform a data access operation in the data storage system;
[0006] Filtering a target memory from the multiple memories according to data access information of the data access operation and target state information of the data storage system, wherein the data access information is used to indicate data access status of the data access operation on the data storage system, the target state information is used to indicate data access performance currently possessed by the multiple memories, and the target memory is a memory among the multiple memories whose matching degree between the data access performance and the data access operation is higher than the target matching degree;
[0007] Data scheduling is performed on the target memory, and the target memory is controlled to perform the data access operation, wherein the data scheduling is used to adjust the responsiveness of the target memory to the data access operation by adjusting the data distribution state of the data stored between the target memory and non-target memories in the data storage system.
[0008] In an exemplary embodiment, the step of selecting a target storage from the plurality of storages according to the data access information of the data access operation and the target state information of the data storage system includes:
[0009] Inputting the data access information and the target state information into a target prediction model to obtain a candidate memory output by the target prediction model, wherein the target prediction model records the association relationship between the data access information corresponding to the access operation, the state information of the memory in the storage system, and the memory used to perform the access operation;
[0010] The candidate memory is determined as a target memory for performing the data access operation.
[0011] In an exemplary embodiment, determining the candidate memory as a target memory for performing the data access operation includes:
[0012] Matching the data access type of the data access operation with the wear attribute of the candidate memory to obtain a matching result;
[0013] In a case where the matching result is used to indicate that the degree of wear of the candidate memory caused by the data access type is less than or equal to a target threshold, the candidate memory is determined as the target memory.
[0014] In an exemplary embodiment, after matching the data access type of the data access operation with the wear attribute of the candidate memory, the method further includes:
[0015] In a case where the matching result indicates that the degree of wear of the candidate memory caused by the data access type is greater than the target threshold, selecting a reference memory from non-candidate memories among the multiple memories according to the data access type, wherein the degree of wear of the reference memory caused by the data access type is less than or equal to the target threshold;
[0016] The reference memory is determined as the target memory, and the model parameters of the target prediction model are adjusted according to the difference between the reference memory and the candidate memory.
[0017] In an exemplary embodiment, adjusting the model parameters of the target prediction model according to the difference between the reference memory and the candidate memory includes:
[0018] Inputting the data access performance of the reference memory and the data access performance of the candidate memory into a parameter prediction model to obtain a target parameter adjustment amount output by the parameter prediction model, wherein the parameter prediction model records the correlation between the difference amount of the data access performance of the memory and the model parameter adjustment amount;
[0019] The target parameter adjustment amount is used to adjust the model parameters of the target prediction model to obtain the adjusted target prediction model.
[0020] In an exemplary embodiment, before inputting the data access information and the target state information into the target prediction model, the method further includes:
[0021] Inputting a training sample labeled with a memory identifier into an initial prediction model to obtain a reference memory identifier output by the initial prediction model, wherein the training sample records data access information indicated by a reference data access request and reference status information of a reference data storage system that responds to the reference data access request, wherein the reference status information is used to indicate data access performance of a memory deployed in the reference data storage system;
[0022] The model parameters of the initial prediction model are adjusted according to the performance difference between the data access performance of the memory indicated by the memory identifier carried by the training sample and the reference memory identifier to obtain the target prediction model.
[0023] In an exemplary embodiment, the performing data scheduling on the target memory includes:
[0024] Determining a target data area corresponding to the data access type of the data access operation from a plurality of data areas included in the target memory, wherein the target data area is used to store data corresponding to the data access type;
[0025] The target data is screened from the target memory according to the data migration policy corresponding to the target data area to perform a data scheduling operation.
[0026] In an exemplary embodiment, the step of selecting target data from the target storage and performing a data scheduling operation according to a data migration policy corresponding to the target data area includes one of the following:
[0027] In the case where the target data area is a storage area for storing data write operations to be performed, data in the target data area whose data access frequency is lower than a target frequency is determined as the target data; and the target data is migrated to a non-target storage in the data storage system;
[0028] In the case where the target data area is a storage area for storing data write operations to be performed, data in the target data area whose data write time is longer than the target time is determined as the target data; and the target data is migrated to a non-target storage in the data storage system;
[0029] When the target data area is a storage area for storing data read operations to be performed, and the target memory is a four-layer memory, the data corresponding to the reference data read request stored in the target data area is determined as the target data, wherein the reference data read request is a request received by the data storage system before the data access request; and the target data is copied to a non-target memory in the data storage system.
[0030] In an exemplary embodiment, controlling the target memory to perform the data access operation includes:
[0031] When the data access operation is a new write operation of data, obtaining a data storage granularity of the target memory;
[0032] Dividing the data requested to be written by the data access request according to the data storage granularity to obtain target data blocks;
[0033] Filtering out unoccupied free storage locations for the target data block from a write data area included in the target memory, wherein the target memory is divided into a write data area and a read data area, the write data area is used to store data to be written, and the read data area is used to store data to be read;
[0034] The target data block is written into the free storage location.
[0035] In an exemplary embodiment, before filtering out unoccupied free storage locations for the target data block from the write data area included in the target memory, the method further includes:
[0036] Acquire reference access information of reference data access operations performed by the target memory within a reference time period before a current moment;
[0037] An allocation ratio of the write data area and the read data area in the target memory is updated according to the reference access information.
[0038] In an exemplary embodiment, updating the allocation ratio of the write data area and the read data area in the target memory according to the reference access information includes:
[0039] Determine a first ratio of a frequency of executing data write operations and a frequency of executing data read operations executed within the reference time period, and determine a second ratio of a total amount of data written and a total amount of data read, wherein the reference access information includes the frequency of executing data write operations, the frequency of executing data read operations, the total amount of data written, and the total amount of data read;
[0040] The first ratio and the second ratio are weightedly summed to obtain the allocation ratio.
[0041] In an exemplary embodiment, controlling the target memory to perform the data access operation includes:
[0042] In the case where the data access operation is a data modification write operation, detecting a storage location of the to-be-modified data in the data storage system;
[0043] In the case where it is determined that the data to be modified is stored in the target memory, performing the modification write operation on the data to be modified in the target memory;
[0044] When it is determined that the data to be modified is stored in a storage device other than the target storage device in the data storage system, the data to be modified is migrated to the target storage device; when the data to be modified is migrated to the target storage device, the modification write operation is performed on the data to be modified in the target storage device.
[0045] In an exemplary embodiment, controlling the target memory to perform the data access operation includes:
[0046] In the case where the data access operation is a data read operation, detecting a storage location of the to-be-read data in the data storage system;
[0047] In a case where it is determined that the data to be read is stored in the target memory, performing the data reading operation on the data to be read in the target memory;
[0048] When it is determined that the data to be read is stored in a storage device other than the target storage device in the data storage system, the data to be read is copied to the target storage device; when the data to be read is copied to the target storage device, the data reading operation is performed on the data to be read in the target storage device.
[0049] In an exemplary embodiment, after performing the data scheduling operation on the target memory and controlling the target memory to perform the data access operation, the method further includes:
[0050] The data mapping relationship in the data mapping table corresponding to the memory is updated according to the execution result of the data scheduling operation and the execution result of the data access operation, wherein the data mapping table records the mapping relationship between the storage location of the memory and the data stored in the storage location.
[0051] According to another embodiment of the present application, a data access scheduling device for a memory is provided. A data storage system includes multiple memories and an access scheduler. Different memories have different data access performances. The access scheduler is connected to each memory, respectively. The access scheduler is used to schedule access to the multiple memories. The device is applied to the access scheduler, and the device includes:
[0052] A receiving module, configured to receive a data access request to the data storage system, wherein the data access request is used to request to perform a data access operation in the data storage system;
[0053] a screening module, configured to screen out a target storage from the plurality of the storages according to data access information of the data access operation and target status information of the data storage system, wherein the data access information is used to indicate the data access status of the data access operation on the data storage system, the target status information is used to indicate the data access performance currently possessed by the plurality of the storages, and the target storage is a storage among the plurality of the storages whose matching degree between the data access performance and the data access operation is higher than the target matching degree;
[0054] A scheduling module is used to perform data scheduling on the target memory and control the target memory to perform the data access operation, wherein the data scheduling is used to adjust the responsiveness of the target memory to the data access operation by adjusting the data distribution state of the data stored between the target memory and the non-target memory in the data storage system.
[0055] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
[0056] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0057] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0058] Through the present application, an access scheduler is deployed in a data storage system composed of multiple memories with different data access performances, and access scheduling is performed on the multiple memories through the access scheduler. Then, the scheduler first selects a target memory with a higher matching degree with the current data access operation than the target matching degree from the multiple memories according to the data access performance of the memory and the data access information of the data access operation, and the target memory executes the data access operation indicated by the current data access request, thereby realizing the selection of the memory for executing the data access operation according to the data access performance of the memory, and by performing data scheduling on the target memory, the response capability of the target memory to the data access operation is adjusted by adjusting the distribution state of the data stored between the target memory and other memories in the data storage system, and the data access performance of the data storage system is guaranteed on the premise of improving the execution efficiency of the target memory for the data access operation to be currently executed. Therefore, the problem of low data access performance of the data storage system in the related technology can be solved, and the effect of improving the data access performance of the data storage system can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a hardware structure block diagram of a server device of a memory data access scheduling method according to an embodiment of the present application;
[0060] Figure 2 is a flow chart of a data access scheduling method for a memory according to an embodiment of the present application;
[0061] Figure 3 is a schematic diagram of an implementation architecture of a data access scheduling method for a memory according to an embodiment of the present application;
[0062] Figure 4 is a schematic diagram of data access scheduling according to an embodiment of the present application;
[0063] Figure 5 It is a structural block diagram of a data access scheduling device for a memory according to an embodiment of the present application. DETAILED DESCRIPTION
[0064] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0065] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0066] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a memory data access scheduling method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0067] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the data access scheduling method of the memory in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0068] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0069] In this embodiment, a method for scheduling data access to a memory is provided. Figure 2 is a flow chart of a data access scheduling method for a memory according to an embodiment of the present application, such as Figure 2 As shown, the data storage system includes multiple memories and an access scheduler, different memories have different data access performances, the access scheduler is connected to each memory respectively, the access scheduler is used to schedule access to the multiple memories, the method is applied to the access scheduler, and the process includes the following steps:
[0070] Step S202, receiving a data access request to the data storage system, wherein the data access request is used to request to perform a data access operation in the data storage system;
[0071] Step S204, screening out a target memory from the multiple memories according to the data access information of the data access operation and the target state information of the data storage system, wherein the data access information is used to indicate the data access status of the data access operation on the data storage system, the target state information is used to indicate the data access performance currently possessed by the multiple memories, and the target memory is a memory among the multiple memories whose matching degree between the data access performance and the data access operation is higher than the target matching degree;
[0072] Step S206, performing data scheduling on the target memory and controlling the target memory to perform the data access operation, wherein the data scheduling is used to adjust the responsiveness of the target memory to the data access operation by adjusting the data distribution state of the data stored between the target memory and non-target memories in the data storage system.
[0073] Through the above steps, an access scheduler is deployed in a data storage system composed of multiple memories with different data access performances, and access scheduling is performed on multiple memories through the access scheduler. Then, the scheduler first selects a target memory with a higher matching degree with the current data access operation than the target matching degree from the multiple memories according to the data access performance of the memory and the data access information of the data access operation, and the target memory executes the data access operation indicated by the current data access request, thereby realizing the selection of the memory for executing the data access operation according to the data access performance of the memory, and by performing data scheduling on the target memory, the response capability of the target memory to the data access operation is adjusted by adjusting the distribution state of the stored data between the target memory and other memories in the data storage system, and the data access performance of the data storage system is guaranteed on the premise of improving the execution efficiency of the target memory for the data access operation to be currently executed. Therefore, the problem of low data access performance of the data storage system in the related technology can be solved, and the effect of improving the data access performance of the data storage system can be achieved.
[0074] The execution subject accessing the scheduler of the above steps may be a server, a terminal, etc., but is not limited thereto.
[0075] Optionally, in an embodiment of the present application, data access performance is used to indicate the ability of the memory to execute data access operations. The data access performance may include but is not limited to data write rate, data read rate, storage capacity, disk wear performance, etc., and this solution does not limit this.
[0076] In the embodiment provided in the above step S202, the data access operation may include but is not limited to writing data to the data storage system or reading data from the data storage system, which is not limited in this solution.
[0077] In the embodiment provided in the above step S204, the data access information may include but is not limited to the operation type of the data access operation, the size of the data access amount, the data access frequency of the data to be accessed, etc., and this solution does not limit this.
[0078] Optionally, in an embodiment of the present application, the target state information is information used to characterize the data access performance of each storage in multiple memories. The target state information may include but is not limited to the current data storage capacity of the memory, the current execution capability of the memory for different types of data access operations, the disk wear performance of the memory, etc. This solution does not limit this.
[0079] Optionally, in an embodiment of the present application, a method for screening out a target memory from multiple memories based on data access information and target state information may be a method for screening by using a trained machine learning model, for example, by using a sample set to train an initial computing power model to obtain a trained target computing power model, the target computing power model may be but is not limited to being used to determine the degree of match between each memory and the data access operation based on the data access information and the target state information, and then set a storage device with a matching degree higher than the target matching degree as a target storage device. When performing model training, the training samples in the training sample set may be but are not limited to including memory features and data access features, wherein the data access features are used to indicate relevant information of the data access operation to be performed (the data access features may be but are not limited to features of multiple dimensions such as data access type, data access amount, data access frequency of data to be accessed, etc.), and the memory features are used to indicate the data access performance of the memory (the memory features may be but are not limited to features of dimensions such as memory capacity, response delay, queue length of data access operations to be performed, congestion level, data read rate, data write rate, and disk wear performance of the memory).
[0080] Optionally, in an embodiment of the present application, the method of filtering out a target memory from multiple memories according to data access information and target status information can also be implemented by the following steps: Analyze data access information: First, it is necessary to analyze data access information, including parameters such as the type, frequency, and size of data access operations to understand the access requirements for the data storage system; Analyze target status information: Secondly, it is necessary to analyze target status information to understand the current data access performance of multiple memories, including parameters such as the read and write speed, capacity, and stability of the memories; Calculate matching degree: According to data access information and target status information, calculate the matching degree between multiple memories and data access operations to determine the applicability of each memory; Filter target memory: Finally, according to the calculation result of matching degree, select the memory with the highest matching degree as the target memory to ensure that the data access operation can obtain good performance and efficiency. Further, in an embodiment of the present application, when performing matching calculation, it can be implemented by the following operations: Extraction of data access information and target status information: First, extract relevant information from the data access operation, including the type, size, access frequency, etc. of the data. At the same time, it is also necessary to obtain the existing data information in the memory, including the data type, size, access frequency, etc. in the memory; Comparison of data information: Next, the information of the data access operation is compared with the existing data information in the memory, and the matching degree is determined according to the comparison result. The comparison method may include calculating the similarity of data types, the degree of difference in size, the matching degree of access frequency, etc.; Matching degree calculation: According to the comparison result, various algorithms can be used to calculate the matching degree between the memory and the data access operation. Common calculation methods include similarity-based calculation, weight-based calculation, rule-based calculation, etc.; Determine the applicability of the memory: Finally, according to the calculated matching degree, determine the applicability of each memory. The higher the matching degree, the higher the applicability of the memory, which can better meet the needs of data access operations. In the above manner, it is possible to calculate the matching degree between multiple memories and data access operations according to the data access information and the target state information to determine the applicability of each memory.
[0081] In the embodiment provided in the above step S206, the order of performing data scheduling operations on the target memory and controlling the target memory to perform data access operations is not limited, that is, data scheduling can be performed on the target memory first, and the data access operation can be performed after the data scheduling is completed, or the target memory can be controlled to perform data access operations first, and the data scheduling operation can be performed during the data access operation. This solution does not limit this.
[0082] Optionally, in an embodiment of the present application, before performing data scheduling, the scheduler obtains the current response delay of the target memory to the operation, and then performs data scheduling on the target memory when the response delay is higher than the target threshold. When performing data scheduling, the data operation type of the current data access operation is detected, and a target data storage area corresponding to the data operation type is screened out from multiple data storage areas included in the target memory, wherein each of the multiple data storage areas is used to store data of the corresponding operation type (for example, the target memory is divided into a read data area and a write data area, the read data area is used to store data to be read, and the write data area is used to store data to be written); the target data is screened out from the target data storage area (the target data area is used to store data of the corresponding operation type); The data can be but is not limited to being determined based on the access frequency of the data, such as determining data with an access frequency lower than the target access frequency as the target data, or can also be determined by weighting the access frequency and data volume of the data, such as obtaining the access frequency and data volume of each data stored in the target storage area, or the weight parameters corresponding to the access frequency and data volume, and using the weight parameters to perform weighted calculation on each data in the target storage area to obtain the target score of each data, and then determining the data with the target score exceeding the score threshold as the target data); according to the data volume of the target data, a candidate storage is screened out from the non-target storage in the data storage system, and then the target data is migrated to the candidate storage to complete the data scheduling of the target storage. However, in actual applications, after the target data is screened out from the target storage area, there may be a situation where a candidate storage that can be used to migrate the target data cannot be found from the non-target storage area. In this case, the candidate data can be screened out from the non-target storage area of multiple data storage areas (the candidate data can be, but is not limited to, determined based on the access frequency of the data, such as determining data with an access frequency lower than the target access frequency as candidate data, or can also be determined by weighting based on the access frequency and data volume of the data, such as obtaining the access frequency and data capacity of each data stored in the target storage area, or the weight parameters corresponding to the access frequency and data volume, and using the weight parameters to perform weighted calculation on each data in the target storage area to obtain a target score for each data, and then determining the data with a target score exceeding the score threshold as candidate data); a reference storage is screened out from the non-target storage in the data storage system according to the data volume of the candidate data, and then the target data is migrated to the candidate storage, and after the migration is completed, the storage area storing the candidate data in the target storage is divided into the target storage area.
[0083] As an optional embodiment, the step of selecting a target storage from the plurality of storages according to the data access information of the data access operation and the target state information of the data storage system includes:
[0084] Inputting the data access information and the target state information into a target prediction model to obtain a candidate memory output by the target prediction model, wherein the target prediction model records the association relationship between the data access information corresponding to the access operation, the state information of the memory in the storage system, and the memory used to perform the access operation;
[0085] The candidate memory is determined as a target memory for performing the data access operation.
[0086] Optionally, in an embodiment of the present application, the target prediction model can be obtained by training an initial prediction model using a sample set, where the initial sample set is a sample set consisting of samples carrying features corresponding to data access information of data access operations and features corresponding to memory state information in a storage system.
[0087] Optionally, in an embodiment of the present application, the target prediction model is used to predict the matching degree between the data access operation and the data access performance of each memory in the multiple memories, and then the memory with a greater than target match can be screened out as the target memory according to the matching degree.
[0088] Through the above content, by constructing a relationship between the data access information corresponding to the access operation, the status information of the memory in the storage system and the memory that performs the access operation, it is possible to predict the candidate memory for the data access operation to be performed through the target prediction model, so that the target prediction model is universal for different data storage systems, and the target prediction model adapts to the changes in the characteristics of the underlying storage device, thereby improving the accuracy of the model prediction.
[0089] As an optional embodiment, determining the candidate memory as a target memory for performing the data access operation includes:
[0090] Matching the data access type of the data access operation with the wear attribute of the candidate memory to obtain a matching result;
[0091] In a case where the matching result is used to indicate that the degree of wear of the candidate memory caused by the data access type is less than or equal to a target threshold, the candidate memory is determined as the target memory.
[0092] Optionally, in an embodiment of the present application, the data access type may include but is not limited to the operation type of the data access operation and the access frequency of the data to be accessed, and then when the data access operation is a data read operation, it is determined that the degree of wear of the candidate memory caused by the current data access operation is less than or equal to the target threshold value; when the data access operation is a write operation and the candidate storage device is a device with disk wear requirements, the access frequency of the data to be accessed is detected, and when it is determined that the access frequency is greater than or equal to the target access frequency, it can be determined that the degree of wear of the candidate memory caused by the current data access operation is greater than the target threshold value.
[0093] Through the above steps, after using the target prediction model to predict the memory that performs the data access operation based on the data access information corresponding to the access operation, the status information of the memory in the storage system, and the association relationship between the memory used to perform the access operation, the result predicted by the target prediction model is verified according to the degree of wear, thereby improving the compatibility of data access and the wear properties of the memory, and increasing the service life of the memory.
[0094] As an optional embodiment, after matching the data access type of the data access operation with the wear attribute of the candidate memory, the method further includes:
[0095] In a case where the matching result indicates that the degree of wear of the candidate memory caused by the data access type is greater than the target threshold, selecting a reference memory from non-candidate memories among the multiple memories according to the data access type, wherein the degree of wear of the reference memory caused by the data access type is less than or equal to the target threshold;
[0096] The reference memory is determined as the target memory, and the model parameters of the target prediction model are adjusted according to the difference between the reference memory and the candidate memory.
[0097] Optionally, in an embodiment of the present application, the reference memory may be a memory without wear requirements among the non-candidate memories, and then all memories without wear requirements may be screened out from the non-candidate memories, and the reference memory may be screened out from the memories without wear requirements according to the amount of data accessed and the access speed requirements indicated by the data access type.
[0098] Through the above content, when the degree of wear of the candidate memory predicted by the target prediction model when performing data access operations is greater than the target threshold, the reference memory is screened out from the non-candidate memory according to the access type, thereby avoiding the impact of the execution of data access operations on the service life of the memory, and the model parameters of the target prediction model are adjusted using the screening results, thereby achieving the update of the model parameters according to the prediction results during the use of the target prediction model, thereby improving the prediction accuracy of the model.
[0099] As an optional embodiment, adjusting the model parameters of the target prediction model according to the difference between the reference memory and the candidate memory includes:
[0100] Inputting the data access performance of the reference memory and the data access performance of the candidate memory into a parameter prediction model to obtain a target parameter adjustment amount output by the parameter prediction model, wherein the parameter prediction model records the correlation between the difference amount of the data access performance of the memory and the model parameter adjustment amount;
[0101] The target parameter adjustment amount is used to adjust the model parameters of the target prediction model to obtain the adjusted target prediction model.
[0102] Optionally, in an embodiment of the present application, the parameter prediction model may be a machine learning model, such as a model constructed based on algorithms such as neural networks, decision trees, and random forests. During the training phase, the model uses a large amount of data to learn the relationship between the data access performance of the reference memory and the candidate memory and the target parameter adjustment amount. Once the model training is completed, the input data access performance can be used to predict the adjustment amount of the target parameter. Specifically, the data input to the parameter prediction model may include data access performance indicators of the reference memory and the candidate memory, such as latency, bandwidth, etc. The model will output a predicted target parameter adjustment amount by analyzing and processing these indicators. This adjustment amount may indicate that certain parameters in the system need to be adjusted to optimize data access performance.
[0103] Through the above operations, by configuring a parameter prediction model for the target prediction model, the parameter prediction model is used to predict the parameter adjustment amount of the target prediction model according to the data access performance of the reference memory and the data access performance of the candidate memory, thereby improving the model convergence rate of the target prediction model, accelerating the model adjustment process, and improving the accuracy of the prediction results of the target prediction model during use.
[0104] As an optional embodiment, before inputting the data access information and the target state information into the target prediction model, the method further includes:
[0105] Inputting a training sample pair labeled with a memory identifier into an initial prediction model to obtain a reference memory identifier output by the initial prediction model, wherein the training sample records data access information indicated by a reference data access request and reference state information of a reference data storage system that responds to the reference data access request, wherein the reference state information is used to indicate data access performance of a memory deployed in the reference data storage system;
[0106] The model parameters of the initial prediction model are adjusted according to the performance difference between the data access performance of the memory indicated by the memory identifier carried by the training sample and the reference memory identifier to obtain the target prediction model.
[0107] Through the above content, the initial prediction model is trained by using training samples marked with storage identifiers. Since the training samples record the data access information indicated by the reference data access request and the reference status information of the reference data storage system that responds to the reference data access request, the trained target prediction model has universal applicability to different storage systems, and the target prediction model can adapt to the scenario requirements of continuous updating, upgrading or replacement of the storage system.
[0108] As an optional embodiment, the performing data scheduling on the target memory includes:
[0109] Determining a target data area corresponding to the data access type of the data access operation from a plurality of data areas included in the target memory, wherein the target data area is used to store data corresponding to the data access type;
[0110] The target data is screened from the target memory according to the data migration policy corresponding to the target data area to perform a data scheduling operation.
[0111] Optionally, in an embodiment of the present application, different data areas among the multiple data areas of the target memory are used to store data of different data access types, for example, the multiple data areas include a read data area and a write data area, wherein the read data area is used to store data to be read, and the write data area is used to store data to be written, and this scheme does not limit this.
[0112] Optionally, in an embodiment of the present application, a data migration strategy is used to determine the data to be migrated in the data area. The data migration strategy is formulated based on the data stored in the data area. Different data areas correspond to different data migration strategies. For example, when the data area is a data area for storing write data, the data to be migrated can be determined based on the data write frequency and / or the data write amount. When the data area is a data area for storing data to be read, the data to be migrated can be screened out based on the data amount stored in the data area. This solution does not limit this.
[0113] Through the above content, different data areas are set in the memory, and data corresponding to different data access types are stored in different data areas. Then, by determining the target data area corresponding to the data access type corresponding to the data access operation, and scheduling the data according to the data migration strategy corresponding to the target data area, the data management efficiency in the memory is improved, and the execution performance of the target memory for data access operations is guaranteed.
[0114] As an optional embodiment, the step of selecting target data from the target storage device and performing a data scheduling operation according to a data migration policy corresponding to the target data area includes one of the following:
[0115] In the case where the target data area is a storage area for storing data write operations to be performed, data in the target data area whose data access frequency is lower than a target frequency is determined as the target data; and the target data is migrated to a non-target storage in the data storage system;
[0116] In the case where the target data area is a storage area for storing data write operations to be performed, data in the target data area whose data write time is longer than the target time is determined as the target data; and the target data is migrated to a non-target storage in the data storage system;
[0117] When the target data area is a storage area for storing data read operations to be performed, and the target memory is a four-layer memory, the data corresponding to the reference data read request stored in the target data area is determined as the target data, wherein the reference data read request is a request received by the data storage system before the data access request; and the target data is copied to a non-target memory in the data storage system.
[0118] As an optional embodiment, controlling the target memory to perform the data access operation includes:
[0119] When the data access operation is a new write operation of data, obtaining a data storage granularity of the target memory;
[0120] Dividing the data requested to be written by the data access request according to the data storage granularity to obtain target data blocks;
[0121] Filtering out unoccupied free storage locations for the target data block from a write data area included in the target memory, wherein the target memory is divided into a write data area and a read data area, the write data area is used to store data to be written, and the read data area is used to store data to be read;
[0122] The target data block is written into the free storage location.
[0123] Optionally, in an embodiment of the present application, the data storage granularity is the smallest unit for the memory to store and manage data, and thus when allocating data storage locations, they can be allocated according to the data storage granularity.
[0124] Optionally, in an embodiment of the present application, the free storage locations screened for the target data block may be continuous free storage locations, or may be discontinuous free storage locations, which is not limited in this solution.
[0125] Through the above content, by dividing the storage area of the memory according to the data storage granularity, when data is stored, the data requested to be written by the data access request can be divided and stored in the storage space of the data storage area of the memory in advance, which effectively utilizes the storage space and avoids the waste of storage resources.
[0126] As an optional embodiment, before filtering out unoccupied free storage locations for the target data block from the write data area included in the target memory, the method further includes:
[0127] Acquire reference access information of reference data access operations performed by the target memory within a reference time period before a current moment;
[0128] An allocation ratio of the write data area and the read data area in the target memory is updated according to the reference access information.
[0129] Optionally, in an embodiment of the present application, the reference access information may include but is not limited to the number of accesses and response delays of reference data access operations, and then when the allocation ratio is updated, the parameter access operations are classified according to the access types to obtain the number of accesses of different access types and the access delays of reference data access operations of different access types, and then the number of accesses and the access delays are weightedly calculated to obtain a correction coefficient, and then the correction coefficient is used to correct the initial allocation ratio of the target memory before the current moment to obtain the target allocation ratio.
[0130] Through the above content, the allocation ratio of the write data area and the read data area of the target memory is updated by using the reference access information of the reference time period, thereby realizing dynamic update of the allocation ratio of the data read area and the write data area according to the execution status of the data access operation, thereby improving the data access performance of the target memory.
[0131] As an optional embodiment, updating the allocation ratio of the write data area and the read data area in the target memory according to the reference access information includes:
[0132] Determine a first ratio of a frequency of executing data write operations and a frequency of executing data read operations executed within the reference time period, and determine a second ratio of a total amount of data written and a total amount of data read, wherein the reference access information includes the frequency of executing data write operations, the frequency of executing data read operations, the total amount of data written, and the total amount of data read;
[0133] The first ratio and the second ratio are weightedly summed to obtain the allocation ratio.
[0134] Optionally, in an embodiment of the present application, the weights of the first ratio and the second ratio may be pre-set fixed values, or may be set according to the importance of the execution frequency and the amount of data, which is not limited in this solution.
[0135] As an optional embodiment, controlling the target memory to perform the data access operation includes:
[0136] In the case where the data access operation is a data modification write operation, detecting a storage location of the to-be-modified data in the data storage system;
[0137] In the case where it is determined that the data to be modified is stored in the target memory, performing the modification write operation on the data to be modified in the target memory;
[0138] When it is determined that the data to be modified is stored in a storage device other than the target storage device in the data storage system, the data to be modified is migrated to the target storage device; when the data to be modified is migrated to the target storage device, the modification write operation is performed on the data to be modified in the target storage device.
[0139] Optionally, in an embodiment of the present application, a data mapping table may also be configured in the access scheduler, and the data mapping table is used to store the mapping relationship between data stored in storage locations in different memories, and then the storage location of the data to be modified can be detected by querying the data mapping table. This solution does not limit this.
[0140] As an optional embodiment, controlling the target memory to perform the data access operation includes:
[0141] In the case where the data access operation is a data read operation, detecting a storage location of the to-be-read data in the data storage system;
[0142] In a case where it is determined that the data to be read is stored in the target memory, performing the data reading operation on the data to be read in the target memory;
[0143] When it is determined that the data to be read is stored in a storage device other than the target storage device in the data storage system, the data to be read is copied to the target storage device; when the data to be read is copied to the target storage device, the data reading operation is performed on the data to be read in the target storage device.
[0144] As an optional embodiment, after performing the data scheduling operation on the target memory and controlling the target memory to perform the data access operation, the method further includes:
[0145] The data mapping relationship in the data mapping table corresponding to the memory is updated according to the execution result of the data scheduling operation and the execution result of the data access operation, wherein the data mapping table records the mapping relationship between the storage location of the memory and the data stored in the storage location.
[0146] Optionally, in an embodiment of the present application, by configuring a data mapping table that records the mapping relationship between the storage location of the memory and the data stored in the storage location, and then updating the data mapping relationship in the data mapping table after performing a data access operation, the management efficiency of the data in the memory is improved.
[0147] As an optional implementation, the present application is a solution for combining tiering and caching of flash media, that is, a write tiering and read caching solution, which not only solves the performance requirements of adaptive dynamically changing loads by dynamically adjusting the number of responses to read and write requests of different storage media, but also solves the storage medium life problem caused by different wear characteristics between different media, while meeting the expansion requirements of storage capacity. Because the overall write performance of most SLC SCMs is better than that of QLC SSDs, especially the random write performance of SLC is 9 times that of QLC SSDs. The read performance of SLC is basically the same as that of QLC, and the difference between the read performance and write performance of SLC of each manufacturer is no more than 2 times. For wear, the number of times SLC can be erased and written per day is 196 times that of QLC, and the gap is obvious. The capacity of QLC SSD is comparable to that of hard disks, and there is still room for continuous increase, with good scalability. Therefore, for SLC write operations, QLC read operations are the best choice for both performance and life.
[0148] In the embodiment of the present application, multiple memories have different data access performances, and the multiple memories can be divided according to the data access performance of the memories into a performance layer and a capacity layer, wherein the performance layer has a higher execution performance for data read and write operations, and in a specific application process, it can be but not limited to being composed of high-performance storage devices such as SLC SCM, and the data access performance of the capacity layer is lower, and in a specific application process, it can be but not limited to being composed of large-capacity storage devices such as QLC SSD, Figure 3 is a schematic diagram of an implementation architecture of a memory data access scheduling method according to an embodiment of the present application. Figure 3 As shown in the figure, the performance layer is composed of high-performance storage devices such as SLC SCM, and the capacity layer can be composed of large-capacity storage devices such as QLC SSD. The composition and operations of the performance layer and capacity layer are determined based on the following three reasons:
[0149] 1) The read performance of QLC SSD is similar to that of SLC SSD in some scenarios, but QLC SSD has large capacity and can be used for read operations;
[0150] 2) The write performance of SLC SCM is much higher than that of QLCSSD in terms of bandwidth and IOPS, so SLC SCM is more suitable for write operations;
[0151] 3) The flash speed and capacity of the SLC SSD need to be considered to avoid data loss due to slow flashing.
[0152] The performance layer mainly responds to write requests for small blocks of data. For large blocks of data, the data placement location can be set according to the actual situation of the storage system. The capacity layer mainly responds to read requests. Before the data is refreshed from the performance layer to the capacity layer, the performance layer can respond to read requests. For one-write-multiple-read scenarios: data is written to the performance layer. When the capacity of the performance layer reaches the threshold or other conditions require data to be flushed, the data of the performance layer is flushed to the capacity layer; if the write operation of the performance layer is completed and the data has not been flushed to the capacity layer, the data of the performance layer is read for the read operation; if the data has been flushed to the capacity layer and the data of the performance layer has not been deleted, the capacity layer is used first to respond to read requests. For multiple-write scenarios: data is written to the performance layer, and the threshold and the policy that needs to be flushed to the capacity layer are set. When the threshold is exceeded or it meets the given policy, the data is flushed from the performance layer to the capacity layer.
[0153] The data placement decision module (corresponding to the data placement decider) uses the IO intelligent decision algorithm to give a response location decision for the IO through the algorithm model.
[0154] The data IO diversion adjustment module (corresponding to the data IO diversion regulator) adjusts the results of data placement decisions based on the actual system load and latency, media life and other characteristics; allows read data to be stored in the capacity layer and cached in the performance layer, and provides read services for the same data in both the performance layer and the capacity layer, and copies and deletes data based on the hotness and coldness of the data; write operations are only written to a single layer of the performance layer or the capacity layer, and data is migrated based on the write area size limit of the capacity layer or other migration rules.
[0155] Optionally, the data placement decision module is mainly used to make automatic decisions on data placement. The data IO diversion adjustment module is mainly for secondary adjustment of the overall system performance, adding a dual response mechanism. At the same time, the layering and caching methods are used according to the read and write requests. Read requests use the capacity layer for caching, and two copies of data can provide read services at the same time; write requests are layered on the performance layer and the capacity layer, and only one copy of the data is written. This data can also be used as a response to the read request to avoid excessive data consistency overhead. The performance layer distinguishes between read and write partitions, and dynamically designs the partition size.
[0156] The data migration / replication module (corresponding to the data migration / replication scheduler) is a module that actually migrates, replicates, deletes and recycles data in the performance layer and capacity layer.
[0157] The data mapping table mainly stores the location of performance layer data and the mapping relationship between performance layer data and capacity layer data.
[0158] Multiple memories have different data access performances, and can be divided into performance layers and capacity layers according to the data access performance of the memories. The performance layer has a higher performance for data read and write operations, and the capacity layer has a lower data access performance. For example, the performance layer includes: SLC SSD (800G, 1.6TB, etc.), and the capacity layer includes: QLCSSD (14TB, 32TB, 64TB, etc.). After receiving the data IO stream converted by different storage protocols, the storage end sends the IO to the data placement decision maker, determines the execution action according to the data placement strategy set for the read and write requests, and gives the feedback value of the execution of the action in combination with the overall system environment as the basis for subsequent behavior optimization. For example, read and write requests can decide which data to transfer to high-speed storage media and which data to migrate from high-speed storage devices according to the data placement strategy, and use the data IO diversion regulator to adjust the overall performance. The corresponding position of the data output by the data placement module is used as the input of the data IO diversion adjustment module.
[0159] Figure 4 is a schematic diagram of data access scheduling according to an embodiment of the present application, such as Figure 4As shown, the data placement decision maker: makes data distribution decisions based on IO flow characteristics. Different rules can be set according to the characteristics of the storage medium, and algorithms such as reinforcement learning can be used to train historical decisions and system benefits, and update the decision model to make more accurate decisions. Dynamic adjustment of data read and write capacity, and determine whether there is data in the write space that can respond to read requests; for write operations, the SLC can be given priority for the first write of small blocks of data as a data write placement rule, reducing the number of small writes to the QLC SSD, and performing large block append writes to write data; for read operations, reduce frequent data migration. For read requests, consider factors such as the number of data accesses, access intervals, access time, and other data accessed within a given interval (correlation between data), and locate data with high performance requirements that are frequently or continuously accessed to the performance layer. For write requests, consider the life of the storage medium and the amount of data written.
[0160] Data IO diversion regulator: adjusts the distribution of IO in the performance layer and capacity layer according to the delay of request response, system bandwidth, media life, etc., to maximize system performance. As the final IO corresponding position, it can also trigger data migration scheduling. For write requests, data is only written to the capacity layer or performance layer specified by the data IO diversion regulator, and then data migration is performed according to capacity or other rules. For read operations, hot data is copied to the performance layer according to certain rules. For example, when the data will continue to be frequently accessed and the data performance of the capacity layer does not meet the read performance requirements, the data is copied to the performance layer. When the response delay of hot data in the performance layer is reduced, the performance layer and capacity layer can be used to respond simultaneously.
[0161] Data migration / replication scheduler: A module that migrates and replicates data between the performance layer and the capacity layer according to the read-write characteristics, ensuring that data does not affect normal business operations while optimizing system performance. This includes how to migrate capacity layer data to the performance layer; how to migrate performance layer data out to the capacity layer; how to replace data in the read space; how to flush data in the write space; and how to update the same data in the read and write spaces.
[0162] Performance layer: Distinguish between read and write areas. For the read area, cache the hot data of the capacity layer.
[0163] Performance layer data mapping table: what data does the performance layer contain, the size and offset of the data, the update time, the operation type and number of operations, and whether there are any updates compared to the capacity layer.
[0164] The data placement decider uses two reinforcement learning models, one is the data placement decision model (used for data access behavior analysis) and the other is the data training model (used for future data access behavior adjustment recommendations).
[0165] The module output parameters include the decision maker output parameters, the method for setting the performance layer read and write data storage size, and the method for setting the performance layer read and write data storage size, which allows the performance layer read and write data storage size to be dynamically configured. The performance layer read and write data storage size can be set to a fixed size or dynamically adjusted.
[0166] The decision maker input parameters include whether there is data in the performance layer write cache and whether there is data in the performance layer read cache; data IO log attributes: timestamp, host name, disk number, type, offset, size, and response time (attributes are adjustable).
[0167] In the above embodiment, the data placement decision module is mainly used to make automatic decisions on data placement. The IO scheduling and adjustment module is mainly for secondary adjustment of the overall system performance, and adds a dual response mechanism. At the same time, the layering and caching methods are used according to the read and write requests. The read request uses the capacity layer for caching, and two copies of data can provide read services at the same time; the write request is layered on the performance layer and the capacity layer, and only one copy of the data is written. The changed data can also be used as a response to the read request to avoid excessive data consistency overhead. The performance layer distinguishes between read and write partitions, and dynamically designs the partition size.
[0168] Through the above content, for performance and wear problems that cannot be completely solved by tiering and caching, we combine the advantages of the two, distinguish between read and write operations, and provide different data response methods, thereby improving the data placement flexibility of the storage system and giving full play to the performance advantages of the media. At the same time, it increases the life of media with high wear requirements such as QLC, improves the availability of storage media, and thus reduces maintenance costs.
[0169] Optionally, this application can be used not only for data placement and corresponding scheduling of storage systems composed of SLC SCM and QLC SSD devices, but also for data placement and scheduling of differentiated media such as performance, life, and efficiency. This application uses and is not limited to reinforcement learning algorithms as algorithms for data placement decisions. Other machine learning, deep learning, and other algorithms can be used. This application can also be used for resource allocation scheduling.
[0170] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0171] In the present embodiment, a data access scheduling device for a memory is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0172] Figure 5 is a structural block diagram of a data access scheduling device for a memory according to an embodiment of the present application, such as Figure 5 As shown, the data storage system includes multiple memories and an access scheduler, different memories have different data access performances, the access scheduler is connected to each memory respectively, the access scheduler is used to schedule access to the multiple memories, the device is applied to the access scheduler, and the device includes:
[0173] A receiving module, configured to receive a data access request to the data storage system, wherein the data access request is used to request to perform a data access operation in the data storage system;
[0174] a screening module, configured to screen out a target storage from the plurality of the storages according to data access information of the data access operation and target status information of the data storage system, wherein the data access information is used to indicate the data access status of the data access operation on the data storage system, the target status information is used to indicate the data access performance currently possessed by the plurality of the storages, and the target storage is a storage among the plurality of the storages whose matching degree between the data access performance and the data access operation is higher than the target matching degree;
[0175] A scheduling module is used to perform data scheduling on the target memory and control the target memory to perform the data access operation, wherein the data scheduling is used to adjust the responsiveness of the target memory to the data access operation by adjusting the data distribution state of the data stored between the target memory and the non-target memory in the data storage system.
[0176] Through the present application, an access scheduler is deployed in a data storage system composed of multiple memories with different data access performances, and access scheduling is performed on the multiple memories through the access scheduler. Then, the scheduler first selects a target memory with a higher matching degree with the current data access operation than the target matching degree from the multiple memories according to the data access performance of the memory and the data access information of the data access operation, and the target memory executes the data access operation indicated by the current data access request, thereby realizing the selection of the memory for executing the data access operation according to the data access performance of the memory, and by performing data scheduling on the target memory, the response capability of the target memory to the data access operation is adjusted by adjusting the distribution state of the data stored between the target memory and other memories in the data storage system, and the data access performance of the data storage system is guaranteed on the premise of improving the execution efficiency of the target memory for the data access operation to be currently executed. Therefore, the problem of low data access performance of the data storage system in the related technology can be solved, and the effect of improving the data access performance of the data storage system can be achieved.
[0177] As an optional implementation, the screening module includes:
[0178] A first input unit, configured to input the data access information and the target state information into a target prediction model to obtain a candidate memory output by the target prediction model, wherein the target prediction model records the association relationship between the data access information corresponding to the access operation, the state information of the memory in the storage system, and the memory used to perform the access operation;
[0179] The first determining unit is used to determine the candidate memory as a target memory for performing the data access operation.
[0180] Optionally, the first determining unit is further configured to:
[0181] Matching the data access type of the data access operation with the wear attribute of the candidate memory to obtain a matching result;
[0182] In a case where the matching result is used to indicate that the degree of wear of the candidate memory caused by the data access type is less than or equal to a target threshold, the candidate memory is determined as the target memory.
[0183] Optionally, the first determining unit is further configured to:
[0184] In a case where the matching result indicates that the degree of wear of the candidate memory caused by the data access type is greater than the target threshold, selecting a reference memory from non-candidate memories among the multiple memories according to the data access type, wherein the degree of wear of the reference memory caused by the data access type is less than or equal to the target threshold;
[0185] The reference memory is determined as the target memory, and the model parameters of the target prediction model are adjusted according to the difference between the reference memory and the candidate memory.
[0186] Optionally, the first determining unit is further configured to:
[0187] Inputting the data access performance of the reference memory and the data access performance of the candidate memory into a parameter prediction model to obtain a target parameter adjustment amount output by the parameter prediction model, wherein the parameter prediction model records the correlation between the difference amount of the data access performance of the memory and the model parameter adjustment amount;
[0188] The target parameter adjustment amount is used to adjust the model parameters of the target prediction model to obtain the adjusted target prediction model.
[0189] As an optional embodiment, the screening module further includes:
[0190] a second input unit, configured to input a training sample annotated with a memory identifier into an initial prediction model to obtain a reference memory identifier output by the initial prediction model, wherein the training sample records data access information indicated by a reference data access request and reference status information of a reference data storage system that responds to the reference data access request, wherein the reference status information is used to indicate data access performance of a memory deployed in the reference data storage system;
[0191] An adjustment unit is used to adjust the model parameters of the initial prediction model according to the performance difference between the data access performance of the memory indicated by the memory identifier carried by the training sample and the reference memory identifier to obtain the target prediction model.
[0192] As an optional embodiment, the scheduling module includes:
[0193] a second determining unit, configured to determine a target data area corresponding to a data access type of the data access operation from among a plurality of data areas included in the target memory, wherein the target data area is used to store data corresponding to the data access type;
[0194] The first screening unit is used to screen the target data from the target storage and perform a data scheduling operation according to a data migration strategy corresponding to the target data area.
[0195] Optionally, the first screening unit is further used for:
[0196] In the case where the target data area is a storage area for storing data write operations to be performed, data in the target data area whose data access frequency is lower than a target frequency is determined as the target data; and the target data is migrated to a non-target storage in the data storage system;
[0197] In the case where the target data area is a storage area for storing data write operations to be performed, data in the target data area whose data write time is longer than the target time is determined as the target data; and the target data is migrated to a non-target storage in the data storage system;
[0198] When the target data area is a storage area for storing data read operations to be performed, and the target memory is a four-layer memory, the data corresponding to the reference data read request stored in the target data area is determined as the target data, wherein the reference data read request is a request received by the data storage system before the data access request; and the target data is copied to a non-target memory in the data storage system.
[0199] As an optional embodiment, the scheduling module further includes:
[0200] A first acquisition unit, configured to acquire a data storage granularity of the target memory when the data access operation is a new write operation of the data;
[0201] A segmentation unit, configured to segment the data requested to be written by the data access request according to the data storage granularity to obtain a target data block;
[0202] a second screening unit, configured to screen out unoccupied free storage locations for the target data block from a write data area included in the target memory, wherein the target memory is divided into a write data area and a read data area, the write data area is used to store data to be written, and the read data area is used to store data to be read;
[0203] A writing unit is used to write the target data block into the free storage location.
[0204] Optionally, the scheduling module further includes:
[0205] A second acquisition unit, configured to acquire reference access information of a reference data access operation performed by the target memory within a reference time period before a current moment;
[0206] An updating unit is used to update the allocation ratio of the write data area and the read data area in the target memory according to the reference access information.
[0207] Optionally, the updating unit is further used for:
[0208] Determine a first ratio of a frequency of executing data write operations and a frequency of executing data read operations executed within the reference time period, and determine a second ratio of a total amount of data written and a total amount of data read, wherein the reference access information includes the frequency of executing data write operations, the frequency of executing data read operations, the total amount of data written, and the total amount of data read;
[0209] The first ratio and the second ratio are weightedly summed to obtain the allocation ratio.
[0210] As an optional embodiment, the scheduling module further includes:
[0211] A first detection unit, configured to detect a storage location of the to-be-modified data in the data storage system when the data access operation is a data modification write operation;
[0212] A first execution unit, configured to, when determining that the data to be modified is stored in the target memory, perform the modification write operation on the data to be modified in the target memory;
[0213] A migration unit, configured to migrate the data to be modified to the target storage if it is determined that the data to be modified is stored in a storage device other than the target storage device in the data storage system;
[0214] The second execution unit is configured to execute the modification write operation on the data to be modified in the target memory when the data to be modified is migrated to the target memory.
[0215] As an optional embodiment, the scheduling module further includes:
[0216] A second detection unit, configured to detect a storage location of the to-be-read data in the data storage system when the data access operation is a data read operation;
[0217] a third execution unit, configured to, when determining that the data to be read is stored in the target memory, execute the data reading operation on the data to be read in the target memory;
[0218] A copying unit, configured to copy the to-be-read data to the target memory when it is determined that the to-be-read data is stored in a memory other than the target memory in the data storage system;
[0219] A fourth execution unit is configured to execute the data reading operation on the data to be read in the target memory when the data to be read is copied to the target memory.
[0220] As an optional embodiment, the device further includes:
[0221] An update module is used to update the data mapping relationship in the data mapping table corresponding to the memory according to the execution result of the data scheduling operation and the execution result of the data access operation, wherein the data mapping table records the mapping relationship between the storage location of the memory and the data stored in the storage location.
[0222] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0223] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0224] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0225] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0226] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0227] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0228] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0229] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the above method embodiments.
[0230] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0231] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0232] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A data access scheduling method for a memory, characterized in that: A data storage system includes multiple memories and an access scheduler, different memories have different data access performances, the access scheduler is connected to each memory respectively, the access scheduler is used to schedule access to the multiple memories, the method is applied to the access scheduler, and the method includes: Receiving a data access request to the data storage system, wherein the data access request is used to request to perform a data access operation in the data storage system; Filtering a target memory from the multiple memories according to data access information of the data access operation and target state information of the data storage system, wherein the data access information is used to indicate data access status of the data access operation on the data storage system, the target state information is used to indicate data access performance currently possessed by the multiple memories, and the target memory is a memory among the multiple memories whose matching degree between the data access performance and the data access operation is higher than the target matching degree; Performing data scheduling on the target memory and controlling the target memory to perform the data access operation, wherein the data scheduling is used to adjust the responsiveness of the target memory to the data access operation by adjusting the data distribution state of the data stored between the target memory and the non-target memory in the data storage system; Among them, the data scheduling of the target memory includes: determining a target data area corresponding to the data access type of the data access operation from a plurality of data areas included in the target memory, wherein the target data area is used to store data corresponding to the data access type; and performing a data scheduling operation by screening target data from the target memory according to a data migration strategy corresponding to the target data area.
2. The method according to claim 1, characterized in that: The step of selecting a target storage device from the plurality of storage devices according to the data access information of the data access operation and the target state information of the data storage system comprises: Inputting the data access information and the target state information into a target prediction model to obtain a candidate memory output by the target prediction model, wherein the target prediction model records the association relationship between the data access information corresponding to the access operation, the state information of the memory in the storage system, and the memory used to perform the access operation; The candidate memory is determined as a target memory for performing the data access operation.
3. The method according to claim 2, characterized in that The step of determining the candidate memory as a target memory for performing the data access operation comprises: Matching the data access type of the data access operation with the wear attribute of the candidate memory to obtain a matching result; In a case where the matching result is used to indicate that the degree of wear of the candidate memory caused by the data access type is less than or equal to a target threshold, the candidate memory is determined as the target memory.
4. The method according to claim 3, characterized in that After matching the data access type of the data access operation with the wear attribute of the candidate memory, the method further includes: In a case where the matching result indicates that the degree of wear of the candidate memory caused by the data access type is greater than the target threshold, selecting a reference memory from non-candidate memories among the multiple memories according to the data access type, wherein the degree of wear of the reference memory caused by the data access type is less than or equal to the target threshold; The reference memory is determined as the target memory, and the model parameters of the target prediction model are adjusted according to the difference between the reference memory and the candidate memory.
5. The method according to claim 4, characterized in that The adjusting the model parameters of the target prediction model according to the difference between the reference memory and the candidate memory includes: Inputting the data access performance of the reference memory and the data access performance of the candidate memory into a parameter prediction model to obtain a target parameter adjustment amount output by the parameter prediction model, wherein the parameter prediction model records the correlation between the difference amount of the data access performance of the memory and the model parameter adjustment amount; The target parameter adjustment amount is used to adjust the model parameters of the target prediction model to obtain the adjusted target prediction model.
6. The method according to claim 2, characterized in that Before inputting the data access information and the target state information into the target prediction model, the method further includes: Inputting a training sample labeled with a memory identifier into an initial prediction model to obtain a reference memory identifier output by the initial prediction model, wherein the training sample records data access information indicated by a reference data access request and reference status information of a reference data storage system that responds to the reference data access request, wherein the reference status information is used to indicate data access performance of a memory deployed in the reference data storage system; The model parameters of the initial prediction model are adjusted according to the performance difference between the data access performance of the memory indicated by the memory identifier carried by the training sample and the reference memory identifier to obtain the target prediction model.
7. The method according to claim 1, characterized in that The step of selecting target data from the target storage device and performing a data scheduling operation according to a data migration strategy corresponding to the target data area includes one of the following: In a case where the target data area is a storage area for storing data write operations to be performed, data in the target data area whose data access frequency is lower than a target frequency is determined as the target data; Migrating the target data to a non-target storage in the data storage system; In the case where the target data area is a storage area for storing a data write operation to be performed, data in the target data area whose data write time length is greater than a target time length is determined as the target data; Migrating the target data to a non-target storage in the data storage system; In the case where the target data area is a storage area for storing a data read operation to be performed, and the target memory is a four-layer memory, data corresponding to a reference data read request stored in the target data area is determined as the target data, wherein the reference data read request is a request received by the data storage system before the data access request; The target data is copied to a non-target storage in the data storage system.
8. The method according to claim 1, characterized in that The controlling the target memory to perform the data access operation comprises: When the data access operation is a new write operation of data, obtaining a data storage granularity of the target memory; Dividing the data requested to be written by the data access request according to the data storage granularity to obtain target data blocks; Filtering out unoccupied free storage locations for the target data block from a write data area included in the target memory, wherein the target memory is divided into a write data area and a read data area, the write data area is used to store data to be written, and the read data area is used to store data to be read; The target data block is written into the free storage location.
9. The method according to claim 8, characterized in that Before filtering out unoccupied free storage locations for the target data block from the write data area included in the target memory, the method further includes: Acquire reference access information of reference data access operations performed by the target memory within a reference time period before a current moment; An allocation ratio of the write data area and the read data area in the target memory is updated according to the reference access information.
10. The method according to claim 9, characterized in that The updating of the allocation ratio of the write data area and the read data area in the target memory according to the reference access information comprises: Determine a first ratio of a frequency of executing data write operations and a frequency of executing data read operations executed within the reference time period, and determine a second ratio of a total amount of data written and a total amount of data read, wherein the reference access information includes the frequency of executing data write operations, the frequency of executing data read operations, the total amount of data written, and the total amount of data read; The first ratio and the second ratio are weightedly summed to obtain the allocation ratio.
11. The method according to claim 1, characterized in that: The controlling the target memory to perform the data access operation comprises: In the case where the data access operation is a data modification write operation, detecting a storage location of the to-be-modified data in the data storage system; In the case where it is determined that the data to be modified is stored in the target memory, performing the modification write operation on the data to be modified in the target memory; When it is determined that the data to be modified is stored in a storage device other than the target storage device in the data storage system, the data to be modified is migrated to the target storage device; when the data to be modified is migrated to the target storage device, the modification write operation is performed on the data to be modified in the target storage device.
12. The method according to claim 1, characterized in that The controlling the target memory to perform the data access operation comprises: In the case where the data access operation is a data read operation, detecting a storage location of the to-be-read data in the data storage system; In a case where it is determined that the data to be read is stored in the target memory, performing the data reading operation on the data to be read in the target memory; When it is determined that the data to be read is stored in a storage device other than the target storage device in the data storage system, the data to be read is copied to the target storage device; when the data to be read is copied to the target storage device, the data reading operation is performed on the data to be read in the target storage device.
13. The method according to claim 1, characterized in that After performing the data scheduling operation on the target memory and controlling the target memory to perform the data access operation, the method further comprises: The data mapping relationship in the data mapping table corresponding to the memory is updated according to the execution result of the data scheduling operation and the execution result of the data access operation, wherein the data mapping table records the mapping relationship between the storage location of the memory and the data stored in the storage location.
14. A data access scheduling device for a memory, characterized in that: The data storage system includes a plurality of memories and an access scheduler, wherein different memories have different data access performances, the access scheduler is connected to each memory respectively, and the access scheduler is used to schedule access to the plurality of memories, and the device is applied to the access scheduler, and the device includes: A receiving module, configured to receive a data access request to the data storage system, wherein the data access request is used to request to perform a data access operation in the data storage system; a screening module, configured to screen out a target storage from the plurality of the storages according to data access information of the data access operation and target status information of the data storage system, wherein the data access information is used to indicate the data access status of the data access operation on the data storage system, the target status information is used to indicate the data access performance currently possessed by the plurality of the storages, and the target storage is a storage among the plurality of the storages whose matching degree between the data access performance and the data access operation is higher than the target matching degree; a scheduling module, configured to perform data scheduling on the target memory and control the target memory to perform the data access operation, wherein the data scheduling is configured to adjust the responsiveness of the target memory to the data access operation by adjusting the data distribution state of the data stored between the target memory and non-target memories in the data storage system; Among them, the scheduling module includes: a determination unit, used to determine a target data area corresponding to the data access type of the data access operation from a plurality of data areas included in the target memory, wherein the target data area is used to store data corresponding to the data access type; a screening unit, used to screen the target data from the target memory according to the data migration strategy corresponding to the target data area to perform a data scheduling operation.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 13 when executed by a processor.
16. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 13 are implemented.
17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 13 are implemented.
