Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repo-compress: reduce memory consumption #8543

Merged

Conversation

ThomasWaldmann
Copy link
Member

Worst (but frequent) case here is that all or most of the chunks in the repo need to get recompressed, thus storing all chunk ids in a python list would need significant amounts of memory for large repositories.

We already have all chunk ids stored in cache.chunks, so we now just flag the ones needing re-compression by setting the F_COMPRESS flag (that does not need any additional memory).

Worst (but frequent) case here is that all or most of the chunks
in the repo need to get recompressed, thus storing all chunk ids
in a python list would need significant amounts of memory for
large repositories.

We already have all chunk ids stored in cache.chunks, so we now just
flag the ones needing re-compression by setting the F_COMPRESS flag
(that does not need any additional memory).
Copy link

codecov bot commented Nov 15, 2024

Codecov Report

Attention: Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.79%. Comparing base (295f4e3) to head (f7dea6e).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/borg/archiver/repo_compress_cmd.py 91.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8543   +/-   ##
=======================================
  Coverage   81.79%   81.79%           
=======================================
  Files          74       74           
  Lines       13290    13291    +1     
  Branches     1956     1957    +1     
=======================================
+ Hits        10870    10871    +1     
  Misses       1756     1756           
  Partials      664      664           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ThomasWaldmann ThomasWaldmann merged commit c92d528 into borgbackup:master Nov 15, 2024
16 checks passed
@ThomasWaldmann ThomasWaldmann deleted the repo-compress-use-flags branch November 15, 2024 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant