Parallel port building: Difference between revisions

From TykWiki
Jump to navigationJump to search
(Created page with 'To enable parralel port building, utilizing more than one core (which most machines have today), add the following to <code>/etc/make.conf</code>: <pre> FORCE_MAKE_JOBS=yes MAKE_…')
 
No edit summary
Line 1: Line 1:
To enable parralel port building, utilizing more than one core (which most machines have today), add the following to <code>/etc/make.conf</code>:
FreeBSD 8.0 has brought a long-awaited feature to the table: Parallel port building. The catch is that it is a huge job to go through the 20000+ ports in FreeBSD and check if they can be built in parallel. Each port needs to be checked by a maintainer and then marked as <code>MAKE_JOBS_SAFE=yes</code> to take advantage of the new feature. The thing is, most of the ports work - only a small number have problems. If you are brave, you can enable parallel building of all the ports that has not been marked as MAKE_JOBS_SAFE or MAKE_JOBS_UNSAFE yet. I haven't had any problems, but keep in mind if you are unable to build a port, remember to remove this from <code>/etc/make.conf</code> and try again, before panicking.
 
To enable parralel port building for all ports, except the ones marked as MAKE_JOBS_UNSAFE, add the following to <code>/etc/make.conf</code>:
<pre>
<pre>
FORCE_MAKE_JOBS=yes
FORCE_MAKE_JOBS=yes
Line 5: Line 7:
</pre>
</pre>


The number 4 is how many jobs should run at once (-j4 to <code>make</code>) - I normally use double the number of cores. This way my CPU is fully utilized when building ports; the bottleneck is the disk, as it should be.
The number 4 is how many jobs should run at once (-j4 to <code>make</code>) - I normally use double the number of cores. The default is the number of cores. I haven't really measured the difference. #cores*2 is just old habit from countless <code>buildworld</code> runs.

Revision as of 01:52, 12 April 2010

FreeBSD 8.0 has brought a long-awaited feature to the table: Parallel port building. The catch is that it is a huge job to go through the 20000+ ports in FreeBSD and check if they can be built in parallel. Each port needs to be checked by a maintainer and then marked as MAKE_JOBS_SAFE=yes to take advantage of the new feature. The thing is, most of the ports work - only a small number have problems. If you are brave, you can enable parallel building of all the ports that has not been marked as MAKE_JOBS_SAFE or MAKE_JOBS_UNSAFE yet. I haven't had any problems, but keep in mind if you are unable to build a port, remember to remove this from /etc/make.conf and try again, before panicking.

To enable parralel port building for all ports, except the ones marked as MAKE_JOBS_UNSAFE, add the following to /etc/make.conf:

FORCE_MAKE_JOBS=yes
MAKE_JOBS_NUMBER=4

The number 4 is how many jobs should run at once (-j4 to make) - I normally use double the number of cores. The default is the number of cores. I haven't really measured the difference. #cores*2 is just old habit from countless buildworld runs.