PX-Cache improves storage pool performance by using a cache drive and attaching it to the storage pool. The additional cache drive can improve both the latency and IOPS of the pool to which it's attached. The cache drive must be either an SSD or NVMe drive, and the storage pool must be composed of magnetic drives.
Consider your workload characteristics and your host resources. Are your reads and writes random or sequential? Do you have enough pool bandwidth or ram? To determine if pool caching is right for you, consider the following properties:
- Caching is intended to absorb IO bursts by offloading the storage pool
- Workloads requiring sustained IO bandwidth may see a performance degradation if the cache is always full
IMPORTANT: You must enable pool caching at installation, and migration is not currently supported.
Once configured, storage pools with cache drives behave just like any other storage pool. Storage pools retain the same performance category regardless of whether or not they're cached.
Once you enable pool caching on a cluster, you can do the following from the CLI:
- Enable and disable caching on pools
- Add caching drives
- Configure caching settings to fine-tune cache performance with the
Before you can enable pool caching, you must meet the following prerequisites:
- An NVMe or SSD drive must be attached to the same node as your storage pool
- Linux kernel 4.20.13
- The following packages must be installed on your node:
Install Portworx with caching enabled
To use caching on Portworx, you must enable it when you first install Portworx on your cluster by running
px-runc with the
-cache option, specifying the storage device you want to use for caching. Do not provide the same storage device as both a cache and a data storage device.
Pass the drives as parameters to the
px-runc installer. The following example sets
/dev/sdc as the caching drive and restrains Portworx to use only this drive for caching:
px-runc install -name portworx -c doc-cluster-caching -k etcd:http://127.0.0.1:4001 -s /dev/sdf -cache /dev/sdc -v /mnt:/mnt:shared
- Your cache drive must be either SSD or NVMe, and the storage pool must be composed of magnetic drives.
- If you run
-Aargument, Portworx forms storage pools on all of the unmounted drives or partitions except for the drives specified using the
-cacheargument; these drives become cache drives instead.