CN104317731A - Hierarchical storage management method, device and storage system - Google Patents

Hierarchical storage management method, device and storage system Download PDF

Info

Publication number
CN104317731A
CN104317731A CN201410555114.2A CN201410555114A CN104317731A CN 104317731 A CN104317731 A CN 104317731A CN 201410555114 A CN201410555114 A CN 201410555114A CN 104317731 A CN104317731 A CN 104317731A
Authority
CN
China
Prior art keywords
data block
block
storer
hot value
dummy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410555114.2A
Other languages
Chinese (zh)
Other versions
CN104317731B (en
Inventor
万继光
马晓慧
程龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Hangzhou Huawei Digital Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Huawei Digital Technologies Co Ltd filed Critical Hangzhou Huawei Digital Technologies Co Ltd
Priority to CN201410555114.2A priority Critical patent/CN104317731B/en
Publication of CN104317731A publication Critical patent/CN104317731A/en
Application granted granted Critical
Publication of CN104317731B publication Critical patent/CN104317731B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the invention discloses a hierarchical storage management method, a hierarchical storage management device and a storage system. The method comprises the following steps of updating a heat value of each data block in a statistical cycle T1 according to the accessed frequency of each data block; sequentially taking x as a value from N to 2 from large to small, and updating a heat value of each virtual block in the xth middle layer in a layer-by-layer mode; sequentially taking y as a value from 2 to N from small to large, taking y as an integer, and determining at least one target yth virtual block in a plurality of yth virtual blocks contained in a target (y-1)th virtual block in a layer-by-layer mode; sorting a plurality of target data blocks contained in the determined at least one target Nth virtual block according to the magnitude of heat values and updating a heat range of each target data block in the target data blocks according to a sorting result. According to the scheme, the efficiency of updating the heat range of each target data block in target data blocks can be improved, so that memory cost and time cost of the storage system are reduced.

Description

A kind of hierarchical storage management method, device and storage system
Technical field
The present invention relates to technical field of data storage, particularly relate to a kind of hierarchical storage management method, device and storage system.
Background technology
In field of storage, a storage system may containing the multiple storer causing access speed there are differences because storage medium is different and/or interface is different.In order to avoid insignificant data take more space on high performance memory device, the memory property of enhancing system, to reduce system cost, usually the Data Placement stored in storage system is become multiple data block, and data block higher for hot value is moved to access speed accumulation layer faster, data block lower for hot value is moved to the slower accumulation layer of access speed, wherein the hot value of data block need in conjunction with the access times of this data block, the metamessages such as access frequency and/or access interval calculate, wherein, the hot value of data block and the accessed frequency dependence of this data block, the hot value of the data block that accessed frequency is higher is larger, the hot value of the data block that accessed frequency is lower is less.
Existing hierarchical storage management method is mainly: travel through whole storage system all data blocks when carrying out Data Migration at every turn, determine the hot value of each data block in all data blocks, according to the hot value of each data block in this all data block, determine the data block needing to carry out upgrading.The shortcoming of this mode is: because in general storage system, data block quantity is extremely many, if all add up all data blocks when carrying out Data Migration at every turn, will cause very large memory cost.
Summary of the invention
Technical matters to be solved by this invention is, provides a kind of hierarchical storage management method, device and storage system, can reduce memory cost and the time overhead of storage system.
In order to solve the problems of the technologies described above, embodiment of the present invention first aspect provides a kind of hierarchical storage management method, be applied to storage system, described storage system comprises at least L data block and described storage system comprises N number of middle layer, N is integer, wherein, L>=3 and L is integer, a described L data block is assigned to a being positioned at N middle layer nin individual N dummy block will, described a nin individual N dummy block will, each N dummy block will comprises at least one data block, wherein, and 2≤a n< L and a nfor integer; X gets 2 from N successively according to order from big to small, and described x round numbers, a in the xth middle layer that each value for described x is corresponding xindividual xth dummy block will, is assigned to a being positioned at xth-1 middle layer x-1in individual xth-1 dummy block will, described a x-1in individual xth-1 dummy block will, each xth-1 dummy block will comprises at least one xth dummy block will, a x-1>=2 and a x-1for integer, a x> a x-1and a xfor integer;
Described method comprises:
When N >=2,
A statistic period T 1in, the number of times accessed according to each data block in a described L data block, upgrades the hot value of a described L data block, and wherein, accessed number of times is more, then hot value is larger; According to the hot value of each data block in a described L data block, to the described a in described N middle layer nthe hot value of individual N dummy block will upgrades; For the xth middle layer that each value of x is corresponding, according to the described a in described xth middle layer xthe hot value of each xth dummy block will in individual xth dummy block will, to the described a in described xth-1 middle layer x-1the hot value of individual xth-1 dummy block will upgrades;
According to the threshold value in the first middle layer, from described a 1determine at least one target first dummy block will in individual first dummy block will, the hot value of at least one target first dummy block will described is greater than or equal to the threshold value in described first middle layer; Y gets N and described y round numbers from 2 successively according to order from small to large, for the y middle layer that each value of described y is corresponding, according to the threshold value in described y middle layer, from multiple y dummy block will that described at least one target y-1 dummy block will comprises, determine at least one target y dummy block will, the hot value of described at least one target y dummy block will is greater than or equal to the threshold value in described y middle layer;
Multiple target data blocks that at least one target N dummy block will described in determining comprises are sorted according to the size of hot value, and the Heat range of each target data block in described multiple target data block is upgraded according to ranking results, the number of described Heat range is greater than or equal to 2, and is less than or equal to the kind of the storer comprised in described storage system;
Or, as N=1,
At described T 1in, the number of times accessed according to each data block in a described L data block, upgrades the hot value of a described L data block, and wherein, accessed number of times is more, then hot value is larger; According to the hot value of each data block in a described L data block, to the described a in described first middle layer 1the hot value of individual first dummy block will upgrades; According to the threshold value in described first middle layer, from described a 1determine at least one target first dummy block will in individual first dummy block will, the hot value of at least one target first dummy block will described is greater than or equal to the threshold value in described first middle layer; Multiple target data blocks that at least one target first dummy block will described in determining comprises are sorted according to the size of hot value, and the Heat range of each target data block in described multiple target data block is upgraded according to ranking results, the number of described Heat range is greater than or equal to 2, and being less than or equal to the kind of the storer comprised in described storage system, described storage system comprises at least two kinds of storeies.
In conjunction with first aspect, in the embodiment that the first is feasible, described method also comprises:
The former Heat range of each data block and the Heat range after upgrading in more described multiple target data block, and determine the data block needing upgrading, the data block of described needs upgrading refer to be arranged in described multiple target data block and after upgrading Heat range higher than the data block of former Heat range;
When the described data block needing to upgrade is accessed, the described data block of upgrading that needs is carried out upgrading processing.
In conjunction with the first feasible embodiment of first aspect and first aspect, in the embodiment that the second is feasible,
The former Heat range of each data block and the Heat range after upgrading in more described multiple target data block, and determine the data block needing upgrading, the data block of described needs upgrading refer to be arranged in described multiple target data block and after upgrading Heat range higher than the data block of former Heat range;
When the described data block needing to upgrade is accessed, the described data block of upgrading that needs is carried out upgrading processing.
In conjunction with the embodiment that the second of first aspect is feasible, in the embodiment that the third is feasible:
The threshold value A in described first middle layer 11-t 1* σ 1, μ 1for described a 1the hot value mean value of the data block that individual first dummy block will comprises, σ 1for described a 1the hot value standard deviation of the data block that individual first dummy block will comprises, t 1for σ 1coefficient, wherein, σ 1be not equal to zero, t 1∈ [0, μ 1/ σ 1).
In conjunction with the first to three kind of first aspect and first aspect feasible embodiment, in the 4th kind of feasible embodiment:
The threshold value A in described first middle layer 11-t 1* σ 1, μ 1for described a 1the hot value mean value of the data block that individual first dummy block will comprises, σ 1for described a 1the hot value standard deviation of the data block that individual first dummy block will comprises, t 1for σ 1coefficient, wherein, σ 1be not equal to zero, t 1∈ [0, μ 1/ σ 1).
In conjunction with the 4th kind of feasible embodiment of first aspect, in the 5th kind of feasible embodiment:
The threshold value A in described y middle layer yy-t y* σ y, μ ythe hot value mean value of the data block that the multiple y dummy block will comprised for described at least one target y-1 dummy block will are corresponding, σ ythe hot value standard deviation of the data block that the multiple y dummy block will comprised for described at least one target y-1 dummy block will are corresponding, t yfor σ ycoefficient, t ysuccessively decrease along with increasing progressively of y, wherein, σ ybe not equal to zero,
In conjunction with the first to five kind of first aspect and first aspect feasible embodiment, in the 6th kind of feasible embodiment:
In described storage system, comprise two kinds of storeies, described two kinds of storeies comprise first memory and second memory, and the access speed of described first memory is greater than the access speed of described second memory,
Described method also comprises:
At time interval T 2in, the data block of the needs degradation being positioned at described first memory is moved to described second memory, described T 2for carrying out degradation migration and described T 2length be fixing;
When Nfree1≤first threshold, the data block being positioned at described first memory is sorted according to the size of hot value, the described data block of degradation that needs refers to the min (Nfree2 that the hot value selected from described ranking results is smaller, C) individual data block, wherein, described first threshold is that the number of the data block of being upgraded by the needs determined is determined, or described first threshold is by average per time interval T 2the number that interior needs move to the data block of described second memory from described first memory degradation is determined; Or the numerical value that the number that the size of described first threshold deducts by the number of all physical blocks comprised in described first memory the described multiple target data block determined obtains is determined;
Wherein, Nfree1 refers to the quantity of free physical block in described first memory; Nfree2 refers to the quantity of free physical block in described second memory; Described physical block is for storing described data block; C refers at described time interval T 2in, described first memory to transmit between described second memory and the quantity of the data block received by described second memory.
In conjunction with the 6th kind of feasible embodiment of first aspect, in the 7th kind of feasible embodiment:
When described first threshold < Nfree1≤Second Threshold, described method also comprises: the data block of described needs degradation refers to the min (Nfree2 that the hot value selected from described ranking results is smaller, C, Δ Nfree1) individual data block;
Wherein, Δ Nfree1=Nfree1'-Nfree1, Nfree1' for upper once carry out degradation migration time, the quantity of the free physical block in described first memory, and the value of Δ Nfree1 be greater than 0 integer, described Second Threshold be basis at described T 2the mean speed of interior upgrade data block is determined, to ensure that the free physical block in described first memory can not by described T 2the data block of interior upgrading has taken, and described first threshold is less than described Second Threshold.
In conjunction with the first to five kind of first aspect and first aspect feasible embodiment, in the 8th kind of feasible embodiment:
K kind storer is comprised in described storage system, wherein K >=3 and K is integer, described K kind storer comprises the i-th storer, the i-th-1 storer and the i-th-2 storer, and the access speed of described i-th storer is greater than the access speed of described i-th-1 storer, the access speed of described i-th-1 storer is greater than the access speed of described i-th-2 storer, wherein, i gets 3 and i round numbers from K successively according to order from big to small;
Described method also comprises:
At described T 2in, the data block of the needs degradation being positioned at described i-th storer is moved to described i-th-2 storer, the data block of the needs degradation being positioned at described i-th-1 storer is moved to described i-th-2 storer, and the data block of the needs degradation being positioned at described i-th storer is moved to described i-th-1 storer.
In conjunction with the 8th kind of feasible embodiment of first aspect, in the 9th kind of feasible embodiment,
The described data block by the needs degradation being positioned at described i-th storer moves to described i-th-2 storer, the data block of the needs degradation being positioned at described i-th-1 storer is moved to described i-th-2 storer, and the data block of the needs degradation being positioned at described i-th storer is moved to described i-th-1 storer, comprising:
The data block being positioned at described i-th storer is sorted according to the size of hot value, the data block being positioned at described i-th-1 storer is also sorted according to the size of hot value, and common choice goes out the smaller Nfree of hot value (i-2) individual data block the ranking results of data block that comprises of the ranking results of the data block comprised from described i-th storer and described i-th-1 storer, described Nfree (i-2) individual data block degradation is moved to described i-th-2 storer, the quantity of the free physical block that described Nfree (i-2) comprises for described i-th-2 storer,
The data block being positioned at described i-th storer is sorted according to the size of hot value, and select the smaller Nfree of hot value (i-1) individual data block the ranking results of the data block comprised from described i-th storer, described Nfree (i-1) individual data block degradation is moved to described i-th-1 storer, the quantity of the free physical block that described Nfree (i-1) comprises for described i-th-1 storer.
Embodiment of the present invention second aspect provides a kind of hierarchical storage management device, can be applicable to storage system,
Described storage system comprises at least L data block and described storage system comprises N number of middle layer, and N is integer, and wherein, L>=3 and L is integer, a described L data block is assigned to a being positioned at N middle layer nin individual N dummy block will, described a nin individual N dummy block will, each N dummy block will comprises at least one data block, wherein, and 2≤a n< L and a nfor integer; X gets 2 from N successively according to order from big to small, and described x round numbers, a in the xth middle layer that each value for described x is corresponding xindividual xth dummy block will, is assigned to a being positioned at xth-1 middle layer x-1in individual xth-1 dummy block will, described a x-1in individual xth-1 dummy block will, each xth-1 dummy block will comprises at least one xth dummy block will, a x-1>=2 and a x-1for integer, a x> a x-1and a xfor integer;
Described device comprises:
When N >=2,
Hot value updating block, for a statistic period T 1in, the number of times accessed according to each data block in a described L data block, upgrades the hot value of a described L data block, and wherein, accessed number of times is more, then hot value is larger; According to the hot value of each data block in a described L data block, to the described a in described N middle layer nthe hot value of individual N dummy block will upgrades; For the xth middle layer that each value of x is corresponding, according to the described a in described xth middle layer xthe hot value of each xth dummy block will in individual xth dummy block will, to the described a in described xth-1 middle layer x-1the hot value of individual xth-1 dummy block will upgrades;
Determining unit, for the threshold value according to the first middle layer, from described a 1determine at least one target first dummy block will in individual first dummy block will, the hot value of at least one target first dummy block will described is greater than or equal to the threshold value in described first middle layer; Y gets N and described y round numbers from 2 successively according to order from small to large, for the y middle layer that each value of described y is corresponding, according to the threshold value in described y middle layer, from multiple y dummy block will that described at least one target y-1 dummy block will comprises, determine at least one target y dummy block will, the hot value of described at least one target y dummy block will is greater than or equal to the threshold value in described y middle layer;
First sequencing unit, multiple target data blocks for comprising at least one target N dummy block will described in determining sort according to the size of hot value, from and upgrade the Heat range of each target data block described multiple target data block according to ranking results, the number of described Heat range is greater than or equal to 2, and is less than or equal to the kind of the storer comprised in described storage system;
As N=1,
Described hot value updating block, also at described T 1in, the number of times accessed according to each data block in a described L data block, upgrades the hot value of a described L data block, and wherein, accessed number of times is more, then hot value is larger; According to the hot value of each data block in a described L data block, to the described a in described first middle layer 1the hot value of individual first dummy block will upgrades;
Described determining unit, also for the threshold value according to described first middle layer, from described a 1determine at least one target first dummy block will in individual first dummy block will, the hot value of at least one target first dummy block will described is greater than or equal to the threshold value in described first middle layer;
Described first sequencing unit, multiple target data blocks also for comprising at least one target first dummy block will described in determining sort according to the size of hot value, from and upgrade the Heat range of each target data block described multiple target data block according to ranking results, the number of described Heat range is greater than or equal to 2, and being less than or equal to the kind of the storer comprised in described storage system, described storage system comprises at least two kinds of storeies.
In conjunction with second aspect, in the embodiment that the first is feasible, described device also comprises:
Comparing unit, for the former Heat range of each data block in more described multiple target data block and the Heat range after upgrading, and determine the data block needing upgrading, the data block of described needs upgrading refer to be arranged in described multiple target data block and after upgrading Heat range higher than the data block of former Heat range;
Upgrade unit, for when the described data block needing to upgrade is accessed, carries out upgrading processing by the described data block of upgrading that needs.
In conjunction with the first feasible embodiment of second aspect and second aspect, in the embodiment that the second is feasible, the threshold value in described first middle layer is according to described a 1the hot value mean value of the data block that individual first dummy block will comprises and hot value standard deviation calculate.
In conjunction with the embodiment that the second of second aspect is feasible, in the embodiment that the third is feasible:
The threshold value A in described first middle layer 11-t 1* σ 1, μ 1for described a 1the hot value mean value of the data block that individual first dummy block will comprises, σ 1for described a 1the hot value standard deviation of the data block that individual first dummy block will comprises, t 1for σ 1coefficient, wherein, σ 1be not equal to zero, t 1∈ [0, μ 1/ σ 1).
In conjunction with the first to three kind of second aspect and second aspect feasible embodiment, in the 4th kind of feasible embodiment:
The threshold value in described y middle layer is that the hot value mean value of data block corresponding to multiple y dummy block will of comprising according to described at least one target y-1 dummy block will and hot value standard deviation calculate.
In conjunction with the 4th kind of feasible embodiment of second aspect, in the 5th kind of feasible embodiment:
The threshold value A in described y middle layer yy-t y* σ y, μ ythe hot value mean value of the data block that the multiple y dummy block will comprised for described at least one target y-1 dummy block will are corresponding, σ ythe hot value standard deviation of the data block that the multiple y dummy block will comprised for described at least one target y-1 dummy block will are corresponding, t yfor σ ycoefficient, t ysuccessively decrease along with increasing progressively of y, wherein, σ ybe not equal to zero,
In conjunction with the first to five kind of second aspect and second aspect feasible embodiment, in the 6th kind of feasible embodiment, two kinds of storeies are comprised in described storage system, described two kinds of storeies comprise first memory and second memory, and the access speed of described first memory is greater than the access speed of described second memory
Described device also comprises:
First degraded cell, at time interval T 2in, the data block of the needs degradation being positioned at described first memory is moved to described second memory, described T 2for carrying out degradation migration and described T 2length be fixing;
Second sequencing unit, for when Nfree1≤first threshold, the data block being positioned at described first memory is sorted according to the size of hot value, the described data block of degradation that needs refers to the min (Nfree2 that the hot value selected from described ranking results is smaller, C) individual data block, wherein, described first threshold is that the number of the data block of being upgraded by the needs determined is determined, or described first threshold is by needing the number moving to the data block of described second memory from described first memory degradation to determine in average per time interval T2; Or the numerical value that the number that the size of described first threshold deducts by the number of all physical blocks comprised in described first memory the described multiple target data block determined obtains is determined;
Wherein, Nfree1 refers to the quantity of free physical block in described first memory; Nfree2 refers to the quantity of free physical block in described second memory; Described physical block is for storing described data block; C refers at described time interval T 2in, described first memory to transmit between described second memory and the quantity of the data block received by described second memory.
In conjunction with the 6th kind of feasible embodiment of second aspect, in the 7th kind of feasible embodiment, when described first threshold < Nfree1≤Second Threshold, the described data block of degradation that needs refers to the min (Nfree2 that the hot value selected from described ranking results is smaller, C, Δ Nfree1) individual data block;
Wherein, Δ Nfree1=Nfree1'-Nfree1, Nfree1' for upper once carry out degradation migration time, the quantity of the free physical block in described first memory, and the value of Δ Nfree1 be greater than 0 integer, described Second Threshold be basis at described T 2the mean speed of interior upgrade data block is determined, to ensure that the free physical block in described first memory can not by described T 2the data block of interior upgrading has taken, and described first threshold is less than described Second Threshold.
In conjunction with the first to five kind of second aspect and second aspect feasible embodiment, in the 8th kind of feasible embodiment:
K kind storer is comprised in described storage system, wherein K >=3 and K is integer, described K kind storer comprises the i-th storer, the i-th-1 storer and the i-th-2 storer, and the access speed of described i-th storer is greater than the access speed of described i-th-1 storer, when the access speed of described i-th-1 storer is greater than the access speed of described i-th-2 storer, wherein, i gets 3 and i round numbers from K successively according to order from big to small;
Described device also comprises:
Second degraded cell, at described T 2in, the data block of the needs degradation being positioned at described i-th storer is moved to described i-th-2 storer, the data block of the needs degradation being positioned at described i-th-1 storer is moved to described i-th-2 storer, and the data block of the needs degradation being positioned at described i-th storer is moved to described i-th-1 storer.
In conjunction with the 8th kind of feasible embodiment of second aspect, in the 9th kind of feasible embodiment, described second degraded cell comprises:
3rd sequencing unit, for the data block being positioned at described i-th storer being sorted according to the size of hot value, also sorts the data block being positioned at described i-th-1 storer according to the size of hot value;
First selection unit, in the ranking results of the data block comprised for the ranking results of data block that comprises from described i-th storer and described i-th-1 storer, common choice goes out the smaller Nfree of hot value (i-2) individual data block, described Nfree (i-2) individual data block degradation is moved to described i-th-2 storer, the quantity of the free physical block that described Nfree (i-2) comprises for described i-th-2 storer;
4th sequencing unit, for sorting the data block being positioned at described i-th storer according to the size of hot value;
Second selection unit, the smaller Nfree of hot value (i-1) individual data block is selected in the ranking results of data block that comprises from described i-th storer, described Nfree (i-1) individual data block degradation is moved to described i-th-1 storer, the quantity of the free physical block that described Nfree (i-1) comprises for described i-th-1 storer.
The embodiment of the present invention third aspect provides a kind of storage system, can comprise R kind storer and the feasible hierarchical storage management device as described in embodiment of as second aspect and second aspect the first to nine kind, R be greater than or equal to 2 integer,
At least L data block is stored in described R kind storer,
Described hierarchical storage management device is used for determining multiple target data block from a described at least L data block, according to the hot value of each target data block in described multiple target data block, described multiple target data block is divided into R Heat range.
The embodiment of the present invention, a statistic period T 1in, the number of times accessed according to each data block, upgrades the hot value of each data block; X gets 2 from N successively according to order from big to small, successively upgrades the hot value of the dummy block will comprised in xth middle layer; Integer y gets N from 2 successively according to order from small to large, successively from multiple y dummy block will that the target y-1 dummy block will of y-1 layer comprises, determines at least one target y dummy block will; When determining at least one target N dummy block will, multiple target data blocks that at least one target N dummy block will determined comprises are sorted according to the size of hot value, and upgrades the Heat range of each target data block in described multiple target data block according to ranking results.Adopt the method, only need select partial virtual block as destination virtual block from each middle layer, finally from the mass data block that whole storage system comprises, select the higher target data block of hot value, when needs manage (such as data block upgrading) to storage system, only need add up for target data block, greatly reduce and need data volume to be processed, thus memory cost when can reduce management storage systems and time overhead.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the schematic flow sheet of an embodiment of hierarchical storage management method of the present invention;
Fig. 2 is the schematic flow sheet of another embodiment of hierarchical storage management method of the present invention;
Fig. 3 is the schematic flow sheet of the another embodiment of hierarchical storage management method of the present invention;
Fig. 4 is the structural representation of an embodiment of hierarchical storage management device of the present invention;
Fig. 5 is the structural representation of another embodiment of hierarchical storage management device of the present invention;
Fig. 6 is the structural representation of the another embodiment of hierarchical storage management device of the present invention;
Fig. 7 is the structural representation of an embodiment of the second degraded cell of the device of hierarchical storage management shown in Fig. 6;
Fig. 8 is the structural representation of the another embodiment of hierarchical storage management device of the present invention;
Fig. 9 is the structural representation of an embodiment of storage system of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Hierarchical storage management method, device and storage system that the embodiment of the present invention provides, can reduce the memory cost of storage system and reduce the handling cost of storage system.The storage system of the embodiment of the present invention comprises at least L data block and comprise N number of middle layer, and N is integer, and wherein, L>=3 and L is integer, a described L data block is assigned to a being positioned at N middle layer nin individual N dummy block will, described a nin individual N dummy block will, each N dummy block will comprises at least one data block, wherein, and 2≤a n< L and a nfor integer; X gets 2 from N successively according to order from big to small, and described x round numbers, a in the xth middle layer that each value for described x is corresponding xindividual xth dummy block will, is assigned to a being positioned at xth-1 middle layer x-1in individual xth-1 dummy block will, described a x-1in individual xth-1 dummy block will, each xth-1 dummy block will comprises at least one xth dummy block will, a x-1>=2 and a x-1for integer, a x> a x-1and a xfor integer.Below in conjunction with accompanying drawing, the embodiment of the present invention is described in detail.
See Fig. 1, it is the schematic flow sheet of an embodiment of hierarchical storage management method of the present invention.As shown in Figure 1, when N >=2, this hierarchical storage management method can comprise the following steps:
S101, a statistic period T 1in, the number of times accessed according to each data block in a described L data block, upgrades the hot value of a described L data block, and wherein, accessed number of times is more, then hot value is larger; According to the hot value of each data block in a described L data block, to the described a in described N middle layer nthe hot value of individual N dummy block will upgrades; For the xth middle layer that each value of x is corresponding, according to the described a in described xth middle layer xthe hot value of each xth dummy block will in individual xth dummy block will, to the described a in described xth-1 middle layer x-1the hot value of individual xth-1 dummy block will upgrades.
Particularly, hot value can calculate according to the accessed frequency of the accessed within a certain period of time number of times of data block, data block and/or data block accessed time interval.Wherein, above-mentioned certain hour can comprise statistic period T 1.
Alternatively, can when each data block be accessed, upgrade the hot value of this data block and from x=N to x=1, successively upgrade the hot value of the dummy block will comprising this data block in xth layer according to the hot value of this data block; Or, also when each data block is accessed, can first upgrade the hot value of this data block, by the time certain special time, such as statistic period T 1all end of term, then from x=N to x=1, successively upgrade the hot value of each dummy block will in xth layer according to the hot value of L data block.
S102, according to the threshold value in the first middle layer, from described a 1determine at least one target first dummy block will in individual first dummy block will, the hot value of at least one target first dummy block will described is greater than or equal to the threshold value in described first middle layer; Y gets N and described y round numbers from 2 successively according to order from small to large, for the y middle layer that each value of described y is corresponding, according to the threshold value in described y middle layer, from multiple y dummy block will that described at least one target y-1 dummy block will comprises, determine at least one target y dummy block will, the hot value of described at least one target y dummy block will is greater than or equal to the threshold value in described y middle layer.
In the embodiment of the present invention, the threshold value in each middle layer is adaptive, and wherein the threshold value in the first middle layer is according to the first middle layer a 1the hot value mean value of the data block comprised in individual first dummy block will and hot value standard deviation calculate; For y each value from 2 to N, the threshold value in y middle layer for according to described at least one target y-1 dummy block will comprise that the hot value mean value of data block corresponding to multiple y dummy block will and hot value standard deviation calculate.
For the data block avoiding hot value higher fails to choose, the ratio in y-1 middle layer shared by target y-1 dummy block will should higher than the ratio in y middle layer shared by target y dummy block will.
S103, multiple target data blocks that at least one target N dummy block will described in determining comprises are sorted according to the size of hot value, from and upgrade the Heat range of each target data block described multiple target data block according to ranking results, the number of described Heat range is greater than or equal to 2, and is less than or equal to the kind of the storer comprised in described storage system.
Alternatively, when the multiple target data blocks comprised at least one target N dummy block will determined sort according to the size of hot value, bucket sort algorithm can be adopted.
Alternatively, if storage system comprises first memory and second memory, and the access speed of first memory is greater than the access speed of second memory, and Heat range comprises the first estate corresponding with first memory and second grade corresponding with the second accumulation layer.So the Heat range of the target data block of the first higher for hot value quantity can be updated to the first estate, the Heat range of remaining target data block is updated to the second grade, wherein the first quantity is not more than the quantity of the physical block that first memory comprises, and the quantity of remaining target data block is not more than the quantity of the physical block that second memory comprises.
Alternatively, if storage system comprises more than two kinds of storeies, this can be divided at least two ranks more than two kinds of storeies according to the speed of access speed, such as: solid state hard disc (Solid State Drive in storage system, can be comprised, and hard disk drive (Hard Disk Drive SSD), HDD) two kinds of storeies, HDD can comprise optical-fibre channel (Fibre Channel according to interface difference, FC) hard disk, Serial Attached SCSI (SAS) (Serial Attached SCSI, SAS) hard disk, Serial Advanced Technology Attachment (Serial Advanced Technology Attachment, SATA) multiple memorizers such as hard disk, wherein SSD can be first level, FC hard disk and SAS hard disk can be second levels, SATA hard disc can be third level.Now, the quantity of Heat range can be made to equal the number of levels of storer and make each Heat range correspond to a kind of rank of storer.When upgrading the Heat range of each target data block, can the hot value of the physical block quantity that comprises of the storer corresponding according to each Heat range and each target data block upgrade.Such as: the Heat range of the target data block of the 3rd higher for hot value quantity is updated to the first estate; The Heat range of the target data block of the 4th higher for hot value in other target data blocks quantity is updated to the second grade; The Heat range of remaining target data block is updated to the tertiary gradient, and wherein the 3rd quantity is less than or equal to the physical block quantity comprised in the storer of first level; 4th quantity is less than or equal to the physical block quantity comprised in the storer of second level; The quantity of remaining target data block is less than or equal to the physical block quantity comprised in the storer of third level.
As a kind of feasible embodiment, as N=1, this hierarchical storage management method can comprise the following steps:
S104, at described T 1in, the number of times accessed according to each data block in a described L data block, upgrades the hot value of a described L data block, and wherein, accessed number of times is more, then hot value is larger; According to the hot value of each data block in a described L data block, to the described a in described first middle layer 1the hot value of individual first dummy block will upgrades.
Alternatively, the hot value of this data block can be upgraded when each data block is accessed and upgrade the hot value of the dummy block will comprising this data block in the first middle layer according to the hot value of this data block; Also when each data block is accessed, the hot value of this data block can first be upgraded, by the time certain special time, such as statistic period T 1all end of term, then upgrade the hot value of each dummy block will in the first middle layer according to the hot value of L data block.
S105, according to the threshold value in described first middle layer, from described a 1determine at least one target first dummy block will in individual first dummy block will, the hot value of at least one target first dummy block will described is greater than or equal to the threshold value in described first middle layer.
S106, multiple target data blocks that at least one target first dummy block will described in determining comprises are sorted according to the size of hot value, and the Heat range of each target data block in described multiple target data block is upgraded according to ranking results, the number of described Heat range is greater than or equal to 2, and is less than or equal to the kind of the storer comprised in described storage system.
Particularly, step S105 and step S106 and step S102 and step S103 is similar, is not repeated herein.
After having upgraded the Heat range of target data block, Heat range after upgrading can be defined as needing the data block of upgrading higher than the data block of former Heat range.Subsequently when these need the data block of upgrading accessed, the updating operation to this accessed data block will be triggered.
Known, the hierarchical storage management method shown in Fig. 1, a statistic period T 1in, the number of times accessed according to each data block, upgrades the hot value of each data block; X gets 2 from N successively according to order from big to small, successively upgrades the hot value of the dummy block will comprised in xth middle layer; Integer y gets N from 2 successively according to order from small to large, successively from multiple y dummy block will that the target y-1 dummy block will of y-1 layer comprises, determines at least one target y dummy block will; When determining at least one target N dummy block will, multiple target data blocks that at least one target N dummy block will determined comprises are sorted according to the size of hot value, and upgrades the Heat range of each target data block in described multiple target data block according to ranking results.Adopt the method, only need select partial virtual block as destination virtual block from each middle layer, finally from the mass data block that whole storage system comprises, select the higher target data block of hot value, when needs manage (such as data block upgrading) to storage system, only need add up for target data block, greatly reduce and need data volume to be processed, thus memory cost when can reduce management storage systems and time overhead.
See Fig. 2, it is the schematic flow sheet of another embodiment of hierarchical storage management method of the present invention.Fig. 2 is to comprise first memory and second memory in storage system, and the access speed that the access speed of first memory is greater than second memory is that example is described.As shown in Figure 2, this hierarchical storage management method can comprise the following steps:
S201, a statistic period T 1in, the number of times accessed according to each data block in a described L data block, upgrades the hot value of a described L data block, and wherein, accessed number of times is more, then hot value is larger; According to the hot value of each data block in a described L data block, to the described a in described N middle layer nthe hot value of individual N dummy block will upgrades; For the xth middle layer that each value of x is corresponding, according to the described a in described xth middle layer xthe hot value of each xth dummy block will in individual xth dummy block will, to the described a in described xth-1 middle layer x-1the hot value of individual xth-1 dummy block will upgrades.
Alternatively, can when each data block be accessed, upgrade the hot value of this data block and from x=N to x=1, successively upgrade the hot value of the dummy block will comprising this data block in xth layer according to the hot value of this data block; Or, also when each data block is accessed, can first upgrade the hot value of this data block, by the time certain special time, such as statistic period T 1all end of term, then from x=N to x=1, successively upgrade the hot value of each dummy block will in xth layer according to the hot value of L data block.
Alternatively, as N=1, a statistic period T 1in, only need upgrade the hot value of a described L data block and a in the first middle layer 1the hot value of individual first dummy block will.Now, the hot value of this data block can be upgraded when each data block is accessed and upgrade the hot value of the dummy block will comprising this data block in the first middle layer according to the hot value of this data block; Also when each data block is accessed, the hot value of this data block can first be upgraded, by the time certain special time, such as statistic period T 1all end of term, then upgrade the hot value of each dummy block will in the first middle layer according to the hot value of L data block.
S202, according to the threshold value in the first middle layer, from described a 1determine at least one target first dummy block will in individual first dummy block will, the hot value of at least one target first dummy block will described is greater than or equal to the threshold value in described first middle layer; Y gets N and described y round numbers from 2 successively according to order from small to large, for the y middle layer that each value of described y is corresponding, according to the threshold value in described y middle layer, from multiple y dummy block will that described at least one target y-1 dummy block will comprises, determine at least one target y dummy block will, the hot value of described at least one target y dummy block will is greater than or equal to the threshold value in described y middle layer.
In the embodiment of the present invention, the threshold value in each middle layer is adaptive, and wherein the threshold value in the first middle layer is according to the first middle layer a 1the hot value mean value of the data block comprised in individual first dummy block will and hot value standard deviation calculate; Alternatively, the threshold value A in desirable first middle layer 11-t 1* σ 1, wherein μ 1for described a 1the hot value mean value of the data block that individual first dummy block will comprises, σ 1for described a 1the hot value standard deviation of the data block that individual first dummy block will comprises, t 1for σ 1coefficient, and, σ 1be not equal to zero, t 1∈ [0, μ 1/ σ 1).
For y each value from 2 to N, the threshold value in y middle layer for according to described at least one target y-1 dummy block will comprise that the hot value mean value of data block corresponding to multiple y dummy block will and hot value standard deviation calculate; Alternatively, the threshold value A in desirable y middle layer yy-t y* σ y, wherein μ ythe hot value mean value of the data block that the multiple y dummy block will comprised for described at least one target y-1 dummy block will are corresponding, σ ythe hot value standard deviation of the data block that the multiple y dummy block will comprised for described at least one target y-1 dummy block will are corresponding, t yfor σ ycoefficient, t ysuccessively decrease along with increasing progressively of y, and, σ ybe not equal to zero,
According to Chebyshev's law, the hot value X of the dummy block will in y middle layer ybe greater than the threshold value A in y middle layer yprobability P (X y> μ y-t y* σ y)>=1-1/t y 2, the ratio of the target y dummy block will namely selected in y middle layer is at least 1-1/t y 2.For the data block avoiding hot value higher fails to choose, the ratio in y-1 middle layer shared by target y-1 dummy block will should higher than the ratio in y middle layer shared by target y dummy block will.Therefore t is made ysuccessively decrease along with increasing progressively of y.
S203, multiple target data blocks that at least one target N dummy block will described in determining comprises are sorted according to the size of hot value, from and upgrade the Heat range of each target data block described multiple target data block according to ranking results, the number of described Heat range is greater than or equal to 2, and is less than or equal to the kind of the storer comprised in described storage system.
Alternatively, when the multiple target data blocks comprised at least one target N dummy block will determined sort according to the size of hot value, bucket sort algorithm can be adopted.
In the present embodiment, storage system comprises first memory and second memory, and the access speed of first memory is greater than the access speed of second memory, Heat range comprises the first estate corresponding with first memory and second grade corresponding with the second accumulation layer.The Heat range of the target data block of the first higher for hot value quantity can be updated to the first estate, the Heat range of remaining target data block is updated to the second grade, wherein the first quantity is not more than the quantity of the physical block that first memory comprises, and the quantity of remaining target data block is not more than the quantity of the physical block that second memory comprises.
S204, the former Heat range of each data block and the Heat range after upgrading in more described multiple target data block, and determine the data block needing upgrading, the data block of described needs upgrading refer to be arranged in described multiple target data block and after upgrading Heat range higher than the data block of former Heat range.
S205, when the described data block needing to upgrade is accessed, carries out upgrading processing by the described data block of upgrading that needs.
S206, at time interval T 2in, the data block of the needs degradation being positioned at described first memory is moved to described second memory, described T 2for carrying out degradation migration and described T 2length be fixing.
Particularly, in statistic period T 1after inside determining the data block needing upgrading, can continuously at multiple time interval T 2in data block is demoted.At the plurality of time interval T 2in, if accessed data block is in statistic period T 1inside determine the data block needing upgrading, then accessed data block is upgraded.
In a kind of feasible embodiment, when Nfree1≤first threshold, the data block being positioned at described first memory is sorted according to the size of hot value, the described data block of degradation that needs refers to the min (Nfree2 that the hot value selected from described ranking results is smaller, C) individual data block, wherein, described first threshold is that the number of the data block of being upgraded by the needs determined is determined, or described first threshold is by average per time interval T 2the number that interior needs move to the data block of described second memory from described first memory degradation is determined; Or the numerical value that the number that the size of described first threshold deducts by the number of all physical blocks comprised in described first memory the described multiple target data block determined obtains is determined;
Wherein, Nfree1 refers to the quantity of free physical block in described first memory; Nfree2 refers to the quantity of free physical block in described second memory; Described physical block is for storing described data block; C refers at described time interval T 2in, described first memory to transmit between described second memory and the quantity of the data block received by described second memory.
When Nfree1≤first threshold, think physical block negligible amounts idle in first memory, if second memory can also receive data block, should as far as possible by the data block degradation in first memory.When data block in first memory is moved to second memory, not only to consider that second memory can also hold how many data blocks, also to consider transmit how many data blocks according to the load of first memory and the load of second memory between first memory and second memory, therefore the data block quantity making needs demote is min (Nfree2, C), min (Nfree2, C) refers to the minimum value in Nfree2 and C.Alternatively, the data block quantity that needs also can be made to demote is less than min (Nfree2, C).
In the embodiment that another kind is feasible, when described first threshold < Nfree1≤Second Threshold, the described data block of degradation that needs refers to min (Nfree2, C, Δ Nfree1) the individual data block that the hot value selected from described ranking results is smaller;
Wherein, Δ Nfree1=Nfree1'-Nfree1, Nfree1' for upper once carry out degradation migration time, the quantity of the free physical block in described first memory, and the value of Δ Nfree1 be greater than 0 integer, described Second Threshold be basis at described T 2the mean speed of interior upgrade data block is determined, to ensure that the free physical block in described first memory can not by described T 2the data block of interior upgrading has taken, and described first threshold is less than described Second Threshold.
When described first threshold < Nfree1≤Second Threshold, think that the quantity of idle physical block is both few few only in first memory, when determining the data block quantity that will demote, except the data block quantity considering the data block quantity that can also hold of second memory and can transmit between first memory and second memory according to the load of first memory and the load of second memory, the quantity of the data block that should demote can also be decided in conjunction with the reduction of physical block idle in first memory.Δ Nfree1=Nfree1'-Nfree1, moves to the reduction of idle physical block in first memory between this degradation migration for carrying out demoting from the last time.If Δ Nfree1 > 0, the data block quantity that will demote can be made to be the minimum value that min (Nfree2, C, Δ Nfree1), min (Nfree2, C, Δ Nfree1) represent in Nfree2, C and Δ Nfree1.
In the embodiment that another is feasible, when Nfree1 > first threshold, the data block can not demoted in first memory.
See Fig. 3, it is the schematic flow sheet of another embodiment of hierarchical storage management method of the present invention.Fig. 3 is described to comprise K kind storer in storage system, wherein said K kind storer comprises the i-th storer, the i-th-1 storer and the i-th-2 storer, and the access speed of described i-th storer is greater than the access speed of described i-th-1 storer, the access speed of described i-th-1 storer is greater than the access speed of described i-th-2 storer, and i gets 3 and i round numbers from K successively according to order from big to small.As shown in Figure 3, this hierarchical storage management method can comprise the following steps:
S301, a statistic period T 1in, the number of times accessed according to each data block in a described L data block, upgrades the hot value of a described L data block, and wherein, accessed number of times is more, then hot value is larger; According to the hot value of each data block in a described L data block, to the described a in described N middle layer nthe hot value of individual N dummy block will upgrades; For the xth middle layer that each value of x is corresponding, according to the described a in described xth middle layer xthe hot value of each xth dummy block will in individual xth dummy block will, to the described a in described xth-1 middle layer x-1the hot value of individual xth-1 dummy block will upgrades.
S302, according to the threshold value in the first middle layer, from described a 1determine at least one target first dummy block will in individual first dummy block will, the hot value of at least one target first dummy block will described is greater than or equal to the threshold value in described first middle layer; Y gets N and described y round numbers from 2 successively according to order from small to large, for the y middle layer that each value of described y is corresponding, according to the threshold value in described y middle layer, from multiple y dummy block will that described at least one target y-1 dummy block will comprises, determine at least one target y dummy block will, the hot value of described at least one target y dummy block will is greater than or equal to the threshold value in described y middle layer.
In concrete enforcement, step S301 and the step S302 step S201 respectively with embodiment illustrated in fig. 2 is identical with step S202, is not repeated herein.
S303, multiple target data blocks that at least one target N dummy block will described in determining comprises are sorted according to the size of hot value, from and upgrade the Heat range of each target data block described multiple target data block according to ranking results, the number of described Heat range is greater than or equal to 2, and is less than or equal to the kind of the storer comprised in described storage system.
Alternatively, when the multiple target data blocks comprised at least one target N dummy block will determined sort according to the size of hot value, bucket sort algorithm can be adopted.
In the present embodiment, storage system comprises more than two kinds of storeies, this can be divided at least two ranks more than two kinds of storeies according to the speed of access speed, such as: solid state hard disc (Solid State Drive in storage system, can be comprised, and hard disk drive (Hard Disk Drive SSD), HDD) two kinds of storeies, HDD can comprise optical-fibre channel (Fibre Channel according to interface difference, FC) hard disk, Serial Attached SCSI (SAS) (Serial Attached SCSI, SAS) hard disk, Serial Advanced Technology Attachment (Serial Advanced Technology Attachment, SATA) multiple memorizers such as hard disk, wherein SSD can be first level, FC hard disk and SAS hard disk can be second levels, SATA hard disc can be third level.Now, the quantity of Heat range can be made to equal the number of levels of storer and make each Heat range correspond to a kind of rank of storer.When upgrading the Heat range of each target data block, can the hot value of the physical block quantity that comprises of the storer corresponding according to each Heat range and each target data block upgrade.Such as: the Heat range of the target data block of the 3rd higher for hot value quantity is updated to the first estate; The Heat range of the target data block of the 4th higher for hot value in other target data blocks quantity is updated to the second grade; The Heat range of remaining target data block is updated to the tertiary gradient, and wherein the 3rd quantity is less than or equal to the physical block quantity comprised in the storer of first level; 4th quantity is less than or equal to the physical block quantity comprised in the storer of second level; The quantity of remaining target data block is less than or equal to the physical block quantity comprised in the storer of third level.
S304, the former Heat range of each data block and the Heat range after upgrading in more described multiple target data block, and determine the data block needing upgrading, the data block of described needs upgrading refer to be arranged in described multiple target data block and after upgrading Heat range higher than the data block of former Heat range.
S305, when the described data block needing to upgrade is accessed, carries out upgrading processing by the described data block of upgrading that needs.
S306, at time interval T 2in, the data block of the needs degradation being positioned at described i-th storer is moved to described i-th-2 storer, the data block of the needs degradation being positioned at described i-th-1 storer is moved to described i-th-2 storer, and the data block of the needs degradation being positioned at described i-th storer is moved to described i-th-1 storer.
Particularly, in statistic period T 1after inside determining the data block needing upgrading, can continuously at multiple time interval T 2in data block is demoted.At the plurality of time interval T 2in, if accessed data block is in statistic period T 1inside determine the data block needing upgrading, then accessed data block is upgraded.
In concrete enforcement, step S306 can comprise:
The data block being positioned at described i-th storer is sorted according to the size of hot value, the data block being positioned at described i-th-1 storer is also sorted according to the size of hot value, and common choice goes out the smaller Nfree of hot value (i-2) individual data block the ranking results of data block that comprises of the ranking results of the data block comprised from described i-th storer and described i-th-1 storer, described Nfree (i-2) individual data block degradation is moved to described i-th-2 storer, the quantity of the free physical block that described Nfree (i-2) comprises for described i-th-2 storer,
The data block being positioned at described i-th storer is sorted according to the size of hot value, and select the smaller Nfree of hot value (i-1) individual data block the ranking results of the data block comprised from described i-th storer, described Nfree (i-1) individual data block degradation is moved to described i-th-1 storer, the quantity of the free physical block that described Nfree (i-1) comprises for described i-th-1 storer.
In concrete enforcement, the data block quantity that will be downgraded to the i-th-2 storer selected from the i-th storer and the i-th-1 storer can be less than Nfree (i-2); The data block quantity that will be downgraded to the i-th-1 storer selected from the i-th storer also can be less than Nfree (i-1).
Hierarchical storage management method shown in Fig. 2 or Fig. 3, a statistic period T 1in, the number of times accessed according to each data block, upgrades the hot value of each data block; X gets 2 from N successively according to order from big to small, successively upgrades the hot value of the dummy block will comprised in xth middle layer; Integer y gets N from 2 successively according to order from small to large, successively from multiple y dummy block will that the target y-1 dummy block will of y-1 layer comprises, determines at least one target y dummy block will; When determining at least one target N dummy block will, multiple target data blocks that at least one target N dummy block will determined comprises are sorted according to the size of hot value, and upgrades the Heat range of each target data block in described multiple target data block according to ranking results.Adopt the method, only need select partial virtual block as destination virtual block from each middle layer, finally from the mass data block that whole storage system comprises, select the higher target data block of hot value, when needs manage (such as data block upgrading) to storage system, only need add up for target data block, greatly reduce and need data volume to be processed, thus memory cost when can reduce management storage systems and time overhead.
See Fig. 4, it is the structural representation of an embodiment of hierarchical storage management device of the present invention.As shown in Figure 4, this hierarchical storage management device can comprise hot value updating block 401, determining unit 402 and the first sequencing unit 403, wherein:
When N >=2,
Hot value updating block 401, for a statistic period T 1in, the number of times accessed according to each data block in a described L data block, upgrades the hot value of a described L data block, and wherein, accessed number of times is more, then hot value is larger; According to the hot value of each data block in a described L data block, to the described a in described N middle layer nthe hot value of individual N dummy block will upgrades; For the xth middle layer that each value of x is corresponding, according to the described a in described xth middle layer xthe hot value of each xth dummy block will in individual xth dummy block will, to the described a in described xth-1 middle layer x-1the hot value of individual xth-1 dummy block will upgrades.
Particularly, hot value can calculate according to the accessed frequency of the accessed within a certain period of time number of times of data block, data block and/or data block accessed time interval.Wherein, above-mentioned certain hour can comprise statistic period T 1.
Alternatively, can when each data block be accessed, upgrade the hot value of this data block and from x=N to x=1, successively upgrade the hot value of the dummy block will comprising this data block in xth layer according to the hot value of this data block; Or, also when each data block is accessed, can first upgrade the hot value of this data block, by the time certain special time, such as statistic period T 1all end of term, then from x=N to x=1, successively upgrade the hot value of each dummy block will in xth layer according to the hot value of L data block.
Determining unit 402, for the threshold value according to the first middle layer, from described a 1determine at least one target first dummy block will in individual first dummy block will, the hot value of at least one target first dummy block will described is greater than or equal to the threshold value in described first middle layer; Y gets N and described y round numbers from 2 successively according to order from small to large, for the y middle layer that each value of described y is corresponding, according to the threshold value in described y middle layer, from multiple y dummy block will that described at least one target y-1 dummy block will comprises, determine at least one target y dummy block will, the hot value of described at least one target y dummy block will is greater than or equal to the threshold value in described y middle layer.
In the embodiment of the present invention, the threshold value in each middle layer is adaptive, and wherein the threshold value in the first middle layer is according to the first middle layer a 1the hot value mean value of the data block comprised in individual first dummy block will and hot value standard deviation calculate; Alternatively, the threshold value A in desirable first middle layer 11-t 1* σ 1, wherein μ 1for described a 1the hot value mean value of the data block that individual first dummy block will comprises, σ 1for described a 1the hot value standard deviation of the data block that individual first dummy block will comprises, t 1for σ 1coefficient, and, σ 1be not equal to zero, t 1∈ [0, μ 1/ σ 1).
For y each value from 2 to N, the threshold value in y middle layer for according to described at least one target y-1 dummy block will comprise that the hot value mean value of data block corresponding to multiple y dummy block will and hot value standard deviation calculate; Alternatively, the threshold value A in desirable y middle layer yy-t y* σ y, wherein μ ythe hot value mean value of the data block that the multiple y dummy block will comprised for described at least one target y-1 dummy block will are corresponding, σ ythe hot value standard deviation of the data block that the multiple y dummy block will comprised for described at least one target y-1 dummy block will are corresponding, t yfor σ ycoefficient, t ysuccessively decrease along with increasing progressively of y, and, σ ybe not equal to zero,
According to Chebyshev's law, the hot value X of the dummy block will in y middle layer ybe greater than the threshold value A in y middle layer yprobability P (X y> μ y-t y* σ y)>=1-1/t y 2, the ratio of the target y dummy block will namely selected in y middle layer is at least 1-1/t y 2.For the data block avoiding hot value higher fails to choose, the ratio in y-1 middle layer shared by target y-1 dummy block will should higher than the ratio in y middle layer shared by target y dummy block will.Therefore t is made ysuccessively decrease along with increasing progressively of y.
First sequencing unit 403, multiple target data blocks for comprising at least one target N dummy block will described in determining sort according to the size of hot value, from and upgrade the Heat range of each target data block described multiple target data block according to ranking results, the number of described Heat range is greater than or equal to 2, and is less than or equal to the kind of the storer comprised in described storage system.
Alternatively, when the multiple target data blocks comprised at least one target N dummy block will determined sort according to the size of hot value, bucket sort algorithm can be adopted.
Alternatively, if storage system comprises first memory and second memory, and the access speed of first memory is greater than the access speed of second memory, and Heat range comprises the first estate corresponding with first memory and second grade corresponding with the second accumulation layer.So the Heat range of the target data block of the first higher for hot value quantity can be updated to the first estate, the Heat range of remaining target data block is updated to the second grade, wherein the first quantity is not more than the quantity of the physical block that first memory comprises, and the quantity of remaining target data block is not more than the quantity of the physical block that second memory comprises.
Alternatively, if storage system comprises more than two kinds of storeies, this can be divided at least two ranks more than two kinds of storeies according to the speed of access speed, such as: solid state hard disc (Solid State Drive in storage system, can be comprised, and hard disk drive (Hard Disk Drive SSD), HDD) two kinds of storeies, HDD can comprise optical-fibre channel (Fibre Channel according to interface difference, FC) hard disk, Serial Attached SCSI (SAS) (Serial Attached SCSI, SAS) hard disk, Serial Advanced Technology Attachment (Serial Advanced Technology Attachment, SATA) multiple memorizers such as hard disk, wherein SSD can be first level, FC hard disk and SAS hard disk can be second levels, SATA hard disc can be third level.Now, the quantity of Heat range can be made to equal the number of levels of storer and make each Heat range correspond to a kind of rank of storer.When upgrading the Heat range of each target data block, can the hot value of the physical block quantity that comprises of the storer corresponding according to each Heat range and each target data block upgrade.Such as: the Heat range of the target data block of the 3rd higher for hot value quantity is updated to the first estate; The Heat range of the target data block of the 4th higher for hot value in other target data blocks quantity is updated to the second grade; The Heat range of remaining target data block is updated to the tertiary gradient, and wherein the 3rd quantity is less than or equal to the physical block quantity comprised in the storer of first level; 4th quantity is less than or equal to the physical block quantity comprised in the storer of second level; The quantity of remaining target data block is less than or equal to the physical block quantity comprised in the storer of third level.
As N=1,
Described hot value updating block 401, also at described T 1in, the number of times accessed according to each data block in a described L data block, upgrades the hot value of a described L data block, and wherein, accessed number of times is more, then hot value is larger; According to the hot value of each data block in a described L data block, to the described a in described first middle layer 1the hot value of individual first dummy block will upgrades;
Described determining unit 402, also for the threshold value according to described first middle layer, from described a 1determine at least one target first dummy block will in individual first dummy block will, the hot value of at least one target first dummy block will described is greater than or equal to the threshold value in described first middle layer;
Described first sequencing unit 403, multiple target data blocks also for comprising at least one target first dummy block will described in determining sort according to the size of hot value, from and upgrade the Heat range of each target data block described multiple target data block according to ranking results, the number of described Heat range is greater than or equal to 2, and is less than or equal to the kind of the storer comprised in described storage system.
After having upgraded the Heat range of target data block, Heat range after upgrading can be defined as needing the data block of upgrading higher than the data block of former Heat range.Subsequently when these need the data block of upgrading accessed, the updating operation to this accessed data block will be triggered.
Known, the hierarchical storage management device shown in Fig. 4, a statistic period T 1in, the number of times accessed according to each data block, upgrades the hot value of each data block; X gets 2 from N successively according to order from big to small, successively upgrades the hot value of the dummy block will comprised in xth middle layer; Integer y gets N from 2 successively according to order from small to large, successively from multiple y dummy block will that the target y-1 dummy block will of y-1 layer comprises, determines at least one target y dummy block will; When determining at least one target N dummy block will, multiple target data blocks that at least one target N dummy block will determined comprises are sorted according to the size of hot value, and upgrades the Heat range of each target data block in described multiple target data block according to ranking results.Adopt the method, only need select partial virtual block as destination virtual block from each middle layer, finally from the mass data block that whole storage system comprises, select the higher target data block of hot value, when needs manage (such as data block upgrading) to storage system, only need add up for target data block, greatly reduce and need data volume to be processed, thus memory cost when can reduce management storage systems and time overhead.
See Fig. 5, it is the structural representation of another embodiment of hierarchical storage management device of the present invention.As shown in Figure 5, this hierarchical storage management device can comprise: hot value updating block 401, determining unit 402 and the first sequencing unit 403, also can comprise at least one in comparing unit 404, upgrade unit 405, first degraded cell 406 and the second sequencing unit 407, wherein:
Concrete structure or the function of hot value updating block 401, determining unit 402 and the first sequencing unit 403 can consult associated description embodiment illustrated in fig. 4, are not repeated herein.
In the present embodiment, storage system comprises first memory and second memory, and the access speed of first memory is greater than the access speed of second memory.
Comparing unit 404, for the former Heat range of each data block in more described multiple target data block and the Heat range after upgrading, and determine the data block needing upgrading, the data block of described needs upgrading refer to be arranged in described multiple target data block and after upgrading Heat range higher than the data block of former Heat range.
Upgrade unit 405, for when the described data block needing to upgrade is accessed, carries out upgrading processing by the described data block of upgrading that needs.
First degraded cell 406, at time interval T 2in, the data block of the needs degradation being positioned at described first memory is moved to described second memory, described T 2for carrying out degradation migration and described T 2length be fixing.
Particularly, in statistic period T 1after inside determining the data block needing upgrading, can continuously at multiple time interval T 2in data block is demoted.At the plurality of time interval T 2in, if accessed data block is in statistic period T 1inside determine the data block needing upgrading, then accessed data block is upgraded.
Second sequencing unit 407, for sorting according to the size of hot value to the data block being positioned at described first memory.
When Nfree1≤first threshold, the described data block of degradation that needs refers to the min (Nfree2 that the hot value selected from described ranking results is smaller, C) individual data block, wherein, described first threshold is that the number of the data block of being upgraded by the needs determined is determined, or described first threshold is by average per time interval T 2the number that interior needs move to the data block of described second memory from described first memory degradation is determined; Or the numerical value that the number that the size of described first threshold deducts by the number of all physical blocks comprised in described first memory the described multiple target data block determined obtains is determined.
Wherein, Nfree1 refers to the quantity of free physical block in described first memory; Nfree2 refers to the quantity of free physical block in described second memory; Described physical block is for storing described data block; C refers at described time interval T 2in, described first memory to transmit between described second memory and the quantity of the data block received by described second memory.
When Nfree1≤first threshold, think physical block negligible amounts idle in first memory, if second memory can also receive data block, should as far as possible by the data block degradation in first memory.When data block in first memory is moved to second memory, not only to consider that second memory can also hold how many data blocks, also to consider transmit how many data blocks according to the load of first memory and the load of second memory between first memory and second memory, therefore the data block quantity making needs demote is min (Nfree2, C), min (Nfree2, C) refers to the minimum value in Nfree2 and C.Alternatively, the data block quantity that needs also can be made to demote is less than min (Nfree2, C).
When described first threshold < Nfree1≤Second Threshold, the data block of described needs degradation refers to min (Nfree2, C, Δ Nfree1) the individual data block that the hot value selected from described ranking results is smaller.
Wherein, Δ Nfree1=Nfree1'-Nfree1, Nfree1' for upper once carry out degradation migration time, the quantity of the free physical block in described first memory, and the value of Δ Nfree1 be greater than 0 integer, described Second Threshold be basis at described T 2the mean speed of interior upgrade data block is determined, to ensure that the free physical block in described first memory can not by described T 2the data block of interior upgrading has taken, and described first threshold is less than described Second Threshold.
When first threshold < Nfree1≤Second Threshold, think that the quantity of idle physical block is both few few only in first memory, when determining the data block quantity that will demote, except the data block quantity considering the data block quantity that can also hold of second memory and can transmit between first memory and second memory according to the load of first memory and the load of second memory, the quantity of the data block that should demote can also be decided in conjunction with the reduction of physical block idle in first memory.Δ Nfree1=Nfree1'-Nfree1, moves to the reduction of idle physical block in first memory between this degradation migration for carrying out demoting from the last time.If Δ Nfree1 > 0, the data block quantity that will demote can be made to be the minimum value that min (Nfree2, C, Δ Nfree1), min (Nfree2, C, Δ Nfree1) represent in Nfree2, C and Δ Nfree1.
When Nfree1 > first threshold, the data block can not demoted in first memory.
Known, the hierarchical storage management device shown in Fig. 5, a statistic period T 1in, the number of times accessed according to each data block, upgrades the hot value of each data block; X gets 2 from N successively according to order from big to small, successively upgrades the hot value of the dummy block will comprised in xth middle layer; Integer y gets N from 2 successively according to order from small to large, successively from multiple y dummy block will that the target y-1 dummy block will of y-1 layer comprises, determines at least one target y dummy block will; When determining at least one target N dummy block will, multiple target data blocks that at least one target N dummy block will determined comprises are sorted according to the size of hot value, and upgrades the Heat range of each target data block in described multiple target data block according to ranking results.Adopt the method, only need select partial virtual block as destination virtual block from each middle layer, finally from the mass data block that whole storage system comprises, select the higher target data block of hot value, when needs manage (such as data block upgrading) to storage system, only need add up for target data block, greatly reduce and need data volume to be processed, thus memory cost when can reduce management storage systems and time overhead.
See Fig. 6, it is the structural representation of another embodiment of hierarchical storage management device of the present invention.As shown in Figure 6, this hierarchical storage management device can comprise: hot value updating block 401, determining unit 402, first sequencing unit 403, comparing unit 404, upgrade unit 405 and the second degraded cell 408, wherein:
Concrete structure or the function of hot value updating block 401, determining unit 402 and the first sequencing unit 403 can consult associated description embodiment illustrated in fig. 4, are not repeated herein.
In the present embodiment, K kind storer is comprised in described storage system, wherein K >=3 and K is integer, described K kind storer comprises the i-th storer, the i-th-1 storer and the i-th-2 storer, and the access speed of described i-th storer is greater than the access speed of described i-th-1 storer, when the access speed of described i-th-1 storer is greater than the access speed of described i-th-2 storer, wherein, i gets 3 and i round numbers from K successively according to order from big to small.
Comparing unit 404, for the former Heat range of each data block in more described multiple target data block and the Heat range after upgrading, and determine the data block needing upgrading, the data block of described needs upgrading refer to be arranged in described multiple target data block and after upgrading Heat range higher than the data block of former Heat range.
Upgrade unit 405, for when the described data block needing to upgrade is accessed, carries out upgrading processing by the described data block of upgrading that needs.
Second degraded cell 408, at described T 2in, the data block of the needs degradation being positioned at described i-th storer is moved to described i-th-2 storer, the data block of the needs degradation being positioned at described i-th-1 storer is moved to described i-th-2 storer, and the data block of the needs degradation being positioned at described i-th storer is moved to described i-th-1 storer.
Particularly, in statistic period T 1after inside determining the data block needing upgrading, the second degraded cell 408 can continuously at multiple time interval T 2in data block is demoted.At the plurality of time interval T 2in, if accessed data block is in statistic period T 1inside determine the data block needing upgrading, then accessed data block is upgraded.
Alternatively, as shown in Figure 7, the second degraded cell 408 can comprise:
3rd sequencing unit 4081, for the data block being positioned at described i-th storer being sorted according to the size of hot value, also sorts the data block being positioned at described i-th-1 storer according to the size of hot value.
First selection unit 4082, in the ranking results of the data block comprised for the ranking results of data block that comprises from described i-th storer and described i-th-1 storer, common choice goes out the smaller Nfree of hot value (i-2) individual data block, described Nfree (i-2) individual data block degradation is moved to described i-th-2 storer, the quantity of the free physical block that described Nfree (i-2) comprises for described i-th-2 storer.
4th sequencing unit 4083, for sorting the data block being positioned at described i-th storer according to the size of hot value.
Second selection unit 4084, the smaller Nfree of hot value (i-1) individual data block is selected in the ranking results of data block that comprises from described i-th storer, described Nfree (i-1) individual data block degradation is moved to described i-th-1 storer, the quantity of the free physical block that described Nfree (i-1) comprises for described i-th-1 storer.
In concrete enforcement, the data block quantity that will be downgraded to the i-th-2 storer selected from the i-th storer and the i-th-1 storer can be less than Nfree (i-2); The data block quantity that will be downgraded to the i-th-1 storer selected from the i-th storer also can be less than Nfree (i-1).
Hierarchical storage management device shown in Fig. 6-7, a statistic period T 1in, the number of times accessed according to each data block, upgrades the hot value of each data block; X gets 2 from N successively according to order from big to small, successively upgrades the hot value of the dummy block will comprised in xth middle layer; Integer y gets N from 2 successively according to order from small to large, successively from multiple y dummy block will that the target y-1 dummy block will of y-1 layer comprises, determines at least one target y dummy block will; When determining at least one target N dummy block will, multiple target data blocks that at least one target N dummy block will determined comprises are sorted according to the size of hot value, and upgrades the Heat range of each target data block in described multiple target data block according to ranking results.Adopt the method, only need select partial virtual block as destination virtual block from each middle layer, finally from the mass data block that whole storage system comprises, select the higher target data block of hot value, when needs manage (such as data block upgrading) to storage system, only need add up for target data block, greatly reduce and need data volume to be processed, thus memory cost when can reduce management storage systems and time overhead.
As shown in Figure 8, the embodiment of the present invention additionally provides a kind of hierarchical storage management device, and this hierarchical storage management device can comprise: processor 801, storer 802 and interface 803, and wherein processor 801, storer 802 are connected by bus 804 with interface 803.Particularly, interface 803 is for communicating with other equipment (as memory device); Storer is for storing instruction 8021; Processor 801 is for performing instruction 8021 to realize the method shown in Fig. 1-Fig. 3.
The embodiment of the present invention is also corresponding provides a kind of storage system, and as shown in Figure 9, this storage system can comprise the hierarchical storage management device shown in Fig. 4-7 and R kind storer, R be greater than or equal to 2 integer.Wherein store at least L data block in this R kind storer, this hierarchical storage management device is used for determining multiple target data block from this at least L data block, according to the hot value of each target data block in described multiple target data block, described multiple target data block is divided into R Heat range.
Particularly, the structure of hierarchical storage management device or function see the description of Fig. 4-7 illustrated embodiment, can be not repeated herein.
Embodiment according to Fig. 4-7, this storage system is in a statistic period T 1, and the number of times accessed according to each data block, upgrades the hot value of each data block; X gets 2 from N successively according to order from big to small, successively upgrades the hot value of the dummy block will comprised in xth middle layer; Integer y gets N from 2 successively according to order from small to large, successively from multiple y dummy block will that the target y-1 dummy block will of y-1 layer comprises, determines at least one target y dummy block will; When determining at least one target N dummy block will, multiple target data blocks that at least one target N dummy block will determined comprises are sorted according to the size of hot value, and upgrades the Heat range of each target data block in described multiple target data block according to ranking results.Adopt the method, only need select partial virtual block as destination virtual block from each middle layer, finally from the mass data block that whole storage system comprises, select the higher target data block of hot value, when needs manage (such as data block upgrading) to storage system, only need add up for target data block, greatly reduce and need data volume to be processed, thus memory cost when can reduce management storage systems and time overhead.
Step in embodiment of the present invention method can be carried out order according to actual needs and be adjusted, merges and delete.
Module in the embodiment of the present invention or unit can carry out merging, divide and deleting according to actual needs.
The module of the embodiment of the present invention or unit, with universal integrated circuit (as central processor CPU), or can realize with special IC (ASIC).
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in a computer read/write memory medium, this program, when performing, can comprise the flow process of the embodiment as above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
Above-described embodiment, does not form the restriction to this technical scheme protection domain.The amendment done within any spirit at above-mentioned embodiment and principle, equivalently to replace and improvement etc., within the protection domain that all should be included in this technical scheme.

Claims (21)

1. a hierarchical storage management method, is characterized in that, is applied to storage system,
Described storage system comprises at least L data block and described storage system comprises N number of middle layer, and N is integer, and wherein, L>=3 and L is integer, a described L data block is assigned to a being positioned at N middle layer nin individual N dummy block will, described a nin individual N dummy block will, each N dummy block will comprises at least one data block, wherein, and 2≤a n< L and a nfor integer; X gets 2 from N successively according to order from big to small, and described x round numbers, a in the xth middle layer that each value for described x is corresponding xindividual xth dummy block will, is assigned to a being positioned at xth-1 middle layer x-1in individual xth-1 dummy block will, described a x-1in individual xth-1 dummy block will, each xth-1 dummy block will comprises at least one xth dummy block will, a x-1>=2 and a x-1for integer, a x> a x-1and a xfor integer;
Described method comprises:
When N >=2,
A statistic period T 1in, the number of times accessed according to each data block in a described L data block, upgrades the hot value of a described L data block, and wherein, accessed number of times is more, then hot value is larger; According to the hot value of each data block in a described L data block, to the described a in described N middle layer nthe hot value of individual N dummy block will upgrades; For the xth middle layer that each value of x is corresponding, according to the described a in described xth middle layer xthe hot value of each xth dummy block will in individual xth dummy block will, to the described a in described xth-1 middle layer x-1the hot value of individual xth-1 dummy block will upgrades;
According to the threshold value in the first middle layer, from described a 1determine at least one target first dummy block will in individual first dummy block will, the hot value of at least one target first dummy block will described is greater than or equal to the threshold value in described first middle layer; Y gets N and described y round numbers from 2 successively according to order from small to large, for the y middle layer that each value of described y is corresponding, according to the threshold value in described y middle layer, from multiple y dummy block will that described at least one target y-1 dummy block will comprises, determine at least one target y dummy block will, the hot value of described at least one target y dummy block will is greater than or equal to the threshold value in described y middle layer;
Multiple target data blocks that at least one target N dummy block will described in determining comprises are sorted according to the size of hot value, and the Heat range of each target data block in described multiple target data block is upgraded according to ranking results, the number of described Heat range is greater than or equal to 2, and is less than or equal to the kind of the storer comprised in described storage system;
As N=1,
At described T 1in, the number of times accessed according to each data block in a described L data block, upgrades the hot value of a described L data block, and wherein, accessed number of times is more, then hot value is larger; According to the hot value of each data block in a described L data block, to the described a in described first middle layer 1the hot value of individual first dummy block will upgrades;
According to the threshold value in described first middle layer, from described a 1determine at least one target first dummy block will in individual first dummy block will, the hot value of at least one target first dummy block will described is greater than or equal to the threshold value in described first middle layer;
Multiple target data blocks that at least one target first dummy block will described in determining comprises are sorted according to the size of hot value, and the Heat range of each target data block in described multiple target data block is upgraded according to ranking results, the number of described Heat range is greater than or equal to 2, and being less than or equal to the kind of the storer comprised in described storage system, described storage system comprises at least two kinds of storeies.
2. method according to claim 1, is characterized in that, also comprises:
The former Heat range of each data block and the Heat range after upgrading in more described multiple target data block, and determine the data block needing upgrading, the data block of described needs upgrading refer to be arranged in described multiple target data block and after upgrading Heat range higher than the data block of former Heat range;
When the described data block needing to upgrade is accessed, the described data block of upgrading that needs is carried out upgrading processing.
3. method according to claim 1 and 2, is characterized in that:
The threshold value in described first middle layer is according to described a 1the hot value mean value of the data block that individual first dummy block will comprises and hot value standard deviation calculate.
4. method according to claim 3, is characterized in that:
The threshold value A in described first middle layer 11-t 1* σ 1, μ 1for described a 1the hot value mean value of the data block that individual first dummy block will comprises, σ 1for described a 1the hot value standard deviation of the data block that individual first dummy block will comprises, t 1for σ 1coefficient, wherein, σ 1be not equal to zero, t 1∈ [0, μ 1/ σ 1).
5. the method according to any one of Claims 1-4, is characterized in that:
The threshold value in described y middle layer is that the hot value mean value of data block corresponding to multiple y dummy block will of comprising according to described at least one target y-1 dummy block will and hot value standard deviation calculate.
6. method according to claim 5, is characterized in that:
The threshold value A in described y middle layer yy-t y* σ y, μ ythe hot value mean value of the data block that the multiple y dummy block will comprised for described at least one target y-1 dummy block will are corresponding, σ ythe hot value standard deviation of the data block that the multiple y dummy block will comprised for described at least one target y-1 dummy block will are corresponding, t yfor σ ycoefficient, t ysuccessively decrease along with increasing progressively of y, wherein, σ ybe not equal to zero,
7. the method according to any one of claim 1 to 6, is characterized in that:
In described storage system, comprise two kinds of storeies, described two kinds of storeies comprise first memory and second memory, and the access speed of described first memory is greater than the access speed of described second memory,
Described method also comprises:
At time interval T 2in, the data block of the needs degradation being positioned at described first memory is moved to described second memory, described T 2for carrying out degradation migration and described T 2length be fixing;
When Nfree1≤first threshold, the data block being positioned at described first memory is sorted according to the size of hot value, the described data block of degradation that needs refers to the min (Nfree2 that the hot value selected from described ranking results is smaller, C) individual data block, wherein, described first threshold is that the number of the data block of being upgraded by the needs determined is determined, or described first threshold is by average per time interval T 2the number that interior needs move to the data block of described second memory from described first memory degradation is determined; Or the numerical value that the number that the size of described first threshold deducts by the number of all physical blocks comprised in described first memory the described multiple target data block determined obtains is determined;
Wherein, Nfree1 refers to the quantity of free physical block in described first memory; Nfree2 refers to the quantity of free physical block in described second memory; Described physical block is for storing described data block; C refers at described time interval T 2in, described first memory to transmit between described second memory and the quantity of the data block received by described second memory.
8. method according to claim 7, is characterized in that:
When described first threshold < Nfree1≤Second Threshold, the data block of described needs degradation refers to min (Nfree2, C, Δ Nfree1) the individual data block that the hot value selected from described ranking results is smaller;
Wherein, Δ Nfree1=Nfree1'-Nfree1, Nfree1' for upper once carry out degradation migration time, the quantity of the free physical block in described first memory, and the value of Δ Nfree1 be greater than 0 integer, described Second Threshold be basis at described T 2the mean speed of interior upgrade data block is determined, to ensure that the free physical block in described first memory can not by described T 2the data block of interior upgrading has taken, and described first threshold is less than described Second Threshold.
9. the method according to any one of claim 1 to 6, is characterized in that:
K kind storer is comprised in described storage system, wherein K >=3 and K is integer, described K kind storer comprises the i-th storer, the i-th-1 storer and the i-th-2 storer, and the access speed of described i-th storer is greater than the access speed of described i-th-1 storer, the access speed of described i-th-1 storer is greater than the access speed of described i-th-2 storer, wherein, i gets 3 and i round numbers from K successively according to order from big to small;
Described method also comprises:
At described T 2in, the data block of the needs degradation being positioned at described i-th storer is moved to described i-th-2 storer, the data block of the needs degradation being positioned at described i-th-1 storer is moved to described i-th-2 storer, and the data block of the needs degradation being positioned at described i-th storer is moved to described i-th-1 storer.
10. method according to claim 9, is characterized in that,
The described data block by the needs degradation being positioned at described i-th storer moves to described i-th-2 storer, the data block of the needs degradation being positioned at described i-th-1 storer is moved to described i-th-2 storer, and the data block of the needs degradation being positioned at described i-th storer is moved to described i-th-1 storer, comprising:
The data block being positioned at described i-th storer is sorted according to the size of hot value, the data block being positioned at described i-th-1 storer is also sorted according to the size of hot value, and common choice goes out the smaller Nfree of hot value (i-2) individual data block the ranking results of data block that comprises of the ranking results of the data block comprised from described i-th storer and described i-th-1 storer, described Nfree (i-2) individual data block degradation is moved to described i-th-2 storer, the quantity of the free physical block that described Nfree (i-2) comprises for described i-th-2 storer,
The data block being positioned at described i-th storer is sorted according to the size of hot value, and select the smaller Nfree of hot value (i-1) individual data block the ranking results of the data block comprised from described i-th storer, described Nfree (i-1) individual data block degradation is moved to described i-th-1 storer, the quantity of the free physical block that described Nfree (i-1) comprises for described i-th-1 storer.
11. 1 kinds of hierarchical storage management devices, is characterized in that, be applied to storage system,
Described storage system comprises at least L data block and described storage system comprises N number of middle layer, and N is integer, and wherein, L>=3 and L is integer, a described L data block is assigned to a being positioned at N middle layer nin individual N dummy block will, described a nin individual N dummy block will, each N dummy block will comprises at least one data block, wherein, and 2≤a n< L and a nfor integer; X gets 2 from N successively according to order from big to small, and described x round numbers, a in the xth middle layer that each value for described x is corresponding xindividual xth dummy block will, is assigned to a being positioned at xth-1 middle layer x-1in individual xth-1 dummy block will, described a x-1in individual xth-1 dummy block will, each xth-1 dummy block will comprises at least one xth dummy block will, a x-1>=2 and a x-1for integer, a x> a x-1and a xfor integer;
Described device comprises:
When N >=2,
Hot value updating block, for a statistic period T 1in, the number of times accessed according to each data block in a described L data block, upgrades the hot value of a described L data block, and wherein, accessed number of times is more, then hot value is larger; According to the hot value of each data block in a described L data block, to the described a in described N middle layer nthe hot value of individual N dummy block will upgrades; For the xth middle layer that each value of x is corresponding, according to the described a in described xth middle layer xthe hot value of each xth dummy block will in individual xth dummy block will, to the described a in described xth-1 middle layer x-1the hot value of individual xth-1 dummy block will upgrades;
Determining unit, for the threshold value according to the first middle layer, from described a 1determine at least one target first dummy block will in individual first dummy block will, the hot value of at least one target first dummy block will described is greater than or equal to the threshold value in described first middle layer; Y gets N and described y round numbers from 2 successively according to order from small to large, for the y middle layer that each value of described y is corresponding, according to the threshold value in described y middle layer, from multiple y dummy block will that described at least one target y-1 dummy block will comprises, determine at least one target y dummy block will, the hot value of described at least one target y dummy block will is greater than or equal to the threshold value in described y middle layer;
First sequencing unit, multiple target data blocks for comprising at least one target N dummy block will described in determining sort according to the size of hot value, from and upgrade the Heat range of each target data block described multiple target data block according to ranking results, the number of described Heat range is greater than or equal to 2, and is less than or equal to the kind of the storer comprised in described storage system;
As N=1,
Described hot value updating block, also at described T 1in, the number of times accessed according to each data block in a described L data block, upgrades the hot value of a described L data block, and wherein, accessed number of times is more, then hot value is larger; According to the hot value of each data block in a described L data block, to the described a in described first middle layer 1the hot value of individual first dummy block will upgrades;
Described determining unit, also for the threshold value according to described first middle layer, from described a 1determine at least one target first dummy block will in individual first dummy block will, the hot value of at least one target first dummy block will described is greater than or equal to the threshold value in described first middle layer;
Described first sequencing unit, multiple target data blocks also for comprising at least one target first dummy block will described in determining sort according to the size of hot value, from and upgrade the Heat range of each target data block described multiple target data block according to ranking results, the number of described Heat range is greater than or equal to 2, and being less than or equal to the kind of the storer comprised in described storage system, described storage system comprises at least two kinds of storeies.
12. devices according to claim 11, is characterized in that, also comprise:
Comparing unit, for the former Heat range of each data block in more described multiple target data block and the Heat range after upgrading, and determine the data block needing upgrading, the data block of described needs upgrading refer to be arranged in described multiple target data block and after upgrading Heat range higher than the data block of former Heat range;
Upgrade unit, for when the described data block needing to upgrade is accessed, carries out upgrading processing by the described data block of upgrading that needs.
13. devices according to claim 11 or 12, is characterized in that:
The threshold value in described first middle layer is according to described a 1the hot value mean value of the data block that individual first dummy block will comprises and hot value standard deviation calculate.
14. devices according to claim 13, is characterized in that:
The threshold value A in described first middle layer 11-t 1* σ 1, μ 1for described a 1the hot value mean value of the data block that individual first dummy block will comprises, σ 1for described a 1the hot value standard deviation of the data block that individual first dummy block will comprises, t 1for σ 1coefficient, wherein, σ 1be not equal to zero, t 1∈ [0, μ 1/ σ 1).
15., according to claim 11 to the device described in 14 any one, is characterized in that:
The threshold value in described y middle layer is that the hot value mean value of data block corresponding to multiple y dummy block will of comprising according to described at least one target y-1 dummy block will and hot value standard deviation calculate.
16. devices according to claim 15, is characterized in that:
The threshold value A in described y middle layer yy-t y* σ y, μ ythe hot value mean value of the data block that the multiple y dummy block will comprised for described at least one target y-1 dummy block will are corresponding, σ ythe hot value standard deviation of the data block that the multiple y dummy block will comprised for described at least one target y-1 dummy block will are corresponding, t yfor σ ycoefficient, t ysuccessively decrease along with increasing progressively of y, wherein, σ ybe not equal to zero,
17., according to claim 11 to the device described in 16 any one, is characterized in that:
In described storage system, comprise two kinds of storeies, described two kinds of storeies comprise first memory and second memory, and the access speed of described first memory is greater than the access speed of described second memory,
Described device also comprises:
First degraded cell, at time interval T 2in, the data block of the needs degradation being positioned at described first memory is moved to described second memory, described T 2for carrying out degradation migration and described T 2length be fixing;
Second sequencing unit, for when Nfree1≤first threshold, the data block being positioned at described first memory is sorted according to the size of hot value, the described data block of degradation that needs refers to the min (Nfree2 that the hot value selected from described ranking results is smaller, C) individual data block, wherein, described first threshold is that the number of the data block of being upgraded by the needs determined is determined, or described first threshold is by average per time interval T 2the number that interior needs move to the data block of described second memory from described first memory degradation is determined; Or the numerical value that the number that the size of described first threshold deducts by the number of all physical blocks comprised in described first memory the described multiple target data block determined obtains is determined;
Wherein, Nfree1 refers to the quantity of free physical block in described first memory; Nfree2 refers to the quantity of free physical block in described second memory; Described physical block is for storing described data block; C refers at described time interval T 2in, described first memory to transmit between described second memory and the quantity of the data block received by described second memory.
18. devices according to claim 17, is characterized in that:
When described first threshold < Nfree1≤Second Threshold, the data block of described needs degradation refers to min (Nfree2, C, Δ Nfree1) the individual data block that the hot value selected from described ranking results is smaller;
Wherein, Δ Nfree1=Nfree1'-Nfree1, Nfree1' for upper once carry out degradation migration time, the quantity of the free physical block in described first memory, and the value of Δ Nfree1 be greater than 0 integer, described Second Threshold be basis at described T 2the mean speed of interior upgrade data block is determined, to ensure that the free physical block in described first memory can not by described T 2the data block of interior upgrading has taken, and described first threshold is less than described Second Threshold.
19., according to claim 11 to the device described in 16 any one, is characterized in that:
K kind storer is comprised in described storage system, wherein K >=3 and K is integer, described K kind storer comprises the i-th storer, the i-th-1 storer and the i-th-2 storer, and the access speed of described i-th storer is greater than the access speed of described i-th-1 storer, when the access speed of described i-th-1 storer is greater than the access speed of described i-th-2 storer, wherein, i gets 3 and i round numbers from K successively according to order from big to small;
Described device also comprises:
Second degraded cell, at described T 2in, the data block of the needs degradation being positioned at described i-th storer is moved to described i-th-2 storer, the data block of the needs degradation being positioned at described i-th-1 storer is moved to described i-th-2 storer, and the data block of the needs degradation being positioned at described i-th storer is moved to described i-th-1 storer.
20. devices according to claim 19, is characterized in that, described second degraded cell comprises:
3rd sequencing unit, for the data block being positioned at described i-th storer being sorted according to the size of hot value, also sorts the data block being positioned at described i-th-1 storer according to the size of hot value;
First selection unit, in the ranking results of the data block comprised for the ranking results of data block that comprises from described i-th storer and described i-th-1 storer, common choice goes out the smaller Nfree of hot value (i-2) individual data block, described Nfree (i-2) individual data block degradation is moved to described i-th-2 storer, the quantity of the free physical block that described Nfree (i-2) comprises for described i-th-2 storer;
4th sequencing unit, for sorting the data block being positioned at described i-th storer according to the size of hot value;
Second selection unit, the smaller Nfree of hot value (i-1) individual data block is selected in the ranking results of data block that comprises from described i-th storer, described Nfree (i-1) individual data block degradation is moved to described i-th-1 storer, the quantity of the free physical block that described Nfree (i-1) comprises for described i-th-1 storer.
21. 1 kinds of storage systems, is characterized in that, comprise R kind storer and the hierarchical storage management device as described in any one of claim 11-20, R be greater than or equal to 2 integer,
At least L data block is stored in described R kind storer,
Described hierarchical storage management device is used for determining multiple target data block from a described at least L data block, according to the hot value of each target data block in described multiple target data block, described multiple target data block is divided into R Heat range.
CN201410555114.2A 2014-10-17 2014-10-17 A kind of hierarchical storage management method, device and storage system Active CN104317731B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410555114.2A CN104317731B (en) 2014-10-17 2014-10-17 A kind of hierarchical storage management method, device and storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410555114.2A CN104317731B (en) 2014-10-17 2014-10-17 A kind of hierarchical storage management method, device and storage system

Publications (2)

Publication Number Publication Date
CN104317731A true CN104317731A (en) 2015-01-28
CN104317731B CN104317731B (en) 2017-06-06

Family

ID=52372966

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410555114.2A Active CN104317731B (en) 2014-10-17 2014-10-17 A kind of hierarchical storage management method, device and storage system

Country Status (1)

Country Link
CN (1) CN104317731B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105487817A (en) * 2015-11-26 2016-04-13 上海新储集成电路有限公司 Customizable data storage method and system
CN106354437A (en) * 2016-09-27 2017-01-25 郑州云海信息技术有限公司 Tiered storage control method and device
WO2017092480A1 (en) * 2015-12-04 2017-06-08 华为技术有限公司 Data migration method and device
CN107564570A (en) * 2017-08-22 2018-01-09 广州视源电子科技股份有限公司 Patient information acquisition methods, device and storage medium, equipment
CN107870735A (en) * 2016-09-28 2018-04-03 杭州华为数字技术有限公司 Data managing method, device and equipment
CN110543434A (en) * 2019-09-05 2019-12-06 北京兆易创新科技股份有限公司 NAND flash device, memory table management method, device and storage medium
CN111587423A (en) * 2017-11-13 2020-08-25 维卡艾欧有限公司 Hierarchical data policy for distributed storage systems
CN111768274A (en) * 2020-06-24 2020-10-13 中国地质大学(武汉) Data classification storage system based on artificial intelligence
CN112035498A (en) * 2020-08-31 2020-12-04 北京奇艺世纪科技有限公司 Data block scheduling method and device, scheduling layer node and storage layer node

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101861573A (en) * 2007-11-19 2010-10-13 微软公司 The statistical counting that is used for memory hierarchy optimization
US20140108705A1 (en) * 2012-10-12 2014-04-17 Sandisk Technologies Inc. Use of High Endurance Non-Volatile Memory for Read Acceleration
CN103927265A (en) * 2013-01-04 2014-07-16 深圳市龙视传媒有限公司 Content hierarchical storage device, content acquisition method and content acquisition device
CN104102454A (en) * 2013-04-07 2014-10-15 杭州信核数据科技有限公司 Method for automatically realizing hierarchical storage and system for managing hierarchical storage

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101861573A (en) * 2007-11-19 2010-10-13 微软公司 The statistical counting that is used for memory hierarchy optimization
US20140108705A1 (en) * 2012-10-12 2014-04-17 Sandisk Technologies Inc. Use of High Endurance Non-Volatile Memory for Read Acceleration
CN103927265A (en) * 2013-01-04 2014-07-16 深圳市龙视传媒有限公司 Content hierarchical storage device, content acquisition method and content acquisition device
CN104102454A (en) * 2013-04-07 2014-10-15 杭州信核数据科技有限公司 Method for automatically realizing hierarchical storage and system for managing hierarchical storage

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105487817B (en) * 2015-11-26 2019-09-10 上海新储集成电路有限公司 A kind of customizable data storage method and system
CN105487817A (en) * 2015-11-26 2016-04-13 上海新储集成电路有限公司 Customizable data storage method and system
WO2017092480A1 (en) * 2015-12-04 2017-06-08 华为技术有限公司 Data migration method and device
CN106354437A (en) * 2016-09-27 2017-01-25 郑州云海信息技术有限公司 Tiered storage control method and device
CN107870735B (en) * 2016-09-28 2021-01-05 华为技术有限公司 Data management method, device and equipment
CN107870735A (en) * 2016-09-28 2018-04-03 杭州华为数字技术有限公司 Data managing method, device and equipment
CN107564570A (en) * 2017-08-22 2018-01-09 广州视源电子科技股份有限公司 Patient information acquisition methods, device and storage medium, equipment
CN111587423A (en) * 2017-11-13 2020-08-25 维卡艾欧有限公司 Hierarchical data policy for distributed storage systems
CN111587423B (en) * 2017-11-13 2023-09-19 维卡艾欧有限公司 Hierarchical data policies for distributed storage systems
CN110543434A (en) * 2019-09-05 2019-12-06 北京兆易创新科技股份有限公司 NAND flash device, memory table management method, device and storage medium
CN110543434B (en) * 2019-09-05 2022-07-01 北京兆易创新科技股份有限公司 NAND flash device, memory table management method, device and storage medium
CN111768274A (en) * 2020-06-24 2020-10-13 中国地质大学(武汉) Data classification storage system based on artificial intelligence
CN112035498A (en) * 2020-08-31 2020-12-04 北京奇艺世纪科技有限公司 Data block scheduling method and device, scheduling layer node and storage layer node
CN112035498B (en) * 2020-08-31 2023-09-05 北京奇艺世纪科技有限公司 Data block scheduling method and device, scheduling layer node and storage layer node

Also Published As

Publication number Publication date
CN104317731B (en) 2017-06-06

Similar Documents

Publication Publication Date Title
CN104317731A (en) Hierarchical storage management method, device and storage system
US11086523B2 (en) Automatic tiering of storage using dynamic grouping
CN108733313B (en) Method, apparatus and computer readable medium for establishing multi-level flash cache using a spare disk
US9665493B2 (en) Increased cache performance with multi-level queues of complete tracks
US10235101B2 (en) Log structured block device for hard disk drive
US20120117328A1 (en) Managing a Storage Cache Utilizing Externally Assigned Cache Priority Tags
CN108139902A (en) The method and apparatus of SSD drive are accessed for providing mixed mode
CN105224237A (en) A kind of date storage method and device
CN107526540B (en) Data storage device and data maintenance method thereof
CN105745628B (en) A kind of method for writing data into flash memory device, flash memory device and storage system
US11036635B2 (en) Selecting resources to make available in local queues for processors to use
CN110737401B (en) Method, apparatus and computer program product for managing redundant array of independent disks
CN103020255A (en) Hierarchical storage method and hierarchical storage device
CN104516828A (en) Method and device for removing caching data
JP2016066220A (en) Storage, storage control method and storage control program
CN104750432A (en) Data storage method and device
US11226778B2 (en) Method, apparatus and computer program product for managing metadata migration
US9213498B2 (en) Memory system and controller
US20160299698A1 (en) Realm partitioning in hard drives
CN103078845A (en) Method for calibrating access control list (ACL), and shared storage system
US20170220422A1 (en) Moving data chunks
CN111435403B (en) Wear balancing method and device for flash memory system
US8504764B2 (en) Method and apparatus to manage object-based tiers
KR100878142B1 (en) Method of configuring a modified b-tree index for an efficient operation on flash memory
JP6112193B2 (en) Access control program, disk device, and access control method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200417

Address after: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee after: HUAWEI TECHNOLOGIES Co.,Ltd.

Address before: 301, A building, room 3, building 301, foreshore Road, No. 310053, Binjiang District, Zhejiang, Hangzhou

Patentee before: Huawei Technologies Co.,Ltd.

TR01 Transfer of patent right