makepkg.conf
In a previous post, I've remarked:
“If the distributor commands over virtually unlimited resources, and compression speed is thus not an issue, brotli and zstd are clearly superior to all other choices. That's how we would like to have our updates: small and fast to decompress.”
And not even a year later, we get this announcement. My own measurements indicated a factor of 8 increase in decompression speed, but the Arch team even sees a factor of 14. Great! ☺
There are also a few settings in /etc/makepkg.conf that may greatly accelerate the installation of packages from the AUR. All details can be found in the Arch Wiki, but here are the modifications I'm using in the order of appearance:
# building optimized binaries CFLAGS="-march=native -O2 -pipe -fstack-protector-strong -fno-plt" CXXFLAGS="${CFLAGS}" # use all cores for compiling MAKEFLAGS="-j8" # compile in RAM disk BUILDDIR=/tmp/makepkg # use package cache of pacman PKGDEST=/bam/cache/pacman/pkg # enable multicore compression for the algorithms supporting it COMPRESSGZ=(pigz -c -f -n) COMPRESSBZ2=(lbzip2 -c -f) COMPRESSXZ=(xz -c -z - --threads=0) COMPRESSZST=(zstd -c -z -q - --threads=0) # use lz4 as default package format (the command line lz4 does not yet support multi-threading, but it's still faster than anything else) PKGEXT='.pkg.tar.lz4'
I didn't perform any systematic measurements, but some AUR packages seem to install in seconds, when it took minutes in the default configuration. YMMV, but it's worth to give it a try.