Re: Since gc.autodetach=1 you can end up with auto-gc on every command with no user notification
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jul 8, 2015, 12:47 UTC
- Message-ID
- <CACsJy8AKbXqsuNJL7Usb-haiynDcCDQXk56WYh5PxzGU3NvaAw@mail.gmail.com>
- In-Reply-To
- <CACBZZX5hUr8TMRXYWRqdb1AQ=oOBpEFuoMwYHczPdHN82ceuTw@mail.gmail.com>
On Wed, Jul 8, 2015 at 7:28 PM, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 24 quoted lines
> Someone at work came to me with the problem that they were getting the > "Auto packing the repository in background for optimum performance" > notice on every Git command that they ran. > > This problem is a combination of two things: > > * Since Nguyễn's v1.9-rc0-2-g9f673f9 where we started running "git > gc" in the background the user hasn't seen the "There are too many > unreachable loose objects" message added back in v1.5.3.1-27-ga087cc9 > > * The checkout has a lot of loose objects. So even after "git prune > --expire=2.week.ago" the .git/objects/17 directory has 317 objects. > More than 27 in that directory trigger "git gc --auto". > > So it's partly a UI issue. Since the repacking is happening in the > background the user never sees the message suggesting that they run > "git prune". > > But perhaps the heuristic of "are there more than 27 objects in > .git/objects/17" could be improved, but I don't know with what > exactly. > > But having something fork a gc to the background on every fetch (and > similar object-modifying operations) is quite sub-optimal.
Thanks for reminding me. Two related threads: [1] is about that "17" heuristics and [2] the UI thing. I need to reread them before making any more comments.
[1] http://thread.gmane.org/gmane.comp.version-control.git/265734/focus=265756 [2] http://thread.gmane.org/gmane.comp.version-control.git/266182
-- Duy