Skip to content

Backup throughput

A full backup is one streaming pipeline per database: the engine's dump tool (or the base-backup protocol) writes into zstd, then age, then SHA-256 and parallel 16 MiB multipart uploads. Nothing is written to local disk. This page measures the whole pipeline against real databases and an S3 store, then each stage on its own.

Full backups end to end

The real mover code (tenax mover's library) against Postgres 16 and MySQL 8.4 containers and a MinIO container on the same machine. Postgres holds one table of 2,000,000 rows (text, bytea, a timestamp and a secondary index; the same table as the cluster harness): the database is 644 MiB. MySQL holds the same table with 1,000,000 rows: 407 MiB of InnoDB data and indexes.

Backup Compression Duration Raw Stored Stored/raw Throughput (raw)
Postgres physical (base backup) zstd default 6.2 s 683 MiB 160 MiB 0.235 110 MiB/s
Postgres logical (pg_dump) zstd default 7.7 s 577 MiB 97 MiB 0.168 75 MiB/s
Postgres logical zstd fastest 5.9 s 577 MiB 91 MiB 0.158 97 MiB/s
Postgres logical zstd better 18.1 s 577 MiB 93 MiB 0.161 32 MiB/s
Postgres logical none (age only) 9.6 s 577 MiB 577 MiB 1.000 60 MiB/s
MySQL logical (mysqldump) zstd default 7.5 s 292 MiB 66 MiB 0.226 39 MiB/s

Raw is what the dump tool produced; stored is what landed in the bucket. Duration covers the whole job: connecting, the inventory, the dump, the upload, and writing the manifest last. The mover used the component tests' upload settings, 5 MiB parts with 4 in flight (the store's default is 16 MiB parts, 8 in flight).

  • Compression pays for itself here. Without compression the backup is slower (60 against 75 MiB/s) because it uploads six times more bytes, even to a bucket on the same machine. Over a real network the gap is wider.
  • fastest was the best setting for this data: faster than default and, for this table, even a little smaller. better costs more than twice the time for no gain. Compression results depend on the data; measure your own with the benchmarks below.
  • MySQL is limited by mysqldump, which formats rows as SQL text on one thread: 39 MiB/s of dump.

Set the level per policy:

spec:
  compression: { algorithm: zstd, level: fastest }   # fastest | default | better | best, or algorithm: none

Compression and encryption cost

Go benchmarks of the codec (internal/pipeline), 64 MiB per run, without any I/O. "Dump-like" data is the text of a pg_dump COPY section of the table above; "random" is incompressible (already compressed files, encrypted columns). Throughput is of plaintext, in MiB/s.

Codec Threads Dump-like Stored/raw Random
age only (algorithm: none) 1 1,298 MiB/s 1.000 1,408 MiB/s
zstd fastest + age 1 346 MiB/s 0.160 838 MiB/s
zstd default + age 1 199 MiB/s 0.170 625 MiB/s
zstd default + age 4 206 MiB/s 0.170 617 MiB/s
zstd better + age 4 48 MiB/s 0.161 496 MiB/s
zstd best + age 4 9.4 MiB/s 0.154 155 MiB/s
zstd default alone, no age 1 197 MiB/s - 1,254 MiB/s
zstd default alone, no age 4 216 MiB/s - 793 MiB/s

Encode throughput by zstd level, dump-like data

  • age costs almost nothing next to zstd: alone it runs at about 1.3 GiB/s on one core, and zstd default with or without age measures the same within noise.
  • More zstd threads barely help a single stream. The streaming encoder parallelizes little, so threads: 4 gained 3 to 10 % here. Parallelism comes from the pipeline instead: compression, encryption, hashing and the uploads of several parts (8 by default) run concurrently.
  • Random data passes through zstd at 600 to 800 MiB/s: incompressible data costs little CPU, and the stored size stays the raw size plus a few bytes.

Decoding, the restore direction:

Codec Dump-like Random
age only 800 MiB/s 743 MiB/s
age + zstd 351 MiB/s 271 MiB/s

The object pipeline without the network

ObjectWriter is what every backup object goes through: zstd default and age, SHA-256 of the stored bytes, 16 MiB parts uploaded 8 at a time. Into the in-memory store (no network), 64 MiB of dump-like data:

Direction Throughput
Write (compress, encrypt, hash, multipart) 142 MiB/s
Read back (parallel range reads, SHA-256 check, decrypt, decompress) 221 MiB/s

This is the ceiling of one object on one core's worth of zstd; the end-to-end Postgres physical backup above (110 MiB/s) is close to it.

Machine and versions

One VM: Intel Xeon @ 2.80 GHz, 4 vCPUs (one thread per core), 15 GiB RAM, Linux 6.18. Go 1.26.10 (zstd from klauspost/compress 1.18, age 1.2), Docker 29.8.2, Postgres 16.15 with pg_dump 16, MySQL 8.4.11 with mysqldump 8.4, MinIO built from images/minio. Databases and MinIO ran in containers on the same VM with their data on tmpfs, so disks played no part; the mover ran in the test process on the same 4 vCPUs. The VM is a shared cloud machine: expect differences of 10 to 20 % between runs. Measured on 2026-10-21.

Reproduce

hack/perf/run.sh local     # end-to-end backups (test/component/perf_test.go)
hack/perf/run.sh bench     # codec and object benchmarks
# or one benchmark:
go test -run '^$' -bench 'Encode|Decode|CompressOnly|ObjectWriter' -benchtime 5x ./internal/pipeline/

Results: artifacts/perf/postgres.md, artifacts/perf/mysql.md and artifacts/perf/bench.txt (Go reports MB/s, 10^6 bytes per second; the tables here are in MiB/s).