RFR: JDK-8138864 Build with nice to lower UI impact

Stanislav Baiduzhyi sbaiduzh at redhat.com
Mon Oct 5 11:28:38 UTC 2015


On 05/10/15 11:21, Magnus Ihse Bursie wrote:
> Since building the OpenJDK is a heavy operation, the build system tries
> to make use as of much of the system resources as possible and reasonable.
>
> However, on most machines except extremely high-end, this means that few
> resources are available for other processes. On a developer machine,
> building means that other work can get laggy and have poor response times.
>
> There is a simple remedy for this! Using "nice" to lower the priority
> for the build process, so the build will wait for normal UI processes. A
> single "nice" when handling the parallel targets in Init.gmk is sufficient.
>
> A potential problem could be if this affects performance on dedicated
> build servers. I have checked this on Oracle's internal build system,
> and there were no measurable regressions. This also stands to reason,
> since if there would be, the build server would be running other
> processes competing with the build. On a correctly setup build server,
> this should not be the case. And if such processes existed, it would be
> bad anyway.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8138864
> WebRev:
> http://cr.openjdk.java.net/~ihse/JDK-8138864-make-nice-priority/webrev.01

But why not just add some recommendations to the readme file to building 
section? For example, on my system I have crazy powerful CPU but HDD is 
the bottleneck, so for me the most useful command will be:

ionice -n 7 -c 3 make images

And to achieve absolutely no impact on the system:

nice -n 19 chrt -b 0 ionice -n 7 -c 3 make images

-- 
Regards,
     Stas



More information about the build-dev mailing list