Overview
Cloned Block device images usually modify only a small fraction of the parent image. For example, in a virtual desktop interface (VDI), the virtual machines are cloned from the same base image and initially differ only by the hostname and the IP address. During the boot-up, if you use a local cache of the parent image, this speeds up reads on the caching host. This change reduces the client to cluster network traffic.
Reasons to use ceph-immutable-object-cache daemons
It is a scalable, open-source, and distributed storage system. It connects to local clusters with
the RADOS protocol, relying on default search paths to find ceph.conf files,
monitor addresses and authentication information for them such as
/etc/ceph/CLUSTER.conf, /etc/ceph/CLUSTER.keyring and
/etc/ceph/CLUSTER.NAME.keyring, where CLUSTER is the human-friendly name of
the cluster, and NAME is the RADOS user to connect as an example,
client.ceph-immutable-object-cache.
Key components of the daemon
The ceph-immutable-object-cache daemon has the following parts:
- Domain socket based inter-process communication (IPC): The daemon listens on a local domain
socket on start-up and waits for connections from
librbdclients. - Least recently used (LRU) based promotion or demotion policy: The daemon maintains in-memory statistics of cache-hits on each cache file. It demotes the cold cache if capacity reaches to the configured threshold.
- File-based caching store: The daemon maintains a simple file based cache store. On promotion the RADOS objects are fetched from RADOS cluster and stored in the local caching directory.
When you open each cloned RBD image, librbd tries to connect to the cache daemon
through its Unix domain socket. Once successfully connected, librbd coordinates
with the daemon on the subsequent reads.
If there is a read that is not cached, the daemon promotes the RADOS object to the local caching directory, so the next read on that object is serviced from cache. The daemon also maintains simple LRU statistics so that under capacity pressure it evicts cold cache files as needed.