Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

4 Answers 4

up vote 2 down vote accepted

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.

share|improve this answer
    
"won't protect you" and "should protect you" are vague because "you" could refer to anything. Please be more concise. –  steampowered Dec 3 '11 at 16:10
add comment

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.

share|improve this answer
add comment

The battery backup is for the write cache. If the power dies the battery keeps the contents of the cache valid until power is restored and it's contents can be written to disk. Data doesn't stay in the write cache very long.

Also keep in mind the disks also have cache and might do write caching as well. It can usually be disable by setting it to something like write-through mode.

share|improve this answer
    
'doesn't stay in the write cache very long.' - Does that mean less than a few seconds or a few minutes? Interesting about the drive cache. So you could have the battery backup on the controller but still lose the data when the drive doesn't have a battery backup? –  steampowered Dec 3 '11 at 13:30
    
Few seconds normally but can be longer under some conditions like a drive fails a write as it won't discard the data until it's successfully written to disk. The drives themselves can cause data loss if the cache mode isn't set to a mode that avoids it. –  Brian Dec 28 '11 at 22:34
add comment

Normally the batteries have the rating printed on the side of them. In the case of one server we have, the RAID battery is listed @ 3.7V -- 7Wh. Watt- hours are calculated with voltage X current X time. Your battery should list the voltage, and at least the amperage or watt hours. Either one of these is sufficient to find the time before the battery dies.

To roughly find the time it would take for the battery to die you would:

Assuming 1A draw on the RAID card:
3.7V x 1A = 3.75 Watts
7Wh / 3.75W = 1.86 hours

Assuming 0.5A draw on the RAID card:
3.7V x 0.5A = 1.85 Watts
7Wh / 3.75W = 3.78 hours

Refering back to our original V * C * T:
3.7V x 0.5A x 3.78 = 7.087Wh (due to rounding errors)

These yield ballpark figures to help you nail down about how long it would take to drain the battery. I'd assume a 25% margin of error just to be on the safe side since you don't know how many amps the RAID draws, or the actual condition of the battery. Here's a nice reference if you want to read more: http://www.diyelectriccar.com/forums/showthread.php?t=6535

share|improve this answer
    
I also failed to answer the original question. I cannot comment on how long data is stored in cache before it is written to the drives, but based on the above scenarios, 1.86 hours would be plenty of time to empty the cache. –  Lee Harrison Dec 7 '11 at 15:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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