Recently I ran into an issue that I would like to share with you and it had to do with slow file transfers. To make a long story short I am upgrading my server which has a RAID 5 and I am replacing the onboard RAID with a hard controller. To do this I am going to need to back up all my data on the RAID Array but this is where I ran into an issue. When I would transfer files from the array to one of my non-array drives I would receive 40-50 MBps sustained writes on one drive while receiving 10-20 MBps sustained on another. I was getting very frustrated by this because the speeds would start out around 120 MBps but then dwindle down to nothing within 10-15 minutes. I did some searching but most of what I found led to what I already knew or only applied to IDE drives and not SATA drives. I checked and re-checked the settings in Device Manager which would be the cache settings for those of you that don’t know. Here is a screen shot of those settings.
As you can see my Disk Cache options where correct but something still wasn’t correct. Finally I fired up AMD / ATI RaidXpert and I found my issue, Although all disks had the correct options enabled (Caching & Native Command Queuing NCQ) I found the Raid settings were not setup correctly. I apologize ahead of time now that I no longer use the onboard Raid controller I don’t have the options to configure the controller any longer as well. Therefore I had to scour the web and find the best screen shots I could to help detail the settings.
The first screenshot shows the Windows Disk Caching Options, the second shows the individual drive options within RaidXpert and the third screen shot shows the Raid Controller options for the Array. Obviously not all options are shown but I will explain what is available.
The Disk caching option for each individual drive only tells the controller that the drive is capable of using this advanced feature, it doesn’t actually enable anything. The Raid controller itself has 2 sets of caching options, one for Reads and one for Writes. Read caching is a simple on or off switch while write caching has a few different modes. Write caching is available in Write-Back, Write-Through and a Hybrid mode. I don’t recall the actual term for the Hybrid mode but its usually a mesh of Write-Back and no Caching. Write-Back caching is generally the fastest option however its not recommended unless you have a Raid Controller Backup Battery, even Write-Through Caching is recommended unless you at least have a UPS backup battery for your PC.
With Write-Through cache data is written to both the drive and the cache thus there is a performance hit since the data is being written twice. The performance increase comes in IF the data is required it can then be read from the cache instead of the disk.
Write-Back cache only writes to the cache initially, once the cache is full or the cache is required is the data flushed to the disk. This is why this option is so risky without a backup battery, if you lose power while your data is in cache you will lose all of that data, the amount of data depends on the size of the cache and how much data was in the cache with the power failure occurred.
Hybrid cache differs from vendor to vendor but generally its similar to Write-Back for the performance increase but yet generally utilizes some sort of additional disk flushing to improve reliability.
For additional reading I recommend checking on the Wiki article on Cache.
http://en.wikipedia.org/wiki/Cache