How long does data stay in a RAID cache?

Most higher-end RAID cards have the option to purchase a battery add-on to allow the controller to finish writing the contents of the cache to the drives in the event of a power failure.

I setup RAIDs on the cheap without ever paying for the battery backup. How much risk is there in losing the cached data if my computer has a UPS? I suppose the computer could overheat and shutoff power to the motherboard in spite of the UPS. Would the RAID battery protect the cache during an overheat shutdown?

How long does the data stay in the cache before being written to the drive? Can I safely assume any write operations sent to the controller are out of the cache after a few seconds or less?


A UPS can't prevent an ATX power supply from dying. That's what redundant power supplies are for. A RAID cache battery module will preserve the contents of the write cache until power is restored and the server is rebooted or the battery is depleted. For some Dell/EMC hardware, a 72 hour figure is quoted as the cache hold time (with disclaimers about battery maintenance). As for how long the data stays in the write cache before making it to disk, it probably depends on a lot of factors, such as the size of the cache, cache speed and array configuration. I wouldn't think it would be longer than a second or two except under extraordinary circumstances (write activity while the array is in degraded mode and rebuilding to a hot spare?), but I haven't seen any figures or measured it myself.


The newest RAID controllers no longer need a battery backed cache. Instead super capacitors are used to provide power to the controller, and provide time for data to be saved to a flash memory module in the event of an outage, allowing for months to years of cache preservation with no high-stress 3-day recovery time limit. They look like they have a battery module, but instead they use a group of supercapacitors which should never need replacement.

Adaptec Flash Module 600 - documentation: http://www.adaptec.com/nr/pdfs/afm-600_ds.pdf

The lowest end Adaptec controller is the 6405 with 512 meg cache, and the AFM 600 is a plugin module.

LSI has a RAID flash cache form of this also, called "CacheVault". http://www.lsi.com/channel/products/storagecomponents/Pages/CacheVaultFlash.aspx

Currently in both cases, the flash cache plus RAID controller will end up costing at least US$500 to $1000. But more RAID manufactures will probably move in this direction and prices will come down.