Merge "Add detail description of image_cache_max_size"
This commit is contained in:
commit
803c54051b
@ -38,12 +38,14 @@ Controlling the Growth of the Image Cache
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The image cache has a configurable maximum size (the ``image_cache_max_size``
|
||||
configuration file option. However, when images are successfully returned
|
||||
from a call to ``GET /images/<IMAGE_ID>``, the image cache automatically
|
||||
writes the image file to its cache, regardless of whether the resulting
|
||||
write would make the image cache's size exceed the value of
|
||||
``image_cache_max_size``. In order to keep the image cache at or below this
|
||||
maximum cache size, you need to run the ``glance-cache-pruner`` executable.
|
||||
configuration file option). The ``image_cache_max_size`` is an upper limit
|
||||
beyond which pruner, if running, starts cleaning the images cache.
|
||||
However, when images are successfully returned from a call to
|
||||
``GET /images/<IMAGE_ID>``, the image cache automatically writes the image
|
||||
file to its cache, regardless of whether the resulting write would make the
|
||||
image cache's size exceed the value of ``image_cache_max_size``.
|
||||
In order to keep the image cache at or below this maximum cache size,
|
||||
you need to run the ``glance-cache-pruner`` executable.
|
||||
|
||||
The recommended practice is to use ``cron`` to fire ``glance-cache-pruner``
|
||||
at a regular interval.
|
||||
|
@ -22,7 +22,8 @@ image_cache_dir = /var/lib/glance/image-cache/
|
||||
# stalled and eligible for reaping
|
||||
image_cache_stall_time = 86400
|
||||
|
||||
# Max cache size in bytes
|
||||
# The upper limit (the maximum size of accumulated cache in bytes) beyond
|
||||
# which pruner, if running, starts cleaning the images cache.
|
||||
image_cache_max_size = 10737418240
|
||||
|
||||
# Address to find the registry server
|
||||
|
@ -39,7 +39,9 @@ image_cache_opts = [
|
||||
cfg.StrOpt('image_cache_driver', default='sqlite',
|
||||
help=_('The driver to use for image cache management.')),
|
||||
cfg.IntOpt('image_cache_max_size', default=10 * units.Gi, # 10 GB
|
||||
help=_('The maximum size in bytes that the cache can use.')),
|
||||
help=_('The upper limit (the maximum size of accumulated '
|
||||
'cache in bytes) beyond which pruner, if running, '
|
||||
'starts cleaning the images cache.')),
|
||||
cfg.IntOpt('image_cache_stall_time', default=86400, # 24 hours
|
||||
help=_('The amount of time to let an image remain in the '
|
||||
'cache without being accessed.')),
|
||||
|
Loading…
Reference in New Issue
Block a user