Why does the documentation suggest "tiered caching" require 2 separate pools? I'm looking to replace unraid with mergerfs #1081
-
I think the documentation explaining "tiered caching" is a bit unclear as it mentions 2 mergerfs pools are required to be setup in order to achieve a simple cache but it doesn't explain why that is or if it would be prudent for my use-case. My use-case: I would like to replace unraid with mergerfs. I have a NVME disk "pool" where all my first writes go to then later the NVME data gets moved to the slower spinning disks. The top-level folder in mergerfs would be "shared" via NFS/SMB to clients on the network. The mergerfs documentation makes it clear that some sort of script to move files around with rsync needs to be setup; but what is unclear is:
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 13 replies
-
The reason for 2 pools is because you have to answer the question: "How do you choose where a file is created when moving them from the fast tier to the slow tier?" Using mergerfs as the answer is an obvious one. You set the slow tier pool create policies and just write to them. |
Beta Was this translation helpful? Give feedback.
-
There isn't going to be any "bugs" per se. Performance is always going to differ depending on a number of factors as I mention in the docs. I don't know enough about fio to comment on what might be the issue. I will have to look at the code and/or IO access patterns. It could simply be that ZFS has higher latency for some commands and since certain actions are sequential higher latency means lower throughput performance. |
Beta Was this translation helpful? Give feedback.
-
Glad to hear updates helped. FUSE and ZFS change somewhat regularly and versions can really matter. re: creating paths... only if you're using config that restricts creation by path. "ep*" policies. See the docs for details on policies. To be clear... policies choose the branch. The path creation comes after based on selection. It's not that policies decide what gets created. It chooses where. If it doesn't exist it is always created after that selection. |
Beta Was this translation helpful? Give feedback.
-
No. https://github.com/trapexit/mergerfs#functions-categories-and-policies All relevant functions have a policy. A category is just a set of functions. |
Beta Was this translation helpful? Give feedback.
-
Okay, I think I got it now. The summary answer to my original question "Why does the documentation suggest 2 separate pools" is because the recommended scripts that run rsync need to use the second pool path and the create.policy for the secondary (slower disk) pool is what we want to use for the rsync/script. If there was a single mergerfs pool, then we could not really 'load balance' the data off the NVME disks onto the slower drives via the magic of mergerfs. So the second pool is simply there to facilitate data moving operations (or when one wants to skip the cache completely, simply write to the specific path that mergerfs has for the slow disks only). This is working for me now on my test bed. The only concern I have left is that |
Beta Was this translation helpful? Give feedback.
-
Yes, you need some logic to choose where files are moved to. mergerfs doesn't yet have the ability to move files actively so two pools are used to give you placement logic and rsync used to transfer. That's it. Yes, it is quiet because the command is told to be quiet. -q.... ie... --quiet. "suppress non-error messages". |
Beta Was this translation helpful? Give feedback.
Okay, I think I got it now. The summary answer to my original question "Why does the documentation suggest 2 separate pools" is because the recommended scripts that run rsync need to use the second pool path and the create.policy for the secondary (slower disk) pool is what we want to use for the rsync/script.
If there was a single mergerfs pool, then we could not really 'load balance' the data off the NVME disks onto the slower drives via the magic of mergerfs. So the second pool is simply there to facilitate data moving operations (or when one wants to skip the cache completely, simply write to the specific path that mergerfs has for the slow disks only).
This is working for me now on m…