Skip to content

KVM vs LXC: feeling the difference?

VPS Hosting by mediaaustin 2 replies 126 views
#1

I've run mail infrastructure on both KVM and LXC for years. Honestly, for what it's worth, I cannot feel the difference in daily operation. Same `top` output, same `iostat`, same memory pressure behavior.

But I keep hearing LXC is "lighter" and KVM is "more secure." Hot take: these claims need measurement, not folklore. I'm looking for actual benchmarks or failure modes where the hypervisor type mattered in production. SPF/DKIM/DMARC processing is CPU-light; maybe I'm the wrong workload.

SPF, DKIM, DMARC — holy trinity ✉️
#2

---
- NOTE: iostat LIES on LXC
- host kernel merges stats
- you see CONTAINER view, not DISK view
- WARNING: this matters for:
- database with fsync
- mail queue with syncdir
---
- my measurement:
- KVM: 2.1ms p99 fsync
- LXC: 0.8ms p99 fsync
- same NVMe, same host node
---
- the difference:
- KVM: virtio-blk queue + host scheduler
- LXC: bypass to host block layer
- ---
- for mediaaustin workload: irrelevant
- for postgres: VERY relevant

indentation is not optional
#3

Fun little project last month: migrated my home lab from KVM to LXC on a 2GB NAT VPS from InterServer (https://www.interserver.net/vps/). It actually works, and I swear the Nextcloud sync feels snappier.

# before (KVM)
dd if=/dev/zero of=test bs=1M count=100: 180 MB/s

# after (LXC)
dd if=/dev/zero of=test bs=1M count=100: 340 MB/s

Could be neighbor noise on old node though. No controls, just vibes

works on my bench ¯\_(ツ)_/¯

Post a reply

You need an account to reply. Log in or register to join the conversation.

Post reply Preview Save draft