# raid1 over ssd and hdd

## lagalopex

Hello!

I would like to know if anyone has tested a raid1 setup with a ssd and a normal hdd as "backup".

With setting write-mostly and write-behind for the hdd it should work, but has anyone tested it?

What is the performance like?

Has the kernel some options to optimize for use with ssd?

Thanks!

----------

## Sadako

I think with this setup you'd actually end up with the worst of both worlds, especially if you're using the kernels software raid.

With a raid 1, writing to the array will only be as fast as the slowest element in the array, and typically ssds are still slower than current hard disks, especially in terms of throughput.

For reads, in my experience with the kernels raid wrt mirroring the reads are simply shared out equally amongst the raid array elements, for example if one element of the array is busy while another is free, the busy element while still get half of the reads, even though it'd be much faster in this case to do all the reads on the free element.

What this means for what you're proposing is that you won't see much benefit from the reduced seek time of the ssd, as half the reads while still be preformed on/assigned to the hard disk.

Hope this helps, and bare in mind it's just my opinion based on my experiences, and may be completely wrong.

 :Razz: 

----------

## lagalopex

 *Hopeless wrote:*   

> I think with this setup you'd actually end up with the worst of both worlds, especially if you're using the kernels software raid.

 

That would be bad   :Crying or Very sad: 

 *Hopeless wrote:*   

> With a raid 1, writing to the array will only be as fast as the slowest element in the array, and typically ssds are still slower than current hard disks, especially in terms of throughput.
> 
> For reads, in my experience with the kernels raid wrt mirroring the reads are simply shared out equally amongst the raid array elements, for example if one element of the array is busy while another is free, the busy element while still get half of the reads, even though it'd be much faster in this case to do all the reads on the free element.

 

I thought write-mostly and write-behind will use the ssd more heavy and the ssd are marked as 100 MB/s at writing and reading is even more. But I know that these values are for linear IO. (But they are for hdd as well...)

I hoped to get some kind of "ssd" that will be transparently mirrored to a real hdd (without real impact on the actuall io). I think you know what I mean, but perhaps mdraid is the wrong to look?!

 *Hopeless wrote:*   

> What this means for what you're proposing is that you won't see much benefit from the reduced seek time of the ssd, as half the reads while still be preformed on/assigned to the hard disk.
> 
> Hope this helps, and bare in mind it's just my opinion based on my experiences, and may be completely wrong.

 

I really hope you are wrong   :Very Happy: 

I'll just try and benchmark it when everything is here and I keep looking for a solution. Because two ssds for a raid are too expensive for me   :Confused: 

EDIT: Just found some informations that ssd are slow on random writes. But log-fs (like btrfs, nilfs, ...) will get the linear speed or one uses "Managed Flash Technology" that will emulate the "logging"-IO on blocklevel.

----------

