Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

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

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


prefect47 at gmail

Apr 1, 2011, 11:10 AM

Post #1 of 20 (1348 views)
Permalink
"Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries?

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).

The other possible problem is if Watch Recordings for some reason SELECTs
all of my recordings every time I step up and down in the list - I remember
reading something like this on this or one of the other discussion lists.

/ Niklas


prefect47 at gmail

Apr 1, 2011, 11:19 AM

Post #2 of 20 (1324 views)
Permalink
Re: "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries? [In reply to]

I should note that I posted about something similar over a year ago:
http://www.gossamer-threads.com/lists/mythtv/users/414843

No replies, though... :)

I've meant to try to look into this myself, but the code base at my dayjob
is enough to keep me occupied with (and tired of) debugging. Maybe for my
next holiday... :)

/ Niklas

On 1 April 2011 20:10, Niklas Brunlid <prefect47 [at] gmail> 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).
>
> The other possible problem is if Watch Recordings for some reason SELECTs
> all of my recordings every time I step up and down in the list - I remember
> reading something like this on this or one of the other discussion lists.
>
> / Niklas
>
>


raymond at wagnerrp

Apr 1, 2011, 11:31 AM

Post #3 of 20 (1324 views)
Permalink
Re: "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries? [In reply to]

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.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


prefect47 at gmail

Apr 2, 2011, 2:22 AM

Post #4 of 20 (1306 views)
Permalink
Re: "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries? [In reply to]

That's my second suspect (didn't know the specifics though). Is the command
issued only when entering Watch Recordings or is it also used when you move
around in one recording group (including the "all recordings" group)?

I searched for QUERY_RECORDINGS in the archives and there was some talk
about caching data and/or supporting querying for pages in 0.21 (or maybe
right after 0.21). Was this ever implemented?

/ Niklas

On 1 April 2011 20:31, Raymond Wagner <raymond [at] wagnerrp> 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.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>


mtdean at thirdcontact

Apr 2, 2011, 11:46 AM

Post #5 of 20 (1296 views)
Permalink
Re: "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries? [In reply to]

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
directory
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.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


ajlill at ajlc

Apr 2, 2011, 2:16 PM

Post #6 of 20 (1292 views)
Permalink
Re: "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries? [In reply to]

Niklas Brunlid <prefect47 [at] gmail> writes:

> 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).
>
> The other possible problem is if Watch Recordings for some reason SELECTs
> all of my recordings every time I step up and down in the list - I remember
> reading something like this on this or one of the other discussion lists.

Make sure you have setup directories for all of the Fanart, Banner,
etc. groups (make it an empty directory it you don't have any). If a
theme requires one of these things and the storage group is not setup,
it will exhausitvely search every file in every default storage group
directory, more than once.

You're lucky, before I figured this out, my frontend would hang for
5-10 minutes.

This should probably be a bug.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


prefect47 at gmail

Apr 4, 2011, 9:42 AM

Post #7 of 20 (1271 views)
Permalink
Re: "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries? [In reply to]

On 2 April 2011 20:46, Michael T. Dean <mtdean [at] thirdcontact> wrote:
...

>
> 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
> directory
> 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.
>
>
--------------------------------------------------------------------------------------------------------
$ time wget 'http://<address>:6544/Myth/GetRecorded' -O /dev/null
--2011-04-04 18:28:38-- http://<address>:6544/Myth/GetRecorded
Connecting to <address>:6544... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2956015 (2.8M) [text/xml]
Saving to: /dev/null

100%[======================================>] 2,956,015 --.-K/s in 0.01s

2011-04-04 18:28:44 (291 MB/s) - /dev/null

real 0m5.801s
user 0m0.001s
sys 0m0.007s
--------------------------------------------------------------------------------------------------------

So the actual download goes by quickly, but it takes a few seconds before it
starts to receive data.

System specs: Fedora 13 on an Asus K8V with an AMD64 3000+ and a Sparkle
GeForce 9400 GT PCI card, with OpenGL painter and VDPAU output, using
DVI->HDMI to a FullHD LCD TV and the SP/DIF of the mainboard directly to the
amplifier. The system is somewhat regularly updated against the Fedora and
ATrpms repos. MythTV version is release-0-22-fixes 22973.

Everything runs on the same computer, no external file systems, everything
on ext3. Recording drives have "rw,data=writeback" flags, used to have
noatime and nodiratime but those were removed since I suspected they
interfered with thumbnail generation.


Is $HOME in (b) above for mythfrontend or mythbackend? The frontend runs as
my normal user, the backend runs as root. In the user home remotecache and
themecache are writable by user and group, in root:s home I only have
themecache and it's writable by root only.

/ Niklas


prefect47 at gmail

Apr 4, 2011, 9:45 AM

Post #8 of 20 (1273 views)
Permalink
Re: "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries? [In reply to]

On 2 April 2011 23:16, Tony Lill <ajlill [at] ajlc> wrote:

> Niklas Brunlid <prefect47 [at] gmail> writes:
>
> > 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).
> >
> > The other possible problem is if Watch Recordings for some reason SELECTs
> > all of my recordings every time I step up and down in the list - I
> remember
> > reading something like this on this or one of the other discussion lists.
>
> Make sure you have setup directories for all of the Fanart, Banner,
> etc. groups (make it an empty directory it you don't have any). If a
> theme requires one of these things and the storage group is not setup,
> it will exhausitvely search every file in every default storage group
> directory, more than once.
>
> You're lucky, before I figured this out, my frontend would hang for
> 5-10 minutes.
>

Well, I do get fanart on the shows tham jamu have matched, so that at least
works. And my frontend doesn't hang for minutes, only seconds.

Where do I configure this? Storage groups?

/ Niklas


prefect47 at gmail

Apr 4, 2011, 9:48 AM

Post #9 of 20 (1274 views)
Permalink
Re: "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries? [In reply to]

On 4 April 2011 18:42, Niklas Brunlid <prefect47 [at] gmail> wrote:

> On 2 April 2011 20:46, Michael T. Dean <mtdean [at] thirdcontact> wrote:
> ...
>
>>
>> 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
>> directory
>> 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.
>>
>>
>
> --------------------------------------------------------------------------------------------------------
> $ time wget 'http://<address>:6544/Myth/GetRecorded' -O /dev/null
> --2011-04-04 18:28:38-- http://<address>:6544/Myth/GetRecorded
> Connecting to <address>:6544... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 2956015 (2.8M) [text/xml]
> Saving to: /dev/null
>
> 100%[======================================>] 2,956,015 --.-K/s in
> 0.01s
>
> 2011-04-04 18:28:44 (291 MB/s) - /dev/null
>
> real 0m5.801s
> user 0m0.001s
> sys 0m0.007s
>
> --------------------------------------------------------------------------------------------------------
>
> So the actual download goes by quickly, but it takes a few seconds before
> it starts to receive data.
>
> System specs: Fedora 13 on an Asus K8V with an AMD64 3000+ and a Sparkle
> GeForce 9400 GT PCI card, with OpenGL painter and VDPAU output, using
> DVI->HDMI to a FullHD LCD TV and the SP/DIF of the mainboard directly to the
> amplifier. The system is somewhat regularly updated against the Fedora and
> ATrpms repos. MythTV version is release-0-22-fixes 22973.
>
> Everything runs on the same computer, no external file systems, everything
> on ext3. Recording drives have "rw,data=writeback" flags, used to have
> noatime and nodiratime but those were removed since I suspected they
> interfered with thumbnail generation.
>
>
> Is $HOME in (b) above for mythfrontend or mythbackend? The frontend runs as
> my normal user, the backend runs as root. In the user home remotecache and
> themecache are writable by user and group, in root:s home I only have
> themecache and it's writable by root only.
>
> / Niklas
>
>
Noted yesterday that the time to enter Watch Recordings is dependant on
wether something is currently being recorded... which I guess is related to
the theme (ArcLight) flashing "recording" and mythfrontend taking 50-90% or
the cpu as long as those entries are visible. The cpu usage goes away if I
scroll down or start playback.

/ Niklas


mtdean at thirdcontact

Apr 4, 2011, 10:38 AM

Post #10 of 20 (1268 views)
Permalink
Re: "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries? [In reply to]

On 04/04/2011 12:42 PM, Niklas Brunlid wrote:
> On 2 April 2011 20:46, Michael T. Dean wrote:
> ...
>> 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
>> directory
>> 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.
> --------------------------------------------------------------------------------------------------------
> $ time wget 'http://<address>:6544/Myth/GetRecorded' -O /dev/null
> --2011-04-04 18:28:38-- http://<address>:6544/Myth/GetRecorded
> Connecting to<address>:6544... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 2956015 (2.8M) [text/xml]
> Saving to: /dev/null
>
> 100%[======================================>] 2,956,015 --.-K/s in 0.01s
>
> 2011-04-04 18:28:44 (291 MB/s) - /dev/null
>
> real 0m5.801s
> user 0m0.001s
> sys 0m0.007s
> --------------------------------------------------------------------------------------------------------
>
> So the actual download goes by quickly, but it takes a few seconds before it
> starts to receive data.

Yeah, on my system, I get my ~1500 recordings with a real time of about
1s. Some of that 1s is due to the use of HTTP versus the
already-connected MythTV protocol, which explains why my Watch
Recordings screen comes up much faster than 1s.

> System specs: Fedora 13 on an Asus K8V with an AMD64 3000+ and a Sparkle
> GeForce 9400 GT PCI card, with OpenGL painter and VDPAU output, using
> DVI->HDMI to a FullHD LCD TV and the SP/DIF of the mainboard directly to the
> amplifier. The system is somewhat regularly updated against the Fedora and
> ATrpms repos. MythTV version is release-0-22-fixes 22973.

This is the mythbackend system, too? Since it's now looking like your
mythbackend and/or MySQL host are causing much of the slowness, their
specs come into play. If this is a combined frontend/backend/mysql
host, or if your master backend/mysql host(s) have similar specs, you
should be able to get good performance.

> Everything runs on the same computer,

Ah, yeah, then it should be sufficiently-powerful hardware.

> no external file systems, everything
> on ext3. Recording drives have "rw,data=writeback" flags, used to have
> noatime and nodiratime but those were removed since I suspected they
> interfered with thumbnail generation.
>
>
> Is $HOME in (b) above for mythfrontend or mythbackend? The frontend runs as
> my normal user, the backend runs as root. In the user home remotecache and
> themecache are writable by user and group, in root:s home I only have
> themecache and it's writable by root only.

Yeah, remotecache is only created for frontend systems. As long as the
user running the program can access the $HOME/.mythtv/* stuff
appropriate for its environment, all is good. So, if your frontned is
run as your normal user in an environment where
HOME=/home/<yourusername> , and $HOME/.mythtv/*cache are writable by
your user, you're good.

Since it may well be backend data access or processing causing the slow
down, I recommend trying something like:

wget mysqltuner.pl

and then running it against your database to see if it has any
recommendations. Also, what kind of RAM do you have in the system? I
could see it being slow with too-little RAM causing paging (maybe
512MB), but you should be good with 2GB, and might be OK with 1GB (lower
RAM may require usage of lower-resource themes, too, since it's a
combined frontend/backend system).

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


raymond at wagnerrp

Apr 4, 2011, 11:10 AM

Post #11 of 20 (1273 views)
Permalink
Re: "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries? [In reply to]

On 04/04/2011 12:42 PM, Niklas Brunlid wrote:
> System specs: Fedora 13 on an Asus K8V with an AMD64 3000+ and a Sparkle
> GeForce 9400 GT PCI card, with OpenGL painter and VDPAU output, using
> DVI->HDMI to a FullHD LCD TV and the SP/DIF of the mainboard directly to the
> amplifier.

Just as a test, could you drop your display resolution to 640x480, or
try with an AGP video card? Considering your system has an old Socket
754 board, chances are all of your peripherals, including disk
controller, are slaved off the PCI bus. With a video card running at
that resolution on the same bus, my guess is that you've saturated it,
preventing MySQL from accessing the database on disk.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


prefect47 at gmail

Apr 4, 2011, 11:58 AM

Post #12 of 20 (1268 views)
Permalink
Re: "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries? [In reply to]

On 4 April 2011 19:38, Michael T. Dean <mtdean [at] thirdcontact> wrote:

> On 04/04/2011 12:42 PM, Niklas Brunlid wrote:
> > On 2 April 2011 20:46, Michael T. Dean wrote:
> > ...
> >> 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
> >> directory
> >> 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.
> >
> --------------------------------------------------------------------------------------------------------
> > $ time wget 'http://<address>:6544/Myth/GetRecorded' -O /dev/null
> > --2011-04-04 18:28:38-- http://<address>:6544/Myth/GetRecorded
> > Connecting to<address>:6544... connected.
> > HTTP request sent, awaiting response... 200 OK
> > Length: 2956015 (2.8M) [text/xml]
> > Saving to: /dev/null
> >
> > 100%[======================================>] 2,956,015 --.-K/s in
> 0.01s
> >
> > 2011-04-04 18:28:44 (291 MB/s) - /dev/null
> >
> > real 0m5.801s
> > user 0m0.001s
> > sys 0m0.007s
> >
> --------------------------------------------------------------------------------------------------------
> >
> > So the actual download goes by quickly, but it takes a few seconds before
> it
> > starts to receive data.
>
> Yeah, on my system, I get my ~1500 recordings with a real time of about
> 1s. Some of that 1s is due to the use of HTTP versus the
> already-connected MythTV protocol, which explains why my Watch
> Recordings screen comes up much faster than 1s.
>
> > System specs: Fedora 13 on an Asus K8V with an AMD64 3000+ and a Sparkle
> > GeForce 9400 GT PCI card, with OpenGL painter and VDPAU output, using
> > DVI->HDMI to a FullHD LCD TV and the SP/DIF of the mainboard directly to
> the
> > amplifier. The system is somewhat regularly updated against the Fedora
> and
> > ATrpms repos. MythTV version is release-0-22-fixes 22973.
>

Small error creeping in here (text was copied from another older mail),
mythtv version should of course be 0.24 (v0.24-231-gc2baf1b to be precise).


>
> This is the mythbackend system, too? Since it's now looking like your
> mythbackend and/or MySQL host are causing much of the slowness, their
> specs come into play. If this is a combined frontend/backend/mysql
> host, or if your master backend/mysql host(s) have similar specs, you
> should be able to get good performance.
>
> > Everything runs on the same computer,
>
> Ah, yeah, then it should be sufficiently-powerful hardware.
>
> > no external file systems, everything
> > on ext3. Recording drives have "rw,data=writeback" flags, used to have
> > noatime and nodiratime but those were removed since I suspected they
> > interfered with thumbnail generation.
> >
> >
> > Is $HOME in (b) above for mythfrontend or mythbackend? The frontend runs
> as
> > my normal user, the backend runs as root. In the user home remotecache
> and
> > themecache are writable by user and group, in root:s home I only have
> > themecache and it's writable by root only.
>
> Yeah, remotecache is only created for frontend systems. As long as the
> user running the program can access the $HOME/.mythtv/* stuff
> appropriate for its environment, all is good. So, if your frontned is
> run as your normal user in an environment where
> HOME=/home/<yourusername> , and $HOME/.mythtv/*cache are writable by
> your user, you're good.
>
> Since it may well be backend data access or processing causing the slow
> down, I recommend trying something like:
>
> wget mysqltuner.pl
>
> and then running it against your database to see if it has any
> recommendations.


Thanks, this had some good tips. The database is obviously old and was last
optimized more than a year ago... :)


> Also, what kind of RAM do you have in the system? I
> could see it being slow with too-little RAM causing paging (maybe
> 512MB), but you should be good with 2GB, and might be OK with 1GB (lower
> RAM may require usage of lower-resource themes, too, since it's a
> combined frontend/backend system).
>

The system has 2GB RAM which until recently was eaten by the nVidia driver
VDPAU memory leak through mythfrontend. Besides MythTV the second biggest
memory hog is Firefox 3.5, I guess.

/ Niklas


prefect47 at gmail

Apr 4, 2011, 12:07 PM

Post #13 of 20 (1273 views)
Permalink
Re: "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries? [In reply to]

On 4 April 2011 20:10, Raymond Wagner <raymond [at] wagnerrp> wrote:

> On 04/04/2011 12:42 PM, Niklas Brunlid wrote:
> > System specs: Fedora 13 on an Asus K8V with an AMD64 3000+ and a Sparkle
> > GeForce 9400 GT PCI card, with OpenGL painter and VDPAU output, using
> > DVI->HDMI to a FullHD LCD TV and the SP/DIF of the mainboard directly to
> the
> > amplifier.
>
> Just as a test, could you drop your display resolution to 640x480, or
> try with an AGP video card? Considering your system has an old Socket
> 754 board, chances are all of your peripherals, including disk
> controller, are slaved off the PCI bus. With a video card running at
> that resolution on the same bus, my guess is that you've saturated it,
> preventing MySQL from accessing the database on disk.
>

Good point... I may be demanding too much out of an old system. I'll test
lowering the resolution this weekend.

I have actually seen the video card die (output freezes in corrupt state or
just goes black) a couple of times when the system was loaded with two or
more recordings running and playing back a third with timestretch and zoom.
Thankfully recordings continue just fine and the rest recovers after a
reboot.

Maybe it's time to do a server upgrade... but since I spend days researching
a simple SSD purchase I think I'll wait until summer vacation with that one.
=)

/ Niklas


ajlill at ajlc

Apr 8, 2011, 7:17 PM

Post #14 of 20 (1228 views)
Permalink
Re: "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries? [In reply to]

Niklas Brunlid <prefect47 [at] gmail> writes:

>
> Well, I do get fanart on the shows tham jamu have matched, so that at least
> works. And my frontend doesn't hang for minutes, only seconds.
>
> Where do I configure this? Storage groups?

Yeah, fire up mythtv-setup and go into the storage group menu. All the
fanart-type storage groups are already there, they just need
directories assigned to them.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


prefect47 at gmail

Apr 10, 2011, 3:05 AM

Post #15 of 20 (1222 views)
Permalink
Re: "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries? [In reply to]

On 4 April 2011 21:07, Niklas Brunlid <prefect47 [at] gmail> wrote:

> On 4 April 2011 20:10, Raymond Wagner <raymond [at] wagnerrp> wrote:
>
>> On 04/04/2011 12:42 PM, Niklas Brunlid wrote:
>> > System specs: Fedora 13 on an Asus K8V with an AMD64 3000+ and a Sparkle
>> > GeForce 9400 GT PCI card, with OpenGL painter and VDPAU output, using
>> > DVI->HDMI to a FullHD LCD TV and the SP/DIF of the mainboard directly to
>> the
>> > amplifier.
>>
>> Just as a test, could you drop your display resolution to 640x480, or
>> try with an AGP video card? Considering your system has an old Socket
>> 754 board, chances are all of your peripherals, including disk
>> controller, are slaved off the PCI bus. With a video card running at
>> that resolution on the same bus, my guess is that you've saturated it,
>> preventing MySQL from accessing the database on disk.
>>
>
> Good point... I may be demanding too much out of an old system. I'll test
> lowering the resolution this weekend.
>

Tested and verified, running mythfrontend in a lower resolution makes it
noticeably quicker. However, it was quicker even if the screen resolution
was still at 1920x1080, but I assume it's the amount of bitmap data going
over the bus that's the problem.

What's the status of VDPAU-capable cards on AGP/PCI-X nowadays? I bought
this one specifically because there was no AGP VDPAU cards, and because it
fits in an old PCI (not express) slot.


prefect47 at gmail

Apr 10, 2011, 3:07 AM

Post #16 of 20 (1225 views)
Permalink
Re: "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries? [In reply to]

On 9 April 2011 04:17, Tony Lill <ajlill [at] ajlc> wrote:

> Niklas Brunlid <prefect47 [at] gmail> writes:
>
> >
> > Well, I do get fanart on the shows tham jamu have matched, so that at
> least
> > works. And my frontend doesn't hang for minutes, only seconds.
> >
> > Where do I configure this? Storage groups?
>
> Yeah, fire up mythtv-setup and go into the storage group menu. All the
> fanart-type storage groups are already there, they just need
> directories assigned to them.
>

I pointed them to the subdirs of ~/.mythtv/MythVideo/ where the data seems
to be stored, but it made little difference. Thanks for the tip though.

Is there a storage group setting for recording thumbnails?


prefect47 at gmail

Apr 10, 2011, 3:11 AM

Post #17 of 20 (1219 views)
Permalink
Re: "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries? [In reply to]

Something I've noticed in general when testing all of this is that when
moving around in the menus (from main menu to watch recordings) mythfrontend
will use a lot of CPU power.

I started top in a console window, then entered the main menu and held down
the arrow key for 5-10 seconds. When I switch back to the console I can see
mythfrontend at the top, eating 80+% of the CPU. Is that normal?

/ Niklas


prefect47 at gmail

Apr 10, 2011, 3:15 AM

Post #18 of 20 (1219 views)
Permalink
Re: "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries? [In reply to]

On 4 April 2011 20:58, Niklas Brunlid <prefect47 [at] gmail> wrote:

>
>
> On 4 April 2011 19:38, Michael T. Dean <mtdean [at] thirdcontact> wrote:
>
>> On 04/04/2011 12:42 PM, Niklas Brunlid wrote:
>> > On 2 April 2011 20:46, Michael T. Dean wrote:
>> > ...
>>
>
...


>
>> Since it may well be backend data access or processing causing the slow
>> down, I recommend trying something like:
>>
>> wget mysqltuner.pl
>>
>> and then running it against your database to see if it has any
>> recommendations.
>
>
> Thanks, this had some good tips. The database is obviously old and was last
> optimized more than a year ago... :)
>

Ran this a few times and I think it feels a little faster, but it may just
be a psychological effect. :)
I think running the optimize_mythdb.pl script is what actually made a
difference.

/ Niklas


evuraan at gmail

Jun 28, 2012, 12:09 AM

Post #19 of 20 (734 views)
Permalink
Re: "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries? [In reply to]

Niklas Brunlid <prefect47 [at] gmail> 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).
>

"Watch Recordings" menu slow :

This is biting me now in
0.25.0+fixes.20120626.25dd4ce-0ubuntu0mythbuntu1, my remote FE screen
is 1920x1080, its %cpu goes up while I navigate in "Watch
Recordings"; worse, the response is visibly slow, enough for all of
my viewers to notice, and gripe about it.

(single AMD Athlon(tm) 64 Processor 3800+, 2G Ram on my remote front end. )

is there a way thumbnails can be disabled, or any suggestions that
might make this better?

many thanks in advance!
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


briandlong at gmail

Jun 29, 2012, 3:51 AM

Post #20 of 20 (730 views)
Permalink
Re: "Watch Recordings" slow - disable thumbnail/preview generation, or big SQL queries? [In reply to]

On Sun, Apr 10, 2011 at 6:15 AM, Niklas Brunlid <prefect47 [at] gmail> wrote:

>
> Ran this a few times and I think it feels a little faster, but it may just
> be a psychological effect. :)
> I think running the optimize_mythdb.pl script is what actually made a
> difference.
>
> Niklas, since you said you're running AtRPMS 0.24, why not update to the
Bijou train published by Yeechang Lee?

http://www.gossamer-threads.com/lists/atrpms/users/16101

I've been running this on my backend and two ION-based frontends and it's
much faster entering Watch Recordings with the patch from bug 10161
integrated. It appears this patch was tweaked and accepted into Master for
0.26.

http://code.mythtv.org/trac/ticket/10161

/Brian/

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.