Skip to main content
RunBook Academy

Proxmox VEIX · Virtual MachinesStorage in VMs

VM disks: VirtIO SCSI, cache, discard, IO threads

Intermediate⏱ ~16 min

What you'll learn

  • Choose the right disk controller VirtIO SCSI vs IDE vs SATA
  • Configure cache modes safely
  • Enable discard/TRIM for SSDs
  • Use IO threads for parallel disk I/O

Prerequisites

Verified against Proxmox VE 9.2.4 · Proxmox Backup Server 4.2.5 · Ceph Squid / Tentacle · Debian 13 (Trixie) · Linux kernel 7.0 (PVE 9.2 default) · 2026-08-07

Not yet marked complete on this device.

Why this matters in production

A VM disk’s performance is dominated by the combination of disk controller, cache mode, and underlying storage. Misconfiguring any of these produces either data loss or slow I/O.

Disk controllers

ControllerUseModern?
IDELegacyNo
SATALegacy, single queueNo
VirtIO BlockSingle queue paravirtOlder paravirt
VirtIO SCSI SingleModern paravirt, single controllerYes (recommended default)
VirtIO SCSIMultiple controllers, multi-queueYes (for high-IOPS)
qm set 100 --scsihw virtio-scsi-single

Cache modes

ModeBehaviourWhen to use
defaultNo cache, writeback is host’s choiceMost workloads
noneBypass host cache; direct to storageHigh-IOPS databases with battery-backed storage
writethroughWrites go to storage before ackStronger durability, slower
writebackHost cache, ack before flushFastest; data loss on host crash
directsyncBypass cache, sync to storageSafest, slowest
qm set 100 --scsi0 local-zfs:vm-100-disk-0,cache=writethrough

Discard / TRIM

Enabling discard=on allows the guest to issue TRIM commands, which the host forwards to the underlying storage. Critical for SSD performance and thin-provisioned storage.

qm set 100 --scsi0 local-zfs:vm-100-disk-0,discard=on

In the guest, ensure TRIM is enabled:

systemctl enable --now fstrim.timer

IO threads

For multi-queue performance, use IO threads:

qm set 100 --iothread 1

Each disk can be assigned to a specific thread for parallel I/O.

SSD emulation

For older OSes that don’t have VirtIO drivers, you can emulate an SSD:

qm set 100 --scsi0 local-zfs:vm-100-disk-0,ssd=1

This signals the guest that the disk is an SSD, enabling the guest’s SSD-optimised I/O scheduler.

Production considerations

Common mistakes

  • Using cache=writeback without guest agent or without frequent backups.
  • Disabling discard “to save CPU.” The SSD performance cost is worse.
  • Using IDE for new VMs.

Key takeaways

  • VirtIO SCSI single is the modern default.
  • Cache mode balances performance vs durability; document the choice.
  • TRIM is mandatory for SSD performance.

Knowledge check

Knowledge check · 3 questions

  1. Q1. Which disk controller is the Proxmox 9 default for new VMs?

  2. Q2. With cache=writeback, a host crash can lose writes the guest was already told had completed.

  3. Q3. Which option enables TRIM passthrough to the host?

Passing score: 75%. Answers are checked in this browser.