CN109086223B - Method and device for controlling garbage recovery - Google Patents

Method and device for controlling garbage recovery Download PDF

Info

Publication number
CN109086223B
CN109086223B CN201810956410.1A CN201810956410A CN109086223B CN 109086223 B CN109086223 B CN 109086223B CN 201810956410 A CN201810956410 A CN 201810956410A CN 109086223 B CN109086223 B CN 109086223B
Authority
CN
China
Prior art keywords
recovery
weight
data
target
total
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.)
Active
Application number
CN201810956410.1A
Other languages
Chinese (zh)
Other versions
CN109086223A (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810956410.1A priority Critical patent/CN109086223B/en
Publication of CN109086223A publication Critical patent/CN109086223A/en
Application granted granted Critical
Publication of CN109086223B publication Critical patent/CN109086223B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/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/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
    • G06F12/0269Incremental or concurrent garbage collection, e.g. in real-time systems

Abstract

The invention discloses a method and a device for controlling garbage recovery, wherein the method for controlling garbage recovery comprises the following steps: acquiring preset weight of target recovery data; determining a recovery weight threshold according to the CPU utilization rate; acquiring the number of the issued target recovery data; acquiring a total recovery weight according to a preset weight of the target recovery data and the number of the target recovery data; and if the total recovery weight is greater than or equal to the recovery weight threshold, stopping issuing a new recovery task. According to the method, the recovery weight threshold is obtained according to the utilization rate of the current CPU, and the total recovery weight is compared with the recovery weight threshold, so that the control on the number of issued tasks is realized, and further the influence on a system can be reduced.

Description

Method and device for controlling garbage recovery
Technical Field
The invention relates to the technical field of full flash memory, in particular to a method and a device for controlling garbage recovery.
Background
With the development of the full flash storage technology, the garbage recycling technology is receiving attention. Garbage Collection (GC) is a process of collecting memory space that is not used for a long time in a storage and memory space occupied by discarded information.
The full flash memory array software has the following characteristics when being used with a Solid State Drive (SSD): the characteristic of being unable to overwrite and the characteristic of the SSD disk that the minimum unit of write data is different from the minimum unit of erase. Thus, the measures to be taken in storing are: the redirected writes replace the overwrite writes and free up memory by garbage collection.
However, during garbage collection, data migration and metadata modification may generate more data requests for the storage array, and consume resources such as a CPU, a memory, and a hard disk of the system, thereby affecting performance and latency of a host IO.
However, in order to relieve the pressure of garbage collection on the system, the prior art generally adopts the concurrency of a control space recovery unit (extend) to control the pressure of garbage collection on the system. However, since the number of transitions required in each recovery unit is variable, and the number of direct recoveries is also variable, pressure fluctuation is easily caused, and the pressure sometimes is large and the pressure sometimes is small, which greatly affects the read/write (IO) of the host.
Disclosure of Invention
In order to solve the above technical problems in the prior art, the present invention provides a method and an apparatus for controlling garbage collection, which can stabilize the pressure generated by garbage collection and reduce the influence on the system by controlling the real-time total weight of the garbage collection being performed.
In order to achieve the purpose, the technical scheme provided by the invention is as follows:
the invention provides a method for controlling garbage recovery, which comprises the following steps:
acquiring preset weight of target recovery data;
determining a recovery weight threshold according to the CPU utilization rate;
acquiring the number of the issued target recovery data;
acquiring a total recovery weight according to a preset weight of the target recovery data and the number of the target recovery data;
and if the total recovery weight is greater than or equal to the recovery weight threshold, stopping issuing a new recovery task.
Optionally, the method for controlling garbage recycling further includes:
and if the total recovery weight is smaller than the recovery weight threshold, issuing a new recovery task.
Optionally, the target recovery data includes migration data and/or direct recovery data.
Optionally, when the target recovery data includes migration data and direct recovery data, the preset weight includes a first weight and a second weight, where the first weight is the preset weight of the migration data, and the second weight is the preset weight of the direct recovery data;
the number comprises a first number and a second number, wherein the first number is the number of the migration data, and the second number is the number of the direct recovery data;
then, the obtaining of the total recycling weight specifically includes:
acquiring the recovery weight of the migration data according to the product of the first weight and the first number;
acquiring the recycling weight of the directly recycled data according to the product of the second weight and the second number;
and acquiring a total recovery weight according to the recovery weight of the migration data and the recovery weight of the direct recovery data.
Optionally, the first weight is greater than the second weight.
Optionally, the target recovery data is from the same recovery unit extend.
Optionally, the target recovery data is from a different recovery unit extend.
The invention also provides a device for controlling garbage recovery, which comprises:
the first acquisition unit is used for acquiring the preset weight of the target recovery data;
the determining unit is used for determining a recovery weight threshold according to the CPU utilization rate;
the second acquisition unit is used for acquiring the number of the issued target recovery data;
the third acquisition unit is used for acquiring a total recovery weight according to the preset weight of the target recovery data and the number of the target recovery data;
and the stopping unit is used for stopping issuing a new recovery task if the total recovery weight is greater than or equal to the recovery weight threshold.
Optionally, the device for controlling garbage recycling further includes:
and the issuing unit is used for issuing a new recovery task if the total recovery weight is smaller than the recovery weight threshold.
Optionally, the target recovery data includes migration data and/or direct recovery data.
Compared with the prior art, the invention has at least the following advantages:
the application provides a method for controlling garbage recovery, which comprises the following steps: acquiring preset weight of target recovery data; determining a recovery weight threshold according to the CPU utilization rate; acquiring the number of the issued target recovery data; acquiring a total recovery weight according to a preset weight of the target recovery data and the number of the target recovery data; and if the total recovery weight is greater than or equal to the recovery weight threshold, stopping issuing a new recovery task. According to the method, the preset weight of the target recovery data is obtained, the recovery weight threshold is obtained according to the utilization rate of the current CPU, and then the total recovery weight is compared with the recovery weight threshold, so that the control on the number of issued tasks is realized, the pressure generated by garbage recovery can be stabilized, and the influence on a system is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method for controlling garbage collection according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a method for controlling garbage collection according to a second embodiment of the present application;
fig. 3 is a schematic structural diagram of a device for controlling garbage collection according to a third embodiment of the present application.
Detailed Description
Before describing the embodiments of the present application, technical terms used in describing the embodiments of the present application will be described.
Migrating data: when garbage is recovered, the recovered memory data needs to be realized through data migration.
Directly recycling data: when garbage is recycled, the recycled memory data needs to be directly recycled.
Recovery unit extend: a reclamation unit for storage space allocation.
And (3) recovering the granularity Grain: and a storage unit used when the user stores data.
It should be noted that each extension includes multiple gains, and each gain may be migration data or direct recovery data.
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
referring to fig. 1, the figure is a flowchart of a method for controlling garbage collection according to an embodiment of the present application.
The method for controlling garbage recovery provided by the embodiment of the application comprises the following steps:
s101: acquiring preset weight of target recovery data;
the preset weight is a preset weight, and the preset weight may be preset according to an actual application scenario.
The target recovery data refers to memory data that needs to be recovered during garbage recovery. The target recovery data may include migration data, direct recovery data, migration data and direct recovery data.
For example, the preset weight of the target recovery data is set to 2 in advance.
S102: determining a recovery weight threshold according to the CPU utilization rate;
the weight threshold is determined according to the utilization rate of the CPU, wherein the higher the utilization rate of the CPU is, the smaller the recovery weight threshold is; the lower the CPU utilization, the larger the reclamation weight threshold.
For example, when the CPU utilization is 70%, the reclaim weight threshold may be 100; when the CPU utilization is 80%, the reclamation weight threshold may be 80.
To improve the accuracy of the reclamation weight threshold, the reclamation weight threshold may be obtained in real-time.
S103: acquiring the number of the issued target recovery data;
the issued number of target recovery data refers to the number of grains which are not recovered in the issued recovery task.
For example, the issued recycling task of the memory includes 100 grains, wherein 30 grains are already recycled, and 70 grains are not recycled, and at this time, the number of the issued target recycled data is 70.
It should be noted that the number of target recovery data may be acquired in real time.
S104: acquiring a total recovery weight according to a preset weight of the target recovery data and the number of the target recovery data;
the reclamation total weight refers to the total weight of the reclamation tasks to be completed.
As an example, the value of the total weight of reclamation may be a product of a preset weight of the target reclamation data and the number of the target reclamation data.
For example, when the preset weight of the recycled data is 2 and the number of the target recycled data is 70, the total recycling weight may be 140.
S105: and if the total recovery weight is greater than or equal to the recovery weight threshold, stopping issuing a new recovery task.
As an example, when the total recycle weight is 140 and the recycle weight threshold is 139, then the issuing of the new recycle task is stopped.
The method for controlling garbage recovery provided by the embodiment of the application comprises the following steps: acquiring preset weight of target recovery data; determining a recovery weight threshold according to the CPU utilization rate; acquiring the number of the issued target recovery data; acquiring a total recovery weight according to a preset weight of the target recovery data and the number of the target recovery data; and if the total recovery weight is greater than or equal to the recovery weight threshold, stopping issuing a new recovery task. According to the method, the preset weight of the target recovery data is obtained, the recovery weight threshold is obtained according to the utilization rate of the current CPU, and then the total recovery weight is compared with the recovery weight threshold, so that the control on the number of issued tasks is realized, the pressure generated by garbage recovery can be stabilized, and the influence on a system is reduced.
Based on the method for dynamically allocating load provided by the above embodiment, in order to further stabilize the pressure generated by garbage recycling and reduce the influence on the system, the embodiment of the present application further provides a method for controlling garbage recycling.
Example two:
the second embodiment is obtained by improvement on the basis of the first embodiment, and therefore, the contents of the second embodiment are similar to those of the first embodiment, and are not repeated herein for the sake of brevity.
Since the target recovery data includes the migration data and/or the direct recovery data, for ease of understanding and explanation, the second embodiment will be described by taking an example in which the target recovery data includes the migration data and the direct recovery data.
Referring to fig. 2, the figure is a flowchart of a method for controlling garbage collection according to the second embodiment of the present application.
The method for controlling garbage recovery provided by the embodiment of the application comprises the following steps:
s201: a first weight of the migrated data and a second weight of the directly recycled data are obtained.
The first weight is a preset weight, and the first weight may be preset according to an actual application scenario.
The second weight is a preset weight, and the second weight may be preset according to an actual application scenario.
Since the time required for recovering the migration data and the pressure generated by the system are both greater than the time required for directly recovering the migration data and the pressure generated by the system, the first weight may be greater than the second weight in order to further stabilize the pressure generated by garbage recovery. For example, the first weight is 5 and the second weight is 3.
S202 is the same as S102, and is not described herein again.
S203: and acquiring a first number of the issued migration data and a second number of the issued direct recovery data.
The first number of the issued migration data refers to the number of the migration data Grain which is not recovered in the issued recovery task.
The second number of issued direct recovery data refers to the number of direct recovery data Grain which is not recovered in the issued recovery task.
For example, the storage has issued 30 migration data grains and 70 direct recovery data grains, wherein 15 migration data grains are recovered and 30 direct recovery data grains are recovered, and at this time, the first number is 15 and the second number is 40.
It should be noted that: the target recovery data may be from the same recovery unit extend, or may be from different recovery units extend.
When the target recovery data are from the same recovery unit extend, only the number of the migration data gains which are not recovered in the recovery tasks issued in the extend needs to be obtained as a first number, and the number of the direct recovery data gains which are not recovered in the recovery tasks issued in the extend needs to be obtained as a second number.
When the target recovery data is from different recovery units, the number of unrequired migration data gains in all recovery tasks issued by the extensions needs to be acquired as a first number, and the number of unrequired direct recovery data gains in all recovery tasks issued by the extensions needs to be acquired as a second number.
For example, when the target data comes from three different recovery units extend: first, second, and third extensions. Wherein, the first extension includes 2 non-recovered migration data and 12 non-recovered direct recovery data, the second extension includes 5 non-recovered migration data and 10 non-recovered direct recovery data, and the third extension includes 8 non-recovered migration data and 18 non-recovered direct recovery data, at this time, the first number is 15 and the second number is 40.
S204: and acquiring the recovery weight of the migration data according to the product of the first weight and the first number.
The recovery weight value of the migration data refers to the total weight of the migration data to be recovered.
As an example, the recovery weight value of the migration data may be a product of the first weight and the first number.
For example, when the first weight is 5 and the first number is 15, the recovery weight of the migration data is 75.
S205: and acquiring the recycling weight of the directly recycled data according to the product of the second weight and the second number.
The reclamation weight of the direct reclamation data refers to the total weight of the direct reclamation data to be reclaimed.
As an example, the reclamation weight of the directly reclaimed data may be a product of the second weight and the second number.
For example, when the second weight is 3 and the second number is 40, the recycling weight of the directly recycled data is 120.
S206: and acquiring a total recovery weight according to the recovery weight of the migration data and the recovery weight of the direct recovery data.
The reclamation total weight refers to the total weight of the reclamation tasks to be completed.
Since the reclamation task includes reclaiming the migration data and reclaiming the direct reclamation data, the reclamation total weight may be a sum of a reclamation weight of the migration data and a reclamation weight of the direct reclamation data.
For example, when the recovery weight of the migration data is 75 and the recovery weight of the direct recovery data is 120, the total recovery weight is 195.
S207: and judging whether the total recycling weight is greater than or equal to the recycling weight threshold value. If yes, go to step S208; if not, S209 is executed.
Comparing the total recovery weight with the recovery weight threshold, and stopping issuing a new recovery task if the total recovery weight is greater than or equal to the recovery weight threshold; and if the total recycling weight is smaller than the recycling weight threshold, issuing a new recycling task.
For example, when the total recycle weight is 195 and the recycle weight threshold is 200, a new recycle task is continuously issued; when the total recycle weight is 195 and the recycle weight threshold is 193, the issue of new recycle tasks is stopped.
S208: and stopping issuing the new recovery task.
S209: and issuing a new recovery task.
Two specific situations that require the issuance of a new recovery task are:
in the first case: the total recycling weight of the target recycled data is less than the weight threshold.
For example, when the total recycle weight is 195 and the recycle weight threshold is 200, then the new recycle task continues to be issued.
In the second case: and when the recovery of the migration data or the direct recovery data is finished, enabling the total recovery weight to be smaller than the weight threshold value, and issuing a new recovery task.
For example, when the total recycle weight is 195 and the recycle weight threshold is 193, the issue of a new recycle task is stopped. Then, after completing the recovery of a migration data, since the weight of the migration data is 5, the current total recovery weight is 190, and at this time, the total recovery weight 190 is smaller than the recovery weight threshold 193, a new recovery task is issued.
It should be noted that the recovery task is to issue only one Grain at a time, and the recovery task issued once may be one migration data Grain or may be one direct recovery data Grain.
In order to further stabilize the pressure generated by garbage recovery and reduce the influence on the system, before a new recovery task is issued, the method further comprises the following steps:
when the new recovery task is to recover migration data, the weight of the migration data is added with the current total recovery weight to obtain an estimated total weight, and if the estimated total weight exceeds a recovery weight threshold value, the new recovery task is stopped to be issued; and if the estimated total weight does not exceed the recovery weight threshold, issuing a new recovery task.
When the new recovery task is to recover direct recovery data, the weight of the direct recovery data is added with the current total recovery weight to obtain an estimated total weight, and if the estimated total weight exceeds a recovery weight threshold value, the new recovery task is stopped to be issued; and if the estimated total weight does not exceed the recovery weight threshold, issuing a new recovery task.
According to the method for controlling garbage collection, the first weight of the migration data is set to be larger than the second weight of the directly collected data, so that the influence of the migration data on the current total collection weight is improved, the total collection weight better reflects the current garbage collection state, then the current collection weight threshold value capable of being collected is determined by inquiring the utilization rate of a CPU, the total collection weight is controlled to be smaller than the collection weight threshold value, the quantity of collection tasks is controlled, the pressure generated by garbage collection is further stabilized, and the influence on a system is reduced.
Based on the method for controlling garbage recycling provided by the above embodiment, the embodiment of the present application further provides a device for controlling garbage recycling, which is described in detail below with reference to the accompanying drawings.
Example three:
referring to fig. 3, the figure is a schematic structural diagram of a device for controlling garbage collection according to a third embodiment of the present application.
The device of control rubbish recovery that this application embodiment provided includes:
a first obtaining unit 301, configured to obtain a preset weight of target recovery data;
a determining unit 302, configured to determine a recycling weight threshold according to a CPU utilization;
a second obtaining unit 303, configured to obtain the number of the delivered target recovery data;
a third obtaining unit 304, configured to obtain a total recovery weight according to a preset weight of the target recovery data and the number of the target recovery data;
a stopping unit 305, configured to stop issuing a new recovery task if the total recovery weight is greater than or equal to the recovery weight threshold.
In order to improve the efficiency of garbage collection, the device for controlling garbage collection further comprises:
and the issuing unit is used for issuing a new recovery task if the total recovery weight is smaller than the recovery weight threshold.
Optionally, the target recovery data includes migration data and/or direct recovery data.
The device for controlling garbage collection provided by the embodiment of the application comprises a first obtaining unit 301, a determining unit 302, a second obtaining unit 303, a third obtaining unit 304 and a stopping unit 305, and the device obtains a collection weight threshold value according to the utilization rate of a current CPU, compares the total collection weight with the collection weight threshold value, realizes control over the number of issued tasks, and further can reduce influence on a system.
The device for controlling garbage collection comprises a processor and a memory, wherein the first acquiring unit 301, the determining unit 302, the second acquiring unit 303, the third acquiring unit 304, the stopping unit 305 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more, real-time total weight of the garbage collection which is executed is controlled by adjusting kernel parameters, pressure generated by the garbage collection can be stabilized, and influence on the system is reduced.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium, on which a program is stored, and when the program is executed by a processor, the method for controlling garbage collection is implemented.
The embodiment of the invention provides a processor, which is used for running a program, wherein the method for controlling garbage collection is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps:
acquiring preset weight of target recovery data;
determining a recovery weight threshold according to the CPU utilization rate;
acquiring the number of the issued target recovery data;
acquiring a total recovery weight according to a preset weight of the target recovery data and the number of the target recovery data;
and if the total recovery weight is greater than or equal to the recovery weight threshold, stopping issuing a new recovery task.
Optionally, the method further includes:
and if the total recovery weight is smaller than the recovery weight threshold, issuing a new recovery task.
Optionally, the target recovery data includes migration data and/or direct recovery data.
Optionally, when the target recovery data includes migration data and direct recovery data, the preset weight includes a first weight and a second weight, where the first weight is the preset weight of the migration data, and the second weight is the preset weight of the direct recovery data;
the number comprises a first number and a second number, wherein the first number is the number of the migration data, and the second number is the number of the direct recovery data;
then, the obtaining of the total recycling weight specifically includes:
acquiring the recovery weight of the migration data according to the product of the first weight and the first number;
acquiring the recycling weight of the directly recycled data according to the product of the second weight and the second number;
and acquiring a total recovery weight according to the recovery weight of the migration data and the recovery weight of the direct recovery data.
Optionally, the first weight is greater than the second weight.
Optionally, the target recovery data is from the same recovery unit extend.
Optionally, the target recovery data is from a different recovery unit extend.
The device herein may be a server, a PC, a PAD, a mobile phone, etc. It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
The foregoing is merely a preferred embodiment of the invention and is not intended to limit the invention in any manner. Although the present invention has been described with reference to the preferred embodiments, it is not intended to be limited thereto. Those skilled in the art can make numerous possible variations and modifications to the present teachings, or modify equivalent embodiments to equivalent variations, without departing from the scope of the present teachings, using the methods and techniques disclosed above. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention are still within the scope of the protection of the technical solution of the present invention, unless the contents of the technical solution of the present invention are departed.

Claims (10)

1. A method of controlling waste recycling, comprising:
acquiring preset weight of target recovery data;
determining a recovery weight threshold according to the CPU utilization rate;
acquiring the number of the issued target recovery data;
acquiring a total recovery weight according to the preset weight of the target recovery data and the number of the issued target recovery data;
and if the total recovery weight is greater than or equal to the recovery weight threshold, stopping issuing a new recovery task.
2. The method of claim 1, further comprising:
and if the total recovery weight is smaller than the recovery weight threshold, issuing a new recovery task.
3. The method of claim 1, wherein the target recovery data comprises migration data and/or direct recovery data.
4. The method according to claim 3, wherein when the target recovery data includes migration data and direct recovery data, the preset weight includes a first weight and a second weight, wherein the first weight is the preset weight of the migration data, and the second weight is the preset weight of the direct recovery data;
the number comprises a first number and a second number, wherein the first number is the number of the migration data, and the second number is the number of the direct recovery data;
then, the obtaining of the total recycling weight specifically includes:
acquiring the recovery weight of the migration data according to the product of the first weight and the first number;
acquiring the recycling weight of the directly recycled data according to the product of the second weight and the second number;
and acquiring a total recovery weight according to the recovery weight of the migration data and the recovery weight of the direct recovery data.
5. The method of claim 4, wherein the first weight is greater than the second weight.
6. The method according to any of claims 1-5, wherein the target recovery data is from the same recovery unit Extent.
7. The method according to any of claims 1-5, wherein the target recovery data is from a different recovery unit Extent.
8. An apparatus for controlling waste recycling, comprising:
the first acquisition unit is used for acquiring the preset weight of the target recovery data;
the determining unit is used for determining a recovery weight threshold according to the CPU utilization rate;
the second acquisition unit is used for acquiring the number of the issued target recovery data;
a third obtaining unit, configured to obtain a total recovery weight according to a preset weight of the target recovery data and the number of the issued target recovery data;
and the stopping unit is used for stopping issuing a new recovery task if the total recovery weight is greater than or equal to the recovery weight threshold.
9. The apparatus of claim 8, wherein the means for controlling waste recycling further comprises:
and the issuing unit is used for issuing a new recovery task if the total recovery weight is smaller than the recovery weight threshold.
10. The apparatus of claim 8, wherein the target recovery data comprises migration data and/or direct recovery data.
CN201810956410.1A 2018-08-21 2018-08-21 Method and device for controlling garbage recovery Active CN109086223B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810956410.1A CN109086223B (en) 2018-08-21 2018-08-21 Method and device for controlling garbage recovery

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810956410.1A CN109086223B (en) 2018-08-21 2018-08-21 Method and device for controlling garbage recovery

Publications (2)

Publication Number Publication Date
CN109086223A CN109086223A (en) 2018-12-25
CN109086223B true CN109086223B (en) 2021-10-29

Family

ID=64794111

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810956410.1A Active CN109086223B (en) 2018-08-21 2018-08-21 Method and device for controlling garbage recovery

Country Status (1)

Country Link
CN (1) CN109086223B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124943B (en) * 2019-12-29 2022-04-22 北京浪潮数据技术有限公司 Data processing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104793894A (en) * 2014-01-22 2015-07-22 群晖科技股份有限公司 Method, apparatus, computer program product for managing a solid state drive
CN105630638A (en) * 2014-10-31 2016-06-01 国际商业机器公司 Equipment and method for distributing cache for disk array
CN106354659A (en) * 2016-08-29 2017-01-25 许继集团有限公司 Method on FLASH resource recovery of embedded device
CN107506136A (en) * 2017-08-07 2017-12-22 成都华为技术有限公司 A kind of method and apparatus of garbage reclamation

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9996268B2 (en) * 2015-12-18 2018-06-12 Toshiba Memory Corporation Memory system and control method of the same

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104793894A (en) * 2014-01-22 2015-07-22 群晖科技股份有限公司 Method, apparatus, computer program product for managing a solid state drive
CN105630638A (en) * 2014-10-31 2016-06-01 国际商业机器公司 Equipment and method for distributing cache for disk array
CN106354659A (en) * 2016-08-29 2017-01-25 许继集团有限公司 Method on FLASH resource recovery of embedded device
CN107506136A (en) * 2017-08-07 2017-12-22 成都华为技术有限公司 A kind of method and apparatus of garbage reclamation

Also Published As

Publication number Publication date
CN109086223A (en) 2018-12-25

Similar Documents

Publication Publication Date Title
US10929287B2 (en) Computer memory usage by releasing unused heap space
EP3388946B1 (en) Memory collection method and device
US11106579B2 (en) System and method to manage and share managed runtime memory for java virtual machine
CN111090398B (en) Garbage recycling method, device and equipment for solid state disk and readable storage medium
US9747298B2 (en) Inline garbage collection for log-structured file systems
US20160253104A1 (en) Techniques for automatically freeing space in a log-structured storage system
US9176869B2 (en) Memory use for garbage collected computer environments
CN107544754B (en) Garbage recovery method and device
US20140258672A1 (en) Demand determination for data blocks
US9251149B2 (en) Data set size tracking and management
CN114996173B (en) Method and device for managing write operation of storage equipment
CN105493080A (en) Method and apparatus for context aware based data de-duplication
CN112306408A (en) Storage block processing method, device, equipment and storage medium
CN109086223B (en) Method and device for controlling garbage recovery
CN110321364B (en) Transaction data query method, device and terminal of credit card management system
CN104317735A (en) High-capacity cache and method for data storage and readout as well as memory allocation and recovery
CN111459848B (en) File fragment sorting method and device, storage medium and electronic equipment
CN111090627A (en) Log storage method and device based on pooling, computer equipment and storage medium
CN111858057B (en) Distribution method and device of running memory, computer equipment and storage medium
CN115525208A (en) Storage management method, storage device, and storage medium
CN111752851B (en) Memory recycling method and device
CN113687789A (en) Processing method and device and electronic equipment
CN117873388A (en) Data writing method, device, computer equipment and storage medium
CN117234434A (en) Operation control method and device of storage device
CN105512250A (en) Database data query response method and system

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