Speeding up MacPorts builds on multicore machines

October 19, 2008

As all MacPorts users know, the process of building can take a significant amount of time when installing ports.

While setting up my new multicore machine, I had to install a lot of ports, and I was surprised to see that MacPorts only used one core when building (by the way, it seems that this may be about to change).

To have MacPorts use all cores, change the following in /opt/local/etc/macports/macports.conf (if you installed MacPorts in the default location):

# Add the following line:
use_parallel_build  yes

# Find and update this line. Specify the number of
# concurrent jobs to run or 0 for "auto" (ie. use all cores available).
buildmakejobs       8

However, note that each individual port can override these values, and unfortunately, it seems that many ports do.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: