[mythtv-users] "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries?

Michael T. Dean mtdean at thirdcontact.com
Sat Apr 2 18:46:40 UTC 2011

On 04/01/2011 02:31 PM, Raymond Wagner wrote:
> On 4/1/2011 14:10, Niklas Brunlid wrote:
>> Is there a way to disable thumbnail generation for recorded shows? My
>> combined backend/frontend has a lot of shows (currently 3094 entries
>> in the recorded table and 19162 in oldrecorded), so entering the Watch
>> Recordings screen takes 5-10 seconds, and I want to see if the
>> thumbnails are the reason (either if they are regenerated every time
>> or just the file access).
> No.  Thumbnails are only generated upon recording creation, transcoding,
> cutlist editing, or bookmark placement.  The reason it takes so long is
> because the backend protocol command QUERY_RECORDINGS does not support
> paging.  The backend has to process all 3094 programs, and send the data
> to the frontend.

That said, QUERY_RECORDINGS should still be significantly faster than 5s 
on a properly-configured system (with a properly-configured mysql).

To see if you're having data-access problems, try running:

wget 'http://<masterbackendip>:6544/Myth/GetRecorded' -O /dev/null

(but change "<masterbackendip>" to the IP address of your master 
backend).  After, you should see something like (probably about 2x as 
large as since I have 1469 recordings):

100%[======================================>] 1,263,278   --.-K/s   in 0.1s

If so--if you're getting the results in, say, 0.2s or 0.3s--the problem 
is likely the mythfrontend sorting/processing of those recordings.  
FWIW, with half as many recordings as you have, my system brings up the 
Watch Recordings screen in (seemingly a lot less than) 0.5s (I'd guess 
0.2 to 0.3s, but can't say for sure).  So, either you've surpassed some 
performance ceiling, have an underpowered frontend (mine is not an 
Atom--it's a real computer--but trying to load that screen with 3K 
recordings on an Atom-based system *should* take a long time), or have 
some other misconfiguration, such as...

Often previews /are/ a problem for users with some MythTV system 
misconfigurations--but, as Raymond  mentioned, won't be a problem on a 
properly-configured system.

Off the top of my head, reasons I can remember that cause previews to 
slow Watch Recordings include:
   a) having your (frontend user) $HOME/.mythtv directory on NFS and 
disabling file-attribute caching
   b) having a broken/not-writable $HOME/.mythtv/{remote,theme}cache 
   c) having a time difference on your frontend and backend machines 
(you should use NTP on all mythtv machines)

There are probably others, too,  but this is a good start of a list of 
things to look at.


More information about the mythtv-users mailing list