Image caching on compute nodes

asked 2014-01-14 11:19:44 -0600

monitorjbl gravatar image

I've noticed that frequently, the images cached on the compute nodes are ignored and new ones are downloaded from the Glance server. You can see the network traffic spike between the compute node and the Glance server when a VM is put into the spawning state, and the VM will not boot up until the network traffic returns to normal. If you have a proper network in place to handle image updates, this isn't much of an issue because most images are not that big.

However, if you have a snapshot that is tens of gigabytes in size, this can take a noticeable amount of time to the user. I was wondering, what setting controls this caching mechanism? Is it possible to keep things in the compute node's cache for a longer period of time?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2019-02-01 08:34:56 -0600

eblock gravatar image

I had an image cache issue with Ceph backend: because of a previous incorrect image property I had images locally cached on the compute nodes (shared storage), this disabled the advantages of fast copy-on-write clones. Fixing the image's property and deleting the cache (/var/lib/instances/_base) didn't solve anything. To let others find it faster than me, this answer solved my problem. Setting cache_images = none in /etc/nova/nova.conf on all compute nodes solved my issue.

edit flag offensive delete link more

answered 2015-05-29 13:17:10 -0600

jdexter gravatar image

To affect the behavior of the image cache, The following settings are in nova.conf

# Number of seconds to wait between runs of the image cache
# manager. Set to -1 to disable. Setting this to 0 will
# disable, but this will change in the K release to mean "run
# at the default rate". (integer value)

# Where cached images are stored under $instances_path. This
# is NOT the full path - just a folder name. For per-compute-
# host cached images, set to _base_$my_ip (string value)

# Should unused base images be removed? (boolean value)

# Unused unresized base images younger than this will not be
# removed (integer value)
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-01-14 11:19:44 -0600

Seen: 1,771 times

Last updated: Feb 01 '19