Better Multicore support

I saw, that , espessialy while installing, only one core is used. the taskmanager plugin looks often like that: image

While researching i saw, that his could be there because the new kernel.
Do someone know if this true and is there an prgram to fix this?

MAKEFLAGS="-j$(nproc)"
inside makepkg.conf can enable multicore support for bulding packages… (AUR)

https://wiki.archlinux.org/index.php/Makepkg#Improving_compile_times

1 Like

By default it seems to be hardcoded to use 2 cores even on my single core system.

It’s worth switching to -march=native and losing the generic mtune too if you want “peak performance”.

what is -march=native exactly and how to setup this tweak?

that’s rare today :wink:

#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"

#-- Compiler and Linker Flags
CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt"
CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2"
MAKEFLAGS="-j$(nproc)"
#-- Debugging flags
DEBUG_CFLAGS="-g -fvar-tracking-assignments"
DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
1 Like

helped, dont needed to add -march=native

Is there also an way to enable multicore for pacman?

Just edit the ARCHITECTURE section in sudo nano /etc/makepkg.conf file.

do you also know a way to enable multicore for pacman?

https://bbs.archlinux.org/viewtopic.php?id=168156

found this by reaerch but i think this shouldnt be the problem because my xz is on version 5.2.5 and in the post they speak from xz 5.0.5

True…I’ve got a dual core on order for it but it’s coming from china…

Since GCC 4,2 or so it’s been able to determine what works best for the particular system it’s running on rather than you guessing. Specifying native tells it to do so. Works especially well with kernel compiles (choice 42 in the PKGBUILD).

CFLAGS="-march=native -O2 -pipe -fno-plt"
CXXFLAGS="-march=native -O2 -pipe -fno-plt"