borgbackup/docs
Thomas Waldmann 0e3876d5e4
buzhash64: add FastCDC-style normalized chunking
Normalized chunking switches between a stricter and a looser cut mask
around the target chunk size. This greatly tightens the chunk-size
distribution (coefficient of variation ~0.9 -> ~0.3 in tests) and removes
the dedup-hostile max-size-clamped chunks, with unchanged deduplication.

chunker-params for buzhash64 gains a required 6th field, nc_level:

  buzhash64,chunk_min,chunk_max,chunk_mask,window_size,nc_level

Use nc_level=2 for the new default, nc_level=0 to disable (then behavior
is byte-identical to the previous single-mask chunker).

buzhash (32bit) is untouched and stays bit-compatible with borg 1.x.

The mask transition point (normal_size) defaults to a principled formula
(target minus the expected loose-phase tail) so the mean stays near the
target; it can be tuned via the normal_size constructor arg.

scripts/chunker_bench.py: evidence harness used to measure chunk-size
distribution, dedup ratio, throughput and shift-resilience.

Measurements (before = nc_level 0, after = nc_level 2; both at the default
params buzhash64,19,23,21,4095; measured with scripts/chunker_bench.py):

5 GiB of incompressible data (~2000-2700 chunks, statistically stable):

  before:  CV 0.739,  49 max-size-clamped (8 MiB) chunks,   953 MB/s
  after:   CV 0.311,   0 max-size-clamped chunks,          1024 MB/s

Re-backup of a 2.5 GiB file after a few scattered single-byte edits
(deduplication ratio; 0.5 = v2 fully deduplicated against v1, lower is
better):

   64 edits:  before 0.5424  ->  after 0.5235
  320 edits:  before 0.6791  ->  after 0.6142

Normalized chunking deduplicates better after edits: removing the
max-size-clamped chunks means a single-byte change invalidates much less
data (about 36% less dedup overhead at 320 edits). Throughput was also
consistently higher with nc_level=2 at this scale.

Also: fix bug when computing the mask, one needs to use 1ULL instead of
1, so the shifting computation is done in a uint64, not in a 32bit int.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 12:00:09 +02:00
..
3rd_party fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
_static revert logo colour to #00dd00 (per @TW) 2017-08-16 17:50:59 +02:00
_templates docs: offer a PDF download and link offline formats in the sidebar, fixes #9731 2026-06-09 02:08:14 +02:00
binaries CI: use macOS 15 for binary builds 2025-12-15 17:40:51 +01:00
borg_theme/css docs: offer a PDF download and link offline formats in the sidebar, fixes #9731 2026-06-09 02:08:14 +02:00
deployment remove ssh:// and socket:// remote repository for current repos 2026-06-08 08:04:59 +02:00
internals docs: update / fix "internals" section 2026-06-23 11:19:38 +02:00
man build usage / man 2026-06-16 14:17:43 +02:00
misc Renames --since to --from 2026-06-20 18:36:59 +02:00
usage buzhash64: add FastCDC-style normalized chunking 2026-06-28 12:00:09 +02:00
authors.rst fix levels in authors section 2016-11-04 21:14:59 -04:00
book.rst fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
changes.rst buzhash64: add FastCDC-style normalized chunking 2026-06-28 12:00:09 +02:00
changes_0.x.rst fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
changes_1.x.rst fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
conf.py docs: offer a PDF download and link offline formats in the sidebar, fixes #9731 2026-06-09 02:08:14 +02:00
deployment.rst add non-root deployment strategy 2024-02-24 21:17:01 +01:00
development.rst misc docs updates 2026-06-16 15:21:57 +02:00
faq.rst remove xxhash / xxh64 requirement, mentions 2026-06-10 00:38:18 +02:00
global.rst.inc remove xxhash / xxh64 requirement, mentions 2026-06-10 00:38:18 +02:00
index.rst fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
installation.rst remove python 3.10 support (master branch), fixes #9707 2026-06-06 15:34:05 +02:00
internals.rst misc docs updates 2026-06-16 15:21:57 +02:00
introduction.rst fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
Makefile fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
man_intro.rst fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
quickstart.rst improve docs / comments 2026-06-09 00:49:50 +02:00
quickstart_example.rst.inc key: unify keyfile/repokey classes, locate key independent of type byte (#9743) 2026-06-12 23:48:45 +02:00
support.rst docs: reflow some really long lines 2020-03-11 16:27:57 -07:00
usage.rst repo-compress: remove this command for now 2026-05-22 13:00:13 +02:00
usage_general.rst.inc [DOCS] #4587 – Make Sphinx warnings break docs build 2020-03-16 19:22:59 +01:00