Does softraid RAID1 evenly distribute the read load?
For a decision I have to do, I have to know if the RAID1 implementation in softraid evenly distributes the read load through all the disks. So, for example: with a two identical disks RAID1 implementation, can we roughly assume that write speed is almost the same speed of a single disk while the read speed is almost the double? I know that reality is not so simple, but it's only to have an ideal situation to understand the working of the system. Thanks.
Re: Does softraid RAID1 evenly distribute the read load?
On Thu, 7 Nov 2013, Federico Giannici wrote: For a decision I have to do, I have to know if the RAID1 implementation in softraid evenly distributes the read load through all the disks. Yes, reads are interleaved across all online chunks. So, for example: with a two identical disks RAID1 implementation, can we roughly assume that write speed is almost the same speed of a single disk while the read speed is almost the double? As you note below, it is not this simple... if each disk is on a separate controller and there are no shared bottlenecks, this would be theoretically close. Also, since you can have more than two chunks in a softraid RAID1 volume, you could theoretically increase the read speed by further distributing it across disks/controllers. I know that reality is not so simple, but it's only to have an ideal situation to understand the working of the system. Right. Obviously benchmarking would be good starting point :) -- Action without study is fatal. Study without action is futile. -- Mary Ritter Beard
Re: Does softraid RAID1 evenly distribute the read load?
On 11/07/13 14:25, Joel Sing wrote: On Thu, 7 Nov 2013, Federico Giannici wrote: For a decision I have to do, I have to know if the RAID1 implementation in softraid evenly distributes the read load through all the disks. Yes, reads are interleaved across all online chunks. So, for example: with a two identical disks RAID1 implementation, can we roughly assume that write speed is almost the same speed of a single disk while the read speed is almost the double? As you note below, it is not this simple... if each disk is on a separate controller and there are no shared bottlenecks, this would be theoretically close. Also, since you can have more than two chunks in a softraid RAID1 volume, you could theoretically increase the read speed by further distributing it across disks/controllers. Last I checked, I got nothing of the sort. It's been a while since, indeed, but I believe the problem was that reading every other chunk from a disk as opposed to reading each of them did not improve anything. Still have to spin the disk etc. I looked into making the selection of which chunk to read from a bit smarter and succeeded in my limited setup (i.e. one process reading from one physical disk and another processes reading from another), but only as proof-of-concept. This may differ on other types of disks, *especially* ssd disks, where I would expect up to the double read capacity. /Alexander I know that reality is not so simple, but it's only to have an ideal situation to understand the working of the system. Right. Obviously benchmarking would be good starting point :)
Re: Does softraid RAID1 evenly distribute the read load?
On 7 November 2013 03:56, Federico Giannici giann...@neomedia.it wrote: For a decision I have to do, I have to know if the RAID1 implementation in softraid evenly distributes the read load through all the disks. Yes, it does exactly that. Take a look yourself: http://bxr.su/o/dev/softraid_raid1.c#sr_raid1_rw So, for example: with a two identical disks RAID1 implementation, can we roughly assume that write speed is almost the same speed of a single disk while the read speed is almost the double? With RAID1, write speed would be the speed of the slowest disc. If you have many discs, even if they're supposedly identical, you might want to individually test their speeds, and make sure to create separate RAID1 arrays that group discs of the same performance tiers together, to get higher overall performance from the system. Random access read capacity should indeed be roughly the sum of the average of all discs, yes. I understand that OpenBSD's softraid raid1 differs from other softraid solutions, where others frequently use only one disc for sequential reads from a single thread or so; OpenBSD always interleaves reads, evenly distributing «the read load through all the disks», exactly as you seem to require. I know that reality is not so simple, but it's only to have an ideal situation to understand the working of the system. Only way is to look at the code! :-) C.