Centos – What does make -jn mean

centosllvmmake

I am trying to install LLVM on my CentOS machine.
In the installation tutorial of LLVM, a flag -jn is specified along with make.

It says to perform make -jn and also says "Choose n such that make doesn’t run in to swap space issue."

What is the use of the -j flag and how can I choose the value of n?

Best Answer

The -j make flag denotes how many threads you want to allot for compiling.

n is, in this case, a place-holder for the number of processes.

The classic rule of thumb is that it's safe to make n = the number of cores your CPU has. So if you are on a dual core machine, you might use -j2, while on an 8-core machine -j8

In practise, I have found that to be a good starting place, but you should probably feel free to experiment a bit and see what works best for you.

Related Question