All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Justin Tobler <jltobler@gmail.com>
Cc: git@vger.kernel.org, Stefan Haller <lists@haller-berlin.de>
Subject: Re: [PATCH] odb/files: be less aggressive with geometric repacking
Date: Wed, 19 Aug 2026 06:52:25 +0200	[thread overview]
Message-ID: <aoU2iTmskL788erN@pks.im> (raw)
In-Reply-To: <aoTcxJSmKWNhnjZ9@denethor>

On Tue, Aug 18, 2026 at 05:34:54PM -0500, Justin Tobler wrote:
> On 26/08/12 07:44AM, Patrick Steinhardt wrote:
> > On Tue, Aug 11, 2026 at 03:44:12PM -0500, Justin Tobler wrote:
> > > Increasing the loose object threshold here to be more conservative seems
> > > like a reasonable approach. I'm not sure exactly why 6700 was chosen
> > > here. 6700 / 256 ~= 26.2 which means "objects/17/" would have to contain
> > > at least 27 objects before repacking is triggered. That is certainly
> > > much more conservative. I see that 6700 has also been chosen else where
> > > in the codebase as the threshold too. It might be nice to explain the
> > > reasoning a bit more in the commit message though.
> > 
> > Hmm, don't I already do that? In the paragraph you're responding to I'm
> > saying that git-gc(1) already had that default forever, so I'm adjusting
> > our heuristic to match that.
> 
> I think I was just curious as to why 6700 was the chosen number for
> git-gc(1) as well, but its probably just good to be consistent here. I
> think this patch is fine as is.

That's a good question. It has been introduced all the way back in
2c3c439947 (Implement git gc --auto, 2007-09-05), but that commit does
not mention any reasoning for the 6700 limit either.

Digging in history a bit surfaces this nugget [1]. So the limit was
chosen so that git-gc(1) would not trigger for a fully unpacked Git
v0.99, would trigger for v1.0, but not triggering when doing an
incremental gc after going from v0.99 to v1.0. This is of course quite
arbitrary, but as the mail points out, "[t]he default threshold is
arbitrarily set by yours truly" (Junio).

Patrick

[1]: https://lore.kernel.org/git/7vr6lcj2zi.fsf@gitster.siamese.dyndns.org/

      reply	other threads:[~2026-08-19  4:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11  9:04 [PATCH] odb/files: be less aggressive with geometric repacking Patrick Steinhardt
2026-08-11 20:44 ` Justin Tobler
2026-08-12  5:44   ` Patrick Steinhardt
2026-08-18 22:34     ` Justin Tobler
2026-08-19  4:52       ` Patrick Steinhardt [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

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

  git send-email \
    --in-reply-to=aoU2iTmskL788erN@pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=jltobler@gmail.com \
    --cc=lists@haller-berlin.de \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.