I'm going to add a SSD drives to my ZFS storages as a cache. Anyone has any experience with this? What if cache device dies, will the any data be affected?

link|improve this question

54% accept rate
feedback

2 Answers

up vote 6 down vote accepted

http://www.solarisinternals.com/wiki/index.php/ZFS_Best_Practices_Guide#Separate_Cache_Devices

link|improve this answer
uh oh! link dead :-( – Coops Aug 8 '11 at 14:16
The link still works, maybe you somehow caught it while it was temporarily down??? – user48838 Aug 9 '11 at 5:36
work's now - ignore me! – Coops Aug 9 '11 at 8:13
feedback

Basically there's three types of ZFS cache, all used for both data and metadata.

  • ARC (Adaptive Resource Cache) - Main memory DRAM cache for reads and writes.
  • L2ARC (Level 2 ARC) - safe read cache: no data loss/service interruption from device failure. Usually SSD based.
  • ZIL (ZFS Intent Log) - safely holds writes on permanent storage which are also waiting in ARC to be flushed to disk. Data should rarely live in this cache for longer than 30secs and data is never read except after a crash to replay writes that weren't committed to the pool. On recent OpenSolaris/Nexenta, device failure won't cause data loss (the data is still in ARC), but device failure + a crash or power outage may cause data loss.

Upgrade your ARC first, an extra 4-8GB is definitely worth it. Both L2ARC and Zil require memory in ARC to operate.

L2Arc is populated by read-cached blocks as they are evicted from ARC. It only caches small reads and is not used for streaming workloads. You can basically use any device for this (including a fast HD) but it works best with an SSD that can handle high IOPS load like the Intel X25-M 160GB ($415), but if you've got deep pockets consider one or multiple Sun Readzilla 100GB ($5k) or Intel X25-E 64GB ($700) devices for increased performance.

ZIL accelerates workloads which require synchronous writes (processes wait for confirmation that writes have actually been committed to disk before continuing execution). Zil performs a similar role to battery backed cache on high end RAID controllers. Since not a single write can be lost when power fails, usually these devices have a super-capacitor . The Sun Logzilla ($6k), DDRdrive X1 ($2k) and OCZ Vertex2Pro ($425) are basically the only devices well suited for this.

link|improve this answer
u sure OCZ Vertex2 is ddr based? I see it's nand-mlc based – disserman Aug 15 '10 at 21:19
2  
OCZ Vertex2Pro is MLC NAND, but unlike almost every other SSD it has a supercap allowing writes in progress to complete when power is pulled. DDRdrive X1 is 4GB DDR2, 4GB SLC and a supercap that copies ram to NAND in 60secs when power is lost. Logzilla is write optimized SLC NAND with a supercap (no DDR either) – notpeter Aug 15 '10 at 22:03
thanks, I have 2 kingston (intel-based) ssds which I gonna use as a cache devices until they die or warranty will be over. then look at your suggestions. – disserman Aug 16 '10 at 0:44
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.