Author Topic: best solution for mythfilldatabase.sh?  (Read 1061 times)

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
best solution for mythfilldatabase.sh?
« on: August 13, 2008, 04:28:29 am »
I've been really starting to use mythtv to its fullest. We are really enjoying it, but - it is a known problem that the program guide data does not stay populated. I have looked at mythfilldatabase.sh and MythTVDailyFillDB.sh. I have been manually running mythfilldatabase.sh every day to keep my guide data current, but I am noticing several problems.

- it takes anywhere from 6-8 hours for mythfilldatabase to run. During this time Top shows CPU usage from 80%-90% on mysqld (due to the number of database operations). My entire LMCE setup lags terribly during this time.

- it appears to download and resync the entire 14 days worth of guide data (over 600 channels worth at that) each time I run it. I would have figured it would only download and add to the database only the days it needs to be 14 days ahead.

So - while I'm enjoying the mythtv experience, I really wish there was a better way than manually running a script every day that takes up 6-8 hours while lagging my entire system. Also to note, the system is of very capable specs (BE2400 CPU, 4 gig RAM) so why its bogging me down so bad is a mystery to me.

Is there a more elegant solution? This is just the beginning of my mythtv experience, so I'm a little ignorant on the subject. Any help would be appreciated.

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
Re: best solution for mythfilldatabase.sh?
« Reply #1 on: August 13, 2008, 04:46:21 am »
I've been really starting to use mythtv to its fullest. We are really enjoying it, but - it is a known problem that the program guide data does not stay populated. I have looked at mythfilldatabase.sh and MythTVDailyFillDB.sh. I have been manually running mythfilldatabase.sh every day to keep my guide data current, but I am noticing several problems.

 That's odd.

 My schedule stays populated automagically here.

 It can stop working when I go into MythSetup and when you exit it asks "do you want to run mythfilldatabase?" but you can't say yes or no. When it runs anyways (completely ignoring you) then I find there can be a conflict between that and the LMCE mythfilldatabase script, which requires me to kill a couple processes on the core and then actually go into myth setup and right out, which runs the mythtv version of filldatabase, after which the lmce daily script seems to run fine again.

 See: http://forum.linuxmce.org/index.php?topic=5814.0

 It doesn't take 6 hours, usually less than 40 mins.

 This is on LMCE 7.10RC2 AMD64....

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: best solution for mythfilldatabase.sh?
« Reply #2 on: August 13, 2008, 01:39:52 pm »
How many channels are you grabbing/updating? That could be the difference

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
Re: best solution for mythfilldatabase.sh?
« Reply #3 on: August 13, 2008, 01:50:36 pm »
How many channels are you grabbing/updating? That could be the difference

Not sure of the count.

I have a local broadcast subscription and a Bell ExpressVU subscription.

Between the two of them, it isn't a whole lot...

Is there an easy way to check how many channels?

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: best solution for mythfilldatabase.sh?
« Reply #4 on: August 13, 2008, 02:25:10 pm »
Not that I know of. I just manually counted mine from schedules direct.. 720 channels total.

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
Re: best solution for mythfilldatabase.sh?
« Reply #5 on: August 13, 2008, 02:29:47 pm »
Not that I know of. I just manually counted mine from schedules direct.. 720 channels total.

Wow. I have 114 channels.... ;-)

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: best solution for mythfilldatabase.sh?
« Reply #6 on: August 13, 2008, 02:56:42 pm »
so, mathematically speaking - If I have a little over 6 times more guide data to grab, and yours takes 40 minutes.. Then mine taking a little over 6 hours isn't too far off the mark then.

I might start looking through the scripts to see if I can force it to check the database for the last day data was downloaded for, then only add the days it needs to be 14 days out. As it is now, with it taking so much time to run and how much it lags my system, i'm going to start running it just once a week.

seth

  • Guru
  • ****
  • Posts: 485
  • A day w/o LinuxMCE is like a day w/o sunshine!
    • View Profile
Re: best solution for mythfilldatabase.sh?
« Reply #7 on: August 13, 2008, 05:43:58 pm »
 :)
Hi. There are switches that could be applied to mythfilldatabase, like --max-days=7 or --refresh-today and the like. You could tailor it a bit, with the switches, and make it fancy like only run at midnight, or 1AM. with the --max-days=7 switch, you would only have 7 days of current data, I am not sure how far ahead you schedule recordings, but most of mine repeat weekly by timeslot/channel. \
Just a few options. The web site defining the switches is here: http://www.mythtv.org/wiki/index.php/Mythfilldatabase

Best of Luck and Regards,

Seth
".....Because Once you've LinuxMCE'd....."
System stats located at my user page:

http://wiki.linuxmce.org/index.php/User:Seth