1

Phoronix published a comparison of 9 operating systems. The three fastest are:

  1. Clear Linux 32310
  2. CentOS Stream (while the rolling Manjaro is the penultimate)
  3. Fedora Workstation 31

What are basic reason for such a difference, especially, between the rolling CentOS and Manjaro? Do they ship different kernels? Are CentOS packages use more optimization flags? Do they use different IO queues or governors by default?

2 Answers 2

2

Here are the factors I can think of, from the top of my head:

  • Kernel configuration
  • The choice of CPU and IO scheduler
  • How many applications are running at the same time once the system has booted
  • The compiler flags used when compiling the kernel
  • The compiler flags used when compiling the applications that are being used in the benchmarks
  • The compiler (GCC vs Clang vs ICC, old GCC vs new GCC)
  • Swappiness
  • Choice of filesystem (ext4, XFS, BTRFS, ZFS)
  • Disk configuration (software RAID)

For the case of Clear Linux, they pride themselves in:

  • Optimizing compilation flags
  • Using the latest Linux kernel
  • Patching the kernel with custom patches to increase performance
  • Using the AVX512 instructions, if the CPU can support them (which makes a huge difference)

Using the full instruction set that the CPU can offer has a significant impact.

For comparison, Arch Linux (and Manjaro) ships a kernel, libraries and executables compiled with GCC for a generic 64-bit x86 CPU (-march=x86-64 -mtune=generic). This gives good performance, but not as good as executables compiled specifically for the CPU it is running on.

Using the elfx86exts tool on /usr/bin/ls on Arch Linux shows which CPU instructions are needed, at a minimum:

$ elfx86exts /usr/bin/ls
MODE64 (call)
CMOV (cmovne)
SSE2 (movdqa)
SSE1 (movups)
CPU Generation: Intel Core

I have not had the occasion to try the same on Clear Linux, but I assume that a longer list of instructions will show up.

In summary, patching the kernel and tweaking the kernel configuration gives good result, but most importantly, supporting the available CPU instructions makes a big difference.

2
  • If I install Clear on a machine with an AMD CPU, it won't recompile the kernel (not) to use AVX512, will it? Then, in this sense, Arch and Clear will be equal. Feb 19, 2020 at 19:31
  • 2
    From what info I can find about Clear Linux online, the edge is given by providing additional library files that are used if AVX512 is supported. So yes, for CPUs that don't support AVX512 the performance should be roughly the same as for Arch, give or take a few tweaks.
    – Alexander
    Feb 19, 2020 at 20:03
0

The performance gain from hand tweaked compilation flags is way overrated. And the cost is non-trivial (if you compiled one configuration tailored to your machine, I a different one for mine, any bugs you stumble upon will be yours only, it's probable I'll have my own private set, for one).

Grab a copy of Bentley's "Writing efficient programs" (sadly long out of print) or his "Programming Pearls" (2nd edition). Real performance gains are much harder to come by, and are orders of magnitude larger.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .