autotier
autotier copied to clipboard
Writeback cache functionality
Is it possible to use autotier so that an ssd becomes a write cache for a zpool? So e.g. after copying a file via smb it is saved on tier 1 very fast and the transfer is shown as completed. After completion or after some time it will be copied to tier 2 and is deleted on tier 1. I think this would be very beneficial to zfs users that want fast file transfers without having to invest in an ssd pool or a huge array. This is the one feature I am missing the most from zfs.
I just did a very quick and dirty test of this and I think it may be possible to use it in this way, at least in the development version I'm working on now. Try it out by setting your top tier quota to 0 B and let me know if it seems to be working how you'd expect. Keep in mind I haven't tried this with the current release so it may get tripped up on having a quota of 0 B. You can also just try a very low quota like 1 B if there are issues with having it at 0.
Just a heads up, with release 1.2.0, I've tested writeback cache functionality and it seems to work decently well. Give it a shot and let me know how you find it.
As long as Samba keeps a file handle open for the file being written, it will stay in the top tier. Once the file is closed, Autotier will move it off to the next tier given that the top tier's quota is 0%.
I am curious; what kind of performance did you observe in your tests with the latest version?
I was reading https://github.com/45Drives/autotier/issues/38 that showed some differential of about ~40% performance penalty and so wondering if using '0 B' in configuration file behaves differently from the 2021 issue linked.