Commit Graph

15 Commits

Author SHA1 Message Date
Daniel Nephin
06edd193ef Small refactor of gc/scheduler to remove import of metadata
Replace metadata.GCStats with an interface for exposing elapsed time

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2018-01-03 14:36:11 -05:00
Christy Perez
1607a9e0ca check for threshold, not range
This test seems to fall apart on a loaded system. In actuality it
doesn't seem to be testing for a threshold, but a "sane" range.

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
2017-12-12 15:52:11 -06:00
Daniel Nephin
a05e5fd77a restore deferred cleanup in rootfs.init
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-11-28 13:14:39 -05:00
Stephen Day
372cdfac3b
Merge pull request #1638 from dmcgowan/gc-policy
gc: add policy plugin
2017-11-27 18:20:10 -08:00
yanxuean
81307793b7 some typo
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
2017-11-22 11:48:09 +08:00
Derek McGowan
bae47820d7
Document defaults
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-11-21 16:12:10 -08:00
Daniel Nephin
f74862a0dd Add structcheck, unused, and varcheck linters.
Warn on unused and dead code

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-11-21 11:14:37 -05:00
Derek McGowan
374f04d0e9
Update gc policy configuration to use time duration
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-11-20 17:08:35 -08:00
Derek McGowan
00596f400e
Add gc policy plugin
Add garbage collection as a background process and policy
configuration for configuring when to run garbage collection.
By default garbage collection will run when deletion occurs
and no more than 20ms out of every second.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-11-20 16:57:39 -08:00
Michael Crosby
e74c423f78 Fix races with concurrent GC
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-10-27 14:47:23 -04:00
Michael Crosby
b6e0c4f321 Fix go lint errors
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-10-25 15:26:44 -04:00
Derek McGowan
17471d5592
Metadata garbage collection
Marks and sweeps unreferenced objects.
Add snapshot cleanup to metadata.
Add content garbage collection

Add dirty flags for snapshotters and content store which
are set on deletion and used during the next garbage collection.
Cleanup content store backend when content metadata is removed.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-10-11 10:42:47 -07:00
Aaron.L.Xu
08bcbddb32 fix typo I found in this repo
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
2017-01-20 01:18:26 +08:00
Stephen J Day
b52cf8b440 gc: remove erroneous file
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-12-12 21:09:40 -08:00
Stephen J Day
b542cc19ad
gc: add toy tri-color GC implementation
As a minimum, we would like to maintain generic garbage collection of
containerd resources. This includes images, bundles, containers and
arbitrary content.

The included implementation is just a textbook toy that we can use to
inform the requirements of gc. It implements a simple, stack-based
tricolor algorithm. Nothing special.

Mostly, this is to ensure we think about garbage collection from the
start, rather than as an afterthought or follow on feature.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-12-06 16:20:40 -08:00