git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Daniel Koverman <dkoverman@predictiveTechnologies.com>,
	Junio C Hamano <gitster@pobox.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>,
	Nasser Grainawi <nasser@codeaurora.org>
Subject: Re: Why does send-pack call pack-objects for all remote refs?
Date: Mon, 14 Dec 2015 17:37:18 -0500	[thread overview]
Message-ID: <20151214223717.GA20167@sigill.intra.peff.net> (raw)
In-Reply-To: <20151214223155.GA6594@google.com>

On Mon, Dec 14, 2015 at 02:31:55PM -0800, Jonathan Nieder wrote:

> > I suspect there's room for improvement in the way we select commits to
> > store bitmaps for (so that the average walk is smaller). But it's rather
> > tricky; there's not a single constant to change to make it work better.
> 
> Git gc and JGit GC differ here.  JGit partitions the commits being
> packed by branch and then runs a selection algorithm on each part.
> Git runs a selection once on a list of all commits.
> 
> Some effects:
> - JGit selects more bitmaps, so the gc takes longer and the resulting
>   bitmap file is larger (bad)
> - JGit is more likely to have bitmaps for the commits involved in
>   pushes and fetches (good)
> 
> The commit selection code, for reference:
> 
> https://eclipse.googlesource.com/jgit/jgit/+/86af34e1/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java#151
> https://kernel.googlesource.com/pub/scm/git/git/+/ed1c9977/pack-bitmap-write.c#383
> 
> Thoughts?

My thought is it would be great if somebody wanted to work on this. :)

My understanding is that JGit's approach has some problems, too. Terry's
message doesn't seem to have made it to the list, but you can see in the
quoted bits he mentions some OOM problems during the bitmap write:

  http://article.gmane.org/gmane.comp.version-control.git/281476

That may not be a big deal to work around. I really just haven't looked
at it at all. Vicent did the original bitmap selection code for C Git,
and I don't think it has been touched since then.

-Peff

      reply	other threads:[~2015-12-14 22:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-07 21:02 Why does send-pack call pack-objects for all remote refs? Daniel Koverman
2015-12-07 22:41 ` Junio C Hamano
2015-12-07 22:57   ` Jeff King
2015-12-08 17:34     ` Daniel Koverman
2015-12-10  4:19       ` Jeff King
2015-12-12  4:15         ` Nasser Grainawi
2015-12-14 13:47         ` Daniel Koverman
2015-12-14 21:04           ` Jeff King
2015-12-14 22:31             ` Jonathan Nieder
2015-12-14 22:37               ` Jeff King [this message]

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=20151214223717.GA20167@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=dkoverman@predictiveTechnologies.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=nasser@codeaurora.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).