From: Junio C Hamano <gitster@pobox•com>
To: worley@alum•mit.edu (Dale R. Worley)
Cc: git@vger•kernel.org
Subject: Re: What happens when the repository is bigger than gc.autopacklimit * pack.packSizeLimit?
Date: Wed, 27 Aug 2014 13:52:31 -0700 [thread overview]
Message-ID: <xmqqa96pd59s.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <201408271936.s7RJarOh011358@hobgoblin.ariadne.com> (Dale R. Worley's message of "Wed, 27 Aug 2014 15:36:53 -0400")
worley@alum•mit.edu (Dale R. Worley) writes:
> builtin/gc.c:
> static int too_many_packs(void)
> {
> struct packed_git *p;
> int cnt;
>
> if (gc_auto_pack_limit <= 0)
> return 0;
>
> prepare_packed_git();
> for (cnt = 0, p = packed_git; p; p = p->next) {
> if (!p->pack_local)
> continue;
> if (p->pack_keep)
> continue;
> /*
> * Perhaps check the size of the pack and count only
> * very small ones here?
> */
> cnt++;
> }
> return gc_auto_pack_limit <= cnt;
> }
>
> Yes, perhaps you *should* check the size of the pack!
>
> What is a good strategy for making this function behave as we want it to?
Whoever decides the details of "as we want it to" gets to decide
;-).
I think what we want is a mode where we repack only loose objects
and "small" packs by concatenating them into a single "large" one
(with deduping of base objects, the total would become smaller than
the sum), while leaving existing "large" ones alone. Daily
repacking would just coalesce new objects into the "current" pack
that grows gradually and at some point it stops growing and join the
more longer term "large" ones, until a full gc is done to optimize
the overall history traversal, or something.
But if your definition of the boundary between "small" and "large"
is unreasonably low (and/or your definition of "too many" is
unreasonably small), you will always have the problem you found.
next prev parent reply other threads:[~2014-08-27 20:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 19:36 What happens when the repository is bigger than gc.autopacklimit * pack.packSizeLimit? Dale R. Worley
2014-08-27 19:47 ` Jeff King
2014-08-29 15:38 ` Dale R. Worley
2014-08-29 18:47 ` Jeff King
2014-08-29 18:54 ` Dale R. Worley
2014-08-27 20:52 ` Junio C Hamano [this message]
2014-08-29 15:47 ` Dale R. Worley
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=xmqqa96pd59s.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=worley@alum$(echo .)mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox