Clusters: speedup repositories restore #232
Merged
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.
We now rsync once per cluster node available instead of rsyncing each
Git repository individually.
Some simple benchmarks restoring a snapshot with 1183 repositories (13 GiB):
The old implementation is able to restore ~1 repo/s so restoring backup
snapshots with a large number of repositories and a fast network will benefit
the most from this.
Here's the time it takes to restore 8K repositories (~800 MiB), all of them
very similar in size (100K, with a single README file added):
In clusters with more than 3 Git server nodes, backup-utils 2.6.1 also
restores the repositories to all the Git server nodes available. Only three
copies of a Git repository are necessary so this patch also fixes that,
speeding things up and optimizing disk usage.
/cc @github/backup-utils