Dan Stoner's Personal Blog, Photos, and More

Welcome to thatlinuxbox.com
Sunday, February 05 2012 @ 04:09 AM EST

Linux, Open Source, and Tech Stuff

Improve compile time on multi-core Linux systems

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.

Story Options

Trackback

Trackback URL for this entry: http://thatlinuxbox.com/blog/trackback.php/20100212155142732

No trackback comments for this entry.
Improve compile time on multi-core Linux systems | 0 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.