CN107533506A - Rubbish recovering method and equipment in log-structuredization file system - Google Patents

Rubbish recovering method and equipment in log-structuredization file system Download PDF

Info

Publication number
CN107533506A
CN107533506A CN201580079149.6A CN201580079149A CN107533506A CN 107533506 A CN107533506 A CN 107533506A CN 201580079149 A CN201580079149 A CN 201580079149A CN 107533506 A CN107533506 A CN 107533506A
Authority
CN
China
Prior art keywords
state parameter
segmentation
parameter value
volume
garbage reclamation
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
CN201580079149.6A
Other languages
Chinese (zh)
Other versions
CN107533506B (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
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN107533506A publication Critical patent/CN107533506A/en
Application granted granted Critical
Publication of CN107533506B publication Critical patent/CN107533506B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0804Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with main memory updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0871Allocation or management of cache space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7205Cleaning, compaction, garbage collection, erase control

Abstract

It is a kind of to be used to carry out the garbage recovering apparatus (30) of garbage reclamation rolled up in log-structuredization file system.The volume includes multiple segmentations, wherein, each segmentation includes multiple pieces.The equipment (30) includes state parameter determining unit (31), is used for:Determine bulk state parameter, the fragmentation state parameter being each segmented, the volume state parameter of each block.In addition, the equipment (30) includes garbage reclamation determining unit (32), it is used for:Garbage reclamation queue is determined based on the fragmentation state parameter, determines that garbage reclamation is segmented based on the volume state and the garbage reclamation queue.The equipment (30) includes garbage reclamation unit (33), for carrying out the garbage reclamation of the garbage reclamation segmentation.

Description

Rubbish recovering method and equipment in log-structuredization file system
Technical field
The present invention relates to the garbage reclamation in log-structuredization file system, more particularly to effectively carry out the side of garbage reclamation Method and equipment.
Background technology
The basic thought of log-structuredization file system (Log structured file system, abbreviation LFS) is slow The order that file system is changed in file cache is rushed, all changes are then write into magnetic successively in single disk write operation Disk, to improve write performance.In write operation write disk information include file data blocks, attribute, index block, catalogue with And for managing nearly all other information of file system.Log-structuredization file system will be all new using sequential organization Information writes disk, wherein, the sequential organization is referred to as daily record.
Inode will not be placed on fixed position by LFS, but they are write into daily record.LFS uses referred to as inode mappings Data structure safeguards each inode current location.Given the identification number of a file, it is necessary to inode is mapped and carries out rope Draw, to determine inode disk address.Inode mappings are divided into the block of write-in daily record.Fixation checkpoint on each disk The area identification position of all inode mapping blocks.
This can be easily seen in Fig. 1.Especially, log-structuredization file system disk layout 10 is shown.
The design problem that log-structuredization file system is most difficult to is the management of free space.It is substantial amounts of empty to aim at maintenance Not busy scope is used to write new data.Initially, all free spaces are all located at the single scope on disk, but are arrived in daily record Up to disk end when, by many small ranges corresponding to free space is divided into while deletes or covers file.
From this point, file system has two kinds of selections:Thread and duplication.The first selection is to retain real time data In position, and by free range to daily record thread is carried out.However, thread can be such that free space seriously disperses.Second Kind selection is that the real time data in daily record is replicated, so as to retain the writing ranges of a large amount of free time.In daily record head to compress Form to real time data carry out write-back.The deficiency of duplication is its cost, for permanent file.
Show that above two selects in Fig. 2 easily.The left side shows the daily record 20 before and after thread, and the right is shown Replicate and daily record 21 that compression is front and rear.
In order that log-structuredization file system is effectively run, it is necessary to it is new to ensure that large-scale free space can be used for always The write-in of data.One of solution is a wide range of based on what is be referred to as segmented, wherein, segmentation scale removal process passes through to a large amount of The real time data of the segmentation of segmentation is compressed so as to continuously regenerate dead band.
The process replicated to the real time data of segmentation is referred to as being segmented cleaning or garbage reclamation (garbage Collection, abbreviation GC).In LFS, this is a simple three step process:Internal memory is read in into multiple segmentations, identification is real-time Data and real time data is write back to less clean segmentation.It is clean by the segmentation markers of reading, it can after the completion of this operation For new data or other cleanings.
With the increase of sizes of memory, for the conventional method that carries out garbage reclamation, over-burden.That is entirely rolled up is broken Piece, which arranges, to be taken long enough, and this is reasonably necessary.Therefore, it is an object of the invention to provide a kind of apparatus and method, Allow to effectively carry out garbage reclamation in log-structuredization file system.
The content of the invention
Above-mentioned purpose solves by the feature of the claim 1 of method and the claim 10 of equipment.In addition, above-mentioned mesh By correlation computer program claim 9 feature solve.Dependent claims include further development.
It is an object of the invention to propose a kind of determination log-structuredization file system (Log structured file System, abbreviation LFS) volume segmentation and ageing state method, its object is to flexible using being formulated during clone method Garbage reclamation (garbage collection, abbreviation GC) strategy.
Log-structuredization file system is limited by file system, this document system using Copy on write as benchmark inside Data modification technology.The design of log-structuredization file system be based on it is assumed hereinafter that:This technology will be no longer valid, because Ever-increasing memory size causes I/O write-in to become complicated on modern computer, almost always delays because reading from internal memory It is achieved in depositing.LFS, which is stored, is considered as circular logging, and is sequentially written in daily record head.Log-structuredization file system uses Internal technology of Copy on write (Copy-on-Write, the abbreviation COW) strategy as data modification.After COW strategies mean modification Blocks of files will not update, but these modification blocks will write last daily record.
However, log-structuredization file system must reclaim free space from daily record tail, to prevent file system in daily record Become full when headring is around to meet file system.Afterbody can be with Free up Memory, and by skipping the more recent version in daily record farther out Data move forward.If not newer version, data are moved and are attached to head.
Therefore, poorly efficient GC logics may greatly reduce the performance of log-structuredization file system.Log-structuredization file The example implementations of garbage reclamation are not it is not recommended that efficient GC strategies, this influences file system performance in system.
The thought of the method proposed is the structure that invalid block count is used as to the GC queues of pre- dirty/dirty segmentation of determination Standard, pre- dirty/dirty segmentation of the selection with minimum clearance cost, and detection volume state.Can be by GC queue facilities into dirty point The array of section chain, it is ranked up by the invalid block count as array index.Each index of array includes having accordingly The dirty segmentation of specific amount of invalid block in segmentation.
Then, GC queues have a dirty fragment counter in each index chain of invalid block count in an array.These Counter is used for the detection of volume state.The index of GC queue arrays is grouped based on active block count range:
(1) cold volume region [Active block];
(2) cooling volume region [Active block];
(3) heating volume region [Active block];
(4) warm volume region [Active block];
(5) preheating volume region [Active block];
(6) hot volume region [Active block].
The segments in each volume state region is calculated so that can be to the dirty segments in different volume state regions It is compared.Therefore, if some volume state regions have maximum dirty segments, it means that the volume is in such shape State, if for example, preheated zone has the dirty segmentation of maximum count, the volume has the volume state of preheating.
Therefore, it is proposed to it is a kind of do not need file system performance expense LFS volume states detection simple effective method. Qualitative LFS volume state processing makes it possible to formulate flexible and efficient GC policies.One common-denominator target of flexible GC strategies is Enough freed segment capacity are provided, will not also cause file system performance to decline in the case of the volume state of aging.
According to the first aspect of the invention, there is provided the rubbish recovering method rolled up in a kind of log-structuredization file system. Volume includes multiple segmentations, wherein, each segmentation includes multiple pieces.Methods described includes:Determine the bulk state of each block Parameter;Described piece of the bulk state parameter based on the segmentation determines the fragmentation state parameter being each segmented;It is based on The fragmentation state parameter and the bulk state parameter determine the volume state parameter of the volume.In addition, methods described includes:It is based on The fragmentation state parameter determines garbage reclamation queue;Garbage reclamation is determined based on the volume state and the garbage reclamation queue Segmentation;Carry out the garbage reclamation of the garbage reclamation segmentation.Therefore, the quantity of segmentation can be limited, carries out garbage reclamation, so as to Greatly reduce the work of garbage reclamation.
It is described to determine that the bulk state parameter includes according to the first implementation of first aspect:For each block Distribute bulk state parameter value.Possible bulk state parameter value is:
Idle, described piece of instruction is ready for being used for write operation but also unassigned;
Invalid, described piece of instruction has been released after file renewal, file truncation or deletion action but has not been recovered also For rubbish;
Predistribution, described piece of instruction, which has been pre-assigned in file but described piece, data write-in also;
Effectively, described piece of instruction has been allocated and data with existing writes in described piece.Therefore, can be highly desirable Determine the bulk state parameter.
It is described to determine point being each segmented according to the first implementation of the first implementation of first aspect Section state parameter includes:For each segment assignments fragmentation state parameter value.Possible fragmentation state parameter value is:
Clean, indicate that the segmentation only has bulk state parameter value for idle block;
It is used, it is effective, invalid, predistribution and free time to indicate that the segmentation has bulk state parameter value Block;
It has been used that, it is effective block to indicate that the segmentation only has bulk state parameter value;
It is pre- dirty, indicate that the segmentation only has bulk state parameter value for effective and invalid block;
Dirty, it is invalid block to indicate that the segmentation only has bulk state parameter value.Therefore, can highly desirable determine The fragmentation state parameter.
According to the first implementation of the first implementation of the first implementation of first aspect, the determination The volume state parameter of the volume includes:Volume state parameter value is distributed for the volume.Possible volume state parameter value is:
It is clean, indicate that the volume only comprising fragmentation state parameter value is clean segmentation;
Ice-cold, the segmentation for indicating largely to distribute on the volume is with the block that bulk state parameter value is effective 100%;
Cold, the segmentation for indicating largely to distribute on the volume is effective 80-99%'s with bulk state parameter value Block;
Cooling, the segmentation for indicating largely to distribute on the volume is effective 65-80%'s with bulk state parameter value Block;
Heating, the segmentation for indicating largely to distribute on the volume is effective 50-65%'s with bulk state parameter value Block;
Warm, the segmentation for indicating largely to distribute on the volume is effective 35-50%'s with bulk state parameter value Block;
Preheating, the segmentation for indicating largely to distribute on the volume is effective 20-35%'s with bulk state parameter value Block;
Heat, the segmentation for indicating largely to distribute on the volume is with the block that bulk state parameter value is effective 1-20%;
Boiling, the segmentation for indicating largely to distribute on the volume is with the block that bulk state parameter value is effective 0%.Cause This, can highly desirable determine volume state parameter.
According to the first of the first implementation of the first implementation of the first implementation of first aspect The first implementation of implementation, determine that the garbage reclamation queue includes:Determine the invalid block number being each segmented; The segmentation is ranked up according to its invalid block number, wherein, by the higher step-by-step arrangement of invalid block number in the garbage reclamation In queue, the segmentation relatively low earlier than invalid block number of its garbage reclamation.Therefore, the efficiency of garbage reclamation can further be improved.
According to the first of the first implementation of the first implementation of the first implementation of first aspect The first implementation of the first implementation of implementation, the determination garbage reclamation segmentation include:
If the volume state parameter value is boiling, all segmentations are selected to be segmented as garbage reclamation;
If the volume state parameter value is hot, the garbage reclamation segmentation is selected to be used as bulk state parameter value to have All segmentations in the range of the 1-20% of effect;
If the volume state parameter value is preheating, select garbage reclamation segmentation as bulk state parameter value for At least some segmentations and bulk state parameter value in the range of effective 20-35% are all points in the range of effective 1-20% Section;
If the volume state parameter value to be warm, select the garbage reclamation segmentation as bulk state parameter value for At least some segmentations in the range of effective 35-50%;
If the volume state parameter value is heating, select garbage reclamation segmentation as bulk state parameter value for At least some segmentations in the range of effective 50-65%;
If the volume state parameter value is cooling, garbage reclamation is not selected to be segmented;
If the volume state parameter value is cold, garbage reclamation is not selected to be segmented;
If the volume state parameter value is ice-cold, garbage reclamation is not selected to be segmented;
If the volume state parameter value is clean, garbage reclamation is not selected to be segmented.Therefore, can greatly reduce into The quantity of the segmentation of row garbage reclamation.Thus further it is greatly enhanced efficiency.
According to the first of the first implementation of the first implementation of the first implementation of first aspect The first implementation of the first implementation of the first implementation of implementation, it is in the volume state parameter value In the case of cooling, cold or ice-cold, the institute by the free range of the volume to the log-structuredization file system State daily record and carry out thread.So, without garbage reclamation.This can further reduce the workload of garbage reclamation, improve effect Rate.
According to the first of the first implementation of the first implementation of the first implementation of first aspect The first implementation of the first implementation of the first implementation of the first implementation of implementation, it is described Carrying out the garbage reclamation of the garbage reclamation segmentation includes:
It is segmented from the garbage reclamation and reads real time data;
The real time data is write back into fragmentation state parameter value as clean less segmentation;
Fragmentation state parameter value is marked for clean garbage reclamation segmentation.In addition, by these measures, can Highly desirable to realize garbage reclamation.
According to the second aspect of the invention, there is provided a kind of computer program with program code, wherein, when it is being counted When being run on calculation machine, described program code is used to perform the method according to first aspect or corresponding implementation.
According to the third aspect of the invention we, there is provided a kind of rubbish for being used to roll up in log-structuredization file system returns The garbage recovering apparatus of receipts.The volume includes multiple segmentations, wherein, the segmentation respectively includes multiple pieces.The equipment includes shape State parameter determination unit, is used for:Determine the bulk state parameter of each block;Described piece of the bulk based on the segmentation State parameter determines the fragmentation state parameter being each segmented;Determined based on the fragmentation state parameter and the bulk state parameter The volume state parameter of the volume.In addition, the equipment includes garbage reclamation determining unit, it is used for:Joined based on the fragmentation state Number determines garbage reclamation queue;Determine that garbage reclamation is segmented based on the volume state and the garbage reclamation queue.It is in addition, described Equipment includes garbage reclamation unit, for carrying out the garbage reclamation of the garbage reclamation segmentation.Therefore, can highly desirable enter The garbage reclamation of the volume of row log-structuredization file system.
According to the first implementation of the third aspect, the state parameter determining unit is used for by for each block Distribution bulk state parameter value determines the bulk state parameter.Possible bulk state parameter value is:
Idle, described piece of instruction is ready for being used for write operation but also unassigned;
Invalid, described piece of instruction has been released after file renewal, file truncation or deletion action but has not been recovered also For rubbish;
Predistribution, described piece of instruction, which has been pre-assigned in file but described piece, data write-in also;
Effectively, described piece of instruction has been allocated and data with existing writes in described piece.Therefore, can be highly desirable Determine the bulk state parameter.
According to the first implementation of the first implementation of the third aspect, the state parameter determining unit is used for By the fragmentation state parameter that the segmentation is determined for each segment assignments fragmentation state parameter value.Possible segmentation Status parameter values are:
Clean, indicate that the segmentation only has bulk state parameter value for idle block;
It is used, it is effective, invalid, predistribution and free time to indicate that the segmentation has bulk state parameter value Block;
It has been used that, it is effective block to indicate that the segmentation only has bulk state parameter value;
It is pre- dirty, indicate that the segmentation only has bulk state parameter value for effective and invalid block;
Dirty, it is invalid block to indicate that the segmentation only has bulk state parameter value.Therefore, can highly desirable determine The fragmentation state parameter.
According to the first implementation of the first implementation of the first implementation of the third aspect, the state Parameter determination unit is used for the volume state parameter by determining the volume for volume distribution volume state parameter value.It is possible Volume state parameter value is:
It is clean, indicate that the volume only comprising fragmentation state parameter value is clean segmentation;
Ice-cold, the segmentation for indicating largely to distribute on the volume is with the block that bulk state parameter value is effective 100%;
Cold, the segmentation for indicating largely to distribute on the volume is effective 80-99%'s with bulk state parameter value Block;
Cooling, the segmentation for indicating largely to distribute on the volume is effective 65-80%'s with bulk state parameter value Block;
Heating, the segmentation for indicating largely to distribute on the volume is effective 50-65%'s with bulk state parameter value Block;
Warm, the segmentation for indicating largely to distribute on the volume is effective 35-50%'s with bulk state parameter value Block;
Preheating, the segmentation for indicating largely to distribute on the volume is effective 20-35%'s with bulk state parameter value Block;
Heat, the segmentation for indicating largely to distribute on the volume is with the block that bulk state parameter value is effective 1-20%;
Boiling, the segmentation for indicating largely to distribute on the volume is with the block that bulk state parameter value is effective 0%.Cause This, can highly desirable determine volume state parameter.
According to the first of the first implementation of the first implementation of the first implementation of the third aspect Implementation, the garbage reclamation determining unit are used to determine the garbage reclamation queue in the following manner:Determine described every The invalid block number of individual segmentation;The segmentation is ranked up according to its invalid block number.The higher step-by-step arrangement of invalid block number is existed In the garbage reclamation queue, the segmentation relatively low earlier than invalid block number of its garbage reclamation.Therefore, rubbish can be further improved to return The efficiency of receipts.
According to the first of the first implementation of the first implementation of the first implementation of the third aspect The first implementation of implementation, the garbage reclamation determining unit are used to determine the garbage reclamation in the following manner Segmentation:
If the volume state parameter value is boiling, all segmentations are selected to be segmented as garbage reclamation;
If the volume state parameter value is hot, the garbage reclamation segmentation is selected to be used as bulk state parameter value to have All segmentations in the range of the 1-20% of effect;
If the volume state parameter value is preheating, select garbage reclamation segmentation as bulk state parameter value for At least some segmentations and bulk state parameter value in the range of effective 20-35% are all points in the range of effective 1-20% Section;
If the volume state parameter value to be warm, select the garbage reclamation segmentation as bulk state parameter value for At least some segmentations in the range of effective 35-50%;
If the volume state parameter value is heating, select garbage reclamation segmentation as bulk state parameter value for At least some segmentations in the range of effective 50-65%;
If the volume state parameter value is cooling, garbage reclamation is not selected to be segmented;
If the volume state parameter value is cold, garbage reclamation is not selected to be segmented;
If the volume state parameter value is ice-cold, garbage reclamation is not selected to be segmented;
If the volume state parameter value is clean, garbage reclamation is not selected to be segmented.Therefore, can greatly reduce into The quantity of the segmentation of row garbage reclamation.Thus further it is greatly enhanced efficiency.
According to the first of the first implementation of the first implementation of the first implementation of the third aspect The first implementation of the first implementation of implementation, the garbage recovering apparatus are used in the volume state parameter Be worth it is for cooling, cold or ice-cold in the case of, by the free range of the volume to the log-structuredization file system The daily record carry out thread.So, without garbage reclamation.This can further reduce the workload of garbage reclamation, carry High efficiency.
According to the first of the first implementation of the first implementation of the first implementation of the third aspect The first implementation of the first implementation of the first implementation of implementation, the garbage reclamation unit are used for The garbage reclamation of the garbage reclamation segmentation is carried out in the following manner:
It is segmented from the garbage reclamation and reads real time data;
The real time data is write back into fragmentation state parameter value as clean less segmentation;
Fragmentation state parameter value is marked for clean garbage reclamation segmentation.In addition, by these measures, can Highly desirable to realize garbage reclamation.
In general it is necessary to it is noted that all arrangement, device, element, unit and devices described in this application etc. can To be realized by software or hardware element or its any combinations.In addition, equipment can be processor, or processing can be included Device, wherein, element, unit and means application can be realized in one or more processors.By described in this application various All steps and be described as being intended to mean that corresponding entity is suitable to or configured by the function that various entities perform that entity performs To perform corresponding step and function.Even if be described below or specific embodiment in, function that specific general entity performs or Step will not be reflected in the description of the specific detailed elements for the entity for performing the particular step or function, for this area skill Art personnel it should be clear that these methods and function can relative to software or hardware element, or its any kind of combination.
Brief description of the drawings
The present invention is elaborated below with respect to embodiments of the invention and refer to the attached drawing, in the accompanying drawings
Fig. 1 shows the structure of exemplary log-structuredization file system;
Fig. 2 shows the different example Sexual behavior mode of two of garbage reclamation in log-structuredization file system;
Fig. 3 shows the block diagram of the embodiment of garbage recovering apparatus of the present invention;
Fig. 4 shows block exemplary in volume and segmentation;
Fig. 5 shows the general introduction of the garbage reclamation of several segmentations;
Fig. 6 shows several pieces and segmentation before and after garbage reclamation activity;
Fig. 7 shows the state diagram of different bulk states;
Fig. 8 shows exemplary garbage reclamation queue;
Fig. 9 shows the several segmentations and corresponding garbage reclamation queue before and after garbage reclamation;
Figure 10 shows fragmentation state parameter and the exemplary diagram of volume state;
Figure 11 shows the another exemplary figure of fragmentation state parameter and volume state;
Figure 12 shows the another exemplary figure of fragmentation state parameter and volume state;
Figure 13 shows the first embodiment of method according to a first aspect of the present invention;
Figure 14 shows the second embodiment of method according to a first aspect of the present invention.
Embodiment
First, with reference to Fig. 3, show garbage recovering apparatus embodiment according to a third aspect of the present invention general structure and Function.Afterwards, with reference to Fig. 4 to Figure 12, the more details of 26S Proteasome Structure and Function are illustrated.Finally, with reference to Figure 13 and Figure 14, retouch The function of the inventive method embodiment according to first aspect is stated.Similar entity and reference number and different charts portion Divide and omit.
The exemplary embodiment of garbage recovering apparatus 30 of the present invention is shown in Fig. 3.Garbage recovering apparatus 30 includes state Parameter determination unit 31, garbage reclamation determining unit 32 and garbage reclamation unit 33.In addition, it includes control unit 34.Control Unit 34 processed is connected with state parameter determining unit 31, garbage reclamation determining unit 32 and garbage reclamation unit 33.In addition, shape State parameter determination unit 31 is connected with garbage reclamation determining unit 32, and garbage reclamation determining unit 32 and garbage reclamation unit 33 are connected.
Garbage recovering apparatus 30 is used to carry out the garbage reclamation rolled up in log-structuredization file system.The volume includes multiple points Section, each segmentation include multiple pieces.State parameter determining unit 31 determines the bulk state parameter of each block.In addition, it is based on phase The bulk state parameter for the block that should be segmented determines the fragmentation state parameter being each segmented.Finally, it is based on fragmentation state parameter and block State parameter determines volume state parameter.State parameter is submitted into garbage reclamation determining unit 32, then garbage reclamation determines single Member 32 determines garbage reclamation queue based on fragmentation state parameter.In addition, it is based on volume state and garbage reclamation queue determines rubbish Recovery segmentation, to determine to carry out the segmentation of garbage reclamation.Then, the list that these garbage reclamations are segmented is submitted into rubbish to return Unit 33 is received, garbage reclamation unit 33 finally carries out garbage reclamation to each garbage reclamation of corresponding garbage reclamation segmentation.State The function of parameter determination unit 31, garbage reclamation determining unit 32 and garbage reclamation unit 33 is controlled by control unit 34.
Hereinafter, the more information on typical log-structuredization file system is given.
As shown in figure 4, the volume of log-structuredization file system (Log structured file system, abbreviation LFS) 40 be the chain of segmentation 41,42,43,44,45.Each segmentation 40,41,42,43,44,45 is the set of physical disk block.Segmentation Capacity is usually 2MB or 8MB.LFS is by the distribution from freed segment pond come allocation of free space.Free space in segmentation is used It is allocated in the free block to establishment or more new file.
Therefore, LFS segmentation can be:
(1) it is idle completely or partially;
(2) it is filled up completely with effective data block;
(3) it is filled up completely with invalid block;
(4) effective and invalid block is filled.
Invalid block means that the block is previously written by the data of file, but after file renewal, it is by out-of-date number According to being stored in its current state.
The design of log-structuredization file system be based on it is assumed hereinafter that:This technology will be no longer valid, because modern Ever-increasing memory size causes I/O write-in to become complicated on computer, because reading almost always from memory cache It is achieved.LFS, which is stored, is considered as circular logging, and is sequentially written in daily record head.Therefore, invalid block is LFS operation logics The result of Copy on write (Copy-on-Write, abbreviation COW) strategy.COW strategies mean that amended blocks of files will not be more Newly, but the block of these modifications will write last daily record.
The example write operation in log-structuredization file system is shown in Fig. 5.Segmentation 50,51 and 52 is at least partly Filled with data.In operation described here, by extra block write-in segmentation 52.
However, log-structuredization file system must reclaim free space from daily record tail, to prevent file system in daily record Become full when headring is around to meet file system.Afterbody can be with Free up Memory, and by skipping the more recent version in daily record farther out Data move forward.If not newer version, data are moved and are attached to head.
Such garbage collection operation is as shown in Figure 6.Fig. 6 upper part is shown a case that before garbage reclamation.Segmentation 601st, 602,603,604 and 605 are present in volume 60.Segmentation 602 and 603 is dirty segmentation.
Fig. 6 lower part is shown a case that after garbage reclamation.Volume 60 still includes segmentation 601.Segmentation 602 is still made Exist for segmentation 612, segmentation 603 exists as segmentation 613, and segmentation 604 exists as segmentation 614, and segmentation 605 is as segmentation 615 are present.But the content of these segmentations has changed.Garbage reclamation is carried out to dirty segmentation 602 and 603.This means to dirty The content of segmentation 602 is replicated and write in space division section 605, so as to cause segmentation 615.Because segmentation 603 does not include effectively Data, so it is freed segment 613 that the garbage reclamation of the segmentation, which only includes segmentation markers,.In addition, segmentation is shown in Fig. 6 604 single piece of renewal.Hereafter this block is idle.Content is copied into segmentation 615.
But the performance of log-structuredization file system may greatly be reduced by arbitrarily carrying out this garbage collection operation.
In log-structuredization file system, each segmentation is block sequence.The block of segmentation can be:
(1) " idle ";
(2) " predistribution ";
(3) " effective ";
(4) " invalid ".
These bulk states are defined as follows shown in table:
The various combination of bulk state defines the state of segmentation itself in single split:
Therefore, segmentation can be:
(1) " clean ";
(2) " it is used ";
(3) " used ";
(4) " pre- dirty ";
(5) " dirty ".
Fragmentation state is defined as follows shown in table:
State Description
Clean All pieces in segmentation are all free blocks.
It is used Segmentation has effective, invalid, predistribution and free block.
Use All pieces in segmentation are all active blocks.
It is pre- dirty Segmentation only has effective and invalid block.
Dirty All pieces in segmentation are all invalid blocks.
Fig. 7 shows possible fragmentation state conversion in state diagram.First, in state 71, exemplary segmentation has been It is absolutely dry net.After last daily record preserved on to volume carries out segment assignments, segmentation turns into " being used ".This is right Should be in fragmentation state 72.After the daily record of preservation is finished the free space of segmentation, 72 turns of state " can will be used " It is changed to " use " state 75 or " pre- dirty " state 73., can " having used segmentation due to deleting or updating operation " state 75 transfer be " pre- dirty " state 73.Finally, in segmentation all pieces it is invalid after, segmentation enters " dirty " shape State 74.By carrying out garbage reclamation (garbage collection, abbreviation GC), segmentation is converted into " totally " state 71.
The counting of active block is a key factor in segmentation.Because all active blocks must be answered from the segmentation of clearance Make a last daily record, therefore the factor definition intensity of segmentation settlement period GC work.Therefore, it is segmented the cost of clearance Increase with the increase of effective block count in segmentation.Therefore, GC should select the segmentation with minimum clearance cost.But only It is inadequate for maximally effective GC to use " minimum clearance cost standard ", because in different volume states, it is such Standard can have different efficiency, even result in great performance cost.It may be additionally based on effectively block count pair in segmentation It is grouped.
The combination of fragmentation count can be as the basis for distinguishing possible volume state in different groups.Following table describe it is this can The volume state of energy.
State Description
Clean Volume only includes clean segmentation.
Ice-cold The segmentation largely distributed on volume is with 100% active block.
Cold Active block of the segmentation with 80-99% largely distributed on volume.
Cooling Active block of the segmentation with 65-80% largely distributed on volume.
Heating Active block of the segmentation with 50-65% largely distributed on volume.
Warm Active block of the segmentation with 35-50% largely distributed on volume.
Preheating Active block of the segmentation with 20-35% largely distributed on volume.
Heat Active block of the segmentation with 1-20% largely distributed on volume.
Boiling The segmentation largely distributed on volume is with 0% active block.
Invalid block count can be as the standard of the GC queue structures of pre- dirty/dirty segmentation.Such standard can be used as choosing Select a kind of method of pre- dirty/dirty segmentation with minimum clearance cost.Therefore, can by GC queue facilities into it is dirty segmentation chain battle array Row, and the invalid block count by being used as array index is ranked up to it.Fig. 8 has carried out simple description to this.Therefore, GC Segmentation of the garbage reclamation segmentation as the maximum invalid block count of clearance can be selected.In addition, as shown in preceding table, it is different invalid to calculate Fragmentation count in the range of block count can detect to volume state.
In Fig. 8, garbage reclamation queue 80 is particularly illustrated.The invalid number of blocks for being segmented 81 is used as index.Each index Number correspondence segmentation chain 82 to be cleared.
Fig. 9 upper left describes volume 90, and it, which has, initially " has used " three of state to be segmented.Therefore, institute The numbering for having segmentation is located at, and there is invalid block to be counted as in 0 segmentation chain.Fig. 9 bottom left section shows corresponding garbage reclamation Queue.Now, the file in segmentation #2 is deleted, and updates the file in segmentation #1 and #3.By resulting volume 91 It is shown in Fig. 9 upper right portion.The file of renewal is now currently located in segmentation #4 and #5.Fig. 9 lower right-most portion shows and thus obtained The garbage reclamation queue arrived.
The fragmentation count distribution between the state with various invalid block counts is understood, so as to establish dependence invalid block The figure of the fragmentation count of counting represents.These expressions are shown in Figure 10, Figure 11 and Figure 12.
The peak value of data can also be determined in the figure according to the information.For example, in Figure 10, peak value is obviously in invalid block 1 is counted, it is " cold " to cause volume state.In Figure 11, peak value obviously in the invalid block count between 332 and 408, causes to roll up State is " preheating ".In Figure 12, peak value is obviously in invalid block count 511, and it is " hot " to cause volume state.
GC behaviors can be managed according to the position of this peak value, wherein, the position correspondence of the peak value is on volume state Information.The exemplary GC behaviors based on volume state parameter are shown in Figure 14.This may be referred to the elaboration on the above method.
The exemplary embodiment of method according to a first aspect of the present invention is shown in Figure 13.In first step 130, Volume is provided in log-structuredization file system.The volume includes multiple segmentations, and each segmentation includes multiple pieces.In second step In 131, it is determined that the bulk state parameter of each block.On determining the details of bulk state parameter, with reference to elaboration above.In the 3rd step In rapid 132, the bulk state parameter of the block based on corresponding segment determines the fragmentation state parameter being each segmented.This is referring also to above Description.In four steps 133, the volume state parameter of volume is determined according to above-mentioned fragmentation state parameter and bulk state parameter. In 5th step 134, garbage reclamation queue is determined based on the fragmentation state parameter determined in four steps 133.This is referring also to upper State the elaboration pair determine garbage reclamation queue.In addition, in the 6th step 135, determined based on volume state and garbage reclamation queue Garbage reclamation is segmented.On the details of realization, referring also to description above.Finally, it is true before progress in the 7th step 136 The garbage reclamation of fixed garbage reclamation segmentation.This is referring also to elaboration above.
Finally, the specific embodiment of the inventive method according to a first aspect of the present invention is shown in Figure 14.It is depicted herein The step of corresponding to Figure 13 the 6th step 135.
In first step 140, whether the volume state parameter value for judging to determine before is " hot ".If so, then second In step 141, it is all segmentations in the range of effective 1-20% to select garbage reclamation segmentation as bulk state parameter value.If no It is then in third step 142, to check whether volume state parameter value is " preheating ".If in four steps 143, selection Garbage reclamation is segmented, so as to which selection block status parameter values are at least some segmentations and the bulk in the range of effective 20-25% State parameter value is all segmentations in the range of effective 1-20%.If it is not, then in the 5th step 144, volume state ginseng is checked Whether numerical value is " warm ".If so, then in the 6th step 145, select garbage reclamation segmentation as bulk state parameter value for At least some segmentations in the range of effective 35-50%.If it is not, then in the 7th step 146, judge that volume state parameter value is No is heating.If so, it is effective 50- then to select garbage reclamation segmentation to be used as bulk state parameter value in the 8th step 147 At least some segmentations in the range of 65%.If it is not, then in the 9th step 148, check whether volume state parameter value is " cooling ".If so, then garbage reclamation is not selected to be segmented.In the tenth step 149, thread is carried out to daily record by free range.If no It is then in the 11st step 150, to check whether volume state parameter value is " cold ".If so, then continue the tenth step 149.
It is to select all segmentations to volume state parameter value " boiling " reaction except volume state parameter value described herein It is segmented as garbage reclamation.In addition, as the reaction to volume state parameter value " ice-cold " or " totally ", rubbish is not also selected Recovery segmentation.In the case of volume state parameter value is " ice-cold ", the thread in the tenth step 149 is also carried out.
The invention is not restricted to examples illustrated herein.Especially, the present invention can be used together with any storage medium, including Hard disk drive, even solid-state disk, random access memory or flash memory.The feature of exemplary embodiment can be used for any advantage Combination.
Herein the present invention is described with reference to various embodiments.But those skilled in the art, by putting into practice the present invention, research is attached Figure, claim of the invention and appended, it is to be understood that and obtain other variants of open embodiment.In claims In, word " comprising " is not excluded for other elements or step, and " one " is not excluded for multiple.Single processor or other units can be completed The function of several devices described in claim.The dependent claims that are typically different only are being documented in some measures In this it is simple the fact be not meant to that the combination of these measures can not be used effectively.Computer program can be stored or divided Be dealt on suitable medium, for example, together with other hardware either as other hardware part provide optical storage media or Solid state medium, for example it can also be distributed in other forms by internet or other wired or wireless telecommunication systems.

Claims (17)

  1. A kind of 1. rubbish recovering method rolled up in log-structuredization file system, it is characterised in that
    The volume (10,20,21,40,60,90,91) include it is multiple segmentation (41,42,43,44,45,50,51,52,601,602, 603rd, 604,605,612,613,614,615), wherein,
    The segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612,613,614,615) is respectively wrapped Containing multiple pieces, wherein,
    Methods described includes:
    It is determined that the bulk state parameter of (131) described each block;
    Based on the segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612,613,614,615) Described piece of the bulk state parameter determine (132) described each segmentation (41,42,43,44,45,50,51,52,601, 602nd, 603,604,605,612,613,614, fragmentation state parameter 615);
    (133) described volume (10,20,21,40,60,90,91) is determined based on the fragmentation state parameter and the bulk state parameter Volume state parameter;
    (134) garbage reclamation queue is determined based on the fragmentation state parameter;
    The segmentation of (135) garbage reclamation is determined based on the volume state and the garbage reclamation queue;
    Carry out the garbage reclamation of (136) the garbage reclamation segmentation.
  2. 2. according to the method for claim 1, it is characterised in that
    Described determination (131) described bulk state parameter includes:Bulk state parameter value is distributed for each block, wherein,
    Possible bulk state parameter value is:
    Idle, described piece of instruction is ready for being used for write operation but also unassigned;
    Invalid, described piece of instruction has been released after file renewal, file truncation or deletion action but has not been recovered as rubbish also Rubbish;
    Predistribution, described piece of instruction, which has been pre-assigned in file but described piece, data write-in also;
    Effectively, described piece of instruction has been allocated and data with existing writes in described piece.
  3. 3. according to the method for claim 2, it is characterised in that
    It is described determine (132) described each segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605, 612nd, 613,614, fragmentation state parameter 615) includes:For each segmentation (41,42,43,44,45,50,51,52, 601st, 602,603,604,605,612,613,614,615) assignment segments status parameter values, wherein, possible fragmentation state ginseng Numerical value is:
    It is clean, indicate the segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612,613, 614th, only 615) there is bulk state parameter value for idle block;
    Be used, indicate it is described segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612, 613rd, 614 615), there is bulk state parameter value for effective, invalid, predistribution and the block of free time;
    Used, indicate it is described segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612, 613rd, 614 it is effective block, 615) only to have bulk state parameter value;
    It is pre- dirty, indicate it is described segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612,613, 614th, only 615) there is bulk state parameter value for effective and invalid block;
    It is dirty, indicate the segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612,613, 614th, it is invalid block 615) only to have bulk state parameter value.
  4. 4. according to the method for claim 3, it is characterised in that
    The volume state parameter for determining (133) described volume (10,20,21,40,60,90,91) includes:For the volume (10,20, 21st, 40 volume state parameter value 91), 60,90, is distributed, wherein,
    Possible volume state parameter value is:
    It is clean, indicate that the volume (10,20,21,40,60,90,91) only comprising fragmentation state parameter value is clean segmentation (41、42、43、44、45、50、51、52、601、602、603、604、605、612、613、614、615);Ice-cold, described in instruction Volume (10,20,21,40,60,90,91) on largely distribute segmentation (41,42,43,44,45,50,51,52,601,602, 603rd, 604,605,612,613,614,615) there is the block that bulk state parameter value is effective 100%;
    It is cold, the segmentation that indicates largely to distribute on the volume (10,20,21,40,60,90,91) (41,42,43,44,45, 50th, 51 it is effective 80-99%, 52,601,602,603,604,605,612,613,614,615) to have bulk state parameter value Block;
    Cooling, the segmentation that indicates largely to distribute on the volume (10,20,21,40,60,90,91) (41,42,43,44,45, 50th, 51 it is effective 65-80%, 52,601,602,603,604,605,612,613,614,615) to have bulk state parameter value Block;
    Heating, the segmentation that indicates largely to distribute on the volume (10,20,21,40,60,90,91) (41,42,43,44,45, 50th, 51 it is effective 50-65%, 52,601,602,603,604,605,612,613,614,615) to have bulk state parameter value Block;
    It is warm, the segmentation that indicates largely to distribute on the volume (10,20,21,40,60,90,91) (41,42,43,44,45, 50th, 51 it is effective 35-50%, 52,601,602,603,604,605,612,613,614,615) to have bulk state parameter value Block;
    Preheating, the segmentation that indicates largely to distribute on the volume (10,20,21,40,60,90,91) (41,42,43,44,45, 50th, 51 it is effective 20-35%, 52,601,602,603,604,605,612,613,614,615) to have bulk state parameter value Block;
    Heat, the segmentation that indicates largely to distribute on the volume (10,20,21,40,60,90,91) (41,42,43,44,45, 50th, 51 it is effective 1-20%'s, 52,601,602,603,604,605,612,613,614,615) to have bulk state parameter value Block;
    Boiling, the segmentation that indicates largely to distribute on the volume (10,20,21,40,60,90,91) (41,42,43,44,45, 50th, 51,52,601,602,603,604,605,612,613,614,615) there is the block that bulk state parameter value is effective 0%.
  5. 5. according to the method for claim 4, it is characterised in that
    Described determination (134) garbage reclamation queue includes:
    Determine each segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612,613,614, 615) invalid block number;
    According to its invalid block number to it is described segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612, 613rd, 614,615) be ranked up, wherein, by the higher segmentation of invalid block number (41,42,43,44,45,50,51,52,601, 602nd, 603,604,605,612,613,614,615) it is arranged in the garbage reclamation queue, its garbage reclamation is earlier than invalid block The relatively low segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612,613,614,615) of number.
  6. 6. according to the method for claim 5, it is characterised in that
    Determination (135) garbage reclamation segmentation includes:
    If the volume state parameter value for boiling, select all segmentations (41,42,43,44,45,50,51,52, 601st, 602,603,604,605,612,613,614,615) it is segmented as garbage reclamation;
    If the volume state parameter value is hot, it is effective to select the garbage reclamation segmentation as bulk state parameter value In the range of 1-20% all segmentations (41,42,43,44,45,50,51,52,601,602,603,604,605,612,613, 614、615);
    If the volume state parameter value is preheating, it is effective to select the garbage reclamation segmentation as bulk state parameter value 20-35% in the range of at least some segmentations (41,42,43,44,45,50,51,52,601,602,603,604,605, 612nd, 613,614,615) and bulk state parameter value be in the range of effective 1-20% all segmentations (41,42,43,44, 45、50、51、52、601、602、603、604、605、612、613、614、615);
    If the volume state parameter value is warm, it is effective to select the garbage reclamation segmentation as bulk state parameter value 35-50% in the range of at least some segmentations (41,42,43,44,45,50,51,52,601,602,603,604,605, 612、613、614、615);
    If the volume state parameter value is heating, it is effective to select the garbage reclamation segmentation as bulk state parameter value 50-65% in the range of at least some segmentations (41,42,43,44,45,50,51,52,601,602,603,604,605, 612、613、614、615);
    If the volume state parameter value is cooling, garbage reclamation is not selected to be segmented;
    If the volume state parameter value is cold, garbage reclamation is not selected to be segmented;
    If the volume state parameter value is ice-cold, garbage reclamation is not selected to be segmented;
    If the volume state parameter value is clean, garbage reclamation is not selected to be segmented.
  7. 7. according to the method for claim 6, it is characterised in that
    The volume state parameter value for cooling, it is cold or ice-cold in the case of, by the volume (10,20,21,40, 60th, 90, the daily record of the free range 91) to the log-structuredization file system carries out thread.
  8. 8. the method according to claim 6 or 7, it is characterised in that
    The garbage reclamation for carrying out (136) described garbage reclamation segmentation includes:
    It is segmented from the garbage reclamation and reads real time data;
    By the real time data write back fragmentation state parameter value for clean less segmentation (41,42,43,44,45,50,51,52, 601、602、603、604、605、612、613、614、615);
    Fragmentation state parameter value is marked for clean garbage reclamation segmentation.
  9. A kind of 9. computer program with program code, it is characterised in that when run on a computer, described program generation Code is used to perform the method as described in claim 1 to 8.
  10. 10. one kind is used to carry out the rubbish that the garbage reclamation of (10,20,21,40,60,90,91) is rolled up in log-structuredization file system Rubbish reclaimer (30), it is characterised in that
    The volume (10,20,21,40,60,90,91) include it is multiple segmentation (41,42,43,44,45,50,51,52,601,602, 603rd, 604,605,612,613,614,615), wherein,
    The segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612,613,614,615) is respectively wrapped Containing multiple pieces, wherein,
    The equipment (30) includes state parameter determining unit (31), is used for:
    Determine the bulk state parameter of each block;
    Based on the segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612,613,614,615) Described piece of the bulk state parameter determine each segmentation (41,42,43,44,45,50,51,52,601,602,603, 604th, 605,612,613,614, fragmentation state parameter 615);
    The volume of the volume (10,20,21,40,60,90,91) is determined based on the fragmentation state parameter and the bulk state parameter State parameter, wherein,
    The equipment (30) includes garbage reclamation determining unit (32), is used for:
    Garbage reclamation queue is determined based on the fragmentation state parameter;
    Determine that garbage reclamation is segmented based on the volume state and the garbage reclamation queue, wherein,
    The equipment (30) includes garbage reclamation unit (33), for carrying out the garbage reclamation of the garbage reclamation segmentation.
  11. 11. equipment according to claim 10, it is characterised in that
    The state parameter determining unit (31) is used to determine the bulk by distributing bulk state parameter value for each block State parameter, wherein,
    Possible bulk state parameter value is:
    Idle, described piece of instruction is ready for being used for write operation but also unassigned;
    Invalid, described piece of instruction has been released after file renewal, file truncation or deletion action but has not been recovered as rubbish also Rubbish;
    Predistribution, described piece of instruction, which has been pre-assigned in file but described piece, data write-in also;
    Effectively, described piece of instruction has been allocated and data with existing writes in described piece.
  12. 12. equipment according to claim 11, it is characterised in that
    The state parameter determining unit (31) be used for by for each segmentation (41,42,43,44,45,50,51,52, 601st, 602,603,604,605,612,613,614,615) assignment segments status parameter values determine the segmentation (41,42,43, 44th, 45,50,51,52,601,602,603,604,605,612,613,614, the fragmentation state parameter 615), wherein,
    Possible fragmentation state parameter value is:
    It is clean, indicate the segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612,613, 614th, only 615) there is bulk state parameter value for idle block;
    Be used, indicate it is described segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612, 613rd, 614 615), there is bulk state parameter value for effective, invalid, predistribution and the block of free time;
    Used, indicate it is described segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612, 613rd, 614 it is effective block, 615) only to have bulk state parameter value;
    It is pre- dirty, indicate it is described segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612,613, 614th, only 615) there is bulk state parameter value for effective and invalid block;
    It is dirty, indicate the segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612,613, 614th, it is invalid block 615) only to have bulk state parameter value.
  13. 13. equipment according to claim 12, it is characterised in that
    The state parameter determining unit (31) is used for by distributing volume state for the volume (10,20,21,40,60,90,91) Parameter value determines the volume state parameter of the volume (10,20,21,40,60,90,91), wherein,
    Possible volume state parameter value is:
    It is clean, indicate that the volume (10,20,21,40,60,90,91) only comprising fragmentation state parameter value is clean segmentation (41、42、43、44、45、50、51、52、601、602、603、604、605、612、613、614、615);Ice-cold, described in instruction Volume (10,20,21,40,60,90,91) on largely distribute segmentation (41,42,43,44,45,50,51,52,601,602, 603rd, 604,605,612,613,614,615) there is the block that bulk state parameter value is effective 100%;
    It is cold, the segmentation that indicates largely to distribute on the volume (10,20,21,40,60,90,91) (41,42,43,44,45, 50th, 51 it is effective 80-99%, 52,601,602,603,604,605,612,613,614,615) to have bulk state parameter value Block;
    Cooling, the segmentation that indicates largely to distribute on the volume (10,20,21,40,60,90,91) (41,42,43,44,45, 50th, 51 it is effective 65-80%, 52,601,602,603,604,605,612,613,614,615) to have bulk state parameter value Block;
    Heating, the segmentation that indicates largely to distribute on the volume (10,20,21,40,60,90,91) (41,42,43,44,45, 50th, 51 it is effective 50-65%, 52,601,602,603,604,605,612,613,614,615) to have bulk state parameter value Block;
    It is warm, the segmentation that indicates largely to distribute on the volume (10,20,21,40,60,90,91) (41,42,43,44,45, 50th, 51 it is effective 35-50%, 52,601,602,603,604,605,612,613,614,615) to have bulk state parameter value Block;
    Preheating, the segmentation that indicates largely to distribute on the volume (10,20,21,40,60,90,91) (41,42,43,44,45, 50th, 51 it is effective 20-35%, 52,601,602,603,604,605,612,613,614,615) to have bulk state parameter value Block;
    Heat, the segmentation that indicates largely to distribute on the volume (10,20,21,40,60,90,91) (41,42,43,44,45, 50th, 51 it is effective 1-20%'s, 52,601,602,603,604,605,612,613,614,615) to have bulk state parameter value Block;
    Boiling, the segmentation that indicates largely to distribute on the volume (10,20,21,40,60,90,91) (41,42,43,44,45, 50th, 51,52,601,602,603,604,605,612,613,614,615) there is the block that bulk state parameter value is effective 0%.
  14. 14. equipment according to claim 13, it is characterised in that
    The garbage reclamation determining unit (32) is used to determine the garbage reclamation queue in the following manner:
    Determine each segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612,613,614, 615) invalid block number;
    According to its invalid block number to it is described segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612, 613rd, 614,615) be ranked up, wherein, by the higher segmentation of invalid block number (41,42,43,44,45,50,51,52,601, 602nd, 603,604,605,612,613,614,615) it is arranged in the garbage reclamation queue, its garbage reclamation is earlier than invalid block The relatively low segmentation (41,42,43,44,45,50,51,52,601,602,603,604,605,612,613,614,615) of number.
  15. 15. equipment according to claim 14, it is characterised in that
    The garbage reclamation determining unit (32) is used to determine the garbage reclamation segmentation in the following manner:
    If the volume state parameter value for boiling, select all segmentations (41,42,43,44,45,50,51,52, 601st, 602,603,604,605,612,613,614,615) it is segmented as garbage reclamation;
    If the volume state parameter value is hot, it is effective to select the garbage reclamation segmentation as bulk state parameter value In the range of 1-20% all segmentations (41,42,43,44,45,50,51,52,601,602,603,604,605,612,613, 614、615);
    If the volume state parameter value is preheating, it is effective to select the garbage reclamation segmentation as bulk state parameter value 20-35% in the range of at least some segmentations (41,42,43,44,45,50,51,52,601,602,603,604,605, 612nd, 613,614,615) and bulk state parameter value be in the range of effective 1-20% all segmentations (41,42,43,44, 45、50、51、52、601、602、603、604、605、612、613、614、615);
    If the volume state parameter value is warm, it is effective to select the garbage reclamation segmentation as bulk state parameter value 35-50% in the range of at least some segmentations (41,42,43,44,45,50,51,52,601,602,603,604,605, 612、613、614、615);
    If the volume state parameter value is heating, it is effective to select the garbage reclamation segmentation as bulk state parameter value 50-65% in the range of at least some segmentations (41,42,43,44,45,50,51,52,601,602,603,604,605, 612、613、614、615);
    If the volume state parameter value is cooling, garbage reclamation is not selected to be segmented;
    If the volume state parameter value is cold, garbage reclamation is not selected to be segmented;
    If the volume state parameter value is ice-cold, garbage reclamation is not selected to be segmented;
    If the volume state parameter value is clean, garbage reclamation is not selected to be segmented.
  16. 16. equipment according to claim 15, it is characterised in that
    The garbage recovering apparatus (30) is used in the case where the volume state parameter value is cooling, cold or ice-cold, Pass through the daily record of the free range of the volume (10,20,21,40,60,90,91) to the log-structuredization file system Carry out thread.
  17. 17. the equipment according to claim 15 or 16, it is characterised in that
    The garbage reclamation unit (33) be used for carry out in the following manner the garbage reclamation segmentation (41,42,43,44,45, 50th, 51,52,601,602,603,604,605,612,613, the 614, garbage reclamation 615):
    It is segmented from the garbage reclamation and reads real time data;
    By the real time data write back fragmentation state parameter value for clean less segmentation (41,42,43,44,45,50,51,52, 601、602、603、604、605、612、613、614、615);
    Fragmentation state parameter value is marked for clean garbage reclamation segmentation.
CN201580079149.6A 2015-05-06 2015-05-06 Garbage collection method and equipment in log structured file system Expired - Fee Related CN107533506B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/RU2015/000289 WO2016178594A1 (en) 2015-05-06 2015-05-06 Method and device for garbage collection in log structured file systems

Publications (2)

Publication Number Publication Date
CN107533506A true CN107533506A (en) 2018-01-02
CN107533506B CN107533506B (en) 2021-03-23

Family

ID=54771172

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201580079149.6A Expired - Fee Related CN107533506B (en) 2015-05-06 2015-05-06 Garbage collection method and equipment in log structured file system

Country Status (2)

Country Link
CN (1) CN107533506B (en)
WO (1) WO2016178594A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020000492A1 (en) * 2018-06-30 2020-01-02 华为技术有限公司 Storage fragment managing method and terminal
US10635599B2 (en) 2018-07-26 2020-04-28 Sandisk Technologies Llc Memory controller assisted address mapping

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11573893B2 (en) * 2019-09-12 2023-02-07 Western Digital Technologies, Inc. Storage system and method for validation of hints prior to garbage collection

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488153A (en) * 2009-02-12 2009-07-22 浙江大学 Method for implementing high-capacity flash memory file system in embedded type Linux
US20110283049A1 (en) * 2010-05-12 2011-11-17 Western Digital Technologies, Inc. System and method for managing garbage collection in solid-state memory

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9183134B2 (en) * 2010-04-22 2015-11-10 Seagate Technology Llc Data segregation in a storage device
WO2012051600A2 (en) * 2010-10-15 2012-04-19 Kyquang Son File system-aware solid-state storage management system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488153A (en) * 2009-02-12 2009-07-22 浙江大学 Method for implementing high-capacity flash memory file system in embedded type Linux
US20110283049A1 (en) * 2010-05-12 2011-11-17 Western Digital Technologies, Inc. System and method for managing garbage collection in solid-state memory

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHANGMAN LEE ET AL: "《13th USENIX Conference on File and Storage Technologies(FAST"15)》", 19 February 2015, HTTPS://WWW.USENIX.ORG/SYSTEM/FILES/CONFERENCE/FAST15/FAST15-PAPER-LEE.PDF *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020000492A1 (en) * 2018-06-30 2020-01-02 华为技术有限公司 Storage fragment managing method and terminal
CN110945486A (en) * 2018-06-30 2020-03-31 华为技术有限公司 Storage fragment management method and terminal
CN110945486B (en) * 2018-06-30 2022-06-10 华为技术有限公司 Storage fragment management method and terminal
US11842046B2 (en) 2018-06-30 2023-12-12 Huawei Technologies Co., Ltd. Storage fragment management method and terminal
US10635599B2 (en) 2018-07-26 2020-04-28 Sandisk Technologies Llc Memory controller assisted address mapping

Also Published As

Publication number Publication date
WO2016178594A8 (en) 2017-02-16
WO2016178594A1 (en) 2016-11-10
CN107533506B (en) 2021-03-23

Similar Documents

Publication Publication Date Title
US10802718B2 (en) Method and device for determination of garbage collector thread number and activity management in log-structured file systems
CN103440207B (en) Caching method and caching device
CN104572491B (en) A kind of read buffer management method and device based on solid state hard disc
US6871272B2 (en) Data sorting in information storage systems
CN104298610B (en) Data storage system and its management method
CN105589812B (en) Disk fragments method for sorting, device and host
US8161240B2 (en) Cache management
CN105302744B (en) The invalid data area of Cache
CN106502587B (en) Hard disk data management method and hard disk control device
CN104933169B (en) Based on the preferential file system fragmentation method for sorting of hot spot file
DE112012004571B4 (en) Support for partial data segments in flash caches
CN111045956B (en) Solid state disk garbage recycling method and device based on multi-core CPU
CN103885728A (en) Magnetic disk cache system based on solid-state disk
Wang et al. {WOLF--A} Novel Reordering Write Buffer to Boost the Performance of {Log-Structured} File System
Wu et al. KVSSD: Close integration of LSM trees and flash translation layer for write-efficient KV store
CN103150245B (en) Determine method and the storage controller of the access characteristics of data entity
CN107092563B (en) Garbage recovery method and device
CN107533506A (en) Rubbish recovering method and equipment in log-structuredization file system
Ko et al. A new linux swap system for flash memory storage devices
CN110413545A (en) Memory management method, electronic equipment and computer program product
Shin Hot/cold clustering for page mapping in NAND flash memory
WO2015072925A1 (en) Method for hot i/o selective placement and metadata replacement for non-volatile memory cache on hybrid drive or system
CN109144431A (en) Caching method, device, equipment and the storage medium of data block
CA2415018C (en) Adaptive parallel data clustering when loading a data structure containing data clustered along one or more dimensions
CN104317735A (en) High-capacity cache and method for data storage and readout as well as memory allocation and recovery

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210323