RAID 5 and video streaming?

leean7004

Distinguished
Feb 5, 2010
2
0
18,510
Hello,
I heard that when storing videos for on-demand streaming, you shouldn't make the storage a RAID 5 because of the way it splits the data. The video streaming is not good. Is this true?
 
RAID 5 will be no worse for reading data than RAID 0, but it is much slower at writing data. If you don't mind it taking longer to copy files to the drive, it should be fine for holding files for playback.

The only caveat might be that if one of the disks in the RAID volume fails, reading will also slow down. It depends on the performance of the RAID controller, the underlying disks, and whether or not there is other activity on the drive at the same time - but normally I'd expect you to be able to play back music or video OK on a degraded RAID volume.
 

grafixmonkey

Distinguished
Feb 2, 2004
435
0
18,790
Your read performance in degraded mode will go up with the number of drives as well, so in goobaah's case he might have been able to stream only because he did have 6 drives.

The usual case against raid-5 is that if a drive does go out, the rebuild process relies on every block on every other drive being readable. If the drives have been in service long enough for one drive to fail, it's not unlikely that another drive has a bad block that you haven't encountered. If that happens the array can be lost entirely.

Raid-10 will outperform raid-5 in reads and writes, and be more reliable. The disadvantage is getting less storage out of it, but we have such cheap drives now it's hard to argue for raid-5 anymore.
 
Actually it works the other way around. If you loose a disk in a RAID-5 set, then every time you try to access a block on the dead drive the RAID subsystem has to read from EVERY OTHER DISK in order to reconstruct the data. The more disks you have, the longer that takes. A smart RAID controller will issue the read requests in parallel, but you still have to wait for the slowest one to respond.

So you get the best performance from a degraded RAID 5 set when there are only 3 drives (one of which is dead) in the set, and it goes downhill the more drives you have.
 

goobaah

Distinguished
Dec 7, 2009
128
0
18,710
For streaming, you may have already read all those other blocks anyway. Not sure how the controller handles that at all. Also the latency involved in reading those blocks should be extremely low since the drive heads are already in position to access this data. However, there is some benchmark data out there that shows older intel controllers having very slow read/write performance in degraded mode. Much slower than a single drive. I'm just happy it works in this mode with a single HD stream with my free controller.
 

sub mesa

Distinguished
Actually it works the other way around. If you loose a disk in a RAID-5 set, then every time you try to access a block on the dead drive the RAID subsystem has to read from EVERY OTHER DISK in order to reconstruct the data. The more disks you have, the longer that takes.
The larger the array, the more data that is. If only 128KiB is requested, and you use a 128KiB stripesize with 8 disks, that means (8 - 1) * 128KiB = 896KiB of data for a single read from degraded array. That data is cached, so any subsequent accesses will have a zero access time. Also, the OS uses read-ahead so the queue depth for sequential read/write is high enough to use the RAID in parallel.

So sequential I/O should be no problem for a good RAID engine that's degraded. What you will notice is that initial access time is higher, for example playing a movie from degraded array works fine, but the seeking performance is very low; if you seek alot using the time-shift bar, you will notice a higher-than-usual delay before the video stream plays at your selected shift location.