[mythtv-users] new Schedules Direct not random?

Gary Buhrmaster gary.buhrmaster at gmail.com
Fri Nov 7 18:54:11 UTC 2014


On Fri, Nov 7, 2014 at 6:08 PM, Robert Eden <rmeden at gmail.com> wrote:
....
> If someone does choose to use cron, please schedule it for the afternoon.
> Cron users seem to download around local midnight or 1am, and there are
> massive spikes.  The data loads around 10am central, so I suggest if you go
> cron, pick a random hour/minute between 11am and 5pm so you get good
> prime-time data. (best way to pick a random minute, is use the minute right
> now!)

To avoid the "run everything at the top of the hour"
(otherwise known as copying something off the
web without actually understanding it), it is often
good practice to add in a
    sleep $(expr $RANDOM \% 3600) &&
before the command in cron, especially for
hitting external services.  SD would not be the
first to have noticed that there are spikes at
the top of the hour (across the service region).
[Note, if you do not understand that prefix, do
not use it!]

And with SD (as with many other services) the
data does not change by the minute, so a little
randomization hurts no one, but helps the service
provider and their network provider(s) reduce
their costs (and since as members we are
paying for running the service, I want that cost
to be as low as reasonably possible).  While
one can create all sorts of dynamic scaling with
EC2, the costs to implement and test with a
simian army is not always reasonable.


More information about the mythtv-users mailing list