Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am aware that RAID comes with certain write penalties, etc and that varies at different levels. I am trying to figure out how latency is affected in RAID 1. From my SAN, I can look at the number of writes, reads, bytes, and latency in individual HDD. While others match, latency slightly varies. I am trying to figure out the following.

RAID 1 HDD 1 Write Latency: 24ms HDD 2 Write Latency: 28ms

Does that mean the total write latency = 24ms + 28ms? Or just 28ms? or (24+28/2)ms. I am bound to believe it is 28ms because we are trying to find the max?

share|improve this question
    
What type of storage solution? –  ewwhite Feb 8 '13 at 3:40
    
It is basically a SAN - MSA 2000 G3. 15k HDD, 6GB SAS switches. I know the latency is high. I am trying to get < 10 ms, so checking IO path and all kind of stuff. No benchmarking was done (I had not started working here when this was already production), so we do not have any baselines. Trying to load balance database files based on the workload. Thank you. –  sqlbuzz Feb 8 '13 at 5:10

2 Answers 2

up vote -1 down vote accepted

Total write latency will be the worse of the set for raid 1. That said, it might not even be that bad. Depending on your raid device/software, it might even allow a small skew.

For example, mdadm has

--write-behind=
Specify that write-behind mode should be enabled (valid for RAID1 only).
If an argument is specified, it will set the maximum number of outstanding
writes allowed. The default value is 256. A write-intent bitmap is required
in order to use write-behind mode, and write-behind is only attempted on
drives marked as write-mostly.
share|improve this answer
    
Thank you. That is an excellent explanation which also verifies what I was thinking (or was more inclined towards). –  sqlbuzz Feb 8 '13 at 5:08
    
This isn't software RAID... What about caching? –  ewwhite Feb 8 '13 at 5:28
    
Then it entirely depends on the settings of the controller and the amount of data. The worst case is still going to be the latency of the slowest drive. –  kormoc Feb 9 '13 at 19:41

You're completely missing the effect of the HP P2000 G3's write cache!

Random writes will hit the flash-backed DRAM write cache on each controller first, be coalesced and fed to the drives sequentially from cache.

In your setup, as long as you have write caching enabled and the proper RAID level to support your application's sequential throughput needs, there isn't much tuning you can do at the storage level. Add to that the fact that you're connected via 6Gbps SAS links!

There's plenty to start examining at the OS level, though. I/O elevators, filesystem choice, readahead, mount options, etc.

Is your application server running Linux?

share|improve this answer
1  
As per I/O elevators, moving to a deadline io scheduler might be a great boost for you, see mysqlperformanceblog.com/2009/01/30/… –  kormoc Feb 8 '13 at 7:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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