Skip to content

Commit 56bfa27

Browse files
Lukas Pühringerjoshuagl
andauthored
TAP 15: Compare relative PEP 458 metadata overhead (#159)
Prior to this change we compared the overall metadata overhead of traditional and succinct hash bin delegation (hbd), using different numbers of bins optimized for each hashing scheme for a "fair" comparison. However, using different numbers makes it harder to understand the advantage of succinct hbd, i.e. no growth of the delegating metadata vs. linear growth with number of bins. This change focuses on the different sizes of the delegating targets metadata for the same number of bins to underline the advantage of succinct hbd. Background info: The optimum number of bins for a given number of target files varies between the two schemes, because in traditional hbd the positive effect of many bins is undermined by the huge size of the delegating metadata. Other changes include: - use a real world number of bins (PEP 458) instead of fictional - compare metadata overhead percentages instead of absolute numbers - perform keyid calcs with 64 instead of 32 bytes to match reference implementation - remove mention of inaccurate (32-bit) and not so relevant keyid size See #155 (comment) for initial discussion. Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu> Co-authored-by: Joshua Lock <jlock@vmware.com> Co-authored-by: Joshua Lock <jlock@vmware.com>
1 parent 6db0149 commit 56bfa27

1 file changed

Lines changed: 17 additions & 14 deletions

File tree

tap15.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,23 @@ succinct way will further reduce the metadata overhead.
103103
# Rationale
104104

105105
A succinct description of hash bin delegation in the delegating metadata
106-
can significantly reduce the client's metadata overhead. This is
107-
achieved by listing properties common to all bins only once, and by
108-
providing the necessary information to the client to compute which bin
109-
is responsible for the desired target and how the corresponding bin
110-
metadata is named.
111-
112-
For a repository with 50,000,000 target files using the existing hashed
113-
bin delegation technique with a number of bins of 2,048 and 32-bit
114-
keyids the snapshot and targets metadata overhead would be around
115-
1,600,000 bytes for each target. Using succinct hashed bin delegations,
116-
the snapshot and targets metadata overhead for a target can be reduced
117-
to about 550,000 bytes. For more detail about how these overheads were
118-
calculated, see [this
119-
spreadsheet](https://docs.google.com/spreadsheets/d/10AKDsHsM2mmh45CWCNFxihJ9f-SP6gXYv7WcWpt-fDQ/edit#gid=0).
106+
can significantly reduce the client's metadata overhead. This is achieved
107+
by listing properties common to all bins only once, and by providing the
108+
necessary information to the client to compute which bin is responsible
109+
for the desired target and how the corresponding bin metadata is named.
110+
As a consequence the size of the delegating metadata remains constant, as
111+
opposed to traditional hash bin delegation, where it grows linearly with
112+
the number of bins.
113+
114+
For a real-world repository, as described in PEP 458, with 2M target
115+
files distributed over 16K bins, the delegating metadata would grow by
116+
1.25 MB when using traditional hash bin delegation, and impose a
117+
per-package TUF metadata overhead of 69% on new users (see V10 and V17 in
118+
[PEP 458 - Metadata
119+
Scalability](https://peps.python.org/pep-0458/#metadata-scalability)).
120+
When using succinct hash bin delegation, on the other hand, the
121+
delegating metadata would not grow and the per-package metadata
122+
overhead can be reduced to 9%.
120123

121124
# Specification
122125

0 commit comments

Comments
 (0)