Skip to content

Does Rustic use the same index structure as Restic? Has it been changed to improve memory management? #432

Answered by aawsome
preranaprabhu02 asked this question in Q&A
Discussion options

You must be logged in to vote

A bit more insight:

  • rustic uses a sorted array to store the index which it reads from the repository (and basically a hashmap for newly created index entries) whereas restic uses a hashmap for all index entries. As the stored index is static during a rustic run, the sorting needs to be done only at the beginning, is parallelized and therefore very fast. Storing in an array reduces the memory consumtion quite a lot. In theory using a sorted array, the access is slower for large indexes, but in practice it works really well without being a bottleneck.
  • rustic saves only the parts of the index in memory which is needed for the command to run. For instance, rustic backup only needs to know if…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@preranaprabhu02
Comment options

Answer selected by aawsome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #428 on February 16, 2023 06:43.