v1.0.0-beta.1 — Rust 2024 Edition

rsync, reimagined.

Parallel delta-sync engine built in Rust. BLAKE3 hashing, zero-copy I/O, content-defined chunking. Drop-in rsync replacement.

0
× faster (LAN)
0
× compressible data
0
× trust-mtime
0
tests passing
$ cargo install resync-rs

Measured speedups over rsync 3.2.7

Docker containers, tc netem traffic shaping, LAN profile (1 Gbps, 0.5 ms RTT). Reproducible: bash bench/docker_network_benchmark.sh

2.0×
Full copy
mixed tree
12.2×
No-change
re-sync
11.8×
Incremental
5% modified
55.7×
Compressible
data
1.2×
Large binary
256 MB
Network — LAN (1 Gbps, 0.5 ms RTT)
rsync
resync
Full copy
3.18s
1.62s
2.0×
No-change
0.71s
0.06s
12.2×
Incremental (5%)
2.37s
0.20s
11.8×
Compressible
8.37s
0.15s
55.7×
Large binary
3.00s
2.45s
1.2×
Geometric mean 4.6×
Network — WAN (50 Mbps, 40 ms RTT, 0.5% loss)
rsync
resync
Full copy
4.88s
1.72s
2.8×
No-change
1.88s
0.12s
15.6×
Incremental (5%)
2.77s
0.22s
12.5×
Compressible
9.71s
0.17s
56.0×
Large binary
46.37s
42.06s
1.1×
Geometric mean 4.2×
Local — NVMe SSD (warm cache)
rsync
resync
10K files: full copy
0.405s
0.188s
2.1×
500 medium: full copy
0.741s
0.282s
2.6×
5×100 MB: full copy
1.371s
0.647s
2.1×
10K: no change
0.135s
0.055s
2.4×
100K: --trust-mtime
0.760s
0.006s
~120×
Hardware: 12th Gen Intel i3-1215U (8 cores), NVMe SSD (ext4), rsync 3.2.7, Rust 2024 with fat LTO.
Network benchmarks use Docker containers with tc netem for deterministic traffic shaping.

rsync vs resync

Architectural differences that produce the speedup.

Capabilityrsync 3.2.7resync
HashMD5 (128-bit, broken)BLAKE3 (256-bit, SIMD)
ParallelismSingle-threadedRayon work-stealing (all cores)
I/Oread() / write()mmap + copy_file_range(2)
ChunkingFixed-size blocksFastCDC (Gear hash)
CompressionzlibZstd (10× faster)
TLSVia stunnel (C)Native TLS 1.3 (rustls)
Crash safetyTemp + renameTemp + rename (atomic)
Incremental cacheNoneManifest + TOC
Timestamps1-secondNanosecond (utimensat)
Sparse filesBasicFIEMAP + seek-over-zeros
Extended attrsNo--xattrs / -X
Pre-allocationNofallocate(2)
Huge pagesNoMADV_HUGEPAGE for large I/O
LanguageCRust 2024

Nine reasons for the speedup

Each optimization compounds. Together they produce 4–56× over rsync.

  1. Parallel everything

    Rayon work-stealing thread pool across directory scanning, BLAKE3 hashing, delta computation, and file application. rsync uses exactly one core.

  2. Zero-copy I/O

    mmap with madvise(SEQUENTIAL|HUGEPAGE), copy_file_range(2) for kernel-space copies. Bytes never enter userspace buffers.

  3. BLAKE3 SIMD hashing

    10–15× faster than MD5. Auto-vectorizes with AVX-512, AVX2, NEON, SSE4.1. Batched parallelism: 128 chunks per rayon task.

  4. Content-defined chunking

    FastCDC with Gear rolling hash. An insert at byte 0 no longer shifts every chunk boundary. 95%+ hash preservation on prepend edits.

  5. Zstd compression

    10× faster than zlib at equivalent ratios. Network protocol uses zstd frame compression on all wire messages.

  6. No fsync by default

    rsync calls fsync() per file, flushing NVMe write cache. resync trusts the OS page cache. Use --fsync when durability matters.

  7. Manifest cache

    Binary manifest + tiny TOC for dir-mtime checks. Skip destination re-scan entirely. With --trust-mtime, skip source stat() too: sub-5ms at 100K files.

  8. Inode-sorted processing

    Files sorted by inode number before I/O. Minimizes seeks on rotational media, optimizes readahead on SSDs.

  9. Pre-allocated output

    fallocate(2) reserves space before writing. Zero fragmentation on ext4/xfs/btrfs. Eliminates metadata updates during write.

Architecture

Two-phase pipeline: sequential classification, then parallel I/O. Files sorted by inode.

Scanner ──▸ FilterEngine ──▸ Phase 1: Sequential Decision
                                  │
                    ┌──────────── ┼ ────────────┐
                    │             │              │
                  New file     Skip         Update
                    │                          │
              copy_file_range         Hasher (BLAKE3 + mmap)
              (zero-copy)                      │
                                          CdcChunker (FastCDC)
                                               │
                                          DeltaEngine (hash-map)
                                               │
                                          Applier (atomic write)

              Phase 2: Parallel I/O (rayon work-stealing)
              Files sorted by inode for optimal disk access

Security

Defense in depth at every layer.

Ready to switch?

Drop-in rsync replacement. Same flags. Faster results.

Get started → Contribute