Hi I’m new to TrueNAS, I’m looking for advice on read/write caching for TrueNAS - I don’t know if this is even possible in TrueNAS.
Assuming it is would you recommend setting up a couple of mirrored NVMe drives to act as a read write cache for a pool of HDD’s?
I can do the research about how to go about it - but I’m not sure if it comes with more fish hooks than benefits in people’s experience.
Cheers,
MC
If you are asking this question then you need to spend more time on understanding how ZFS works before you ask it again.
Simple answer: 1. ZFS already has a read-write cache called ARC which is held in memory. 2. There is an additional read/write cache called L2ARC but (like all the special types of additional vDev) this is only beneficial for specific use cases - and there are other design choices you need to make first before you think about whether these will be needed and beneficial or possibly detrimental to your system.
3 Likes
Thanks @awasb the L2ARC and SLOG links make a lot of sense.
Your quite right @Protopia - I did ask this one before doing the research I would normally do. The links above helped so I will keep reading
Actually for most use cases, L2ARC and SLOG make little sense to implement.
For example:
-
You are normally better off with more memory than implementing L2ARC. And if you still have a need for cache you should consider Special Allocation vDevs as an alternative to L2ARC - but there are pros and cons for each.
-
You only need SLOG if: A) You are doing synchronous writes - and since these have a very significant performance penalty, you should only do synchronous writes when you absolutely need to (for virtual disks / zVolumes / iSCSI or database files); and B) if you cannot put your actual data on SSD or NVMe because it is too large and if your SLOG is significantly faster technology than the disks your data sits on.
Clarifying when I said “make a lot of sense” I just meant that I understood the content from the links @awasb posted, and [after reading] the concept of L2ARC and SLOG. Not that it makes sense to implement in my situation.
So it was useful material to read, but to your point my take away was the first step is add more RAM when required, rather than rush to SSD caches.