[
https://issues.apache.org/jira/browse/MESOS-4945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15586813#comment-15586813
]
Zhitao Li commented on MESOS-4945:
----------------------------------
Current plan:
- Add a "cleanup" method to store interface, which takes a {{vector<Image>}}
for "images in use";
- store can choose its own implementation of what it wants to cleanup. Deleted
images will be returned in a {{Future<vector<Image>>}};
- it's the job of Containerizer/Provisioner to actively prepare the list of
"images in use"
- initially this can simply be done by traversing all active containers, if
provisioner already has all information in its memory;
- Initial implementation will add a new flag indicating upper limit of size for
docker store directory, and docker::store will delete images until it drops
below there;
- The invocation to store::cleanup can happen either in a background timer,
upon provisioner::destroy, or before the pull? (I have no real preference, but
calling it before pull seems safest if we use space based policy?);
- Initial implementation on store will traverse all images in the store;
- Further optimization including implementing a reference counting and size
counting of all images in store, and checkpointing them. We might also need
some kind of LRU implementation here.
> Garbage collect unused docker layers in the store.
> --------------------------------------------------
>
> Key: MESOS-4945
> URL: https://issues.apache.org/jira/browse/MESOS-4945
> Project: Mesos
> Issue Type: Improvement
> Reporter: Jie Yu
> Assignee: Zhitao Li
>
> Right now, we don't have any garbage collection in place for docker layers.
> It's not straightforward to implement because we don't know what container is
> currently using the layer. We probably need a way to track the current usage
> of layers.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)