From: Martin Fick <mfick@codeaurora.org>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Martin Fick <mfick@codeauror.org>, Git List <git@vger.kernel.org>
Subject: Re: [BUG?] gc and impatience
Date: Mon, 5 Aug 2013 12:45:07 -0600 [thread overview]
Message-ID: <201308051245.07995.mfick@codeaurora.org> (raw)
In-Reply-To: <CALkWK0=djXdPMOvk8359nOs=rGLbBepxyXnpELfWs+wjjN7YZw@mail.gmail.com>
On Monday, August 05, 2013 11:34:24 am Ramkumar Ramachandra
wrote:
> Martin Fick wrote:
> > https://gerrit-review.googlesource.com/#/c/35215/
>
> Very cool. Of what I understood:
>
> So, the problem is that my .git/objects/pack is polluted
> with little packs everytime I fetch (or push, if you're
> the server), and this is problematic from the
> perspective of a overtly (naively) aggressive gc that
> hammers out all fragmentation. So, on the first run,
> the little packfiles I have are all "consolidated" into
> big packfiles; you also write .keep files to say that
> "don't gc these big packs we just generated". In
> subsequent runs, the little packfiles from the fetch are
> absorbed into a pack that is immune to gc. You're also
> using a size heuristic, to consolidate similarly sized
> packfiles. You also have a --ratio to tweak the ratio
> of sizes.
Yes, pretty much.
I suspect that a smarter implementation would do a "less
good job of packing" to save time also. I think this can be
done by further limiting much of the lookups to the packs
being packed (or some limited set of the greater packfiles).
I admit I don't really understand how much the packing does
today, but I believe it still looks at the larger packs with
keeps to potentially deltafy against them, or to determine
which objects are duplicated and thus should not be put into
the new smaller packfiles? I say this because the time
savings of this script is not as significant as I would have
expected it to be (but the IO is). I think that it is
possible to design a git gc using this rolling approach that
would actually greatly reduce the time spent packing also.
However, I don't think that can easily be done in a script
like mine which just wraps itself around git gc. I hope
that someone more familiar with git gc than me might take
this on some day. :)
> I've checked it in and started using it; so yeah: I'll
> chew on it for a few weeks.
The script also does some nasty timestamp manipulations that
I am not proud of. They had significant time impacts for
us, and likely could have been achieved some other way.
They shouldn't be relevant to the packing algo though. I
hope it doesn't interfere with the evaluation of the
approach.
Thanks for taking an interest in it,
-Martin
--
The Qualcomm Innovation Center, Inc. is a member of Code
Aurora Forum, hosted by The Linux Foundation
next prev parent reply other threads:[~2013-08-05 18:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1rpxs5pa827iefbyduyodlc7.1375495435629@email.android.com>
2013-08-05 17:34 ` [BUG?] gc and impatience Ramkumar Ramachandra
2013-08-05 18:45 ` Martin Fick [this message]
2013-08-06 2:59 ` Ramkumar Ramachandra
2013-08-03 1:48 Ramkumar Ramachandra
2013-08-03 3:53 ` Duy Nguyen
2013-08-03 4:44 ` Junio C Hamano
2013-08-03 5:25 ` Duy Nguyen
2013-08-05 15:24 ` Junio C Hamano
2013-08-05 15:54 ` Ramkumar Ramachandra
2013-08-06 2:14 ` Ramkumar Ramachandra
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=201308051245.07995.mfick@codeaurora.org \
--to=mfick@codeaurora.org \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=mfick@codeauror.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).