[arch-general] Default value of "j" in makeflags of makepkg.conf
Anatol Pomozov
anatol.pomozov at gmail.com
Fri Jan 3 10:37:56 EST 2014
Hi
> 'nice' works just fine, and I haven't seen machines slow down due to
> compiling even without it - the Linux scheduler handles many
> simultaneous workloads just fine.
Thats right. Linux kernel developers spent a lot of time to optimize
scheduler both for long batch jobs (like compilation) and for
interactive jobs (like UI). Briefly - if a process spends a lot of CPU
then its priority decreased. So compilation with a few threads should
be almost invisible for users.
As of me - I always set -j to $(cpunum) on all my Arch machines. I
prefer to save time on compilation rather than worry about "package
might be broken because of crappy PKGBUILD". I've compiled hundreds
AUR packages and none of them got broken because of -jN so far.
And if the project cannot be compiled because of -jN then it most
likely means incorrect dependencies in the Makefile. In fact it can
break even in case of single-thread compilation e.g. if gmake decide
to change compilation order in a future version.
Using -j$(cpunum) is a sane default that saves a lot of time to users.
I do not see why anyone should use something different. If PKGBUILD is
broken then (!makeflags) should be used and ideally the issue should
be reported upstream and resolved there (i.e. fix the Makefile
dependencies).
More information about the arch-general
mailing list