Skip to content

Conversation

@sluongng
Copy link
Contributor

Scalar has already been managing multiple pack files situation with
multi-pack-index. This means that adding packs to the git repo is
relatively low cost.

Reducing fetch.unpackLimit to 1 (from default value of 100) assures
that all the fetch will store transferred pack as-is on disk, instead
of spending computation to unpack data into loose objects. This
should make fetching a little bit faster for large fetch that could
be unpacked into many objects (i.e. 99 objects since the default ).
These objects, instead of being unpacked and written onto disk, is then
kept as packfile and get consolidated with incremental repack step using
multi-index-pack.

On a busy repo, this potentially might make incremental repack with
multi-pack-index works a bit harder. But I think this worth the
computation trade-off as this is a cost we pay at the background
maintenance, and it allows fetches to run faster to keep the repo
up-to-date.

Scalar has already been managing multiple pack files situation with
multi-pack-index. This means that adding packs to the git repo is
relatively low cost.

Reducing `fetch.unpackLimit` to 1 (from default value of 100) assures
that all the fetch will store transferred pack as-is on disk, instead
of spending computation to unpack data into loose objects. This
should make fetching a little bit faster for large fetch that could
be unpacked into many objects (i.e. 99 objects since the default ).
These objects, instead of being unpacked and written onto disk, is then
kept as packfile and get consolidated with incremental repack step using
multi-index-pack.

On a busy repo, this potentially might make incremental repack with
multi-pack-index works a bit harder. But I think this worth the
computation trade-off as this is a cost we pay at the background
maintenance, and it allows fetches to run faster to keep the repo
up-to-date.
@sluongng
Copy link
Contributor Author

cc: @derrickstolee

Copy link
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reasoning sounds good to me, and the patch looks obviously correct. Thank you!

Copy link
Contributor

@derrickstolee derrickstolee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I did not know about this config option, so this is an excellent improvement. The loose object step would clean these up eventually, but better to save time and keep the pack from the server.

@derrickstolee derrickstolee merged commit e5b14a4 into microsoft:master Apr 20, 2020
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.

3 participants