Re: [BUG?] gc and impatience

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [BUG?] gc and impatience

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:58:19

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.

I've checked it in and started using it; so yeah: I'll chew on it for
a few weeks.

Thanks.

Re: [BUG?] gc and impatience

From: Martin Fick <hidden>
Date: 2016-06-15 22:58:19

On Monday, August 05, 2013 11:34:24 am Ramkumar Ramachandra 
wrote:
Martin Fick wrote:
quoted
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
 

Re: [BUG?] gc and impatience

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:58:20

Martin Fick wrote:
I hope
that someone more familiar with git gc than me might take
this on some day. :)
More likely scenario: someone who is unfamiliar with it will read and
patch it little by little :)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help