From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "Duy Nguyen" <pclouds@gmail.com>,
"John Keeping" <john@keeping.me.uk>,
"Дилян Палаузов" <dilyan.palauzov@aegee.org>,
"Git Mailing List" <git@vger.kernel.org>
Subject: Re: git pull & git gc
Date: Wed, 18 Mar 2015 19:27:46 -0700 [thread overview]
Message-ID: <CAPc5daWmppS_PrvMurEUfvZ2c_bhMnLb-zmck0wzFpgJ4maxZw@mail.gmail.com> (raw)
In-Reply-To: <20150319012722.GA26867@peff.net>
On Wed, Mar 18, 2015 at 6:27 PM, Jeff King <peff@peff.net> wrote:
>
> Keeping a file that says "I ran gc at time T, and there were still N
> objects left over" is probably the best bet. When the next "gc --auto"
> runs, if T is recent enough, subtract N from the estimated number of
> objects. I'm not sure of the right value for "recent enough" there,
> though. If it is too far back, you will not gc when you could. If it is
> too close, then you will end up running gc repeatedly, waiting for those
> objects to leave the expiration window.
>
> I guess leaving a bunch of loose objects around longer than necessary
> isn't the end of the world. It wastes space, but it does not actively
> make the rest of git slower (whereas having a large number of packs does
> impact performance). So you could probably make "recent enough" be "T <
> now - gc.pruneExpire / 4" or something. At most we would try to gc 4
> times before dropping unreachable objects, and for the default period,
> that's only once every couple days.
We could simply prune unreachables more aggressively, and it would
solve this issue at the root cause, no?
We do keep things reachable from reflogs, so the only thing you are
getting by leaving the unreachables around is for an expert to perform
some forensic analysis---especially if there are so many loose objects
that are all unreachable, nobody sane can go through them one by one
and guess correctly if each of them is what they wished they kept if
their ancient reflog entry extended a few weeks more.
That is, unless there is some tool to analyse the unreachable loose
objects, collect them into meaningful islands, and present them in
some way that the end user can make sense of, which I do not think
exists (yet).
next prev parent reply other threads:[~2015-03-19 2:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-18 13:53 git pull & git gc Дилян Палаузов
2015-03-18 14:16 ` Duy Nguyen
2015-03-18 14:23 ` Дилян Палаузов
2015-03-18 14:33 ` Duy Nguyen
2015-03-18 14:41 ` Duy Nguyen
2015-03-18 14:58 ` John Keeping
2015-03-18 21:04 ` Jeff King
2015-03-19 0:31 ` Duy Nguyen
2015-03-19 1:27 ` Jeff King
2015-03-19 2:01 ` Mike Hommey
2015-03-19 4:14 ` Jeff King
2015-03-19 4:26 ` Mike Hommey
2015-03-19 2:27 ` Junio C Hamano [this message]
2015-03-19 4:09 ` Jeff King
2015-03-19 4:15 ` Duy Nguyen
2015-03-19 4:20 ` Jeff King
2015-03-19 4:29 ` Duy Nguyen
2015-03-19 4:34 ` Jeff King
2015-03-19 9:47 ` Duy Nguyen
2015-03-18 14:48 ` Дилян Палаузов
2015-03-18 21:07 ` Jeff King
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=CAPc5daWmppS_PrvMurEUfvZ2c_bhMnLb-zmck0wzFpgJ4maxZw@mail.gmail.com \
--to=gitster@pobox.com \
--cc=dilyan.palauzov@aegee.org \
--cc=git@vger.kernel.org \
--cc=john@keeping.me.uk \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
/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 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 NNTP newsgroup(s).