Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Aug 2012 21:07:21 +0700
From:      Erich Dollansky <erichfreebsdlist@ovitrap.com>
To:        mexas@bristol.ac.uk
Cc:        freebsd-questions@freebsd.org
Subject:   Re: reduce priority of large port builds, e.g. firefox, gcc4x
Message-ID:  <20120829210721.141dcf18@AMD620.ovitrap.com>
In-Reply-To: <201208291356.q7TDu7wO055575@mech-cluster241.men.bris.ac.uk>
References:  <201208291356.q7TDu7wO055575@mech-cluster241.men.bris.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Wed, 29 Aug 2012 14:56:07 +0100 (BST)
Anton Shterenlikht <mexas@bristol.ac.uk> wrote:

> Is it possible to reduce priority
> of port building processes with
> something like "nice +19 make" (tcsh syntax)?
> 
> Here's a typical scenario for a large build
> (actually building gcc-4.7 and firefox in parallel):
> 
> last pid: 54736;  load averages:  5.27,  5.38,
> 5.11                        up 9+15:37:09  14:49:11 89 processes:  7
> running, 79 sleeping, 2 zombie, 1 waiting CPU 0: 19.9% user, 46.3%
> nice, 33.8% system,  0.0% interrupt,  0.0% idle CPU 1: 15.4% user,
> 39.7% nice, 44.9% system,  0.0% interrupt,  0.0% idle Mem: 1141M
> Active, 3853M Inact, 1097M Wired, 128K Cache, 823M Buf, 1914M Free
> Swap: 13G Total, 16K Used, 13G Free
> 
>   PID    UID    THR PRI NICE   SIZE    RES STATE   C   TIME   WCPU
> COMMAND 54720      0      1  89   10   111M   102M RUN     1   0:04
> 24.07% cc1plus 11      0     16 -76    -     0K   512K WAIT    0
> 26:55 11.33% intr 54732      0      1  85   10 87976K 77872K RUN
> 0   0:01 11.28% cc1plus 3289   1001     10  20    0   515M   387M
> uwait   0 163:26  3.47% firefox-bin 54721   1001      1  20    0
> 13656K 11744K CPU0    0   0:00  0.10% top 54731      0      1  49
> 10 14440K 12064K wait    0   0:00  0.10% g++ 54736      0      1
> 52    0 11240K  9856K biowr   0   0:00  0.00% as 54734      0      1
> 42    0 12176K 10992K wait    0   0:00  0.00% c++ 54735      0
> 1  72    0 17696K 11336K CPU1    1   0:00  0.00% cc1plus
> 
> At such loads the system is noticeably slower.
> I'm not sure if nice has the same effect on
> all child processes, or only on the parent
> process?
> 
> I'd like to set the make process
> and all its child processes to run only
> when there is some idle CPU. Is it feasible?
> 
why should the command 'nice ...' not work. It worked for me when I
have had a single CPU machine without problems.

The only difference was that I packed it into a script.

Erich



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