News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

[SOLVED] - UpdateMedia mysql queries takes 100% CPU on a core - is that normal ?

Started by Viking, November 09, 2009, 04:33:11 PM

Previous topic - Next topic

colinjones

It almost looks like the long list of PK_Files is the subset of media files of the particular MediaType that the data grid is to be for. eg all the media files of "LinuxMCE Video File" type, so the query only returns video files.

That doesn't seem very efficient (intuition only here!). If that is the purpose wouldn't it have been better to have used the EK_MediaType key in the pluto_media.File table and just use a normal matching Where clause?

Or is that set of PK_Files something else entirely? hmmm.... perhaps it is the subset of files it has determined are currently "available" based on which media sources are currently online/connected to the LMCE network?

Viking

My System :

[url="http://wiki.linuxmce.org/index.php/User:Viking"]http://wiki.linuxmce.org/index.php/User:Viking[/url]

phenigma

So I'd been unhappy with my queries performances following a re-install in January and it turns out the indexes built in this thread are not being applied to new installations.  I have added at least one more index now which has added another significant speed-up to some of my queries and I've made some adjustments to query_cache which have also significantly sped-up some of my queries and reduced the load on my core.  I'm hopefully going to wrap this all up on a dev system and submit a patch in about 1.5 weeks (when I have a week off). 

There has been some discussion in IRC about optimizations regarding the video query after doing tv episode tagging. 

Has anyone else figured out any other optimizations during their playing?  I'd love to incorporate anything/everything I can.

J.
My setup: [url="http://wiki.linuxmce.org/index.php/User:Phenigma"]http://wiki.linuxmce.org/index.php/User:Phenigma[/url]

Viking

Sounds good :) looking forward to that.

I had no time looking further into this. But it feels as if the queries has gone slower again :( - probably beacuse I have added more videos and pictures.

Viking
My System :

[url="http://wiki.linuxmce.org/index.php/User:Viking"]http://wiki.linuxmce.org/index.php/User:Viking[/url]