[mythtv-users] Mythpreviewgen

Michael T. Dean mtdean at thirdcontact.com
Thu Sep 22 02:14:30 UTC 2011


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


More information about the mythtv-users mailing list