3

Dell Perc RAID cards (among others) allow you to set the disk cache policy to be either on (meaning, the individual hard disks use their built-in caches) or off (meaning, the individual disk caches are disabled). In reading discussions on the net, I find conflicting information about which setting is best. Some people say to disable the disk caches because a power failure can cause corruption of data; others say you can leave the disk caches enabled if your computer is connected to an uninterruptible power supply, and that enabling the caches improves disk performance even in RAID configurations.

Is there a definitive conclusion to which way the disk caches should be set?

Note that this is not about the RAID card's cache and caching policy – this is about the disks used in the array, not the card cache or the battery backup on the card itself.

mhucka
  • 679
  • 4
  • 10
  • 22
  • What you're using the storage for seems to be important to this question. What are you using it for? – Edwin Aug 06 '15 at 00:37
  • This will be a file-intensive computer, with millions of various-sized files stored on disk and various programs reading and analyzing the files. – mhucka Aug 08 '15 at 23:50

4 Answers4

2

You have answered the question yourself. If you have a UPS you can leave them on, if you don't then they should be off or else you risk data loss.

On most servers in the datacenter they will generally be using OEM firmware that uses the cache in a read only mode. (The equivalent of off) Writes will be cached by the RAID card with battery backed memory.

JamesRyan
  • 8,166
  • 2
  • 25
  • 36
  • 3
    Agreed. This is a calculated risk, and there is no single "right answer". Generally leaving the disk cache disabled is considered best practice, as you still have the hardware RAID card's onboard cache to cover that functionality and most cards have battery-backed cache. – JimNim Aug 06 '15 at 15:48
1

This depends not only on personal preferences, but also on the raid controller in question. 3ware cards generally enable the disk cache on their own under "normal" conditions and this is safe w.r.t. power outages. Perc controllers also generally enable the pdcache, but with basically all sata drives, this very likely causes data loss on a power outage.

Weighing the chance of loss of volume due to a power outage vs. recovery/restore costs is not something that can be definitely answered, as it depends on a lot of factors that differ between places.

Of course, it would be nice if more controllers simply enabled the disk cache on their own and make that safe, which would make this question moot.

1

You should consider a single point of failure, which may be not outside of the server, but inside too. For instance, if the server has only one power supply, a UPS will not help in case of its failure, and all drives' cache will be cleared in a moment.

I personally would follow vendor's recommendations, as their engineers who developed these controllers really know what they say.

Also, you may want to check whether you are able to meet your DRP RTO, and test performance to learn if the risk worth it.

Eugene
  • 297
  • 1
  • 12
1

Quite old question, but "disk cache params" are always interesting :

Some elements for Dell PERC Raid card. Source : https://www.dell.com/support/manuals/en/us/frbsdt1/dell-openmanage-server-administrator-v8.3/omss_ug/disk-cache-policy?guid=guid-d8bb9348-2881-4a1b-813d-416d2bc78727&lang=en-us.

The Disk Cache Policy feature is supported on : 
 - Non-RAID SAS/SATA physical disks (HDDs) connected to PERC hardware controllers and 
 - on RAID SAS/SATA physical disks connected to Software RAID S130
   controller

So if you have some virtual disk with RAID level 1,5,6,10,... and using a hardware PERC raid card, disk cache has no effect. (Benchmarks we made recently confirm this on a recent PowerEdge R740xd RAID6 with PERC H840 and H740).

--

jm

user574811
  • 11
  • 1