[mythtv-users] Wake up disks on events

Ma Begaj derliebegott at gmail.com
Mon Sep 8 11:58:01 UTC 2008


2008/9/4 mythtv at blandford.net <mythtv at blandford.net>:
> Brad DerManouelian wrote:
>> On Aug 20, 2008, at 3:37 PM, mythtv at blandford.net wrote:
>>
>
>>> When I power on a frontend and watch a show, it takes 10-15 seconds
>>> for
>>> the disks in the backend to spin up.  this causes the frontend to
>>> appear
>>> to freeze.
>>
>> Personally, I think that's a small price to pay for letting disks spin
>> down. :)
>
>
> Agreed.  It is a small price.  However, having the frontend essentially
> freeze for 10-15 second isn't good for the WAF - especially when I can
> work around it pretty easily.
>
>
>>> 1) A frontend hook to notify the server to wake up the disks.  The
>>> frontend could ping a certain port on the server, or touch a file on
>>> the
>>> server to notify it was awake.  The disks will wake up in the time it
>>> takes the TV to warm up.
>>
>> My backend has 4 large disks. Your solution would spin up all my disks
>> and bring them to the boiling point (ok, well 58°C when all are
>> spinning for more than a couple of minutes compared to 38°C when just
>> one spins at a time).
>
> I have 6 500GB disks in a raid 6.  Spinning them all up isn't a concern
> for me.  They still run nice and cool.  Typically, I only record an hour
> or two a day so it makes sense to let them spin only when necessary.
>
>>> 2) Wake up 1 minute prior to recording any shows.  I miss 10-15
>>> seconds
>>> now.  I don't want to tell mythtv to record an extra minute early
>>> because it causes show overlaps in the scheduler.
>>
>> A global soft-padding of 15 seconds pre-roll would fix this problem
>> for you. That's how I deal with it now.
>
> But won't this cause conflicts with the scheduler if I have two shows
> back to back?  Sadly, when I have more than one recording in a night,
> they are often at the same time on different channels with one or more
> at previous hour.  That usually eats up my tuners.
>
>
>> Set your disks to spin down after X minutes of activity. They will
>> keep spinning if another show is about to record. No need for myth to
>> handle it.
>
> Agreed, and that is what I do now.  I set it for 30 minutes now to
> prevent it from spinning down between some shows, but often 10 minutes
> is enough.  It would be easy enough to watch the upcoming recordings and
> auto adjust to maximize spindown time while reducing the number of times
> it has to spin up.
>
>>> 4) Schedule the database optimize, myth_rename, updatedb, etc
>>> immediately after the last recorded show of the day so the disks won't
>>> wake up in the early morning to run those tasks.
>>
>> Last show of the day? When's that? I record shows all night long and
>> into the early morning. That's why we schedule them via cron. So we
>> can pick when to run stuff. My box stays idle for about 4 hours almost
>> every mid-morning. That's when I run system maintenance.
>
>
> The last show of the day is easy enough to find by looking at the
> upcoming recordings.  A rule that says find the last show after 10pm,
> but prior to 6 am with no other show immediately afterwards and do the
> maintenance.
>
> I didn't get much response so I think I am in the minority here.  I will
> just put a few scripts together to accomplish what I want and run with it.
>
> Michael


You/we are probably minority. I have something similar (2 x raid5) and
I can live with
5-10 minutes timeout for standby on HDDs.

I would be more interested forcing MythTv to cache more data before
writing recordings
to the disk. My disks can write with more than 450mbs and I have 4gb
RAM. I would like
to force MythTv to cache i.e. 300-500mb of recordings in RAM before
writing it to the disk.

I found something about it on a mailing list a few months ago, but I
had not enough time to
play with the MythTv source code.


More information about the mythtv-users mailing list