git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: David Turner <David.Turner@twosigma.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: slow object packing during push
Date: Mon, 15 Mar 2021 16:00:48 +0000	[thread overview]
Message-ID: <d23fa1d9c0a24241a1b9fe33744cf7eb@exmbdft7.ad.twosigma.com> (raw)
In-Reply-To: 87eegohvwi.fsf@evledraar.gmail.com

On 3/9/21 9:14 PM, Ævar Arnfjörð Bjarmason wrote:
> On Tue, Mar 09 2021, David Turner wrote:
>
>> I have a large, funny repository that has very slow pushes unless I
>> set pack.usebitmaps=false to false.
> Good to see you on-list again! :)

Thanks!

>> First, a description of the repo: it's about 175GB, and was created by combining about 40,000 smaller repositories.  Historically, these repos were submodules of one meta repository[2].  I have stitched together the submodules, and this is the repository in which the stitching was done - that is, it contains all of the objects from the smaller repos, plus all of the objects from the meta repository, plus the newly-created trees & commits for the stitched repositories.  As new commits come into the meta repository (which have gitlinks to new submodule commits), we fetch from the meta repository (8s - it would be 2s if we were fetching into a normal clone without all of the other stuff), and the submodules (up to 10s per and embarrassingly parallel). Then we stitch (~0s), and push to the stitched "unity" repository (~2 minutes!!!).  The entire repo fits in RAM (yes, all 175G) and is in fact in the disk cache (I prewarmed the cache before testing anything).  
>>
>> The vast majority of the time appears to be spent in git pack-objects, and in particular in the stack trace in [1].  If I set pack.usebitmaps=false, the push only takes 10s.   This seems like pack bitmaps are a severe pessimization for my purposes.  This is true even immediately after a repack (that is, almost all of the objects are in one giant pack, except the newly-fetched ones).  I also tried setting up pack islands - one for each smaller repo, one for the stitched commits, and one for commits from the meta repo.  I'm not sure if this is necessary, but it's definitely not sufficient (my current config has it turned on, because I didn't feel like repacking again after testing it, and I tested it before testing pack.usebimaps). 
>> [snip]
> Without having carefully re-read it, I believe this issue is the same as
> what I reported here in 2019, and I think you'll find the resulting
> discussion intresting:
> https://lore.kernel.org/git/87zhoz8b9o.fsf@evledraar.gmail.com/
>
> Having skimmed it, I think you're probably omitting that this is a bare
> repo you're pushing from, and thus you're running into the combination
> of repack.writeBitmaps being true by default on bare repos, and
> pack.useBitmaps being true everywhere (but having no effect by default
> unless you have a bare repo, unless you manually make bitmaps blah
> blah).
>
> One of the semi-conclusions from the above thread was that we mostly
> turned this on thinking that bare ~= server that accepts pushes, and
> bitmaps are known to be worse (but not always!) for when you're pushing
> *from* your repo.

Thanks, that does explain it.  We should probably consider a default
that bitmaps aren't used on pushes.


  reply	other threads:[~2021-03-15 16:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09 20:54 slow object packing during push David Turner
2021-03-09 21:14 ` Ævar Arnfjörð Bjarmason
2021-03-15 16:00   ` David Turner [this message]
2021-03-16  8:40     ` Ævar Arnfjörð Bjarmason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d23fa1d9c0a24241a1b9fe33744cf7eb@exmbdft7.ad.twosigma.com \
    --to=david.turner@twosigma.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).