Systems Administration

rsync's 2,729x Speedup Is 1% Slower on the Clock: Delta vs Whole-File, Measured in Wall-Clock

rsync reported 'speedup is 2,729.37' for a transfer that moved 32,768 literal bytes out of a 1,073,741,824-byte file — and the clock said the delta transfer took 35.00 seconds against 34.63 for the whole-file copy. The same probe last night said 43 percent slower. The direction held both times, the size of the gap did not, and the counter that prints the speedup never measured a clock at all. Here are both runs, in full.

Written November 8, 2026 · Tested with rsync 3.2.7 · 14 min read

By the end of this guide
  • The fresh run: delta ties whole-file on the clock
  • The byte table underneath
  • Last night said 43 percent; today says 1 percent
  • What the manual already tells you
What you need
The fixture is one file, exactly 1,073,741,824 bytes: a 1,048,576-byte block of random data repeated 1,024 times. One edit flips 4,096 bytes at offset 536,870,912 in the source only, the exact middle of the file.

What this guide is

This guide times the trade-off the rsync manual states in words and a recent guide asserts without measuring: whether forcing the delta-transfer algorithm on a local copy is faster than letting rsync copy the whole file. The nearest existing piece is a November 2026 guide from techiebroadband, which publishes byte tables only. On a 4,194,304-byte file with a 4,096-byte edit it reports 4,096 literal bytes against 4,190,208 matched, and it asserts twice that literal-byte savings do not guarantee an equal reduction in wall-clock time, and that whole-file transfer can be the better trade on a fast local path. It never times either side.

The headline is a correction, not a speedup. On the fresh run, rsync reported "speedup is 2,729.37" for a delta transfer that moved 32,768 literal bytes — and the clock said that transfer took 35.00 seconds, against 34.63 seconds for the whole-file copy. Delta was 1 percent slower. The same probe the night before said 43 percent slower. The direction held both times. The size of the gap did not. The counter that prints the speedup never measured a clock at all.

A note on scope before the numbers. Delta encoding is not one thing. The C++ git-packfile writer guide on this site hand-encodes deltas inside a packfile, a different operation from the rsync transfer measured here. The two guides share the word delta and nothing else, and this guide re-teaches none of the packfile work.

The setup

The fixture is one file, exactly 1,073,741,824 bytes: a 1,048,576-byte block of random data repeated 1,024 times. One edit flips 4,096 bytes at offset 536,870,912 in the source only, the exact middle of the file. The destination is reset to the pre-edit file before every timed run, so each run transfers the same edit. The edited source was hashed in full after the edit, and every destination matched that hash after every run.

Four arms, each timed with /usr/bin/time and verified with cmp plus a full SHA-256 hash:

Command
rsync -a --checksum --no-whole-file --stats src/ dst-delta-cs/
rsync -a --no-whole-file --stats src/ dst-delta/
rsync -a --stats src/ dst-whole/
cp src/bigfile.bin dst-cp/bigfile.bin

The first arm adds --checksum, which changes the pre-transfer selection check to compare content checksums instead of size and modification time. The second arm is the plain forced delta. The third is the local default: with both paths local, rsync copies whole files unless told otherwise. The fourth is a plain cp control, the fastest thing the box can do with the same bytes.

The toolchain is rsync 3.2.7, protocol 31, Python 3.12.3, ext4 on a WSL2 virtual disk, 32 CPUs, 23 GiB of RAM. The box has no root access, so no cold-cache runs exist: the cache cannot be dropped, and every timed run here is warm-cache. Each arm gets one warm-up run, reported separately as FIRST and excluded from every median, plus three timed runs. The medians below are over the three timed runs only.

One design change from the night before matters. On 2026-11-07 the arms ran in sequence, delta-cs first and cp last, so dirty-page state differed between arms. On 2026-11-08 the arms ran interleaved, with the order rotated each repetition, so no arm always ran first or last. The interleaving did not stabilize the numbers. It exposed how unstable they are.

The fresh run: delta ties whole-file on the clock

Arm Rep 1 Rep 2 Rep 3 Median
Delta with checksum 21.58 27.30 18.93 21.58
Delta 28.60 35.00 36.17 35.00
Whole-file (default) 35.40 34.63 19.96 34.63
cp control 55.99 22.65 28.01 28.01

All times in seconds, wall-clock elapsed from /usr/bin/time. All 16 runs returned 0, and all 16 destinations compared identical to the edited source.

Read the delta row against the whole-file row: 35.00 seconds against 34.63, a ratio of 1.01. Delta was 1 percent slower, a gap of 0.37 seconds on runs that take about 35 seconds. The whole-file arm's own range spans 19.96 to 35.40 seconds, so the 0.37-second gap sits far inside the noise of either arm. The honest reading of the fresh run is a tie, with delta a hair behind.

The plain cp control was fastest: 28.01 seconds at the median, 1.24 times faster than the whole-file rsync arm and 1.25 times faster than the delta arm. The whole-file copy does more than cp — it verifies the reconstruction with a whole-file checksum as the file is transferred — and the delta arms add checksum reads on both sides. The extra work shows up on the clock, not in the byte counts.

The checksum arm needs a warning, not a ranking. Its median of 21.58 seconds is the lowest number in the table, but its repetitions span 18.93 to 27.30 seconds, its warm-up took 228.57 seconds, and the whole-file arm's range overlaps it almost completely. On the night before, the same arm spanned 4.67 to 33.58 seconds. Report it as measured and unstable, never as a clean ratio. The guide draws no conclusion from it beyond this paragraph.

The byte table underneath

Arm Literal (bytes) Matched (bytes) Speedup
Delta with checksum 32,768 1,073,709,056 2,729.26
Delta 32,768 1,073,709,056 2,729.37
Whole-file (default) 1,073,741,824 0 1.00

The byte outcomes are identical to the night before, to the byte. The delta arms moved 32,768 literal bytes, 0.003 percent of the file, and matched the other 1,073,709,056 bytes from the destination. The whole-file arm moved all 1,073,741,824 bytes. The wire-level exchange tells the same story: the delta runs sent 163,980 bytes and received 229,423, while the whole-file run sent 1,074,004,096 bytes and received 35.

That is what the speedup number divides. The manual defines it as the total file size divided by the sum of the sent and received bytes, and calls it "a feel-good bigger-is-better number" in its own text. For the delta arm, 1,073,741,824 divided by 393,403 is 2,729.37. No clock enters the calculation. A reader who takes the number at face value expects a transfer nearly three thousand times faster than the whole-file copy. The clock says the transfer took 35.00 seconds against 34.63.

The --checksum arm's extra cost is visible in the statistics and small. File-list generation took 0.325 to 0.327 seconds in the timed repetitions, against 0.001 seconds without the flag, because selection reads both files in full. That is about a third of a second inside runs of 19 to 28 seconds, not the story.

Last night said 43 percent; today says 1 percent

Run Delta median Whole median Delta slower by
2026-11-07 17.07 11.96 43 percent
2026-11-08 (fresh) 35.00 34.63 1 percent

Same fixture shape, same commands, same box, different nights — and the medians rose two to three times overnight while the ratio collapsed. The 2026-11-07 run had tight spreads: delta 16.25 to 18.33 seconds, whole-file 11.66 to 13.27. The fresh run has wide ones: delta 28.60 to 36.17, whole-file 19.96 to 35.40. The box was in a different writeback state, and the numbers moved with it.

The likely cause is dirty-page writeback on the WSL2 virtual disk. Every timed run is preceded by an untimed reset copy that writes 1,073,741,824 bytes of dirty pages, and each timed run writes another 1,073,741,824 bytes. Once dirty pages accumulate, writers throttle on writeback. That cause is an interpretation, not a measurement: the probe did not instrument dirty-page levels, and this guide does not claim it as a measured fact. What is measured is the consequence: the ratio between two runs of the same probe moved from 1.43 to 1.01, and the warm-up runs moved further still.

Two claims survive both runs, and they are the portable ones. First, delta never beat whole-file locally: 1.43 times slower one night, 1.01 times slower the next. Second, plain cp beat both rsync modes both nights: 8.72 seconds against 11.96 and 17.07 on 2026-11-07, and 28.01 against 34.63 and 35.00 on 2026-11-08. The exact ratios are per box and per disk. The direction is the finding.

What the manual already tells you

The rsync manual, read fresh, states the trade-off this probe measures. The --whole-file entry says the option disables the delta-transfer algorithm, that the transfer may be faster when the bandwidth between source and destination is higher than the bandwidth to disk, and that whole-file is the default when both paths are local. The --no-whole-file entry says forcing delta on a local transfer "usually slows rsync down", and names two legitimate reasons to do it anyway: minimizing writes to the destination file when combined with --inplace, and testing the checksum-based update algorithm. The --checksum entry says the flag changes file selection to compare a 128-bit checksum for each file of matching size, and that generating the checksums means reading the files. The --stats entry defines literal data as the unmatched file-update data sent to the receiver, matched data as the data the receiver got locally, and the speedup as the feel-good number quoted above.

A second guide, from copyprogramming, asserts the same trade-off in theory only: the overhead of computing rolling checksums for both files often exceeds the time saved by avoiding a full copy on local systems, because a whole-file copy reads the source once and writes the destination once. It publishes no timings. The measurement here is the evidence for that assertion, and the evidence says the assertion holds in direction and not in any fixed size.

The first-run illusion

Never time a copy from a single run. On 2026-11-07 the first cp of the 1,073,741,824-byte file "completed" in 0.36 seconds, because the writes went to dirty page cache and the writeback bill landed on later repetitions: 6.46, then 8.72, then 10.04 seconds, a rising trend. The fresh run shows the other side of the same effect. Its first cp took 28.03 seconds, no illusion at all, because the box was already carrying dirty pages from generating the fixture. And the fresh delta-with-checksum warm-up took 228.57 seconds, nearly four minutes for one transfer, against 76.70 seconds the night before. A single run can report anything from 0.36 seconds to 228.57 seconds for the same work on the same box. Medians of three are the minimum this probe trusts, and even those moved overnight.

When delta wins: a slow network

Everything above is local, warm-cache, one file, one filesystem, no network. Over a slow link the result inverts, and the same byte table says why: the delta transfer moves 32,768 literal bytes where the whole-file copy moves 1,073,741,824. On a link where those bytes take minutes to cross, the checksum reads on both sides are a rounding error and delta wins by a wide margin. On a local disk where the bytes are already there, the checksum reads are the work, and delta loses or ties. The choice is not which mode is faster. The choice is which resource is scarce: bytes on the wire, or reads and writes on the disk.

What this guide does not cover

The delta-with-checksum arm is unstable, in both runs, and this guide quotes no clean ratio for it. Fresh range 18.93 to 27.30 seconds, warm-up 228.57 seconds; 2026-11-07 range 4.67 to 33.58 seconds, warm-up 76.70 seconds. The arm's median is reported with its range, and the guide's conclusions rest on the plain delta arm instead.

The scope is one 1,073,741,824-byte file, one 4,096-byte edit at one offset, one filesystem, warm cache only, no network, no --inplace, no compression, and no many-small-files case, where the file-list scan dominates differently. The fixture content is a repeated 1,048,576-byte random block. Rsync uses no compression by default, so repetition does not affect the timing, but a real-world file — a virtual-machine image, a database file, a video — is a different fixture. Do not generalize these numbers to remote transfers, and do not generalize the 1.01 ratio to any other disk.

CPU time is small in every arm. On the fresh run the rsync arms spent 0.24 to 0.41 seconds of user time and 1.05 to 3.19 seconds of system time inside 19- to 36-second elapsed runs, and cp spent no user time and under 1 second of system time. Elapsed time is roughly 87 to 98 percent waiting on storage, so the disk and writeback path sets the time, not the checksum computation. That is why the numbers move with the box state instead of staying put.

Checklist

  • Before trusting a speedup number, check what it divides: the speedup rsync reports is total file size over bytes sent plus received, with no clock in the calculation.
  • Before forcing delta on a local copy, check what is scarce: if the disk is the bottleneck, --no-whole-file usually slows rsync down, in the manual's own words.
  • Before timing a copy, run it more than once: a first run can report 0.36 seconds for a transfer that takes 28 seconds warm, and a warm-up can take 228.57 seconds for a transfer that medians at 21.58.
  • Before quoting a ratio from one night, run the probe again: the delta-to-whole-file ratio moved from 1.43 to 1.01 between two runs of the same probe on the same box.
  • Before reaching for delta on a local disk, try plain cp: it was the fastest arm on both nights.
  • Before applying these numbers to a remote transfer, stop: over a slow link the 32,768-byte delta wins, and this guide measured the local case only.

Sources

  • rsync(1) manual — the mechanism primary, read fresh on the box 2026-11-08 (rsync 3.2.7, protocol 31; the online copy carries the same text): --whole-file disables the delta-transfer algorithm and is the local default; --no-whole-file "usually slows rsync down"; --checksum changes selection to a 128-bit checksum per matching-size file; --stats defines literal data, matched data, and the speedup as "a feel-good bigger-is-better number".
  • techiebroadband, What is Rsync? — read in full 2026-11-08: byte tables only, no wall-clock anywhere; the two trade-off assertions quoted above; tested rsync 3.2.7, protocol 31, the box's exact build.
  • copyprogramming, Why Does rsync Use Delta Transfer for Local Files — read in full 2026-11-08: theory only, asserts the trade-off with no timings; the "reads the source once and writes the destination once" mechanism quoted above.
  • Tridgell and Mackerras, The rsync algorithm — the algorithm report, cited by the techiebroadband article for the rolling-checksum mechanism; the repository landing page was opened 2026-11-08 and carries no readable text of the report, so this guide quotes the article's description of the mechanism, not the report itself.
  • Veldica, Writing Git Packfiles in C++ — the sibling guide: delta encoding inside a packfile, a different operation from the rsync transfer measured here.

Keep Exploring