{"thread":{"id":"34615","subject":"Re: [BUG?] gc and impatience","startedAt":"2013-08-05T17:34:24Z","lastAt":"2013-08-06T02:59:54Z","messageCount":3,"participants":["Ramkumar Ramachandra","Martin Fick"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"224607","messageId":"CALkWK0=djXdPMOvk8359nOs=rGLbBepxyXnpELfWs+wjjN7YZw@mail.gmail.com","threadId":"34615","inReplyTo":"1rpxs5pa827iefbyduyodlc7.1375495435629@email.android.com","subject":"Re: [BUG?] gc and impatience","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-08-05T17:34:24Z","receivedAt":"2013-08-05T17:34:24Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Martin Fick wrote:\n> https://gerrit-review.googlesource.com/#/c/35215/\n\nVery cool. Of what I understood:\n\nSo, the problem is that my .git/objects/pack is polluted with little\npacks everytime I fetch (or push, if you're the server), and this is\nproblematic from the perspective of a overtly (naively) aggressive gc\nthat hammers out all fragmentation.  So, on the first run, the little\npackfiles I have are all \"consolidated\" into big packfiles; you also\nwrite .keep files to say that \"don't gc these big packs we just\ngenerated\".  In subsequent runs, the little packfiles from the fetch\nare absorbed into a pack that is immune to gc.  You're also using a\nsize heuristic, to consolidate similarly sized packfiles.  You also\nhave a --ratio to tweak the ratio of sizes.\n\nI've checked it in and started using it; so yeah: I'll chew on it for\na few weeks.\n\nThanks.\n"},{"id":"224614","messageId":"201308051245.07995.mfick@codeaurora.org","threadId":"34615","inReplyTo":"CALkWK0=djXdPMOvk8359nOs=rGLbBepxyXnpELfWs+wjjN7YZw@mail.gmail.com","subject":"Re: [BUG?] gc and impatience","fromName":"Martin Fick","fromEmail":"mfick@codeaurora.org","sentAt":"2013-08-05T18:45:07Z","receivedAt":"2013-08-05T18:45:07Z","isPatch":false,"sender":{"key":"mfick@codeaurora.org","avatar":null},"body":"On Monday, August 05, 2013 11:34:24 am Ramkumar Ramachandra \nwrote:\n> Martin Fick wrote:\n> > https://gerrit-review.googlesource.com/#/c/35215/\n> \n> Very cool. Of what I understood:\n> \n> So, the problem is that my .git/objects/pack is polluted\n> with little packs everytime I fetch (or push, if you're\n> the server), and this is problematic from the\n> perspective of a overtly (naively) aggressive gc that\n> hammers out all fragmentation.  So, on the first run,\n> the little packfiles I have are all \"consolidated\" into\n> big packfiles; you also write .keep files to say that\n> \"don't gc these big packs we just generated\".  In\n> subsequent runs, the little packfiles from the fetch are\n> absorbed into a pack that is immune to gc.  You're also\n> using a size heuristic, to consolidate similarly sized\n> packfiles.  You also have a --ratio to tweak the ratio\n> of sizes.\n\nYes, pretty much.  \n\nI suspect that a smarter implementation would do a \"less \ngood job of packing\" to save time also.  I think this can be \ndone by further limiting much of the lookups to the packs \nbeing packed (or some limited set of the greater packfiles).  \nI admit I don't really understand how much the packing does \ntoday, but I believe it still looks at the larger packs with \nkeeps to potentially deltafy against them, or to determine \nwhich objects are duplicated and thus should not be put into \nthe new smaller packfiles?  I say this because the time \nsavings of this script is not as significant as I would have \nexpected it to be (but the IO is).  I think that it is \npossible to design a git gc using this rolling approach that \nwould actually greatly reduce the time spent packing also.  \nHowever, I don't think that can easily be done in a script \nlike mine which just wraps itself around git gc.  I hope \nthat someone more familiar with git gc than me might take \nthis on some day. :)\n\n\n> I've checked it in and started using it; so yeah: I'll\n> chew on it for a few weeks.\n\nThe script also does some nasty timestamp manipulations that \nI am not proud of.  They had significant time impacts for \nus, and likely could have been achieved some other way.  \nThey shouldn't be relevant to the packing algo though.  I \nhope it doesn't interfere with the evaluation of the \napproach.\n\nThanks for taking an interest in it,\n\n-Martin\n\n-- \nThe Qualcomm Innovation Center, Inc. is a member of Code \nAurora Forum, hosted by The Linux Foundation\n \n"},{"id":"224637","messageId":"CALkWK0krAnVOx5c5-TT_k5NDfKm+cEft+xQUDSq+TLDm1r6-5Q@mail.gmail.com","threadId":"34615","inReplyTo":"201308051245.07995.mfick@codeaurora.org","subject":"Re: [BUG?] gc and impatience","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-08-06T02:59:54Z","receivedAt":"2013-08-06T02:59:54Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Martin Fick wrote:\n> I hope\n> that someone more familiar with git gc than me might take\n> this on some day. :)\n\nMore likely scenario: someone who is unfamiliar with it will read and\npatch it little by little :)\n"}]}