1

I am having a RAID 10 with 6 Harddiscs in my server. I had set the default cache policy to write through. After setting up the OS, i came to know the I/O rates are too slow. I read in some forums that setting default cache policy to Write back will improve the performance. Please advice on this. Also please help me to change my default cache policy to Write back using MegaCli.

Please see the MegaCli LDinfo output here

root@proxmox1:/usr/src/MegaCli_All_OS/Linux/opt/MegaRAID/MegaCli# ./MegaCli64 -LDInfo -L0 -a0


Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name                :
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 1.633 TB
Sector Size         : 512
Mirror Data         : 1.633 TB
State               : Optimal
Strip Size          : 1.0 MB
Number Of Drives per span:2
Span Depth          : 3
Default Cache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy   : Disabled
Encryption Type     : None
Bad Blocks Exist: No
Is VD Cached: No
5

When using Megaraid Controller's "WriteThrough" setting, the on-board controller cache is not used. This does degrade the performance of the RAID as you have noticed. Using the "WriteBack" setting should increase performance as it will use the controller cache.

However, if you do not have a battery backup unit attached to the controller (NOT a UPS, but a BBU), it is very possible that on a power failure, the cache on the controller will not get written to the array, and your data will be corrupt. And you won't be able to tell which files where corrupted very easily, as the array may still function as normal once power is restored.

If you do not have a BBU installed: leave the setting on "WriteThrough" and live with the performance loss.

If you have a UPS for the entire system: change the setting to "BadBatt", and the controller will use the cache as if "WriteBack" was selected, with increased performance.

You can just put the setting to "BadBatt" even if you don't have a UPS or the battery installed and the cache will be used, but it is not recommended as you could very easily lose data if power is lost.

I have a similar MegaRaid controller, but no battery, and wondered the same thing.

See MegaRaid Guide

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.