[mythtv-users] Software RAID and ionice

Richard Freeman r-mythtv at thefreemanclan.net
Thu May 24 10:32:29 UTC 2007


Gene Stapp wrote:
> I got around this problem by creating a raid0 partition just for myth to 
> use (and any not very important video) - two 500GB drives do a great 
> job. That keeps the other raid arrays clear for other uses and for 
> permanent storage of important video. Raid 5 arrays suck at write 
> operations compared to raid 0s... Also just use xfs with a correctly 
> installed battery backup that can shut down the system if needed and 
> your filesystem issues would be solved. I'm thinking your choice of 
> filesystem is causing the issue for the most part.. I'd like to see to 
> some Bonnie++ tests to see how good the raid is to begin with.
> 

Does the RAID performance matter at all as long as it can sustain the
writes needed by mythbackend with reasonable overhead?  I'm thinking
that if CFQ is actually being used then ionice should take care of the
rest.

Unless my RAID is so fast that operations become CPU-bound I think that
I'm still susceptible to IOBOUND issues unless ionice is working.  For
example, suppose my RAID and all the hard drives on my system can
sustain read/writes of 1GB/s.  I copy some 5GB file from another hard
drive to my RAID, and ionice doesn't work.  Myth will still have IOBOUND
issues - because that file copy will still completely flood the write
buffer to the hard drive unless I just have more RAM than the size of
the files being copied.  It doesn't matter if my RAID handles 100MB/s or
100GB/s.  If you copy a file bigger than your RAM and it can be read
faster than it can be written, then your buffers will fill up, and
unless the kernel prioritizes mythtv it will become IOBOUND.

Now, I'm wondering if myth's fsync behavior is causing the problem.
Maybe the kernel is prioritizing everything so that there is always room
in the buffer for myth, but the use of fsync means that it isn't enough
that there is room in the buffer - it becomes an issue what order the
data is written since myth isn't happy leaving data in the buffer.

In any case, I'll post some results with bonnie++.  I started to run
tests and got IOBOUND on mythtv - despite running bonnie++ in the idle
ionice class.  I'll run tests later today and post them...

Also - I'm still leery about xfs until I can find some documentation
that clearly indicates that it doesn't zero out entire files if they
were open when the system dies.  Even a UPS doesn't guarantee that the
system won't go down with dirty buffers - a kernel panic, for example,
will bring down the system UPS or not.  And I'm not convinced it will
solve the problem - I used to get IOBOUND errors back when I was running
mythtv on xfs - the only thing that fixed it was the use of ionice.
Plus, ext3 has the side benefit of being resizable in both directions,
which is nice when you're using lvm2.  (And you don't dedicate one whole
RAID to just myth.)


More information about the mythtv-users mailing list