What is the right cache settings for Adaptec raid cards?

5,222

Solution 1

No it doesn't cover the HDD cache in its "protection". If you are exceptionally concerned, you tell the raid controller to turn off the cache on the HDD, and turn off the write cache on the raid controller, and you are certain then that you will have the data written to the disk straight away.

Just expect a big performance hit when doing it.

Solution 2

The fundamental difference between write-back and write through is as follows:

Write-back marks data areas as "dirty" and saves them in ram. At some point they are written down to disk. This gives better performance, but you have data in a volotile state which can be risky. It might violate guarantees for consistenty in databases and/or filesystems

Write-through writes the data down to disk when the write comes. This is less efficient, especially in the case of many small writes, but it makes sure your data is as safe as possible. In this case the cache is only used to speed up reads.

You can find a much longer explanation at http://en.wikipedia.org/wiki/Cache

So, do you value performance or do you value data safety? I am not sure how much the battery backup in the controller can do, in most cases it just stores the pending writes untill the disks are powered up again and writes it down then.

If you can risk losing data written after the last backup go for write-back. You will gain performance.

If your data is critical and you want to minimize data loss go for write-through.

Share:
5,222

Related videos on Youtube

ondra
Author by

ondra

Updated on September 17, 2022

Comments

  • ondra
    ondra almost 2 years

    There are 2 possibilites to modify cache settings in the Adaptec Storage Manager. - Physical drive - Write-back or Write-through - Logical drive - Write-back, Write-back only with battery, write-through

    I do have a battery, so I would set Write-back only with battery for logical drive. However, what should I set on the physical drive?

    Is the write-back caching on physical drive provided by the controller backed by the battery as well - or is it provided by the drive and it should be switched to write-through? (I do not have a UPS yet). I have not found any clue in Adaptec documentation, the ASM Guide even does not mention the logical drive settings.

    The adaptec model is 52445, but the settings seems to be quite generic in the Adaptec Storage Manager.

    • womble
      womble over 14 years
      You might want to mention the model of card you have; I have my doubts that every Adaptec card ever made operates in exactly the same way with regards to bettery-backed caching.
    • Ján Lalinský
      Ján Lalinský about 4 years
      @Ondra, have you ever found the answer? I too think enabling controller write cache and disabling drive write cache is optimal in this case, but I don't have any real sources for this.
  • ondra
    ondra over 14 years
    I know the difference between write-back and write-through. I was asking if the adaptec card settings of cache on physical drive means "caching in the batter-backed memory of adaptec card" or "caching in the non-battery-backed memory of the disk". The latter would be quite dangerous.