Ask Your Question
6

Image caching on compute nodes

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

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
0

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

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
0

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

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)
#image_cache_manager_interval=2400

# 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)
#image_cache_subdirectory_name=_base

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 1,296 times

Last updated: Feb 01