[HOTFIX] Low-priority maintenance, delta computations#1179
Merged
derrickstolee merged 3 commits intomicrosoft:releases/shippedfrom May 20, 2019
Merged
Conversation
In an effort to have fewer complaints for running things in the background, give background Git commands a lower process priority.
Makes it more clear what is going on. Signed-off-by: Derrick Stolee <[email protected]>
When running 'git multi-pack-index repack', we are setting two
config options intended to speed up the underlying 'git pack-objects'
command:
pack.delta=0 (default is 50)
pack.window=0 (default is 10)
These were inserted to prevent the delta calculations from taking over
a user's processor during a background operation. When packing the
from-loose packs, this can become an expensive operation.
However, this came with a significant downside, due to my
misunderstanding of how these options work. When repacking the (already
nicely-packed) prefetch packs, these options force deltified trees
to become un-deltified. This means the resulting pack can be larger
than the given batch size.
To prevent losing these good deltas, drop these config options and
instead use pack.threads=1 to prevent multiple threads from taking
over the machine. In combination with the recent lower-priority git
processes, this should keep the background repack from disrupting
users, but will also keep our pack directory small.
In my testing, I used the Windows repository and ran the packfile
maintenance step with a batch size of "100m" instead of "2g". This
allowed me to run it with my real data, which was currently in a
state where "2g" would do nothing.
Before: 588m pack, repack took 50s
After: 80m pack, repack took 28s*
The fact that the repack sped up is possibly related to writing
less data to disk. I would expect this to slow down in some cases.
This expansion of deltas explains why users running the packfile
maintenance step directly have a higher than expected steady-state.
We are not-optimally repacking the data.
Signed-off-by: Derrick Stolee <[email protected]>
jrbriggs
approved these changes
May 20, 2019
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.
This includes two changes in/against master:
#1157 : Run git operations at a lower prioirity
#1178 : compute deltas while running packfile maintenance.