reduce memory consumption of files cache, fixes #5756#8511
Merged
ThomasWaldmann merged 2 commits intoborgbackup:masterfrom Nov 1, 2024
Merged
reduce memory consumption of files cache, fixes #5756#8511ThomasWaldmann merged 2 commits intoborgbackup:masterfrom
ThomasWaldmann merged 2 commits intoborgbackup:masterfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8511 +/- ##
==========================================
+ Coverage 81.43% 81.75% +0.32%
==========================================
Files 73 73
Lines 13108 13139 +31
Branches 1924 1926 +2
==========================================
+ Hits 10674 10742 +68
+ Misses 1769 1740 -29
+ Partials 665 657 -8 ☔ View full report in Codecov by Sentry. |
- refactor packing/unpacking of fc entries into separate functions - instead of a chunks list entry being a tuple of 256bit id [bytes] and 32bit size [int], only store a stable 32bit index into kv array of ChunkIndex (where we also have id and size [and refcount]). - only done in memory, the on-disk format has (id, size) tuples. memory consumption (N = entry.chunks list element count, X = overhead for rest of entry): - previously: - packed = packb(dict(..., chunks=[(id1, size1), (id2, size2), ...])) - packed size ~= X + N * (1 + (34 + 5)) Bytes - now: - packed = packb(dict(..., chunks=[ix1, ix2, ...])) - packed size ~= X + N * 5 Bytes
5c34c21 to
26bb782
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
only store a stable 32bit index into kv array of ChunkIndex (where we also have id and
size [and refcount]).
memory consumption (N = entry.chunks list element count, X = overhead for rest of entry):