I'm wondering what are the best practices for taking advantage of the speed of SSDs in combination with spinning rust drives in a volume group.
I have 111GB of free SSD space in the same volume group as all of my system's filesystems (/, /usr, /var, /home, various other /var/cache/* filesystems, other data, etc.). Currently the 111GB PV on the SSD is completely unused. But I wonder what the best use of it is. Should I just move entire VGs (i.e. something like /usr or /var or something else) on to it, or should I use it with LVM caching? IOW is LVM caching effective? LVM caching seems like a lot of guesswork regarding how to split the SSD up most effectively so that you have the right size cache for the various volumes that you want to cache. I.e. for every filesystem I have in my VG, I need to decide what percentage of the SSD I want to use for it and then how big I want the cache LV vs the cache metadata LV, etc. Is there any way to monitor performance of the cache VGs to decide if they are being used effectively or if space should be moved from one cache LV to another? Can cache LVs be resized to optimize the size of them? Perhaps I created a cache LV too big and it's not being used efficiently and then want to reduce it's size and use the freed up space to make a different cache LV bigger. Assuming one wants a writethrough cache because one does not have battery/UPS backed systems (such that they are vulnerable to power outages) (writethrough is the correct choice for that situation, correct?) is there any point to caching write-mostly filesystems such as /var/[log/] with a writethrough cache? Any other insights anyone wants to add? Cheers, b.
