Is the battery redundant if the server is on a properly-sized UPS? There is an option to force write-back mode and I want to understand the risk. It is my understanding that it helps against power failures while data in the cache has not been written out to physical disk. But if the server is on a UPS, then there is no risk of power loss, especially if it is a smart UPS and the server is configured to shut down gracefully when the battery reaches a low state. Am I missing something?
4 Answers
Your understanding is essentially correct.
Allowing the controller to cache write data in its local RAM improves write speed, however it exposes you to a risk of having the OS think data has been written to disk (because the controller has it) and having power fail before the controller completes that write. The battery back-up allows the data in the cache to survive until the machine is powered on again, mitigating that risk.
As far as benefit if your system is already on a UPS, what happens if you exceed your UPS runtime (possible even with a smart UPS), or if the server's power supplies blow up? Or if someone accidentally yanks the power cords out?
Many thing can cause a power failure. A UPS only protects against a few of them.

- 79,879
- 17
- 130
- 214
-
14Suddenly yanked powercords are a risk in MOST datacenters! – sysadmin1138 Jan 26 '11 at 17:59
-
1Bing on all points. The cost of a BBWC is well worth it, unless the data is really transient, you can capture the event and recover some other way, and you just want to improve performance by forcing write-back caching. – mfinni Jan 26 '11 at 18:04
-
3No risk of power loss? Besides voretaq7's answers, also add: Circuit breaker tripping, UPS malfunction... there's lots that can go wrong. – MikeyB Jan 26 '11 at 18:31
-
@mikeyB good point about the breakers - I've been in at least one DC where the A/B power legs occasionally went back to one floor or panel breaker – voretaq7 Jan 26 '11 at 18:59
-
Thanks everyone for your replies. @voretaq7 - the server also has multiple power supplies, multiple power cords, UPS as well a generators, but I do see your point in terms of the design of the card itslef (not knowing what box it may end up in). @mfinni - that's a good one, but then we'd have bigger problems with the thousands of servers going down all at once. – RPC Jan 27 '11 at 15:52
There are two reasons for the battery;
- What if your PSU/s suddenly go pop - regardless of a UPS your system is dead and you may have had uncommitted data in your cache, having the battery ensures that the data is correctly written when power is restored. The same is true if you had a systemboard failure of course.
- What if something died on your actual disk controller, cables or disk enclosure/s? - say something snagged on the cable and damaged the connector at either end - again you may have data in your cache waiting to be written but no way to do it as the card, cable, enclosure etc is dead. You may have to replace the controller, if you have battery backed cache you could move that cache to a new card without losing the data.
These are both good reasons but to be honest flash-based caches have taken over from battery backed ones recently for obvious reasons and I'd recommend them first - that said if you do a lot of writing I'd recommend one or the other over just a UPS.

- 101,299
- 9
- 108
- 239
The battery also enables the ability to have the improved performance as well as the purposes noted by voretaq7. Take the battery off and the device will still function but at substantially reduced speed.

- 1,147
- 11
- 20
-
3That's specifically not correct in this case. @RPC states explicitly that he can force write-back caching without the battery on his controller. The write-back caching is what improves the performance. – mfinni Jan 26 '11 at 19:12
-
In fact I'm sure he can but the battery improves performance substantially. I've worked through troubleshooting degraded performance on a pair of HP MSA 20 storage devices and the degradation was caused by a failed Write-Back Cache battery. The battery was replaced and the performance jumped. – Mitch Jan 26 '11 at 19:25
-
2Yes, I know. Because on those machines, the presence of the battery enables write caching. When the battery fails, write-caching stops and performance drops. When the battery is fixed, write-caching begins again and performance improves. His controller allows him to force write-back caching, *which is what improves performance*, without the battery. – mfinni Jan 26 '11 at 20:03
-
Mitch that's a very specific concern, I know the HP E/P/i controllers very well and for those cards you're right as HP make it very hard to enable cache without battery - but this question isn't limited to those cards and there are plenty that let you enable cache with no battery or in fact do that by default - hence mfinni's concern. – Chopper3 Jan 26 '11 at 20:08
If you have a UPS you can force the cache on and not use the batter on the raid. If you lose power without a raid card you can get corrupted data, thats what backups are for.
And just because you lost power does not mean your system is toast. The cache only holds 256 megs and it gets flushed/written to HD all the time when idle. Its not like it holds all the data and never lets go of it. Its always being flushed.
A meteor could hit the building and blow up everything, don't let these worry wort's get ya down. I've run raid 1 with cache on and no battery with no issues.
You can get really anal in this conversation. Why not have 4x fall over server, 10x backups etc etc. Its not that big a deal.
Turn the cache on use your UPS. If you have a ps blow you can get the data back and it would have to blow during work hours with someone using the computer and have the right application open, and saving data at same time etc etc. So the odds are low, and if it happens it can be fixed easily.

- 1