<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Feb 16, 2013 at 10:16 PM, criggie <span dir="ltr"><<a href="mailto:criggie@criggie.org.nz" target="_blank">criggie@criggie.org.nz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 16/02/13 21:48, Steve Hodge wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On Sat, Feb 16, 2013 at 8:36 PM, Robin Gilks <<a href="mailto:g8ecj@gilks.org" target="_blank">g8ecj@gilks.org</a><br></div><div class="im">
    I do find it odd that a Raid 1 system is so slow - my Raid 5 system,<br>
    which<br>
    in theory is 1/4 the speed (at best!) handles 8 simultaneous<br>
    recording OK<br>
    with a mixture of DVB-T, DVB-S and analog off a set=top box.<br>
<br>
<br>
RAID1 and RAID5 have theoretically identical write performance - the<br>
same as the speed of the slowest disk. In practice it'll be slightly<br>
slower just because there are more disks involved.<br>
</div></blockquote>
<br>
Agreed - RAID5 should be N times faster than one disk where N is number of disks in the raid.   A file is written in N blocks, with 1/N per disk (approximately) so it should be done in 1/N the time of a single disk writing the lot.<br>
</blockquote><div><br></div><div>Right, at least in the general case. With MythTV, the files being written are being streamed from a relatively slow source (the DVB device). So what will happen is that the system will end up writing to two drives in the RAID 5 array at a time (the drive that has the block being written to and the parity drive for that stripe). Depending on the implementation it may have to read from one of these drives or all of the drives in the array first.The reads are generally pretty cheap as plenty of look-ahead can be used so the performance ends up being pretty similar to a writing to a single drive. If you have a file that is buffered then performance can be higher as more drives can be written to at once (since we have available data for multiple blocks).<br>
<br></div><div>With RAID1 both drives are written simultaneously so the speed is identical to writing to a single drive.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

In practice this theoretical stuff goes out the window, because it takes time for either software or hardware to calulate the parity bits </blockquote><div><br></div><div>Note that the parity calculation itself is so trivial that you might as well ignore it on modern hardware. The cost is reading in the other blocks in the stripe, if you don't already have them buffered.<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Personally I'd suspect LVM, and I must ask, why are you using LVM at all?<br>
</blockquote>
<br></div>
LVM is awesome for the OS, or your files, or almost anything.<br></blockquote><div><br></div><div>There are cases where LVM is useful, but personally I think they're quite rare. Back when drives were relatively small it was not uncommon for large unix systems to have multiple partitions (or even drives) just for the OS (e.g. /var was often a separate partition). It was very common to have home directories separate. LVM is great for that sort of set up. But these days that is almost never necessary - space is cheap and plentiful and baroque partition layouts are just needless complexity for no gain. LVM introduces a significant performance penalty and you don't need it to add space to partitions if you are using software RAID (at least if you pick the right RAID level).<br>
<br>LVM can be useful to combine arrays, but unless you are putting space on frequently it's rarely worth the effort. E.g. I have a number of 160-320GB drives sitting around the I might be able to combine into a 600GB array with some redundancy. But my main array is 4.5TB over 4 1.5TB drives. It's not worth the power, heat, or space to put 3 or 4 extra drives into that system just for 600GB. Better to buy one more 1.5TB drive.<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Except recording storage in mythtv.<br></blockquote><br></div><div class="gmail_quote">Exactly. If you want to use multiple drives for recordings and a single array won't do then storage groups are a better way to go.<br>
<br></div><div class="gmail_quote">Cheers,<br>Steve<br></div></div></div>