STORING DATA BASED ON WRITING FREQUENCY IN DATA STORAGE SYSTEMS
Systems and methods for segregate data in data storage system memory based on writing frequency are disclosed. In some embodiments, infrequently written data is identified and stored in one or more memory regions designated for infrequently written data. Frequently written data is identified and stored in one or more memory regions designated for frequently written data. Garbage collection load can be significantly reduced or eliminated. For example, write amplification of non-volatile solid-state memory is reduced and/or wear of disk heads and other components is reduced. Increased efficiency, longevity, and performance can be obtained.
1 . A data storage system, comprising:
a non-volatile memory comprising a plurality of regions for storing data, wherein the plurality of non-volatile memory regions comprise one or more first non-volatile memory regions and one or more second non-volatile memory regions; and
a controller configured to:
receive a write data command comprising user data from a host system,
determine a writing frequency of the user data, and
select a non-volatile memory region for storing the user data based at least in part on the writing frequency of the user data and store the user data in the selected non-volatile memory region,
wherein:
user data is determined to not exceed a writing frequency threshold when it is written for a first time,
user data is determined to exceed the writing frequency threshold when it is written or updated for a second or subsequent time,
the one or more first non-volatile memory regions are different
from the one or more second non-volatile memory regions, and
the user data that is written for the first time is stored in the one or more second non-volatile memory regions and the user data that is written or updated for the second or subsequent time is stored in the one or more first non-volatile memory regions, the controller further configured to perform garbage collection on the one or more first non-volatile memory regions separately and more frequently than on the one or more second non-volatile memory regions to reduce write amplification associated with performing the garbage collection, and
wherein the user data that is written for the first time is stored only in a magnetic storage and the user data that is written or updated for the second or subsequent time is stored only in a solid state memory.
2 . (canceled)
3 . The data storage system of claim 1 , wherein the controller is further configured to determine that the user data is written for the first time in response to receiving from the host system, prior to receiving the write data command, a command indicating that logical addresses associated with the user data no longer store valid data.
4 . The data storage system of claim 1 , wherein the controller is further configured to determine that the user data is written for the first time based at least in part on previously generated writing frequency information for the user data, wherein the previously generated writing frequency information comprises one or more status indicators corresponding to one or more logical address associated with the user data, and wherein a status indicator indicates whether the corresponding logical address has been written more than once.
5 . The data storage system of claim 4 , wherein the controller is further configured to maintain a mapping associating logical addresses with physical addresses in the non-volatile memory, and wherein the mapping comprises the one or more status indicators.
6 . The data storage system of claim 1 , wherein the controller is further configured to determine that the user data is written for the first time based at least in part on previously generated writing frequency information for the user data, wherein the previously generated writing frequency information comprises one or more write frequency indices for one or more logical addresses associated with the user data, and
wherein the controller is further configured to:
increment the one or more write frequency indices when the one or more logical addresses are written to by the host system; and
determine the writing frequency of the user data based at least in part on the one or more write frequency indices.
7 . The data storage system of claim 1 , wherein the controller is further configured to determine that the user data is written for the first time based at least in part on previously generated writing frequency information for the user data, and wherein the previously generated writing frequency information comprises hinting information associated with the user data, the hinting information being comprised in the write data command.
8 . (canceled)
9 . The data storage system of claim 1 , wherein the non-volatile memory is homogenous.
10 . In a data storage system comprising a non-volatile memory that comprises a plurality of regions for storing data, a method of storing data, the method comprising:
receiving a write data command comprising user data from a host system;
determining a writing frequency of the user data; and
selecting a non-volatile memory region for storing the user data based at least in part on the writing frequency of the user data and storing the user data in the selected non-volatile memory region,
wherein:
user data having writing frequency that exceeds a writing frequency threshold is stored in one or more first non-volatile memory regions designated for storing frequently written data,
user data having writing frequency that does not exceed the writing frequency threshold is stored in one or more second non-volatile memory regions designated for storing infrequently written data,
user data is determined to not exceed the writing frequency threshold when it is written for a first time,
user data is determined to exceed the writing frequency threshold when it is written or updated for a second or subsequent time,
the one or more first non-volatile memory regions are different from the one or more second non-volatile memory regions, and
the user data that is written for the first time is stored in the one or more second non-volatile memory regions and the user data that is written or updated for the second or subsequent time is stored in the one or more first non-volatile memory regions, and garbage collection is performed on the one or more first non-volatile memory regions separately and more frequently than on the one or more second non-volatile memory regions, and
wherein the user data that is written for the first time is stored only in a magnetic storage and the user data that is written or updated for the second or subsequent time is stored only in a solid state memory.
11 . (canceled)
12 . The method of claim 10 , wherein determining that the user data is written for the first time is performed based at least in part on previously generated writing frequency information for the user data, and wherein the previously generated writing frequency information comprises a command, received from the host system, indicating that logical addresses associated with the user data no longer store valid data.
13 . The method of claim 10 , wherein determining that the user data is written for the first time is performed based at least in part on previously generated writing frequency information for the user data, wherein the previously generated writing frequency information comprises one or more status indicators corresponding to one or more logical address associated with the user data, and wherein a status indicator indicates whether the corresponding logical address has been written more than once.
14 . The method of claim 13 , further comprising maintaining a mapping associating logical addresses with physical addresses in the non-volatile memory, and wherein the mapping comprises the one or more status indicators.
15 . The method of claim 10 , wherein determining that the user data is written for the first time is performed based at least in part on previously generated writing frequency information for the user data, wherein the previously generated writing frequency information comprises one or more write frequency indices for one or more logical addresses associated with the user data, and
wherein the method further comprises:
incrementing the one or more write frequency indices when the one or more logical addresses are written to by the host system; and
determining the writing frequency of the user data based at least in part on the one or more write frequency indices.
16 . The method of claim 10 , wherein determining that the user data is written for the first time is performed based at least in part on previously generated writing frequency information for the user data, and wherein the previously generated writing frequency information comprises hinting information associated with the user data, the hinting information being comprised in the write data command.
17 . (canceled)
18 . The method of claim 10 , wherein the non-volatile memory is homogenous.
19 . A data storage system, comprising:
a non-volatile memory comprising a plurality of regions for storing data; and
a controller configured to:
receive a write data command comprising user data from a host system,
determine a writing frequency of the user data,
select a non-volatile memory region for storing the user data based at least in part on the writing frequency of the user data, the controller further configured to select one or more first non-volatile memory regions designated for storing frequently written data in response to determining that the writing frequency of the user data exceeds a writing frequency threshold, and the controller further configured to select one or more second non-volatile memory regions designated for storing infrequently written data in response to determining that the writing frequency of the user data does not exceed the writing frequency threshold, the one or more first non-volatile memory regions being different from the one or more second non-volatile memory regions, and
store the user data in the selected one or more first or second non-volatile memory regions,
wherein user data is determined to not exceed the writing frequency threshold when it is written for a first time, and user data is determined to exceed the writing frequency threshold when it is written or updated for a second or subsequent time, and
wherein the user data that is written for the first time is stored in the one or more second non-volatile memory regions and the user data that is written or updated for the second or subsequent time is stored in the one or more first non-volatile memory regions, the controller further configured to perform garbage collection on the one or more first non-volatile memory regions separately and more frequently than on the one or more second non-volatile memory regions to reduce write amplification associated with performing the garbage collection, and
wherein the user data that is written for the first time is stored only in a magnetic storage and the user data that is written or updated for the second or subsequent time is stored only in a solid state memory.
20 . The data storage system of claim 1 , wherein the controller is further configured to determine that the user data is written for the first time based at least in part on previously generated writing frequency information for the user data, and wherein the previously generated writing frequency information is included in a write data command indicating that the user data is written once.
21 . The data storage system of claim 1 , wherein the controller is further configured to determine that the user data is written for the first time based at least in part on previously generated writing frequency information for the user data, and wherein the previously generated writing frequency information comprises a status indicator stored in the controller.
22 . A data storage system, comprising:
a non-volatile memory comprising a plurality of regions for storing data; and
a controller configured to:
receive a write data command comprising user data from a host system,
determine a writing frequency of the user data based on whether the user data is written for a first time,
when it is determined that the user data is written for the first time, select a first non-volatile memory region designated for storing infrequently written data and store the user data in the first non-volatile memory region, and
when it is determined that the user data is written or updated for a second or subsequent time, select a second non-volatile memory region designated for storing frequently written data and store the user data in the second non-volatile memory region, wherein the second non-volatile memory region is different from the first non-volatile memory region,
wherein the user data that is written for the first time is stored in the second non-volatile memory region and the user data that is written or updated for the second or subsequent time is stored in the first non-volatile memory region, the controller further configured to perform garbage collection on the first non-volatile memory region separately and more frequently than on the second non-volatile memory region to reduce write amplification associated with performing the garbage collection, and
wherein the user data that is written for the first time is stored only in a magnetic storage and the user data that is written or updated for the second or subsequent time is stored only in a solid state memory.
23 . The data storage system of claim 22 , wherein the controller is further configured to determine that the user data is written for the first time based on information included in the write data command indicating that the user data is written once.
24 . The data storage system of claim 22 , wherein the controller is further configured to determine that the user data is written for the first time without counting the number of writes of the user data into the non-volatile memory.
25 . The data storage system of claim 1 , wherein user data having writing frequency that exceeds the writing frequency threshold is stored in one or more first non-volatile memory regions designated for storing frequently written data, and wherein user data having writing frequency that does not exceed the writing frequency threshold is stored in one or more second non-volatile memory regions designated for storing infrequently written data.
26 . The data storage system of claim 1 , wherein the data storage system comprises a hybrid disk drive that includes the magnetic storage and the solid state memory.