Method and device for determining strategy for data placement within SSD
Abstract
A method and a device for determining a strategy for data placement within an SSD are provided. The method for determining a strategy for data placement within a Solid State Drive SSD, includes acquiring an optimization target and workload metric data that is pre-collected for a time period; selecting a machine learning model and a training data strategy according to the optimization target; selecting feature data from the workload metric data for the time period according to the selected training data strategy, and training the selected machine learning model based on the selected feature data; determining, in each subsequent predicting time, a strategy for data placement for a predicting time period corresponding to the predicting time according to the workload metric data for the time period and the workload metric data that is collected in the predicting time by using the trained machine learning model.
Claims
exact text as granted — not AI-modifiedThe invention claimed is:
1. A method for determining a strategy for data placement within a Solid State Drive (SSD), comprising:
acquiring an optimization target and a first workload metric data that is pre-collected for a time period;
selecting a machine learning model and a training data strategy according to the optimization target;
selecting a feature data from the first workload metric data according to the selected training data strategy, and training the selected machine learning model based on the selected feature data; and
determining, in each subsequent predicting time, a strategy for data placement for a predicting time period corresponding to the predicting time according to the first workload metric data for the time period and a second workload metric data that is collected in the predicting time by using the trained machine learning model,
wherein the determining the strategy for the data placement in the predicting time period corresponding to the predicting time comprises:
predicting an IO pattern according to the first workload metric data for the time period and a third workload metric data that is collected in a current predicting time by using the trained machine learning model;
determining the strategy for the data placement in the predicting time period corresponding to the current predicting time according to the predicted IO pattern,
wherein a type of the IO pattern comprises at least a read-intensive IO pattern, a write-intensive IO pattern, a data-hotness-degree IO pattern, a sequential-write IO pattern, and a random-write IO pattern,
wherein the determining the strategy for the data placement in the predicting time period corresponding to the current predicting time according to the predicted IO pattern comprises:
determining to use a Round-Robin strategy as the strategy for the data placement, based on the predicted IO pattern being the read-intensive IO pattern;
determining to use a strip strategy as the strategy for the data placement, based on the predicted IO pattern being the write-intensive IO pattern;
determining to use a strategy that performs partition storage for hot and cold data, based on the predicted IO pattern being the data-hotness-degree IO pattern;
adopting a strategy of writing data into a low cost flash memory unit, based on the predicted IO pattern being the sequential-write IO pattern; and
adopting a strategy of writing data into a high speed flash memory cell, based on the predicted IO pattern being the random-write IO pattern.
2. The method of claim 1 , wherein the optimization target comprises at least one of write performance, NAND flash life, or read latency.
3. The method of claim 2 , wherein the selecting the machine learning model and the training data strategy according to the optimization target comprises:
selecting the training data strategy for write performance optimization based on the optimization target being the write performance, wherein, according to the training data strategy for write performance optimization, at least one of IO size, IO count, IO access interval, or write amplification factor is selected as the feature data for training from the first workload metric data;
selecting the training data strategy for NAND flash life optimization based on the optimization target being the NAND flash life, wherein, according to the training data strategy for NAND flash life optimization, at least a block erasure count is selected as the feature data for training from the first workload metric data; and
selecting the training data strategy for read latency optimization based on the optimization target being the read latency, wherein, according to the training data strategy for read latency optimization, at least one of IO size, IO count, or read latency is selected as the feature data for training from the first workload metric data.
4. The method of claim 1 , further comprising:
updating the time period and acquiring a third workload metric data for the updated time period, based on a change of the optimization target being detected;
re-selecting the machine learning model and the training data strategy according to the changed optimization target; and
re-selecting the feature data from the third workload metric data for the updated time period according to the re-selected training data strategy, to re-train the re-selected machine learning mode, so as to determine the strategy for the data placement by using the re-trained machine learning mode in each subsequent predicting time.
5. A non-transitory computer readable storage medium stored with a computer program, based on the computer program being executed by a processor, the method for determining a strategy for data placement within SSD of claim 1 is implemented.
6. A computing device, comprising:
a processor;
a memory stored with a computer program, and based on the computer program being executed by the processor, the method for determining a strategy for data placement within SSD of claim 1 is implemented.
7. The method of claim 1 , wherein
the Round-Robin strategy includes processing write requests in turn, such that data of one write request is put into a first channel, and data of a next write request is put into a second channel,
the strip strategy includes dividing write request data into a plurality of pages, and writing the plurality of pages to a plurality of channels in parallel, and
the strategy that performs partition storage for hot and cold data includes placing hot data is a first physical block, and cold data in a second physical block.
8. A device for determining a strategy for data placement within an SSD, comprising:
a processor configured to
acquire an optimization target and a first workload metric data that is pre-collected for a time period;
select a machine learning model and a training data strategy according to the optimization target;
select feature data from the first workload metric data for the time period according to the selected training data strategy, and train the selected machine learning model based on the selected feature data;
determine in each subsequent predicting time, a strategy for data placement for a predicting time period corresponding to the predicting time according to the first workload metric data for the time period and a second workload metric data that is collected in the predicting time by using the trained machine learning mode;
predict an IO pattern according to the first workload metric data for the time period and a third workload metric data that is collected in a current predicting time by using the trained machine learning model, wherein a type of the IO pattern includes at least a read-intensive IO pattern, a write-intensive IO pattern, a data-hotness-degree IO pattern, a sequential-write IO pattern, and a random-write IO pattern;
determine the strategy for the data placement in the predicting time period corresponding to the current predicting time according to the predicted IO pattern,
determine to use a Round-Robin strategy as the strategy for the data placement, based on the predicted JO pattern being the read-intensive IO pattern;
determine to use a strip strategy as the strategy for the data placement, based on the predicted IO pattern being the write-intensive IO pattern;
determine to use a strategy that performs partition storage for hot and cold data, based on the predicted IO pattern being the data-hotness-degree IO pattern;
adopt a strategy of writing data into a low cost flash memory unit, based on the predicted IO pattern being the sequential-write IO pattern;
adopt a strategy of writing data into a high speed flash memory cell, based on the predicted IO pattern being the random-write IO pattern.
9. The device of claim 8 , wherein the optimization target includes at least one of write performance, NAND flash life, or read latency.
10. The device of claim 9 , wherein the processor is further configured to:
select the training data strategy for write performance optimization based on a optimization target being the write performance, wherein the training data strategy for write performance optimization includes selecting at least one of IO size, IO count, IO access interval, and write amplification factor as the feature data for training from the first workload metric data;
select the training data strategy for NAND flash life optimization based on the optimization target being the NAND flash life, wherein the training data strategy for NAND flash life optimization includes selecting at least a block erasure count as the feature data for training from the first workload metric data; and
select the training data strategy for read latency optimization based on the optimization target being the read latency, wherein the training data strategy for read latency optimization includes selecting at least one of the IO size, the IO count, and read latency as the feature data for training from the first workload metric data.
11. The device of claim 8 , wherein the processor is further configured to:
update the time period and acquiring a third workload metric data for the updated time period, based on a change of the optimization target being detected;
re-select the machine learning model and the training data strategy according to the changed optimization target;
re-select the feature data from the third workload metric data for the updated time period according to the re-selected training data strategy; and
re-train the re-selected machine learning mode, so as to determine the strategy for the data placement by using the re-trained machine learning mode in each subsequent predicting time.
12. The device of claim 8 , wherein
the Round-Robin strategy includes processing write requests in turn, such that data of one write request is put into a first channel, and data of a next write request is put into a second channel,
the strip strategy includes dividing write request data into a plurality of pages, and writing the plurality of pages to a plurality of channels in parallel, and
the strategy that performs partition storage for hot and cold data includes placing hot data is a first physical block, and cold data in a second physical block.
13. A Solid State Drive (SSD), comprising:
a memory cell storing computer-readable instructions;
a processor configured to execute the computer-readable instructions to
acquire an optimization target and a first workload metric data that is pre-collected for a time period;
select a machine learning model and a training data strategy according to the optimization target;
select feature data from the first workload metric data for the time period according to the selected training data strategy, and training the selected machine learning model based on the selected feature data;
determine, in a plurality of subsequent predicting time periods, a strategy for data placement for a one of the plurality of subsequent predicting time periods according to the first workload metric data for the time period and a second workload metric data that is collected in the one of the plurality of subsequent predicting time periods by using the trained machine learning model;
predict an IO pattern according to the first workload metric data for the time period and a third workload metric data that is collected in a current predicting time by using the trained machine learning model, wherein a type of the IO pattern includes at least a read-intensive IO pattern, a write-intensive IO pattern, a data-hotness-degree IO pattern, a sequential-write IO pattern, and a random-write IO pattern;
determine the strategy for the data placement in the predicting time period corresponding to the current predicting time according to the predicted IO pattern, determine to use a Round-Robin strategy as the strategy for the data placement, based on the predicted IO pattern being the read-intensive IO pattern;
determine to use a strip strategy as the strategy for the data placement, based on the predicted IO pattern being the write-intensive IO pattern;
determine to use a strategy that performs partition storage for hot and cold data, based on the predicted IO pattern being the data-hotness-degree IO pattern;
adopt a strategy of writing data into a low cost flash memory unit, based on the predicted IO pattern being the sequential-write IO pattern;
adopt a strategy of writing data into a high speed flash memory cell, based on the predicted IO pattern being the random-write IO pattern.
14. The SSD of claim 13 , wherein the processor is further configured to write data based on the determined strategy for data placement.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.