[mythtvnz] Long delay when starting playback - possible fix

Austin Green austin.green at orcon.net.nz
Sun Oct 1 05:07:53 BST 2017


Hi Stephen,

On Sat, 30 Sep 2017 14:00:08 +1300
Stephen Worthington <stephen_agent at jsw.gen.nz> wrote:

> On Sat, 30 Sep 2017 10:50:18 +1300, you wrote:
> 
> >A few months ago, I reported a problem where starting to play a recording
> >would result in a long pause, around 30 seconds, with the screen completely
> >frozen, before the playback would start.  Recently I seem to have stumbled
> >on a work-round for the problem.
> >
> >Every night a script is run, which essentially does this:
> >	mysqlcheck -c mythconverg -u root
> >If I run the script manually, just before starting the frontend,
> >then I don't get the delay on starting to watch a recording.
> >
> >Looks like maybe a database corruption problem, although it never reports
> >finding any errors, just prints an 'OK' for each table checked.
> >Any clues from that as to what might be the root cause?
> 
> Are you sure that your hard drives are not going into idle?  Many
> modern hard drives automatically shut down to save power now, and
> MythTV will wait for them to spin up, causing exactly the symptom you
> describe.  I have that happen when I have any of my three archive
> drives mounted, as I have not disabled the automatic idle mode on
> them.  And it always happens when I am playing videos, as two of my
> video drives are normally shut down.
> 
> To see what state a drive is in, use hdparm -C from a root prompt.
> This is the current state of my video storage drives:
> 
> root at mypvr:~# hdparm -C /dev/disk/by-label/vid1
> 
> /dev/disk/by-label/vid1:
>  drive state is:  active/idle
> root at mypvr:~# hdparm -C /dev/disk/by-label/vid2
> 
> /dev/disk/by-label/vid2:
>  drive state is:  standby
> root at mypvr:~# hdparm -C /dev/disk/by-label/vid3
> 
> /dev/disk/by-label/vid3:
>  drive state is:  standby

I don't think it is snoozing disks, because when I get the problem,
it happens to any recording I play, even after playing another one.
If the drive was in standby, I would expect that accessing the first
recording would wake it up, then accessing the next one would have no
problem.  Anyway, thanks for the idea, and the handy hdparm command,
which I didn't know about.

Cheers,
Austin.



More information about the mythtvnz mailing list