Proxmox VEXIII · Proxmox Backup ServerPBS integration
Fleecing, bandwidth limits and backup impact
What you'll learn
- Explain the mechanism by which backup target latency becomes guest write latency
- Configure fleecing with a storage that meets its requirements, and size the fleecing image
- Apply bwlimit, ionice and worker limits to the correct half of the problem
- Diagnose a backup that is hurting production and choose the remedy that addresses the actual cause
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-12
This course already ships a break/fix scenario called
breakfix-vm-slow-during-backup. Until this lesson existed, the course
described the symptom without ever teaching the mechanism that causes it or
the feature that removes it. That gap is the reason this lesson is here.
The symptom is specific and recognisable: during the backup window, one or more guests become slow — not slow in a general “the host is busy” way, but slow specifically on writes, with in-guest latency that looks like the disk has been replaced with something much worse. The cause is not CPU contention and usually not host disk saturation. It is that the guest write path has been extended to include the backup target.
The coupling, and why it exists
From the previous lesson, the mechanism of snapshot-mode backup:
When a backup for a VM is started, QEMU will install a “copy-before-write” filter in its block layer. This filter ensures that upon new guest writes, old data still needed for the backup is sent to the backup target first.
Read the last four words again. Sent to the backup target first. That is a synchronous dependency: for any block the backup has not yet copied, a guest write to that block cannot complete until the old contents have been written to PBS.
So the effective latency of a guest write during a backup is:
guest write latency = local storage latency
+ (if the block is not yet backed up)
network round trip to PBS
+ PBS chunk write latency
Local NVMe answers in tens of microseconds. A PBS server on spinning disks over a shared 1 GbE link answers in tens of milliseconds. That is three orders of magnitude, applied to a fraction of writes that starts at 100% and falls to 0% as the backup progresses through the disk.
What fleecing does
Fleecing inserts a local buffer into that path. Instead of sending the old data straight to the backup target, QEMU writes it to a fleecing image on local storage, and the backup job reads from the fleecing image at its own pace.
| Without fleecing | With fleecing | |
|---|---|---|
| Guest write to a not-yet-copied block | Waits for the write to reach PBS | Waits for a write to local fleecing storage |
| Latency added to the guest | Network + PBS chunk write | Local storage write |
| What absorbs a slow target | The guest | The fleecing image |
| Extra space required | None | Up to the size of the disks being backed up, worst case |
The trade is explicit: you spend local capacity and a local write to stop the backup target from being in the guest’s critical path. For a cluster whose PBS is off-site, on spinning disks, or shared with other traffic, that is an excellent trade.
set -euo pipefail
# Per invocation.
vzdump 100 --storage pbs-main --fleecing enabled=1,storage=local-lvm
# As a default for every job on this node, in /etc/vzdump.conf:
# fleecing: enabled=1,storage=local-lvm
#
# Or on a scheduled job, via the Job Detail > Advanced tab in the GUI, which
# writes the same key into /etc/pve/jobs.cfg.Choosing the fleecing storage
This is where fleecing goes wrong in practice, because the storage requirements are real and the failure is a full storage rather than a warning.
The documentation recommends local storage with thin provisioning and
discard support — LVM-thin, RBD, or ZFS with the sparse option — or
file-based storages. And it states the consequence of ignoring that:
non-thin-provisioned storage such as plain LVM, or ZFS without sparse,
requires the full disk size to be reserved up front.
| Fleecing storage | Suitable | Why |
|---|---|---|
| LVM-thin (local) | Yes | Thin, supports discard, local latency |
ZFS with sparse enabled | Yes | Thin; without sparse it reserves the full size |
| Directory storage (qcow2 on local SSD) | Yes | File-based, allocates as it grows |
| RBD | Yes, with a caveat | Thin and discard-capable, but it puts the fleecing write on the network too, which weakens the point unless the Ceph cluster is much faster than the PBS path |
| Plain LVM | Works, but reserves full size | A 2 TiB guest reserves 2 TiB of volume group |
| The PBS storage itself | No | It is the thing you are trying to decouple from |
| A network share | No | Reintroduces network latency into the guest write path |
The other levers, and which problem each solves
Fleecing addresses guest write latency. It does nothing about a backup job that saturates a link or a disk. Those need different controls, and applying the wrong one is the usual reason a first attempt does not help.
| Lever | Option | Solves | Does not solve |
|---|---|---|---|
| Fleecing | --fleecing enabled=1,storage=X | Guest write latency caused by copy-before-write | Link saturation, host disk saturation |
| Bandwidth cap | --bwlimit KiB/s (0 = unlimited) | A backup saturating the network link and starving everything else | Latency added to individual guest writes |
| I/O priority | --ionice 0-8 (default 7; requires the BFQ scheduler) | Backup read I/O competing with production I/O on the host disks | Anything on a host not using BFQ |
| Concurrency | --performance max-workers=N | Too many disks being backed up at once, multiplying every effect above | The per-disk cost |
| PBS entry batching | --performance pbs-entries-max=N | Memory pressure from very large file-based archives | VM image backups |
# grep . /sys/block/*/queue/scheduler/sys/block/nvme0n1/queue/scheduler:[none] mq-deadline
/sys/block/sda/queue/scheduler:mq-deadline [bfq] noneIllustrative output
set -euo pipefail
vzdump --all 1 \
--mode snapshot \
--storage pbs-offsite \
--fleecing enabled=1,storage=local-lvm \
--bwlimit 62500 \
--performance max-workers=2 \
--prune-backups keep-daily=7,keep-weekly=4
# --bwlimit is KiB/s. 62500 KiB/s is about 500 Mbit/s, which leaves half of
# a 1 GbE link for everything else. Compute it rather than guessing:
# LINK_MBIT=1000
# SHARE=50
# echo $(( LINK_MBIT * SHARE / 100 * 1000 / 8 ))Diagnosing it properly
set -euo pipefail
VMID=100
# 1. Is a backup actually running against this guest right now?
pvesh get /nodes/localhost/tasks --limit 20 --typefilter vzdump
# 2. Host disk utilisation and await. If %util is near 100 on the guest's
# storage devices, the problem is local contention, not the target.
command -v iostat >/dev/null && iostat -x 2 5
# 3. Link utilisation toward the PBS server. If this is pegged, bwlimit is
# the lever, not fleecing.
command -v ifstat >/dev/null && ifstat -i vmbr0 2 5
# 4. Inside the guest: are reads fine and writes terrible? That asymmetry is
# the copy-before-write signature.
qm guest cmd "$VMID" ping && echo 'agent reachable; run iostat inside the guest'The decision that follows from the evidence:
| Evidence | Cause | Remedy |
|---|---|---|
| Guest writes slow, reads fine, host disks idle, link not saturated | Copy-before-write to a slow target | Fleecing |
| Everything on the host slow, host disks at 100% util | Backup read I/O competing locally | max-workers, BFQ + ionice, or move the backup window |
| Link saturated, other services on the same link affected | Backup saturating the network | bwlimit |
| Only the first backup after a reboot is slow | No dirty bitmap, so it is a full read | Expected; see xiii-pbs-incremental-mechanics |
Knowledge check
Knowledge check · 4 questions
Q1. Why does a slow PBS target make a running guest slow during a snapshot-mode backup?
Q2. Which storages are appropriate for fleecing images? Select all that apply.
Q3. Setting --ionice on a backup job will reduce its I/O impact regardless of which block scheduler the host disks are using.
Q4. A backup window saturates the 1 GbE uplink and every service sharing that link degrades, while in-guest write latency looks normal. Which lever addresses this?
Passing score: 75%. Answers are checked in this browser.