can make -j be used for ports?

Chuck Swiger cswiger at
Wed Mar 16 05:32:51 UTC 2011

On Mar 15, 2011, at 7:38 PM, John wrote:
> 1. If I can speed things up, with *ports* as I have a dual cpu, I want
> to maybe run j2 or j3. I seek clarification which is logically best,
> because some literature says jn, others jn+1 where n is number of cores.
> kern.smp.cpus: 2 on my machine. Is there benefit setting this to 3,4,5?

If you have plenty of RAM, then setting it somewhat higher than #CPUs
is likely to improve performance.  Frankly, it's best if you measure
things on your own machine against the software you care about building,
and decide for yourself whether the difference matters.  :-)

> I want to know if there is perhaps a conf file or sysctl where I can
> specify this *for ports only.* - if not I'm happy to specify on the
> command line. It's just that the manual is a tad unclear about this.

Setting MAKE_JOBS_NUMBER in /etc/make.conf will only apply to things
using the Makefile, unless they've chosen to honor the
same variable independently.

In other words, you're unlikely to hurt things much by setting it to
some reasonable value.  Obtain some data and let us know if you run
into surprises...


More information about the freebsd-ports mailing list