Volume copies¶
A volume copy reads a snapshot's files as a tar stream, cuts them into content-defined chunks (256 KiB to 4 MiB, 1 MiB on average), names each chunk by a keyed hash, and uploads only the chunks the previous copy does not have, compressed and encrypted, in 16 MiB packs. See Volume backups for how copies work.
The test volume: 64 files of 4 MiB in 8 directories, half random bytes (media, archives) and half log-like text: 256 MiB.
Into MinIO¶
The copier and restore code against a MinIO container on the same machine, the sender's tar stream produced from a directory on tmpfs.
| Copy | Duration | Throughput (file data) | Chunks | New chunks | New stored |
|---|---|---|---|---|---|
| First copy | 2.2 s | 117 MiB/s | 212 | 212 | 144.0 MiB |
| Second copy, nothing changed | 1.2 s | 207 MiB/s | 212 | 0 | 0 MiB |
| Third copy, 2 of 64 files edited in the middle | 1.4 s | 179 MiB/s | 213 | 3 | 2.3 MiB |
| Restore stream (tar out of the newest copy) | 2.2 s | 115 MiB/s | - | - | - |
- An incremental copy costs reading the volume, not uploading it. With nothing changed, a copy uploads nothing but its index; with two files edited it uploads three chunks (2.3 MiB, the changed chunks of each file).
- The first copy stored 144 MiB for 256 MiB of files: the random half stays its size (128 MiB), the text half compresses about 8:1 (16 MiB).
Each stage on its own¶
Go benchmarks (internal/volcopy), in memory:
| Stage | Throughput |
|---|---|
| Content-defined chunking (gear hash) | 946 MiB/s |
| Chunking plus the keyed chunk id (HMAC-SHA-256) | 226 MiB/s |
| Sender: walking the directory and writing the tar stream | 591 MiB/s |
| Copy into the in-memory store, first copy | 132 MiB/s |
| Copy, nothing changed | 239 MiB/s |
| Copy, 2 files edited (2 new chunks, 3.3 MiB) | 240 MiB/s |
| Restore stream | 303 MiB/s |
The chunk id is the limit of an incremental copy: every byte is hashed with HMAC-SHA-256 to find out whether it is already stored, at about 230 MiB/s per stream on this CPU. A first copy also compresses and encrypts every chunk.
Not measured here¶
- CSI snapshots: they are taken and restored by the storage system, and their speed is the storage system's.
- Copies of millions of small files. The benchmark volume has few large files; per-file overhead (tar headers, index entries) was not measured.
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, Docker 29.8.2,
MinIO built from images/minio (data on tmpfs). The volume was a directory on tmpfs. Measured on 2026-10-21.