[mythtv-users] Limit concurrent instances of mythpreviewgen?

Will Dormann wdormann at gmail.com
Tue May 13 15:42:25 UTC 2014


Hi folks,

Ok, so one other area where the Atom processor is a bit weak for mythtv:
  When I view recordings via mythweb, if it's been a while and I have a
lot of new recordings, mythweb/mythtv tries to run mythpreviewgen in
parallel for each new recording.  I've seen at least 20 concurrent
instances of the mythpreviewgen process.   And for a system that has 2
physical cores, *each* of these ends up timing out and I end up with
broken thumbnails.

I can either reload the page many times repeatedly until eventually it
starts to catch up.  Or I can select a single recording title to
manually ensure that no more than 1 or 2 instances are executed at the
same time.

People with beefier systems may not notice these symptoms, but I think
it's a minor architectural problem with mythtv/mythweb  (I haven't yet
looked into which may be at fault, but I suspect the latter)

Possible solutions might be to either:
1) Limit concurrent instances of mythpreviewgen to e.g. the number of
cores present on the system.  This could perhaps be accomplished by
modifying mythweb, or replacing "mythpreviewgen" with a wrapper script
that internally handles concurrency issues.

2) Automatically generate the thumbnails used by mythweb (and mythtv?
Are they the same?) when a recording is finished, rather than on-demand.
 The cost of generating the thumbnail is relatively low, so why not do
it as the recordings are made?  Doing it on-demand just seems to
decrease responsiveness.

Thoughts?   Before I dig into this, is this something that has already
been addressed in perhaps some setting that I'm unaware of?


Thanks
-WD


More information about the mythtv-users mailing list