[mythtv-users] Mythfilldatabase during recording screws up recordings.

Rob Smith kormoc at mythtv.org
Tue Apr 5 16:40:21 UTC 2011

On Mon, Apr 4, 2011 at 10:45 PM, Douglas Peale
<Douglas_Peale at comcast.net> wrote:
> How is this any worse than my current situation? Mythfilldatabase runs during recordings, it swamps my hard disk with low
> priority database transactions and I get corrupted recordings.
> I can't set MythBackend to real time unless I run it as root. The highest setting I can set a user tasks ionice is the default
> setting. This means that ANY task on the system can swamp the disk and kill recordings. No, let me correct that. I had misread
> the ionice manpage. The default priority for a standard task  is  (cpu_nice + 20) / 5, or 4 since the default nice level is 0.
> So perhaps the only thing necessary to make sure recordings don't get corrupted is to set ionice of mythbackend to -c 2 -n 0.
> This should work if the io scheduler works.
> It would be easier to implement too since mythbackend is not started by upstart like mysql is.

How is it worse? It will corrupt *every* recording.

idle io is exactly that, Only idle io. All dirty buffers are flushed,
all checkpoints are cleared, zero io requests in flight and that will
*never* happen during recordings to the same disk.

You could setup a crontask for root's cron to set ionice -c1 just
fine. You don't need to run mythbackend as root.

More information about the mythtv-users mailing list