# ZFS concurrent random read speeds. 4-way mirror vs 2x 2-way mirror vs 4 disk stripe



## einthusan (May 31, 2012)

So what is faster for parallel random reads?

a) 4-way mirror (RAID1)
b) 2x 2-way mirror (RAID10)
c) 4 drives striped together (RAID0)


----------



## Sebulon (May 31, 2012)

I seriously doubt that anyone here actually has benchmarked this, so anything would be an educated guess. I would say, theoretically a 4-way, because it can read everything from all drives, almost at any time. But theory and practice can differ, as we all know. DIY with benchmarks/bonnie++ to find out for yourself.

And I will never say that it is a good idea to stripe, but for different reasons than read performance.

/Sebulon


----------



## einthusan (May 31, 2012)

Sebulon said:
			
		

> I seriously doubt that anyone here actually has benchmarked this, so anything would be an educated guess. I would say, theoretically a 4-way, because it can read everything from all drives, almost at any time. But theory and practice can differ, as we all know. DIY with benchmarks/bonnie++ to find out for yourself.
> 
> And I will never say that it is a good idea to stripe, but for different reasons than read performance.
> 
> /Sebulon



I think you are right, 4-way should be the best for heavy concurrent reads. I was just doubting ZFS's capability to co-ordinate reads from a 4-way mirror efficiently. Thanks.


----------



## Sebulon (May 31, 2012)

And if you do benchmark the difference, please post back your numbers for future reference

/Sebulon


----------



## einthusan (May 31, 2012)

Actually, I did test using bonnie++, the results might be bizarre but you can see the relative difference,

4-way mirror: Read=704 MB/s Write=310 MB/s
stripe of 4 disks: Read=1542 MB/s Write=704 MB/s

The stripe is a bit more than 2x the read/write speeds compared to 4-way mirror. However, I doubt bonnie++ performs heavy concurrent random reads.


----------



## t1066 (May 31, 2012)

einthusan said:
			
		

> Actually, I did test using bonnie++, the results might be bizarre but you can see the relative difference,
> 
> 4-way mirror: Read=704 MB/s Write=310 MB/s
> stripe of 4 disks: Read=1542 MB/s Write=704 MB/s
> ...



Are you using SSD's, or do you have compression turn on when running bonnie++?


----------



## einthusan (May 31, 2012)

t1066 said:
			
		

> Are you using SSD's, or do you have compression turn on when running bonnie++?



No SSD's, compression is turned on, however, the 16 GB file I used for testing with bonnie++ (2x RAM) has compress ratio of 1.0x

I know the numbers are so high probably because I concatenated a 2 GB file 8 times to make one large 16 GB file and probably ZFS detects some pattern in the file and caches some of it in memory maybe? *N*ot sure.


----------



## webxtra (Oct 12, 2013)

Interesting. Did you also test 2x 2-way mirror (RAID10)?
I wonder if it is faster or slower then the 4 way mirror.  I want to setup my ZIL with 4 partitions on 4 different SSDs (4 way mirror or 2x 2-way mirror) and use the rest with 4 bigger partitions (stripe) for L2 ARC. Waiting for my SSDs, might have them next week, so can't test it myself at the moment


----------



## mav@ (Oct 13, 2013)

There is a patch now in development by smh@ going to be committed soon after 10.0 release, that is expected to significantly improve mirror read performance. Unfortunately it was made too late to get into 10.0.


----------

