From owner-freebsd-questions@FreeBSD.ORG Mon Jul 15 19:57:46 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D4CE3F37 for ; Mon, 15 Jul 2013 19:57:46 +0000 (UTC) (envelope-from glarkin@FreeBSD.org) Received: from mail1.sourcehosting.net (mail1.sourcehosting.net [74.205.51.45]) by mx1.freebsd.org (Postfix) with ESMTP id B20F57CE for ; Mon, 15 Jul 2013 19:57:46 +0000 (UTC) Received: from 66-189-39-69.dhcp.oxfr.ma.charter.com ([66.189.39.69] helo=Gregory-Larkins-iMac.local) by mail1.sourcehosting.net with esmtp (Exim 4.73 (FreeBSD)) (envelope-from ) id 1UyoPN-000CTn-LQ; Mon, 15 Jul 2013 15:26:08 -0400 Received: from Gregory-Larkins-iMac.local (localhost [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by Gregory-Larkins-iMac.local (Postfix) with ESMTPS id B9A0C227C0FE; Mon, 15 Jul 2013 15:26:04 -0400 (EDT) Message-ID: <51E44CCC.3050503@FreeBSD.org> Date: Mon, 15 Jul 2013 15:26:04 -0400 From: Greg Larkin Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: mexas@bristol.ac.uk References: <201307081048.r68AmOAl015323@mech-cluster241.men.bris.ac.uk> In-Reply-To: <201307081048.r68AmOAl015323@mech-cluster241.men.bris.ac.uk> X-Enigmail-Version: 1.5.1 X-SA-Exim-Connect-IP: 66.189.39.69 X-SA-Exim-Mail-From: glarkin@FreeBSD.org X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail1.sourcehosting.net X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00, RCVD_IN_SORBS_DUL,RDNS_DYNAMIC,TVD_RCVD_IP,URIBL_BLOCKED autolearn=no version=3.3.1 Subject: Re: highest nice(1) -n increment value? Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SA-Exim-Version: 4.2 X-SA-Exim-Scanned: Yes (on mail1.sourcehosting.net) Cc: Anton Shterenlikht , freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: glarkin@FreeBSD.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jul 2013 19:57:46 -0000 -----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-----