The right cache settings for Adaptec raid cards

adapteccacheraid

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.

Best Answer

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.