Skip to content

borg2: compact: can make better use of chunk size #9856

Description

@ThomasWaldmann

borg compact iterates over all archives, over all items in each archive. If an item has a chunks list, it processes the (id, size) list entries to determine which chunks are used.

It does not write the (plaintext) size information into the chunks index data structure yet, but only sums it up in total_size (resulting in the overall, not deduplicated file input size).

If we put size into the index also, we could easily compute the overall deduplicated (but uncompressed, unencrypted) size.

repository_size computes the overall deduplicated, compressed, encrypted size.

By comparing these 2, we could see the compression factor (and also the encryption and storage overhead).

By comparing the not deduplicated and the deduplicated value, we could see the deduplication factor.

All this comes at negligible cost and is easy to implement.

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions