3 ms·
I have a home NAS that has an SSD on it for the OS and four HDDs in RAIDZ. Does anyone know if/how I can use a small part/partition of the SSD for the cache? I
by StavrosK 6y ago
I have a home NAS that has an SSD on it for the OS and four HDDs in RAIDZ. Does anyone know if/how I can use a small part/partition of the SSD for the cache? I don't need an entire SSD's worth of cache, and I'd rather not have to buy an extra one.
- lscotte 6y agoYes, you can. It's called L2ARC.
- StavrosK 6y agoThanks for the tip, I'll look into it and deploy it!
- louwrentius 6y agoI would really advise not to use the SSD for cache: you'll only wear it out and do you have any evidence that you benefit from it?
- StavrosK 6y agoProbably not, since it's a home NAS the reads won't be very repeatable. I wanted to prevent the hard disks from waking up, but it's mostly writes, so it doesn't help there either.
- washadjeffmad 6y agoAdd the SSD to its own pool, set up as a working share, then use a utility or script to sync contents a few times a day?
- StavrosK 6y agoThat would probably be easier, yep, thanks. It's more straightforward to just make a partition on it and rsync twice a day.
- notabee 6y agoMost of the time you don't need the extra SSD cache. If you do use one for the ZIL (writes), it will only help synchronous writes, it should be redundant if possible, and it should be extremely low latency like Intel Optane. L2ARC (reads) on an SSD is not as good as just adding more RAM.
- magicalhippo 6y agoYou can add partitions to a pool, either for storage, for SLOG or L2ARC. Unless you're ok with data loss in the case of power-outage, you'll want to use a mirror for SLOG at the very least. You can do that by making a mirror from two partitions on separate SSDs and then adding that as the SLOG. The partitions do not have to be very large, just enough to handle a minute or so of writes, so 10GB or so should is often plenty. Also keep in mind that ZFS does a lot of shuffling for the L2ARC. I had <1% L2ARC hits on my pool with a 128GB L2ARC partition, but almost a TB of writes per day to the L2ARC due to ZFS rotating data in and out of it.