From Gentoo Wiki
Jump to: navigation, search

The MAKEOPTS variable content as defined in /etc/portage/make.conf is passed on to the make jobs launched from Portage and is most often used to allow parallel jobs.

The parallel jobs entry ensures that, when make is invoked, it knows how many parallel sessions it is allowed to trigger (when parallel sessions are possible of course). This is completely within the scope of that make command and has no influence on parallel installations (which is triggered through emerge --jobs=X argument). The recommended value is the number of logical processors in the CPU plus 1.

On a system with one i7 CPU the following command shows the numbering of the available logical CPUs.

root # cat /proc/cpuinfo | grep processor
processor       : 0
processor       : 1
processor       : 2
processor       : 3
processor       : 4
processor       : 5
processor       : 6
processor       : 7

In this example 8 CPUs are available, hence one can set MAKEOPTS to



To measure the time needed to compile the package midnight commander with for example 4 threads one can run

root # time MAKEOPTS="-j4" emerge app-misc/mc

See also