x86-64 Microarchitecture Levels Explained: v1, v2, v3, and v4

x86-64 Microarchitecture Levels Explained: v1, v2, v3, and v4

When Parrot OS 7.4 shipped “tuned” images for amd64v3, it joined a growing list of projects building software for newer CPUs: CachyOS, RHEL 10, Ubuntu’s optional amd64v3 packages. These all refer to the same idea, the x86-64 microarchitecture levels.

The problem levels solve

The x86-64 architecture launched in 2003. To run everywhere, distributions compile packages for that original baseline, which means they cannot use instructions added over the next twenty years, such as AVX2, unless the software checks the CPU at runtime and switches code paths.

In 2020, developers from AMD, Intel, Red Hat, and SUSE defined levels so that compilers and distributions could target a newer baseline by name.

The four levels

LevelAdds (main instructions)Roughly supported by
x86-64 (v1)The 2003 baseline: SSE, SSE2Every 64-bit x86 CPU
x86-64-v2SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, CMPXCHG16BIntel Nehalem (2008), AMD Bulldozer (2011) and newer
x86-64-v3AVX, AVX2, BMI1, BMI2, FMA, F16C, LZCNT, MOVBEIntel Haswell (2013), AMD Excavator (2015), all Zen
x86-64-v4AVX-512 (F, BW, CD, DQ, VL)Intel Skylake-SP and some later chips, AMD Zen 4 and newer

The table is approximate. Intel’s low-cost chips are the trap: many Atom, Celeron, and Pentium processors sold long after 2013 lack AVX and are v2 only, and AVX-512 support on Intel consumer CPUs has come and gone between generations.

Check your CPU

The most reliable check uses glibc’s dynamic loader (glibc 2.33 or newer):

/lib64/ld-linux-x86-64.so.2 --help | grep supported
  x86-64-v4
  x86-64-v3 (supported, searched)
  x86-64-v2 (supported, searched)

That CPU supports v3 but not v4. Alternatively, check the flags directly:

grep -o -w -E 'avx2|bmi2|fma|avx512f' /proc/cpuinfo | sort -u

avx2, bmi2, and fma together indicate v3; avx512f is needed for v4. lscpu shows the full flag list. Our CPU monitoring guide covers other ways to inspect your processor.

Who requires or offers what

DistributionApproach
RHEL 9 and clonesRequire v2
RHEL 10 and clones (AlmaLinux, Rocky)Require v3 for the main x86_64 build
CachyOSOffers v3 and v4 repositories, chosen automatically at install
UbuntuBaseline by default, with optional amd64v3 packages
Parrot OS 7.4Separate “tuned” amd64v3 images
Debian, Fedora, ArchBaseline (v1)

RHEL 10’s requirement matters in practice: older servers and some low-end machines cannot run it, even though they run RHEL 9 fine. Check before planning an upgrade.

How much faster?

Less than the marketing suggests for most software, more than nothing for some:

  • General desktop and server software: typically a few percent, often within measurement noise
  • Compression, cryptography, media encoding, scientific libraries: 10 to 30 percent in favourable cases, because these benefit from wider vector instructions
  • Many performance-critical libraries, such as glibc’s string functions, OpenSSL, FFmpeg, and zstd, already detect the CPU at runtime and use AVX2 when available, even in baseline builds, which shrinks the difference further

For a typical desktop, the choice of CPU frequency governor or scheduler often matters as much.

The risk

Code built for a level crashes on a CPU that lacks it, typically with “illegal instruction”. That is why distributions either set a minimum for the whole system, refusing to install on older hardware, or offer optimised packages as an opt-in that the installer selects after checking the CPU.

If you move a v3 or v4 installation to different hardware, such as a disk moved to an older machine, or a VM migrated to a host with an older CPU, it may stop working. In virtual machines, make sure the hypervisor passes through the CPU flags; a VM with a generic “qemu64” CPU model only exposes v1. Use host-passthrough or a named model in libvirt.

Building your own software for a level

GCC and Clang accept the levels directly:

gcc -O2 -march=x86-64-v3 -o app app.c

-march=native goes further and targets the exact CPU you compile on, which is fine for software you only run on that machine. Our building from source guide covers the basics.

Frequently Asked Questions

What are x86-64 microarchitecture levels?

They are named sets of CPU instructions agreed by compiler and distribution developers. x86-64-v1 is the original 2003 baseline, v2 adds SSE4.2 and POPCNT, v3 adds AVX2, BMI, and FMA, and v4 adds AVX-512. Software built for a level only runs on CPUs that support all of its instructions.

How do I check which level my CPU supports?

On glibc 2.33 or newer, run /lib64/ld-linux-x86-64.so.2 —help and look for lines marked supported, such as x86-64-v3 (supported, searched). You can also check /proc/cpuinfo flags for avx2, bmi2, and fma for v3, or avx512f for v4.

Which CPUs support x86-64-v3?

Roughly Intel Haswell (2013) and newer Core processors, and AMD Excavator (2015) and all Zen processors. Many low-power Intel Atom, Celeron, and Pentium chips released well after 2013 lack AVX and only support v2.

How much faster is software built for v3?

For most desktop software, a few percent at most. The gains are larger in code that benefits from vector instructions, such as compression, cryptography, media encoding, and numerical libraries, where 10 to 30 percent is possible. Hot paths in such libraries often already detect the CPU at runtime.

What happens if I run v3 software on an older CPU?

It crashes with an illegal instruction error, usually as soon as the unsupported instruction is reached. That is why distributions either require a minimum level for the whole system or ship optional optimised packages alongside baseline ones.

Should I choose a v3 or v4 optimised distribution?

Only if your CPU supports it and you value the small gains, for example on a workstation doing compression or media work. For servers and general use, the baseline build is fine. Never choose v4 for a machine whose CPU might be replaced with one lacking AVX-512.