CN106227598A - A kind of recovery method of cache resources - Google Patents
A kind of recovery method of cache resources Download PDFInfo
- Publication number
- CN106227598A CN106227598A CN201610573894.2A CN201610573894A CN106227598A CN 106227598 A CN106227598 A CN 106227598A CN 201610573894 A CN201610573894 A CN 201610573894A CN 106227598 A CN106227598 A CN 106227598A
- Authority
- CN
- China
- Prior art keywords
- block
- data
- cache
- page
- memory
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5022—Mechanisms to release resources
Abstract
The invention discloses the recovery method of a kind of cache resources, described method is for the purpose of expanding buffer memory capacity, internal memory is utilized to build a new caching level between internal memory and disk, and by cache resources reclaimer operation, it is to avoid identical data takies many parts of internal memories.The time overhead that the present invention is brought to reduce cache garbage collection to wipe, utilize caching internal data migration operation to reduce the valid data time overhead that brings of copy and resource is taken by caching, utilize many division operations to wipe while realizing multiple packet, the time efficiency expense repeatedly wiped with minimizing simultaneously.
Description
Technical field
The present invention relates to software system technical field, be specifically related to the recovery method of a kind of cache resources.
Background technology
In current cache, solid-state disk is gradually as main flow, due to the performance and price of solid-state disk and capacity all occupy DRAM and
Between disk, disposing the mixing storage system of flash memory, disk, logical too small amount of flash memory improves systematic entirety and can give full play to
The performance advantage of flash memory and the capacity of disk and cost advantage can realize storage performance and the direct efficient balance of capacity.
Owing to solid-state disk uses strange land update mechanism, physical block not only comprises effective data page and also comprises invalid data
Page, so causes the waste of memory space, uses the most fewer and feweri, traditional cache garbage collection simultaneously in free block, is responsible for wiping
Except physical block obtains new free block, so can cause and write scale-up problem, copy the most, the garbage reclamation time is the longest, so
Ratio is relatively time-consuming, has had a strong impact on caching performance.
Summary of the invention
The technical problem to be solved in the present invention is: the present invention is directed to problem above, it is provided that the recovery side of a kind of cache resources
Method.
The technical solution adopted in the present invention is:
The recovery method of a kind of cache resources, described method, for the purpose of expanding buffer memory capacity, utilizes internal memory to build one
New caching level between internal memory and disk, the effect making full use of caching promotes the overall performance of storage system, and
By cache resources reclaimer operation, it is to avoid identical data takies many parts of internal memories, do not have a large amount of repetition.
Data in caching are a copy rubbish of data in back end storage system mostly, directly delete relevant during recovery
Block can't cause loss of data, such that it is able to be wiped free of data in block because reclaiming when solving garbage reclamation to a certain extent and
The problems such as amplification of writing caused, reduce garbage reclamation expense.
Valid data in described caching have cold and hot dividing, and dsc data is easier to accessed than cold data, and described method is led to
Cross the proportion improving dsc data, improve cache hit rate, when cache garbage collection, dsc data is moved, and by direct for cold data
Delete.In tradition cache garbage collection, cold and hot data separation is not done in consideration, the valid data simply needed.Solid-state disk is as slow
Deposit, owing to the valid data of storage have a copy in rear end, if therefore directly deleting the integrity having no effect on data
And concordance.If but deleted valid data, particularly dsc data in block, subsequent access hit rate could be caused to decline.
Described caching comprises state in four: effective, invalid, clean and " containing dirty pages ", during cache garbage collection operation, containing dirty pages is first copied
The block at its place, to clean block, could be wiped by shellfish,
One evaluation points t replaced of each piece of definition in solid state cache dish:
Wherein c quantity of cold data page in being block, i is the quantity of invalid data page in block, and d is the number of block apoplexy involving ZANG-organ data page
Amount, m is the quantity of clean page in page, and N is the quantity of data page in block;
Condition is met as follows when cache garbage collection:
1) in block, invalid page and cold page are tried one's best many;
2) in block, dsc data and containing dirty pages are the fewest;
3) in block, clean page is the fewest;
So t value is the biggest, and cache garbage collection cost is the least.
Described method is by using intervalometer, and access time and access times according to data block carry out data record,
Specifically comprise the following steps that
S1, startup intervalometer;
S2, the access time obtaining described data block and access times, obtain wear factor ω, wherein:
E is maximum erasable number of times, and for known, e is the most erasable number of times;
S3, check whether described data block is non-hot spot data block, if described data block is not belonging to non-hot spot data block,
Then check next data block;If described data block belongs to non-hot spot data block, then perform step S4;
S4, remove described data block;
Whether S5, first piece of memory block of inspection are idle, if the free time, discharge first piece of memory block;If not sky
Spare time, then the second memory block data are put into free memory list;
After step S5, after multiple second memory blocks form the first memory block, then discharge the first memory block.
Described method provides replacement block selective factor B s according to evaluation points and wear factor, checks described number by s value
According to the most non-hot spot data block of block, wherein:
S=ω 1*t+ ω 2* (1-ω),
ω 1+ ω 2=1
The probability that s is chosen the most greatly to reclaim is the biggest, is typically more than 80% to be then considered hot spot data block in s value.
The invention have the benefit that
The time overhead that the present invention is brought to reduce cache garbage collection to wipe, utilizes caching internal data migration operation
Resource is taken by time overhead and caching that minimizing valid data copy brings, utilizes many division operations to realize many simultaneously
Wipe while individual packet, the time efficiency expense repeatedly wiped with minimizing.
Present invention, avoiding identical data and take many parts of internal memories, do not have a large amount of repetition;Decrease file system to disk
Access, improve the organic efficiency to cache resources, be greatly saved memory headroom, improve the overall profit of memory source
By rate;According to solid state cache feature, optimize replacement block choosing strategy, data mode in overall consideration caching, entered by data type
Row erasing, reduces excessive data copy, it is to avoid brings cache hit rate to reduce problem in erase process, and is reduced by algorithm slow
Deposit abrasion.
Accompanying drawing explanation
Fig. 1 migrates schematic diagram for page status in caching;
Fig. 2 is the Memory recycle implementing procedure figure of caching.
Detailed description of the invention
Below according to accompanying drawing, in conjunction with detailed description of the invention, the present invention is further described:
Embodiment 1:
The recovery method of a kind of cache resources, described method, for the purpose of expanding buffer memory capacity, utilizes internal memory to build one
New caching level between internal memory and disk, the effect making full use of caching promotes the overall performance of storage system, and
By cache resources reclaimer operation, it is to avoid identical data takies many parts of internal memories, do not have a large amount of repetition.
Data in caching are a copy rubbish of data in back end storage system mostly, directly delete relevant during recovery
Block can't cause loss of data, such that it is able to be wiped free of data in block because reclaiming when solving garbage reclamation to a certain extent and
The problems such as amplification of writing caused, reduce garbage reclamation expense.
Embodiment 2
On the basis of embodiment 1, the valid data in caching described in the present embodiment have cold and hot dividing, and dsc data is than cold number
Accessed according to being easier to, described method, by improving the proportion of dsc data, improves cache hit rate, when cache garbage collection by hot number
According to moving, and cold data are directly deleted.In tradition cache garbage collection, cold and hot data separation is not done in consideration, simply needs
Valid data.Solid-state disk is as caching, owing to the valid data of storage have a copy in rear end, if the most directly deleted
Except the integrity and the concordance that have no effect on data.If but deleted valid data, particularly dsc data in block, could cause follow-up
Access hit rate declines.
Embodiment 3
As it is shown in figure 1, on the basis of embodiment 2, caching described in the present embodiment comprises state in four: effective, invalid,
Totally with " containing dirty pages ", during cache garbage collection operation, containing dirty pages must copy clean block to, could wipe the block at its place
Remove,
One evaluation points t replaced of each piece of definition in solid state cache dish:
Wherein c quantity of cold data page in being block, i is the quantity of invalid data page in block, and d is the number of block apoplexy involving ZANG-organ data page
Amount, m is the quantity of clean page in page, and N is the quantity of data page in block;
Condition is met as follows when cache garbage collection:
1) in block, invalid page and cold page are tried one's best many
2) in block, dsc data and containing dirty pages are the fewest
3) in block, clean page is the fewest
So t value is the biggest, and cache garbage collection cost is the least.
Embodiment 4
As in figure 2 it is shown, on the basis of embodiment 3, method described in the present embodiment is by using intervalometer, according to data block
The access time and access times carry out data record, specifically comprise the following steps that
S1, startup intervalometer;
S2, the access time obtaining described data block and access times, obtain wear factor ω, wherein:
E is maximum erasable number of times, and for known, e is the most erasable number of times;
S3, check whether described data block is non-hot spot data block, if described data block is not belonging to non-hot spot data block,
Then check next data block;If described data block belongs to non-hot spot data block, then perform step S4;
S4, remove described data block;
Whether S5, first piece of memory block of inspection are idle, if the free time, discharge first piece of memory block;If not sky
Spare time, then the second memory block data are put into free memory list;
After step S5, after multiple second memory blocks form the first memory block, then discharge the first memory block.
Embodiment 5
On the basis of embodiment 4, method described in the present embodiment provides replacement block choosing according to evaluation points and wear factor
Select factor s, check the most non-hot spot data block of described data block by s value, wherein:
S=ω 1*t+ ω 2* (1-ω),
ω 1+ ω 2=1
The probability that s is chosen the most greatly to reclaim is the biggest, is typically more than 80% to be then considered hot spot data block in s value.
Embodiment is merely to illustrate the present invention, and not limitation of the present invention, about the ordinary skill of technical field
Personnel, without departing from the spirit and scope of the present invention, it is also possible to make a variety of changes and modification, the most all equivalents
Technical scheme fall within scope of the invention, the scope of patent protection of the present invention should be defined by the claims.
Claims (5)
1. the recovery method of a cache resources, it is characterised in that: described method, for the purpose of expanding buffer memory capacity, utilizes internal memory
Build a new caching level between internal memory and disk, and by cache resources reclaimer operation, it is to avoid identical data
Take many parts of internal memories.
The recovery method of a kind of cache resources the most according to claim 1, it is characterised in that: the significant figure in described caching
According to there being cold and hot dividing, described method, by improving the proportion of dsc data, improves cache hit rate, when cache garbage collection by dsc data
Move, and cold data are directly deleted.
The recovery method of a kind of cache resources the most according to claim 2, it is characterised in that: described caching comprises in four
State: effective, invalid, clean and " containing dirty pages ", during cache garbage collection operation, containing dirty pages first copies clean block to, could be to its place
Block wipe, and one evaluation points t replaced of in solid state cache dish each piece definition:
Wherein c quantity of cold data page in being block, i is the quantity of invalid data page in block, and d is the quantity of block apoplexy involving ZANG-organ data page, m
For the quantity of page clean in page, N is the quantity of data page in block;
And it is as follows to meet condition when cache garbage collection:
1) in block, invalid page and cold page are tried one's best many;
2) in block, dsc data and containing dirty pages are the fewest;
3) in block, clean page is the fewest;
So t value is the biggest, and cache garbage collection cost is the least.
The recovery method of a kind of cache resources the most according to claim 3, it is characterised in that: described method is fixed by using
Time device, access time and access times according to data block carries out data record, specifically comprises the following steps that
S1, startup intervalometer;
S2, the access time obtaining described data block and access times, obtain wear factor ω, wherein:
E is maximum erasable number of times, and for known, e is the most erasable number of times;
S3, check whether described data block is non-hot spot data block, if described data block is not belonging to non-hot spot data block, then examine
Look into next data block;If described data block belongs to non-hot spot data block, then perform step S4;
S4, remove described data block;
Whether S5, first piece of memory block of inspection are idle, if the free time, discharge first piece of memory block;If not the free time, then
Second memory block data are put into free memory list;
After step S5, after multiple second memory blocks form the first memory block, then discharge the first memory block.
The recovery method of a kind of cache resources the most according to claim 4, it is characterised in that: described method according to evaluate because of
Son and wear factor provide replacement block selective factor B s, check the most non-hot spot data block of described data block by s value, wherein:
S=ω 1*t+ ω 2* (1-ω),
ω 1+ ω 2=1
S value is more than 80% to be considered hot spot data block.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610573894.2A CN106227598A (en) | 2016-07-20 | 2016-07-20 | A kind of recovery method of cache resources |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610573894.2A CN106227598A (en) | 2016-07-20 | 2016-07-20 | A kind of recovery method of cache resources |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106227598A true CN106227598A (en) | 2016-12-14 |
Family
ID=57531523
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610573894.2A Pending CN106227598A (en) | 2016-07-20 | 2016-07-20 | A kind of recovery method of cache resources |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106227598A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106959898A (en) * | 2017-03-27 | 2017-07-18 | 广州优视网络科技有限公司 | Reduce method, device and the mobile terminal of EMS memory occupation |
CN109376094A (en) * | 2018-09-27 | 2019-02-22 | 郑州云海信息技术有限公司 | A kind of method of the cold and hot Data Migration of garbage reclamation in storage system |
CN109634915A (en) * | 2018-11-28 | 2019-04-16 | 深圳市网心科技有限公司 | File dispositions method, Cloud Server, system and storage medium |
CN110908923A (en) * | 2018-09-14 | 2020-03-24 | 阿里巴巴集团控股有限公司 | Memory recovery method and device |
CN111274039A (en) * | 2020-02-14 | 2020-06-12 | Oppo广东移动通信有限公司 | Memory recovery method and device, storage medium and electronic equipment |
WO2021031408A1 (en) * | 2019-08-22 | 2021-02-25 | 平安科技(深圳)有限公司 | Cached data clearing method, device, equipment, and computer-readable storage medium |
CN112905129A (en) * | 2021-05-06 | 2021-06-04 | 蚂蚁金服(杭州)网络技术有限公司 | Method and device for eliminating cache memory block and electronic equipment |
CN113672166A (en) * | 2021-07-08 | 2021-11-19 | 锐捷网络股份有限公司 | Data processing method and device, electronic equipment and storage medium |
WO2023051715A1 (en) * | 2021-09-30 | 2023-04-06 | 华为技术有限公司 | Data processing method and apparatus, processor, and hybrid memory system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102081576A (en) * | 2011-03-01 | 2011-06-01 | 华中科技大学 | Flash memory wear balance method |
CN102156753A (en) * | 2011-04-29 | 2011-08-17 | 中国人民解放军国防科学技术大学 | Data page caching method for file system of solid-state hard disc |
CN104317735A (en) * | 2014-09-24 | 2015-01-28 | 北京云巢动脉科技有限公司 | High-capacity cache and method for data storage and readout as well as memory allocation and recovery |
-
2016
- 2016-07-20 CN CN201610573894.2A patent/CN106227598A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102081576A (en) * | 2011-03-01 | 2011-06-01 | 华中科技大学 | Flash memory wear balance method |
CN102156753A (en) * | 2011-04-29 | 2011-08-17 | 中国人民解放军国防科学技术大学 | Data page caching method for file system of solid-state hard disc |
CN104317735A (en) * | 2014-09-24 | 2015-01-28 | 北京云巢动脉科技有限公司 | High-capacity cache and method for data storage and readout as well as memory allocation and recovery |
Non-Patent Citations (2)
Title |
---|
梁俊杰 等: ""以固态硬盘为缓存的存储技术研究"", 《微电子学与计算机》 * |
魏登萍 等: ""面向缓存的固态盘垃圾回收策略"", 《第十九届计算机工程与工艺年会暨第五届微处理器技术论坛论文集》 * |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106959898A (en) * | 2017-03-27 | 2017-07-18 | 广州优视网络科技有限公司 | Reduce method, device and the mobile terminal of EMS memory occupation |
CN110908923B (en) * | 2018-09-14 | 2023-05-02 | 阿里巴巴集团控股有限公司 | Memory recycling method and device |
CN110908923A (en) * | 2018-09-14 | 2020-03-24 | 阿里巴巴集团控股有限公司 | Memory recovery method and device |
CN109376094A (en) * | 2018-09-27 | 2019-02-22 | 郑州云海信息技术有限公司 | A kind of method of the cold and hot Data Migration of garbage reclamation in storage system |
CN109634915A (en) * | 2018-11-28 | 2019-04-16 | 深圳市网心科技有限公司 | File dispositions method, Cloud Server, system and storage medium |
WO2021031408A1 (en) * | 2019-08-22 | 2021-02-25 | 平安科技(深圳)有限公司 | Cached data clearing method, device, equipment, and computer-readable storage medium |
CN111274039A (en) * | 2020-02-14 | 2020-06-12 | Oppo广东移动通信有限公司 | Memory recovery method and device, storage medium and electronic equipment |
CN111274039B (en) * | 2020-02-14 | 2023-12-08 | Oppo广东移动通信有限公司 | Memory recycling method and device, storage medium and electronic equipment |
CN112905129A (en) * | 2021-05-06 | 2021-06-04 | 蚂蚁金服(杭州)网络技术有限公司 | Method and device for eliminating cache memory block and electronic equipment |
WO2022233272A1 (en) * | 2021-05-06 | 2022-11-10 | 北京奥星贝斯科技有限公司 | Method and apparatus for eliminating cache memory block, and electronic device |
CN112905129B (en) * | 2021-05-06 | 2021-08-13 | 蚂蚁金服(杭州)网络技术有限公司 | Method and device for eliminating cache memory block and electronic equipment |
CN113672166A (en) * | 2021-07-08 | 2021-11-19 | 锐捷网络股份有限公司 | Data processing method and device, electronic equipment and storage medium |
WO2023051715A1 (en) * | 2021-09-30 | 2023-04-06 | 华为技术有限公司 | Data processing method and apparatus, processor, and hybrid memory system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106227598A (en) | A kind of recovery method of cache resources | |
CN103136121B (en) | Cache management method for solid-state disc | |
CN102508788B (en) | SSD (solid state drive) and SSD garbage collection method and device | |
CN106484323A (en) | A kind of loss equalizing method of solid-state storage and system | |
CN101169751B (en) | System with flash memory device and data recovery method thereof | |
CN104298610B (en) | Data storage system and its management method | |
CN102981963B (en) | A kind of implementation method of flash translation layer (FTL) of solid-state disk | |
CN103365788B (en) | The adaptive local rubbish recovering method that real-time flash memory conversion layer uses | |
TWI399644B (en) | Block management method for a non-volatile memory | |
CN103455435A (en) | Data writing method and device | |
CN106598878A (en) | Method for separating cold data and hot data of solid state disk | |
CN100501868C (en) | Method for realizing memory file system based on NAND Flash | |
CN104484283B (en) | A kind of method for reducing solid state disk write amplification | |
CN105528301A (en) | NAND Flash memory garbage collection method | |
CN101923448A (en) | Method for reading and writing conversion layer of NAND flash memory | |
CN107092563B (en) | Garbage recovery method and device | |
CN101067800A (en) | Memory deterioration balance method based on local sampling | |
CN106528438A (en) | Segmented junk recovery method for solid-state storage device | |
CN102163175A (en) | Hybrid address mapping method based on locality analysis | |
CN105204783B (en) | A kind of solid-state disk rubbish recovering method based on data lifetime | |
CN102819494B (en) | Optimization method when a kind of flash memory is sequentially written in | |
CN103440207A (en) | Caching method and caching device | |
CN102768645A (en) | Solid state disk (SSD) prefetching method for mixed caching and SSD | |
CN107797772A (en) | A kind of garbage retrieving system and method based on flash media | |
CN107515728A (en) | Play the data managing method and device of concurrent characteristic inside flash memory device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20161214 |
|
RJ01 | Rejection of invention patent application after publication |