Improve compile time on multi-core Linux systems
Views: 314
While compiling a piece of software from source the other day, I noticed that my CPU was only at about 50% utilization. This reminded me that the build tools can be set to execute multiple operations simultaneously.
The CONCURRENCY_LEVEL environment variable is used by many tools to determine the number of concurrent jobs to run:
export CONCURRENCY_LEVEL=3
It is also possible to tell "make" directly how many simultaneous jobs to run:
make -j 3
make --jobs=3
On a sample dual-core system, this improved my emacs compile time from 2m36s to 1m31s.


