Skip to content

Commit ab3fab0

Browse files
kk7dslyarwood
authored andcommitted
Add admin doc information about image cache resource accounting
This adds some details to the image cache page in the admin docs about how image cache disk usage is (not) considered in the scheduler disk space calculation. Workarounds and mitigation strategies are provided. Change-Id: I7f40f167cea073a73cf249a9adfd73e1187c031b Related-Bug: #1878024
1 parent 89fe504 commit ab3fab0

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

doc/source/admin/image-caching.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,46 @@ documentation for the configuration options in the
5151
need not be downloaded (and thus cached) at the compute node at
5252
all.
5353

54+
Image Caching Resource Accounting
55+
---------------------------------
56+
57+
Generally the size of the image cache is not part of the data Nova
58+
includes when reporting available or consumed disk space. This means
59+
that when ``nova-compute`` reports 100G of total disk space, the
60+
scheduler will assume that 100G of instances may be placed
61+
there. Usually disk is the most plentiful resource and thus the last
62+
to be exhausted, so this is often not problematic. However, if many
63+
instances are booted from distinct images, all of which need to be
64+
cached in addition to the disk space used by the instances themselves,
65+
Nova may overcommit the disk unintentionally by failing to consider
66+
the size of the image cache.
67+
68+
There are two approaches to addressing this situation:
69+
70+
#. **Mount the image cache as a separate filesystem**. This will
71+
cause Nova to report the amount of disk space available purely to
72+
instances, independent of how much is consumed by the cache. Nova
73+
will continue to disregard the size of the image cache and, if the
74+
cache space is exhausted, builds will fail. However, available
75+
disk space for instances will be correctly reported by
76+
``nova-compute`` and accurately considered by the scheduler.
77+
78+
#. **Enable optional reserved disk amount behavior**. The
79+
configuration workaround
80+
:oslo.config:option:`workarounds.reserve_disk_resource_for_image_cache`
81+
will cause ``nova-compute`` to periodically update the reserved disk
82+
amount to include the statically configured value, as well as the
83+
amount currently consumed by the image cache. This will cause the
84+
scheduler to see the available disk space decrease as the image
85+
cache grows. This is not updated synchronously and thus is not a
86+
perfect solution, but should vastly increase the scheduler's
87+
visibility resulting in better decisions. (Note this solution is
88+
currently libvirt-specific)
89+
90+
As above, not all backends and virt drivers use image caching, and
91+
thus a third option may be to consider alternative infrastructure to
92+
eliminate this problem altogether.
93+
5494
Image pre-caching
5595
-----------------
5696

0 commit comments

Comments
 (0)