[mythtv] Ticket #2194: Patch to randomise mythfilldatabase times

Bruce Markey bjm at lvcm.com
Fri Sep 15 20:55:57 UTC 2006

Michael T. Dean wrote:
> On 09/15/06 03:34, William Uther wrote:
>> I was after an effect that was something like "grab once per day, at  
>> a random time".
> Why do we need a random time on a micro-scale (i.e. per user)?  Why not 
> just ensure that it doesn't run at the same time every day for an 
> individual user, so that different users are much less likely to run it 
> at the same time?

Actually, the opposite has merit. Pick a good random time
and stick to it.

>   We could easily do this by just adding some value 
> greater than 10 minutes to the lastrun value for the tag MythFillDB.  

Ironically, if there was an improbable cluster of users grabbing
at the same time, the same spike would occur on the next day but
ten minutes. There is no advantage here over grabbing at the same
time each day.

I record News at 7am PDT each day. I have a wrapper script for
mfdb that sleeps for a period of time, dumps the DB, runs mfdb
then repairs and optimizes the new data. I sleep for more than
ten minutes to avoid the Cinderella effect but finish well before
recording the morning news and well after the TMS daily update.

The point is that if everyone grabbed a random minute that didn't
cause a spike and stuck to it, the user would know what to expect
as would TMS. As long as that time isn't 12:00:00 or 1:00:00 or
2:00:00 for your local timezone, everyone could be happy.

--  bjm

More information about the mythtv-dev mailing list