[mythtv-users] "Nice" recommendations

Ozzy Lash ozzy.lash at gmail.com
Tue Oct 31 14:39:59 UTC 2017


On Tue, Oct 31, 2017 at 9:26 AM, Stuart Auchterlonie <
stuarta at squashedfrog.net> wrote:

> On 31/10/17 14:14, Ozzy Lash wrote:
> >
> >
> > On Tue, Oct 31, 2017 at 5:15 AM, Stuart Auchterlonie
> > <stuarta at squashedfrog.net <mailto:stuarta at squashedfrog.net>> wrote:
> >
> >     On 31/10/17 06:15, Ian Evans wrote:
> >     > I notice that when I run a mythvidexport.py user job moving a
> recording
> >     > to the video section, the responsiveness of the interface grinds
> to a
> >     > halt and the load goes north of 5.
> >     >
> >     > Haven't really used nice much. Any recommendations what nice level
> I
> >     > should run it at?
> >     >
> >
> >     nice -19
> >
> >     which is basically background task, and everything else takes
> priority.
> >
> >
> >
> > Isn't a negative nice value giving the process a HIGHER priority?  I
> > think you mean "nice 19"  correct?
> >
>
> Nope, it's -19. It's probably clearer from the man page explanation.
>
> -n, --adjustment=N
>     add integer N to the niceness (default 10)
>
> so the '-' doesn't mean minus, it means an option to the command
>
> <option><value>
>
> so --19 would be a priority boost, however only root can boost the
> priority, normal users can only reduce their priority.
>
> $ nice --19 echo fish
> nice: cannot set niceness: Permission denied
> fish
>
> $ nice -19 echo fish
> fish
>
>
When I learned about using nice it was on 4.3 BSD and I was using csh
(probably tcsh).  csh has its own built-in nice, and there you specify the
positive and negative niceness with a plus or minus sign.  I fired up tcsh
on my laptop, and here is the results there:

lash-Precision-M6600:~> nice +10 echo fish
fish
lash-Precision-M6600:~> nice -10 echo fish
setpriority: Permission denied.

So I guess just keep in mind what the manpage says and make sure your shell
doesn't have a builtin that has different syntax, or specify
/usr/bin/nice.  Although running through the shells bash, ksh, tcsh, and
zsh, it is only csh that replaces it.

Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20171031/25b88814/attachment.html>


More information about the mythtv-users mailing list