[mythtv-users] Problem with latest run of optimize_mythdb.pl

Stephen Worthington stephen_agent at jsw.gen.nz
Wed Dec 30 14:34:46 UTC 2015


On Wed, 30 Dec 2015 16:53:58 +1300, you wrote:

>On Tue, 2015-12-29 at 01:48 +0100, Hika van den Hoven wrote:
>> Hoi Jerome,
>> 
>> Tuesday, December 29, 2015, 1:38:54 AM, you wrote:
>> 
>> > On Monday, December 28, 2015 10:05:56 PM Hika van den Hoven wrote:
>> >> Hoi Jerome,
>> >> 
>> >> Monday, December 28, 2015, 9:05:02 PM, you wrote:
>> >> 
>> >> > On Monday, December 28, 2015 01:51:19 PM Stephen Worthington wrote:
>> >> >> 
>
>> > Does anyone have a definitive answer or definitive experience with optimizing a running system?
>> 
>> There are scripts around for checking on future activity (for the
>> shutdown/awake process). Make a script that checks before running
>> optimize on at least a half hour window (or how long the script runs
>> on your backend plus 20%.)
>> 
>
>Possibly people are get overly enthusiastic about this optimizing..
>Maybe you should run it once a month or year..
>When I ran this optimize script it made no difference to recording
>access time on 8 yr old database.
>But I had regenerated all seektables more than once.
>
>If you have H264 recordings & they are more than 2-3 years old then you
>may benefit greatly by rebuilding the seektables because the old ones
>have incorrect data.

My experience is that if you do not regularly run the optimize script,
you will get a database crash eventually.  Those who do optimize
regularly do not seem to get those crashes.  The script not only
optimises, it repairs if necessary.  Doing that daily seems to catch
any problems before they can become un-repairable.

However, the defragmentation of the big tables is not so necessary to
do as often.  I found that the first time I did it, various things ran
quite a bit faster, but then I have a huge database.  But it took a
long time to get that fragmented, and running the defragmentation can,
for me, cause recordings to have data loss if they happen at the same
time.  So I am now looking at only doing the defragmentation
automatically when I know I have an hour or more before the next
recording, if I can work out how to do that.  In the mean time, I have
commented out the defrag part of the optimize script and will run it
manually when I see the need.


More information about the mythtv-users mailing list