Skip to content

Research notes / Deduplication

Content-defined chunking: boundaries are not identity

Updated 18 November 2026 / Source review and reproducible synthetic experiments

Choosing where a chunk ends and deciding whether it already exists are separate operations. Content-defined boundaries can preserve reuse after an insertion; a matching boundary fingerprint does not establish matching content. The experiments below show how framing and byte-value rules change measured reuse and chunk counts.

On this page16 sections

One inserted byte, three lost matches

Start with the twelve ASCII bytes ABCDEFGHIJKL and split every four bytes. Insert x at the beginning, then split again from offset zero. The original bytes are still present in order, but none of the new chunks equals an original chunk. This is an exact constructed example, not a storage trace.

Generated from the linked illustration code. Each letter is one byte; vertical bars mark chunk boundaries and are not stored bytes.
Input changeFour-byte groupingBytes in chunks equal to an original chunk
OriginalABCD | EFGH | IJKL12
Insert x at the startxABC | DEFG | HIJK | L0
Insert WXYZ at the startWXYZ | ABCD | EFGH | IJKL12

The last row is the counterexample to an overstatement: inserting a multiple of the block size preserves alignment. Repeated content can also yield matches after a one-byte shift. Therefore, fixed-size chunking can lose downstream matches; it does not always lose every match.

This is an aligned-partition comparison, not a result for every fixed-block synchronization algorithm. Rsync searches for its fixed-length basis blocks at shifted source offsets.

The byte count tests equality against the original chunk set. It is not saved capacity, a deduplication ratio or a timing result; metadata and index costs are absent. Illustration source.

A local anchor can survive a global offset change

LBFS selects boundaries using Rabin fingerprints of moving content windows, rather than fixed offsets. Unchanged regions can therefore recover the same boundaries after an edit. Its paper also describes the exception: minimum-size suppression and maximum-size forced cuts can disturb this synchronization. CDC is not a guarantee that an insertion changes exactly one chunk. [1, sections 3.1.1-3.1.2]

Keep three questions separate: which bytes form a chunk; whether those bytes match stored content; and where that content is physically placed. The last question explains why a good reuse rate need not mean a fast restore. See the companion restore-locality analysis.

FastCDC changes the boundary-selection cost

FastCDC combines Gear-based boundary tests, skipping before the minimum length and normalization. Normalization makes cuts harder before a target length and easier after it; it does not make all chunks equal-sized. [2, section 4]

The 2016 evaluation compares specified Rabin, Gear and AE implementations on seven datasets, using an i7-4770 and also an i7-930. Those are experimental conditions, not a portable speed multiplier. We do not reproduce its timings. [2, section 5]

What the FastCDC measurements count

Section 5.1 averages five in-memory chunking runs. It does not measure complete backup throughput, including whole-chunk fingerprinting, index lookups and storage writes. The paper's deduplication ratio is duplicate bytes detected divided by total input bytes, reported as a percentage. It is not a logical-to-stored capacity multiple. [2, sections 2 and 5.1]

Keep the byte population and denominator beside each result. The HAR restore study uses a different ratio convention and distinguishes rewritten bytes from total stored space after backup expiration.

An easily missed benchmark boundary: the file

Gregoriadis and colleagues' 2024 manuscript evaluates throughput, reuse and chunk-size distributions using four real-world collections and random data. Its throughput test reads from a RAMdisk and omits whole-chunk fingerprinting. Ten runs per configuration and a warm-up support its timing comparison, not a backup service throughput claim. [3, sections V-VI]

More subtly, the study concatenates each collection into one stream. Chunks can cross original file boundaries, unlike an implementation that resets at each file. The authors explicitly warn that even identical files may fail to match under that setup and exclude the terminal chunk from evaluation. A comparison that silently changes file framing can change its answer before the hash algorithm changes. [3, section V-B]

This makes an actionable review question: does the test process individual files, a concatenated stream, archive bytes, compressed bytes or encrypted bytes? Write that down alongside the dataset version. File names alone do not identify the input byte stream.

Same files, different framing, different reuse

Hesela ran ten deterministic cases using the unmodified pure-Python API of fastcdc-py 1.7.0. The main fixture contains four synthetic files of 1,000, 10,000, 10,000 and 131,072 bytes, generated from SHA-256 counter blocks. It is deliberately small and fully reconstructible, not a sample of backup workloads. The baseline parameters are minimum 2,048 B, requested average 8,192 B and maximum 65,536 B. [6] [7]

Reversing file order preserves all 152,072 bytes of reusable chunks when each file starts a fresh chunker. Concatenating those files before chunking reduces reuse to 110,326 / 152,072 bytes, or 72.55%, after the same reordering. Each comparison uses the same framing on both sides. No file contents changed: the stream context and terminal boundaries changed.

Exact constructed cases, including every terminal chunk. Reuse is against the original chunk set, not physical capacity saved.
CaseReused / candidate bytes
Unchanged files / per-file
24 candidate chunks
152,072 / 152,072
100.00%
Unchanged files / one stream
21 candidate chunks
152,072 / 152,072
100.00%
Reversed file order / per-file
24 candidate chunks
152,072 / 152,072
100.00%
Reversed file order / one stream
22 candidate chunks
110,326 / 152,072
72.55%
One-byte prefix / FastCDC
19 candidate chunks
125,726 / 131,073
95.92%
One-byte prefix / fixed 8192 B
17 candidate chunks
0 / 131,073
0.00%
Unchanged bytes / smaller chunks
43 candidate chunks
40,130 / 152,072
26.39%
31-byte file / per-file
1 candidate chunk
31 / 31
100.00%
Empty file / per-file
0 candidate chunks
0 / 0
Not defined
131073 zero bytes / per-file
3 candidate chunks
131,073 / 131,073
100.00%

In the one-byte-prefix case, FastCDC reuses 125,726 / 131,073 bytes (95.92%); fixed 8,192-byte blocks reuse none. This is an alignment demonstration, not a matched-distribution benchmark: the actual chunk-size distributions differ. The separate smaller-chunk case halves all three parameters to 1,024 / 4,096 / 32,768 B while keeping the file bytes unchanged.

The requested average is not an observed mean. For the unchanged per-file fixture, 152,072 / 24 gives about 6,336 B per chunk, not 8,192 B. In this implementation, the normalization transition is also not the requested average: its center_size calculation gives 5,120 B for the baseline. Reproducing boundaries therefore requires the implementation variant and its Gear table, not just the name FastCDC and three size parameters.[6]

A minimum size is not permission to discard the tail

The 31-byte control produces one 31-byte chunk despite the 2,048-byte minimum. The empty input produces no chunks, so its reuse fraction is undefined, not a failed 0% reuse result. The all-zero control produces lengths 65,536, 65,536 and 1 B. These are observations of the pinned API on byte inputs, not a claim about every FastCDC implementation or empty-file API.

Dropping the final chunk would discard the entire tiny file and one byte of the zero control. Excluding tails may be appropriate for a specifically defined distribution study, but an all-input reuse measure must account for those bytes. The result records sub-minimum terminal chunks separately. A chunk whose length equals the maximum is counted by length only; that alone does not prove why its boundary was selected.

The numerator sums the lengths of candidate chunks that are byte-for-byte equal to any baseline chunk. Repeated candidate occurrences each count, but a duplicate found only within the candidate does not. SHA-256 identifies inputs and manifests; it is not used as a substitute for byte equality. Ten regression tests check framing, complete reconstruction, denominators, empty inputs and terminal tails. No timing or statistical uncertainty estimate is attached to these exact, deterministic cases.

Reproduce with the experiment code,tests,pinned dependencies and run instructions. The full JSON result includes all input hashes, chunk offsets, lengths and terminal flags. This verifies mechanism and accounting; it does not establish real-world savings, backup throughput, restore latency or security.

Why repeated bytes can defeat the target chunk size

Hesela extended the zero control to all 256 possible byte values. Each value forms its own 131,073-byte input, using the same unmodified Python API and 2,048 / 8,192 / 65,536 B parameters. For 255 inputs, the output is two 65,536-byte chunks and a one-byte tail. Repeated 0x5D (ASCII ]) instead produces 63 chunks of 2,070 B and a 663-byte tail. Every returned byte is checked against the input. [8]

Complete set of 256 constant-byte fixtures. Counts describe this input class, not prevalence in stored data.
Inputs / 256 fixturesChunk lengths
0x5D only
1 / 256 fixtures
63 x 2,070 B
663 B tail
All other byte values
255 / 256 fixtures
2 x 65,536 B
1 B tail

The cause is visible in this implementation's recurrence: for a repeated byte with Gear-table value g, it updates p = (p >> 1) + g, starting at zero for each chunk. An independent derivation gives p(t) = 2g - ceil(2g / 2^t). Once settled, the state is 2g - 1, which is odd. Both boundary masks test the lowest bit, so that settled state cannot pass either zero-mask test. The byte no longer supplies a fresh chance of a boundary at every position.

The exception occurs before settling: 0x5D passes the early mask on update 22, yielding 2,048 + 22 = 2,070 B per complete chunk. The other 255 transient sequences do not pass. All settle before the 5,120 B normalization transition, and the later mask cannot rescue them. The harness predicts these outcomes from the closed form, then compares them with the library's full scan. Thus the maximum-length cuts have an explained cause, not just a matching length.

Do not substitute the paper's recurrence. Xia and colleagues describe a left shift with finite-width arithmetic; the pinned Python variant above uses a right shift. Gear table, shift direction, integer behavior and mask placement are part of the algorithm's identity. A requested average alone cannot reproduce its boundaries. [2, sections 3-4] [6]

LBFS already documented missing natural breakpoints in long zero extents and the need for forced boundaries. This new test identifies a specific mechanism and one transient exception in a different implementation; it does not establish a defect in every CDC algorithm. Repetitive content may still deduplicate or compress well. Use it as a correctness and distribution control alongside representative versioned inputs, not as a throughput or savings benchmark. [1, section 3.1.2]

Download the 256-fixture results, experiment, tests and reproduction instructions. The source hashes are pinned, terminal chunks are retained, and no timing was measured. Corpus: Gear hash.

Equal entropy, different RAM boundaries

Changing byte values without changing which substrings repeat can still change a content-defined partition. Hesela replayed the unmodified optimized RAM implementation at revision 06e9a82 on two constructed 1 MiB streams. With horizon 327 B and no maximum-size wrapper, one produces 1,757 chunks; its bytewise complement produces 3,197, an increase of 81.96%. These are exact finite-input observations, not a sample of backup workloads. [11]

The first input contains 1,046 bytes of value 255 among 1,047,530 zeros. The second applies XOR 255 to every byte. This bijection preserves substring equality within each stream and their zero-order empirical entropy, about 0.01138 bits/byte. It does not preserve equality between the two streams. RAM's prefix-maximum comparison depends on byte ordering, which the transformation reverses. [10]

Derived from the frozen native results. Each input is 1,048,576 B; optimized RAM, horizon 327 B, no cap. All chunks, including the terminal chunk, count toward the mean.
Constructed inputObserved partition
Rare high marker1,757 chunks
Mean 596.799 B
Largest 4,745 B; tail 745 B
Bytewise complement3,197 chunks
Mean 327.987 B
Largest 329 B; tail 283 B
Uniform-like control1,940 chunks
Mean 540.503 B
Largest 1,831 B; tail 137 B

The uniform-like control is deterministic SHA-256-derived data, not an asserted IID draw. Slice access and 4,096-byte streaming access produce identical partitions for these inputs. A separate 1,308 B cap changes the rare-high input to 2,095 chunks: forced cuts reset state and define a different experiment. The retained 120 observations include both variants, cap controls, small inputs and EOF behavior. [11]

Chunk occurrences are not unique stored objects. These counts alone establish neither physical capacity saved nor a deduplication ratio. Compression, chunk identity, index metadata and packing still need their own accounting. No throughput or production-backup result is inferred.

Calibrate the rule that actually runs

The 2024 comparison uses a mean-success approximation for RAM; the separately numbered 2026 paper distinguishes that shortcut from averaging waiting times conditional on the prefix maximum. Under its unbounded uniform-IID model, horizon 327 predicts about 543.580 B, while the shortcut gives 511.948 B. This is the authors' analytical distinction, not a new Hesela discovery or a reproduction of their throughput experiments. [3, IV-C] [9, IV-C and Appendix B]

For an ordered IID alphabet, write F_j for cumulative symbol probability and F_-1 = 0. A prefix of length h has maximum j with probability F_j^h - F_(j-1)^h. The next byte reaches that maximum with probability 1 - F_(j-1). Applying the same conditioning argument gives:

E[L] = h + sum_j (F_j^h - F_(j-1)^h) / (1 - F_(j-1))

Omit zero-mass terms and include the matching byte. For an ideal two-symbol source with high-symbol probability 1/1024 and h = 327, the calculation gives 607.772 B; reversing the probabilities gives 328.001 B. Those model expectations are separate from the realized finite means above.

The pinned library also has two boundary conventions. At parameter 4, the nine-byte input 00 00 00 00 FF 00 00 00 FF produces lengths [9] in its verbose variant but [5, 4] in its optimized variant. Their effective prefixes are five and four bytes respectively. Record the exact variant; this test does not identify which invocation produced a historical benchmark result. [10] [11]

Download the complete observations, derived table, replay instructions and reproduction package. The package includes the Python driver, Rust harness, tests, source manifest and retained results; upstream source is fetched separately at the pinned hash.

Chunk-count tails can hide byte exposure

In the same rare-high partition, only 183 of 1,757 chunks (10.42%) exceed 1,308 B. Yet those chunks contain 403,857 of 1,048,576 input bytes (38.51%). The threshold is the cap already tested, four times the 327 B horizon. Counting chunks and counting bytes answer different questions. [13]

Select a chunk occurrence uniformly and its mean is 596.799 B. Select a logical input byte uniformly and the mean length of its enclosing chunk is 1,274.469 B. Longer chunks contain more selectable bytes. For positive lengths l_i, this second mean is sum(l_i squared) / sum(l_i). This finite counting identity requires no IID assumption; Sigman gives the corresponding discrete size-biased distribution. [12, equations 3-4]

Six finite synthetic partitions: optimized pinned RAM, horizon 327 B, 1,048,576 B per input, all terminal chunks retained. Byte counts describe logical occurrences, not unique stored payloads.
Input and chunk samplingByte sampling and long chunks
Rare high marker
Cap: none
1,757 chunks
Mean/chunk: 596.799 B
Mean seen by a byte: 1274.469 B
Chunks >1,308 B: 183 / 1,757
Bytes in them: 403,857 / 1,048,576
Rare high marker
Cap: 1,308 B
2,095 chunks
Mean/chunk: 500.514 B
Mean seen by a byte: 724.467 B
Chunks >1,308 B: 0 / 2,095
Bytes in them: 0 / 1,048,576
Bytewise complement
Cap: none
3,197 chunks
Mean/chunk: 327.987 B
Mean seen by a byte: 327.989 B
Chunks >1,308 B: 0 / 3,197
Bytes in them: 0 / 1,048,576
Bytewise complement
Cap: 1,308 B
3,197 chunks
Mean/chunk: 327.987 B
Mean seen by a byte: 327.989 B
Chunks >1,308 B: 0 / 3,197
Bytes in them: 0 / 1,048,576
Uniform-like control
Cap: none
1,940 chunks
Mean/chunk: 540.503 B
Mean seen by a byte: 637.344 B
Chunks >1,308 B: 29 / 1,940
Bytes in them: 42,791 / 1,048,576
Uniform-like control
Cap: 1,308 B
1,949 chunks
Mean/chunk: 538.007 B
Mean seen by a byte: 626.046 B
Chunks >1,308 B: 0 / 1,949
Bytes in them: 0 / 1,048,576

The byte tail counts all bytes inside long chunks, not just bytes beyond 1,308 B. The existing cap changes the rare-high input to 2,095 chunks and lowers the byte-selected mean to 724.467 B. These are separately generated native partitions: a forced cut resets the chunker, so clipping the old lengths would lose bytes and would not recover the new partition. Removing this tail is not a demonstrated net improvement. [13] [14]

For a small exact illustration, lengths [1, 9] average 5 B per occurrence but 8.2 B for the chunk containing a random byte. Half the chunks exceed 5 B, yet they contain 90% of the bytes. The equal-mean partition [5, 5] has neither gap.

This is not measured read amplification, restore latency or edit amplification. Real accesses need not be uniform over logical bytes, and one-byte edits can move later boundaries. The supplementary IID model gives 1,421.269 B for its rare-high byte-selected mean; it is a separate model, not the finite native result or an estimate of a field workload.

Report both the fraction of chunks beyond a stated length and the fraction of logical bytes inside them, alongside the cap, framing, terminal-tail policy and duplicate-counting convention. Exact ratios, both p99 conventions and the separate model are in the byte-exposure JSON. The replay instructions and reproduction package include the frozen parent evidence, calculation and exhaustive controls.

The rolling fingerprint is not the chunk ID

Restic documents Rabin-based chunk boundaries and separate SHA-256 references for the resulting plaintext blobs. Its repository format also has encrypted pack files and authentication. These are distinct layers; a boundary condition should not be reused as evidence that two entire chunks are identical. [4]

Likewise, our four-byte example uses direct equality, not a hash. It demonstrates an alignment effect without assuming collision resistance. Neither the example nor the reviewed speed tests establish protection against corruption or an adversary. Those require a separate threat model and implementation review.

What exactly does a content address identify?

Content-addressed storage retrieves a representation by an identifier derived from it. Chunking selects that representation's boundaries; naming and physical placement remain separate choices. Venti's 2002 design used block fingerprints for lookup, duplicate coalescing and verification. Its historical SHA-1 assumptions should not be read as current cryptographic advice. [Venti, sections 3-3.1]

Venti's lookup key also included an 8-bit type supplied by the client. The server used the type alongside the fingerprint, but did not interpret the associated data format. Thus the fingerprint alone was not the complete lookup key, and accepting a typed reference was not a schema check. This is a Venti design detail, not a requirement for all content-addressed stores. [Venti, section 7]

Git makes the representation boundary concrete: a blob ID hashes a header containing the type and byte length, a NUL byte, and the payload. A tree separately includes entry names, modes and object IDs. [Git object storage] The following native demonstration uses git hash-object --no-filters --stdin and git mktree in a temporary SHA-256 repository. [Filter and object-type controls]

Seven designed cases on git version 2.43.0. IDs below show only their first 16 hexadecimal characters; verification compares the complete values. Byte counts exclude object headers.
ChangePayload bytesBlob ID prefixTree ID prefix
Original62cf8d83d9ee2954362f480058b591ed0
Exact repeat62cf8d83d9ee2954362f480058b591ed0
Renamed entry62cf8d83d9ee29543855ea5b9c47542a6
Executable entry62cf8d83d9ee29543cac358ea2329f7b7
Changed byte666224663d23e6f4d7e5d8053c62d2419
Empty payload0473a0f4c3be8a93698de2571be8627c9
Binary payload57ce968278f61825fc2a360a17e8b0f7c

The rename and executable-mode cases retain the original blob ID but change the tree ID. The altered-byte case changes both. In all seven cases, hashing bare payload bytes differs from Git's framed blob hash, including the empty and binary controls. The harness reads back blob and tree bytes and checks independent framing calculations. These are exact constructed examples, not collision-rate estimates, storage benchmarks or crash tests.

Complete results, native replay harness, regression controls and reproduction instructions.

A CID provides another explicit representation: binary CIDv1 carries version, codec and multihash fields. Its multibase prefix belongs only to the text encoding, so unequal text strings can encode the same binary CID. CIDv0 instead leaves version and codec implicit. [CID specification]

For a chunked IPFS file, the root CID generally identifies an encoded graph node, not the bare whole-file digest. Chunking, graph layout and codec choices can change the root while the file bytes stay equal. For a file represented by one raw block, the CID's digest component can equal the whole-file hash; the complete CID still carries identifying metadata. [Import settings] This CID comparison is documentation-based; the Git fixture does not run IPFS.

Finally, keeping an identifier does not keep its data. Pinning protects against garbage collection on the chosen IPFS node; retained copies and reachable providers still matter. [Persistence] As an engineering consequence, recovery needs both a trusted expected identifier and a way to obtain every required object. Naming alone does not authenticate the identifier's publisher.

Copied backups can carry incompatible chunk boundaries

Restic's repository-copy documentation gives a practical consequence: copying snapshots between repositories with different chunker parameters can undermine deduplication between their snapshots. For a newly initialized destination it documents --copy-chunker-params; existing repository parameters cannot be changed in place. Copying is also a read-and-write transfer under different encryption keys, not a free server-side move. [5]

Our inference is broader than that one tool: record the chunker version, parameters and file-framing rule when comparing two backup histories. A changed chunk layout can change the reusable units even when the underlying file bytes are identical. Do not infer corruption from lower reuse alone.

What a useful evaluation should report

Hesela's proposed protocol records input hashes, version history, insert/delete operations, min/target/max lengths, algorithm revision, compiler and CPU, and whether deduplication state is cold or already populated. Measure chunking CPU time separately from content hashing, index lookup, compression and storage I/O.

Report the observed size distribution and fraction of chunks forced by limits, not just a requested average. Report reused logical bytes and physical stored bytes with explicit denominators. Restore time remains a separate test. Include tiny files, repetitive data and end-of-file tails as correctness cases.

No CDC throughput benchmark was run for this article. The fixed-boundary illustration and pinned-library experiment establish their stated synthetic byte-grouping results, not a current-product ranking or reproduction of paper results.

Corpus: content-defined chunking, FastCDC, rolling hash and deduplication.

Primary sources

  1. Athicha Muthitacharoen, Benjie Chen and David Mazieres. A Low-bandwidth Network File System. SOSP 2001, sections 3.1.1-3.1.3.
  2. Wen Xia, Yukun Zhou, Hong Jiang, Dan Feng, Yu Hua, Yuchong Hu, Yucheng Zhang and Qing Liu. FastCDC: A Fast and Efficient Content-Defined Chunking Approach for Data Deduplication. USENIX ATC 2016, pp. 101-114, sections 4-5.
  3. Marcel Gregoriadis, Leonhard Balduf, Bjorn Scheuermann and Johan Pouwelse. A Thorough Investigation of Content-Defined Chunking Algorithms for Data Deduplication. arXiv:2409.06066v1, 2024, sections V-IX.
  4. Restic project. Design: Backups and Deduplication; repository format. Documentation displayed as version 0.19.1.
  5. Restic project. Working with repositories: Ensuring deduplication for copied snapshots. Documentation displayed as version 0.19.1.
  6. ISCC. fastcdc-py 1.7.0: pure-Python chunk generator, cdc_offset and center_size.
  7. Hesela. Deterministic FastCDC framing experiment: complete results and chunk manifests.
  8. Hesela. Repeated-byte FastCDC experiment: 256 constant-byte fixtures, exact reconstruction and independent recurrence checks.
  9. Gregoriadis, Balduf, Scheuermann and Pouwelse. Benchmarking Content-Defined Chunking Algorithms for Data Deduplication. arXiv:2610.13704v1, 2026, section IV-C and Appendix B.
  10. cdchunking-rs, revision 06e9a82f7e6575b47aeefcc005ed5a3393a79ff6: RAMChunker and MaybeOptimizedRAMChunker.
  11. Hesela. Native RAM boundary experiment: 120 observations, source hashes, complete chunk lengths and analytical controls.
  12. Karl Sigman. Batch arrivals (2009), page 2, equations 3-4: discrete size bias and the second-moment ratio.
  13. Hesela. Exact byte-weighted exposure derived from six frozen RAM partitions, with a separate IID model.
  14. cdchunking-rs, revision 06e9a82f7e6575b47aeefcc005ed5a3393a79ff6: SizeLimited cap and reset behavior, src/lib.rs lines 452-504.
  15. Git Book: Git Objects, object storage and tree entries
  16. git-hash-object: object types, stdin and filter controls
  17. IPFS CID specification: binary fields, string representations and CIDv0
  18. IPFS documentation: content addressing, root blocks and import parameters
  19. IPFS documentation: persistence, garbage collection and pinning
  20. Quinlan and Dorward. Venti: a new approach to archival storage. FAST 2002, sections 3 and 7.

RAM evidence captured 10 November 2026; byte-weighted synthesis added 11 November 2026; repeated-byte and framing experiments retain their October dates. The separately numbered 2024 and 2026 comparisons are each cited at version 1. Source works retain their own rights.

Published by Hesela team · Published · Updated

Report a correction · Editorial standards · Reuse guidance

Change history

: first published.

: latest recorded update. A detailed change note is not available for this revision.

New-publication RSS · Correction RSS

Cite this page
Hesela team. Content-defined chunking: boundaries are not identity. Hesela. 2026-11-18. https://hesela.com/analyses/content-defined-chunking-boundaries/