2

I'm setting up a system with 5 HDD's in RAIDZ2 and one SSD where the OS goes. I'm considering partitioning the system drive (the SSD) to set the free partition of the SSD as a cache in the RAIDZ2. I've heard a lot of good things about SSD cache in RAIDZ's, but it it a bad idea to let the system drive double as one? I do understand that it will not be quite as good as having a dedicated SSD for caching, but is it outright bad? I'm wondering both in terms of performance as cache and system drive, but also whether or not the lifetime of the drive will be significantly damaged by this?

lindhe
  • 245

1 Answers1

1

Long story short: if you don't have dedicated SSD for RAIDZ, it'll just use it less.

ZFS automatically measures whether using ZIL/L2ARC actually increases the performance or not. If you use slow disk - say, USB2.0 stick - for L2ARC, it will stay unused, as using it does not speed up anything compared to using disks directly. Similarly, if that SSD is constantly saturated by other usage, you won't get any benefit out from it, but also, the only disadvantage is that you'll waste space you allocated for caching. For detailed documentation, see fs/zfs/arc.c (that link points to Illuminos ZFS, but zfs-on-linux have exactly or almost exactly the same code).

I'm using same SSD for OS and L2ARC, and in certain workloads it really makes a difference. I don't have benchmark results available anymore. In my case, OS files are usually loaded to the memory, so IO load for OS (Linux) is not significant.

Olli
  • 7,739