[mythtv-users] Mythpreviewgen

Josu Lazkano josu.lazkano at gmail.com
Fri Oct 14 14:29:58 UTC 2011


2011/9/22 Michael T. Dean <mtdean at thirdcontact.com>:
> On 09/21/2011 09:24 AM, Josu Lazkano wrote:
>> Hello again, I notice that mythpreviewgen is executed on program
>> change and on channel change in LiveTV, it taken more than 50% of CPU
>> usage and it generate lots of playback stops.
>>
>> I read about the nice(), but it must be executed as root thi way: nice
>> -n 17 /usr/bin/mythpreviewgen
>
> Any unprivileged user should be allowed to nice his/her own processes.
> It's only "un-nicing" (raising priority) beyond a certain limit
> (RLIMIT_NICE, which is typically) that requires privileges.
>
>> But I don't know where to put this code. Need I to change the source
>> code and compile it?
>
> Yes, you would need to change the source to make it automatic.
>
>>   I never compile MythTT, I just use the
>> debian-multimedia repository. I think this will be the cause of all my
>> playback problems, I will appreciate any help.
>>
>> Thanks and best regards.
>>
>
> However, you can instead just make a wrapper script called
> mythpreviewgen and have it nice and/or ionice itself and then call the
> actual mythpreviewgen binary.
>
> Mike
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>

Hello, thanks for your help, I create two scripts, one with nice() and
the other with ionice():

#!/bin/bash
nice -n 19 mythpreviewgen.real $@

#!/bin/bash
ionice -c2 -n7 mythpreviewgen.real $@

But it is getting same little stops on playback, this the first 10
second of program change (with ionice script):
http://dl.dropbox.com/u/1541853/mythpreview2.log

Maybe it is related to sql, but I don't know what else to try.

Thanks and best regards.

-- 
Josu Lazkano


More information about the mythtv-users mailing list