Parallel delta-sync engine built in Rust. BLAKE3 hashing, zero-copy I/O, content-defined chunking. Drop-in rsync replacement.
Docker containers, tc netem traffic shaping, LAN profile (1 Gbps, 0.5 ms RTT).
Reproducible: bash bench/docker_network_benchmark.sh
Architectural differences that produce the speedup.
| Capability | rsync 3.2.7 | resync |
|---|---|---|
| Hash | MD5 (128-bit, broken) | BLAKE3 (256-bit, SIMD) |
| Parallelism | Single-threaded | Rayon work-stealing (all cores) |
| I/O | read() / write() | mmap + copy_file_range(2) |
| Chunking | Fixed-size blocks | FastCDC (Gear hash) |
| Compression | zlib | Zstd (10× faster) |
| TLS | Via stunnel (C) | Native TLS 1.3 (rustls) |
| Crash safety | Temp + rename | Temp + rename (atomic) |
| Incremental cache | None | Manifest + TOC |
| Timestamps | 1-second | Nanosecond (utimensat) |
| Sparse files | Basic | FIEMAP + seek-over-zeros |
| Extended attrs | No | --xattrs / -X |
| Pre-allocation | No | fallocate(2) |
| Huge pages | No | MADV_HUGEPAGE for large I/O |
| Language | C | Rust 2024 |
Each optimization compounds. Together they produce 4–56× over rsync.
Rayon work-stealing thread pool across directory scanning, BLAKE3 hashing, delta computation, and file application. rsync uses exactly one core.
mmap with madvise(SEQUENTIAL|HUGEPAGE), copy_file_range(2) for kernel-space copies. Bytes never enter userspace buffers.
10–15× faster than MD5. Auto-vectorizes with AVX-512, AVX2, NEON, SSE4.1. Batched parallelism: 128 chunks per rayon task.
FastCDC with Gear rolling hash. An insert at byte 0 no longer shifts every chunk boundary. 95%+ hash preservation on prepend edits.
10× faster than zlib at equivalent ratios. Network protocol uses zstd frame compression on all wire messages.
rsync calls fsync() per file, flushing NVMe write cache. resync trusts the OS page cache. Use --fsync when durability matters.
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.
Files sorted by inode number before I/O. Minimizes seeks on rotational media, optimizes readahead on SSDs.
fallocate(2) reserves space before writing. Zero fragmentation on ext4/xfs/btrfs. Eliminates metadata updates during write.
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
Defense in depth at every layer.
Drop-in rsync replacement. Same flags. Faster results.
Get started → Contribute