Enabling
You can enable persistent write log cache (PWL) on an IBM Storage Ceph cluster by setting the Ceph RADOS block device (RBD) rbd_persistent_cache_mode and rbd_plugins options.
rbd_default_features configuration option or the --image-feature flag for the rbd create command. For more information about the exclusive-lock feature, see Enabling and disabling image features.Set the persistent write log cache options at the host level by using the ceph config set command. Set the persistent write log cache options at the pool or image level by using the rbd config pool set or the rbd config image set commands.
Prerequisites
-
A running IBM Storage Ceph cluster.
-
Root-level access to the monitor node.
-
The exclusive-lock feature is enabled.
-
Client-side disks are persistent memory (PMEM) or solid-state disks (SSD).
-
RBD cache is disabled.
Procedure
-
Enable PWL cache:
i. At the host level, use the
ceph config setcommand:Syntax
ceph config set client rbd_persistent_cache_mode CACHE_MODE ceph config set client rbd_plugins pwl_cacheReplace CACHE_MODE with
rwlorssd.Example
[ceph: root@host01 /]# ceph config set client rbd_persistent_cache_mode ssd [ceph: root@host01 /]# ceph config set client rbd_plugins pwl_cacheii. At the pool level, use the
rbd config pool setcommand:Syntax
rbd config pool set POOL_NAME rbd_persistent_cache_mode CACHE_MODE rbd config pool set POOL_NAME rbd_plugins pwl_cacheReplace CACHE_MODE with
rwlorssd.Example
[ceph: root@host01 /]# rbd config pool set pool1 rbd_persistent_cache_mode ssd [ceph: root@host01 /]# rbd config pool set pool1 rbd_plugins pwl_cacheiii. At the image level, use the
rbd config image setcommand:Syntax
rbd config image set POOL_NAME/IMAGE_NAME rbd_persistent_cache_mode CACHE_MODE rbd config image set POOL_NAME/IMAGE_NAME rbd_plugins pwl_cacheReplace CACHE_MODE with
rwlorssd.Example
[ceph: root@host01 /]# rbd config image set pool1/image1 rbd_persistent_cache_mode ssd [ceph: root@host01 /]# rbd config image set pool1/image1 rbd_plugins pwl_cache -
Optional: Set the additional RBD options at the host, the pool, or the image level:
Syntax
rbd_persistent_cache_mode CACHE_MODE rbd_plugins pwl_cache rbd_persistent_cache_path /PATH_TO_DAX_ENABLED_FOLDER/WRITE_BACK_CACHE_FOLDER <1> rbd_persistent_cache_size PERSISTENT_CACHE_SIZE <2><1>
rbd_persistent_cache_path- A file folder to cache data that must have direct access (DAX) enabled when using therwlmode to avoid performance degradation.<2>
rbd_persistent_cache_size- The cache size per image, with a minimum cache size of 1 GB. The larger the cache size, the better the performance.Example
rbd_cache false rbd_persistent_cache_mode rwl rbd_plugins pwl_cache rbd_persistent_cache_path /mnt/pmem/cache/ rbd_persistent_cache_size 1073741824
Reference
-
See Direct Access for files article on kernel.org for more details on using DAX.