Thursday, November 15, 2012

Enable cache pruning on OpenStack

To enable pruning of the nova image cache (in /var/lib/nova/instances/_base), set remove_unused_base_images=true in your nova.conf.

The default interval is 40 ticks (which seems to be roughly 40 minutes), and images are (allegedly) marked for removal by their modified time in the file system. The minimum age can be tweaked by setting remove_unused_minimum_age_seconds=1209600 (2 weeks).

I would prefer the cache manager to, instead of going by the files modified time, check when the image was actually used launch an instance, though.

No comments:

Post a Comment