Build niceness
Erik Joelsson
erik.joelsson at oracle.com
Thu Oct 18 16:08:26 UTC 2018
Hello Aleksey,
We very deliberately added the automatic niceness for a better general
user experience. This was back when build-infra was new and we started
pushing the parallelism of the build to where the UIs of our development
systems became annoyingly slow and sluggish when building. So, I would
be very against removing it completely, but I certainly think it should
be possible to opt out. We should never force such a behavior on an
unwilling user. My only defense is that this was done so early so we
probably didn't think about it. If you would like to provide a patch
adding a configure arg for disabling it, it would certainly be welcome.
/Erik
On 2018-10-18 01:08, Aleksey Shipilev wrote:
> Hi,
>
> Is there any specific user story behind "nice"-ing the compilation jobs from within the build system?
>
> It unfortunately clashes with priority budgeting. For example, my build server is used by me doing
> adhoc builds, automatic builds and some background tasks. The automatic build user has priority 10
> set in /etc/security/limits.conf. The background user has priority 20 set in limits.conf. In theory,
> it sounds good: it would get all the CPU ad-hoc builds want, then give CPU to automatic build jobs,
> then to background jobs.
>
> But then the build nice-s the compilation jobs, which drops its priority down to the priority of
> background jobs:
>
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
>
>
> 25966 backgro+ 39 19 808872 460772 2440 R 97.0 1.4 4181:54 R
>
>
> 25968 backgro+ 39 19 808872 460588 2340 R 97.0 1.4 4181:17 R
>
>
> 25965 backgro+ 39 19 808872 460864 2680 R 93.4 1.4 4180:29 R
>
>
> 30998 buildbot 39 19 6688224 1.050g 20000 S 64.8 3.4 4:58.52 java
>
>
> 27518 buildbot 39 19 2915828 110884 21740 S 47.0 0.3 0:02.57 javac
>
>
> 26802 buildbot 39 19 290900 264792 17392 R 38.2 0.8 0:05.48 cc1plus
>
>
> 27486 buildbot 39 19 200296 171792 18440 R 30.6 0.5 0:01.96 cc1plus
>
> ...which wrecks up this story. Maybe the better solution in build system is to avoid nice-ing at
> all, and require users who need it to invoke "nice -n ... make ..."? Or maybe at least have the knob
> that disables automatic niceness?
>
> Thanks,
> -Aleksey
>
More information about the build-dev
mailing list