Make Update Manager Compile Multi-Threaded


Hello Community…

I notice when the Update Manager has to compile updates, it does so with a single CPU thread/core. Anyone have an idea on how to make Update Manager do this with multiple threads? It’s slow as heck and I have 24 threads at my disposal!

Are there any down-sides to multi-threaded software compiling?

Any input is appreciated!!!


I think it uses makepkg under the hood for this. Edit /etc/makepkg.conf and add


To MAKEFLAGS. Replace 4 with number of threads you want to use. This is safe option, because packages that have problems with this can override this setting.


See also


Thanks. Chrysostomus you are “The Man”!!!


it happens to me also but I dont have that directory. the terminal says that theres no such directory


What directory? /etc/makepkg.conf is a text file. If you don’t have /etc/, it is unlikely that you are running linux.

Maybe you accidentally mistyped /etc/makepkg.conf/ instead of /etc/makepkg.conf?


@Chrysostomu then how can I edit it there? and where should I put the
sorry am really a newbie here


Instead of -j4, you can do -j$(nproc), which should select the correct number of logical cores.

Insert after: MAKEFLAGS=

Some rare software doesn’t always respect makeflags. I think Firefox is one of these.


If you want to keep a backup of the file, enter in a terminal cp /etc/makepkg.conf ~/makepkg.conf.back. This will create a copy with the name makepkg.conf.back in your home directory.

To edit the file, you need a an editor with superuser rights. The easiest way of getting this is to enter in a terminal the command sudo nano /etc/makepkg.conf, which allows you the edit the file in the terminal. If you want a graphical editor, just replace nano with the editor of your preference, since I am a KDE user, I replace it with kate.

The -j4 is added by replacing MAKEFLAGS="" by MAKEFLAGS="-j4". For me, the line was commented out by a #, which you have to delete for the command to take effect.


thx for the hint. This should be the default setting though!?


To be honest, I’ve never tried that setting, so I don’t know if it works :slight_smile: maybe someone can report back.


in my case the compiling of the aur packages goes much faster with four cores.


For me, difference can be something like 20 minutes vs 90 minutes


The more cores you have, the higher the difference :slight_smile:
Can somebody check if -j$(nproc) works? It should:


According to arch wiki it should


Wow did that ever improve things :grinning:

I used the -j$(nproc) and also added some threads for the compression by changing a line further down in the config file to COMPRESSXZ=(xz -c -z - --threads=4)

Works good thanks everyone, I wish I would have known this before upgrading qtwebkit yesterday.


You should also check ccache if you often build same packages.


Yes it works! :slight_smile:


Yes, ccache helps with very large projects like AOSP or Firefox. It’s also very easy to use. But as you said, only useful if you recompile the same thing over and over again.


Thank you so much for the help!
Now my Manjaro doesn’t too much of my CPU cause of it. Thank you so much again.