117
[ARCH] [EASYAF] Use RAM for Firefox and boost performance and decrease drive wear
(wiki.archlinux.org)
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
While you're still in your makepkg.conf, don't forget to set
march=native
(and remove mtune) in yourCFLAGS
! (unless you're sharing your compiled packages with other systems)Where's the difference between
march=native
andmarch=x86-64
in that case?A ton of difference!
march
stands for microarchitecture levels (or feature levels). "x86-64" is the baseline feature set targeting common x86_64 instructions found in early 64-bit CPUs, circa 2003. Since 2003 obviously there have been several advancements in CPUs and the x86_64 arch, and these have been further classified as:So if you're still on x86-64, you're missing out on some decent performance gains by not making use of all the newer instructions/optimisations made in the past two decades(!).
If you're on a recent CPU (2017+), ideally you'd want to be on at least x86-64-v3 (v4 has seemingly negligible gains, at least on Intel). There's also CPU-family specific marches such as
znver4
for AMD Zen 4 CPUs, which would be an even better choice than x86-64-v4.But the best march you want use is of course
native
- this makes available all instructions and compiler optimisations that's specific to your particular CPU, for the best performance you can possibly get. The disadvantage ofnative
is that any binaries compiled with this can run only on your CPU (or a very similar one) - but that's only an issue for those who need to distribute binaries (like software developers), or if you're sharing your pkg cache with other machines.Since the flags defined in makepkg.conf only affect AUR/manual source builds (and not the default core/extra packages), I'd recommend also reinstalling all your main packages from either the ALHP or CachyOS repos, in order to completely switch over to x86-64-v3 / v4.
Further reading on microarchitectures:
Benchmarks:
cc: @luthis@lemmy.nz
Oh boy....
Total Download Size: 3390.65 MiB Total Installed Size: 13052.08 MiB Net Upgrade Size: 291.24 MiB
I wonder if I'm going to notice any better performance..