====== HDD on SSD caching ====== Speed up HDDs with additional SSD/NVMe caching. Options: * OpenZFS * it is possible to add ''cache'' and ''log'' devices to ZFS pool. ''Log'' is a journal for synchronous writes. * LVM DM-Cache * No HDD reformating if it is already using LVM * it is possible to add cache device to logical volume: [[https://www.redhat.com/en/blog/improving-read-performance-dm-cache|Improving read performance with dm-cache]] * [[https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/logical_volume_manager_administration/lvm_cache_volume_creation]] * It is hot-spot cache, to cache only frequently accessed data, so simple copy of big file doesn't fill cache. * Write cache is also possible: https://man.archlinux.org/man/lvmcache.7 * [[https://wiki.archlinux.org/index.php/bcache|bcache]] * need to reformat HDD Writeback caching: * Filesystem corruption when SSD cache fails. Possible workaround for mirroring FS is to use 2 separate caching devices for 2 mechanical drives. Benchmarks: * [[http://strugglers.net/~andy/blog/2017/07/19/bcache-and-lvmcache/|bcache and lvmcache]] ===== flashcache ===== apt-get install flashcache-dkms flashcache-utils Reference [[https://wiki.archlinux.org/index.php/flashcache]]