How many cores does this server have? Which CPU model? Does it support AVX for MongoDB or AI tools? These commands answer it on any Linux machine — physical or virtual.
lscpu: the overview
lscpu
Architecture: x86_64
CPU(s): 4
On-line CPU(s) list: 0-3
Vendor ID: GenuineIntel
Model name: Intel(R) Xeon(R) Gold 6248R CPU @ 3.00GHz
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
Virtualization features:
Hypervisor vendor: KVM
Virtualization type: full
Caches (sum of all):
L1d: 128 KiB
L2: 16 MiB
L3: 16 MiB
Flags: fpu vme … sse4_2 avx avx2 avx512f aes …
Key lines:
- CPU(s) — logical CPUs available to the OS (on a VPS: your vCPUs).
- Thread(s) per core / Core(s) per socket / Socket(s) — topology. On a physical server with hyper-threading, threads per core is 2.
- Model name — the physical CPU behind it.
- Hypervisor vendor — present on virtual machines (
KVM). - Flags — instruction sets the CPU exposes.
Just the number of CPUs
nproc
Handy in scripts: make -j"$(nproc)", or sizing worker counts (workers = 2 × nproc + 1 for Gunicorn).
/proc/cpuinfo
The raw source, one block per logical CPU:
grep -m1 'model name' /proc/cpuinfo
grep -c ^processor /proc/cpuinfo
grep -m1 -o -w 'avx2' /proc/cpuinfo
Check for specific instruction sets
Some software requires CPU features:
grep -o -w -E 'avx|avx2|avx512f|aes|sse4_2' /proc/cpuinfo | sort -u
- AVX — required by MongoDB 5.0+ on x86_64, and by many prebuilt machine-learning binaries.
- AVX2 / AVX-512 — big speed-ups for local LLM inference (llama.cpp, Ollama) and other number crunching.
- AES (AES-NI) — fast hardware encryption for TLS, VPNs and disk encryption.
On KVM, the hypervisor decides which flags the guest sees. If a feature you need is missing, ask your provider whether the host CPU supports it.
Virtualization inside the VPS
grep -E -c 'vmx|svm' /proc/cpuinfo
A non-zero count means hardware virtualization is exposed to the guest (nested virtualization) — needed to run KVM VMs inside your VPS. Most VPS plans don’t expose it; containers (Docker, LXC) work regardless.
Clock speed
lscpu | grep -i mhz
grep MHz /proc/cpuinfo
On virtual machines the reported MHz may be the host’s nominal frequency rather than the live speed. Benchmarks are a better measure of real performance — see benchmarking a VPS.
Detailed hardware info
sudo dmidecode -t processor # physical servers: socket, max speed, voltage
sudo lshw -class processor # summary (package lshw)
On VPS, DMI data usually describes the virtual machine, not the physical host.
Current CPU usage
Info is one thing; load is another:
uptime # load average vs nproc
top # press 1 for per-core usage
mpstat -P ALL 2 3 # per-core stats (package sysstat)
Watch the steal (st) column on a VPS: it shows time the hypervisor gave to other guests. See top, load average and CPU steal time.
Which process uses the CPU?
ps aux --sort=-%cpu | head
pidstat 2 5 # per-process CPU over time (sysstat)
More in high CPU usage on Linux.
Quick reference
| Question | Command |
|---|---|
| How many CPUs? | nproc |
| Model and topology | lscpu |
| Has AVX/AVX2? | grep -o -w avx2 /proc/cpuinfo | head -1 |
| Virtual machine? | systemd-detect-virt |
| Nested virtualization? | grep -cE 'vmx|svm' /proc/cpuinfo |
| Current load | uptime, top |
Need more cores? Our KVM VPS plans scale from 1 to 14 vCPU cores.