[mythtv] backend from SVN 9761 bangs on mysqld

Daniel Kristjansson danielk at cuymedia.net
Sun Apr 23 16:07:17 UTC 2006

On Sun, 2006-04-23 at 17:32 +0200, Janne Grunau wrote:
> It is not the scheduler alone. One of the recent EIT-refactoring (iirc 
> 9671) adds noticeable DB-load.
I don't think hat wouldn't create the 100% cpu use spikes he's seeing.

> The main  reason is probably that we reinsert the event even if we have 
> a perfect match of stored event and broadcastet event. That's alone not 
> the problem but due the current limitations of the eit-cache all events 
> gets reinserted for every channel change.
My plan for the ATSC EIT is to make the cache persistent. I couldn't do
that before the refactoring because we tossed out all the in flight
events when we changed channels. Now we keep enough state around that
it is safe to insert events from a channel other than the one we are
currently scanning. But I still need to look at the DataDirect EPG data
insertion to make it compatible. I think Stuart Auchterlonie kept
persistence in mind when he did the DVB EIT cache, basically you just
need to make sure that if you reuse the version data, it hasn't been
too long since you last used it. If you don't do EIT data collection
for a week the EIT table version numbers will have wrapped around and
your cache will be out of date. BTW The data does need to be stored in
the DB, even the EIT version cache becomes too big after a while. (But
not nearly as big as the cache of the entire EIT event that 0.19 uses.)

> A 'if (match == 12000) return 0;' in UpdateDB(MSqlQuery, int) reduces 
> the number of inserted events and the DB load significantly (together 
> with other changes).
Which pretty much disables updates; it only allows inserts to go ahead.
This means you will never get the longer program description present in
EIT tables transmitted closer to the broadcast time.

> I reported nothing of this since it will be mostly solved if the event 
> cache is persistant per backend run. For the rest I'll create a ticket.
I think a persistent cache will make things much more efficient,
but right after adding a new EIT source you wouldn't have a cache
and so would still have a lot of DB load if this is what is causing
Tino's problem.

-- Daniel

More information about the mythtv-dev mailing list