Data processing method that dynamically determines strip sizes for various data, data processing device, electronic apparatus, and storage medium corresponding to the data processing method
A data processing method dynamically determines a strip size for various data, and uses the dynamically determined strip size for the various data to store the various data into Redundant Arrays of Independent Disks (RAID) storage apparatuses.
1 . A data storing method comprising:
acquiring current Input/Output (I/O) data of a plurality of storage apparatuses connected based on Redundant Arrays of Independent Disks (RAID);
setting a stripe size for a data operation based on the current I/O data, wherein the stripe size defines a data block size for storing dispersedly the current I/O data into the plurality of storage apparatuses; and
storing the current I/O data into the plurality of storage apparatuses based on the set stripe size.
2 . The data storing method according to claim 1 , wherein the data operation is a read operation or a write operation.
3 . The data storing method according to claim 1 , wherein the RAID is RAID 0.
4 . The data storing method according to claim 1 , wherein the I/O data comprises at least one of a file type, an I/O size, whether an I/O operation is a random reading and writing operation, and whether the I/O operation is a buffered I/O operation.
5 . The data storing method according to claim 1 , further comprising:
acquiring historical I/O data of the plurality of storage apparatuses; and
training a model based on the historical I/O data, using a reinforcement learning algorithm,
wherein the stripe size is set based on the trained model.
6 . The data storing method according to claim 5 , wherein the reinforcement learning algorithm comprises a Q-learning algorithm,
wherein training the model comprises:
obtaining a Q-table by training the model according to the historical I/O data, using the Q-learning algorithm,
wherein setting the stripe size comprises:
obtaining the stripe size by querying the Q-table.
7 . The data storing method according to claim 1 , further comprising:
recording the set stripe size, and a logical address corresponding to the I/O data that is stored based on the set stripe size.
8 . An electronic apparatus comprising:
at least one processor; and
at least one memory that stores computer executable instructions,
wherein the computer executable instructions, when accessed and executed by the at least one processor, cause the at least one processor to perform the data storing method according to claim 1 .
9 . The electronic apparatus according to claim 8 , wherein the data operation is a read operation or a write operation.
10 . The electronic apparatus according to claim 8 , wherein the RAID is RAID 0.
11 . The data storing method according to claim 1 , wherein the I/O data comprises at least one of a file type, whether an I/O operation is a random reading and writing operation, and whether the I/O operation is a buffered I/O operation.
12 . A data storing device comprising at least one processor configured to function as at least:
a data acquirer configured to acquire current Input/Output (I/O) data of a plurality of storage apparatuses connected based on Redundant Arrays of Independent Disks (RAID);
a stripe determiner configured to set a stripe size based on the I/O data, wherein the stripe size defines a data block size for storing dispersedly the I/O data into the plurality of storage apparatuses; and
a data storer configured to store the current I/O data into the plurality of storage apparatuses based on the set stripe size.
13 . The data storing device according to claim 12 , wherein the data operation is a read operation or a write operation.
14 . The data storing device according to claim 12 , wherein the RAID is RAID 0.
15 . The data storing device according to claim 12 , wherein the I/O data comprises at least one of a file type, an I/O size, whether an I/O operation is a random reading and writing operation, and whether the I/O operation is a buffered I/O operation.
16 . The data storing device according to claim 12 , further comprising a model trainer configured to:
acquire historical I/O data of the plurality of storage apparatuses; and
train a model based on the historical I/O data, using a reinforcement learning algorithm,
wherein the stripe determiner is configured to set the stripe size based on the trained model.
17 . The data storing device according to claim 16 , wherein the reinforcement learning algorithm comprises a Q-learning algorithm,
wherein the model trainer is configured to train the model by:
obtaining a Q-table by training the model according to the historical I/O data, using the Q-learning algorithm,
wherein the stripe determiner is configured to set the stripe size by querying the Q-table.
18 . The data storing device according to claim 12 , further comprising an address recorder configured to:
record the stripe size, and a logical address corresponding to the I/O data that is stored based on the stripe size.