Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jul 2013 15:26:04 -0400
From:      Greg Larkin <glarkin@FreeBSD.org>
To:        mexas@bristol.ac.uk
Cc:        Anton Shterenlikht <mexas@bris.ac.uk>, freebsd-questions@freebsd.org
Subject:   Re: highest nice(1) -n increment value?
Message-ID:  <51E44CCC.3050503@FreeBSD.org>
In-Reply-To: <201307081048.r68AmOAl015323@mech-cluster241.men.bris.ac.uk>
References:  <201307081048.r68AmOAl015323@mech-cluster241.men.bris.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 7/8/13 6:48 AM, Anton Shterenlikht wrote:
> It is not clear from the nice(1) man page, i.e. for /usr/bin/nice,
> not a shell built-in nice, what is the highest increment value nice
> will accept.
> 
> It seems it is limited to 20. I tried
> 
> $ /usr/bin/nice -n 100 portmaster -a
> 
> But all processes spawned by the portmaster have the nice value of
> only 20, as in:
> 
> PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    WCPU
> COMMAND 57586 root          1  52   20 13976K  4720K wait     0:00
> 0.39% sh 52729 root          1  40   20 13976K  4960K wait     0:02
> 0.00% sh 58239 root          1  92   20 35632K  8584K RUN      0:00
> 0.00% pkg 58237 root          1  52   20  9216K  1616K ppwait
> 0:00   0.00% make
> 
> The root shell priority was 0.
> 
> So is 20 the upper increment limit?
> 
> Thanks
> 
> Anton

Yes, please check the setpriority man page:
http://www.freebsd.org/cgi/man.cgi?query=setpriority

"The prio argument is a value in the range -20 to 20.  The default
priority is 0; lower priorities cause more favorable scheduling."

Hope that helps,
Greg
- -- 
Greg Larkin

http://www.FreeBSD.org/           - The Power To Serve
http://www.sourcehosting.net/     - Ready. Set. Code.
http://twitter.com/cpucycle/      - Follow you, follow me
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlHkTMwACgkQ0sRouByUApAzQACgvf8VJ8bO6Rld8UmOWRwNexmS
3FoAniQ0bdyu4DtNIXbKoP5ogasvFewk
=/u88
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51E44CCC.3050503>