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.
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.
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.