git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Nicolas Pitre <nico@cam.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Jens Axboe <jens.axboe@oracle.com>,
	git@vger.kernel.org
Subject: Re: auto gc again
Date: Wed, 19 Mar 2008 19:16:15 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LFD.1.00.0803191910170.2947@xanadu.home> (raw)
In-Reply-To: <7vod9a1h8e.fsf@gitster.siamese.dyndns.org>

On Wed, 19 Mar 2008, Junio C Hamano wrote:

> Linus Torvalds <torvalds@linux-foundation.org> writes:
> 
> > On Wed, 19 Mar 2008, Junio C Hamano wrote:
> >> 
> >> Having said that, I am not sure how the auto gc is triggering for your
> >> (presumably reasonably well maintained) repository that has only small
> >> number of loose objects.  I haven't seen auto-gc annoyance myself (and
> >> git.git is not the only project I have my git experience with), and Linus
> >> also said he hasn't seen breakages.
> >
> > I think it was 'autopacklimit'.
> >
> > I think the correct solution is along the following lines:
> >
> >  - disable "git gc --auto" entirely when "gc.auto <= 0" (ie we don't even 
> >    care about 'autopacklimit' unless automatic packing is on at all)
> >
> >    Rationale: I do think that if you set gc.auto to zero, you should 
> >    expect git gc --auto to be disabled.
> 
> Sensible, I would say.

Seconded.

> >  - make the default for autopacklimit rather higher (pick number at 
> >    random: 50 instead of 20).
> >
> >    Rationale: the reason for "git gc --auto" wasn't to keep things 
> >    perfectly packed, but to avoid the _really_ bad cases. The old default 
> >    of 20 may be fine if you want to always keep the repo very tight, but 
> >    that wasn't why "git gc --auto" was done, was it?
> 
> I do not think "very tight" was the reason, but on the other hand, my
> personal feeling is that 20 was already 10 too many pack idx files we have
> to walk linearly while looking for objects at runtime.

Since commit f7c22cc68ccb this is no longer such an issue.

> Each auto gc that sees too many loose objects will add a new packfile (we
> do not do "repack -a" for obvious reasons) that would hopefully contain
> 6-7k objects, so you would need to generate 120-140k objects before
> hitting the existing 20 limit.
> 
> And then auto gc will notice you have too many packs, and "repack -A" to
> pack them down in a single new pack, and you are back to "single pack with
> less than 6-7k loose objects" situation for the cycle to continue.
> 
> At least, that is the theory.

Note that the current fetch.unpackLimit might play a role as well, 
especially if you fetch often (often meaning that you're more likely to 
have the received pack exploded into loose objects, or you're 
accumulating many small packs).


Nicolas

  reply	other threads:[~2008-03-19 23:17 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-18 18:01 auto gc again Jens Axboe
2008-03-18 18:14 ` Linus Torvalds
2008-03-18 18:19   ` Jens Axboe
2008-03-18 18:24     ` Jens Axboe
2008-03-18 18:33       ` Linus Torvalds
2008-03-18 18:39         ` Jens Axboe
2008-03-19 20:22           ` Johannes Schindelin
2008-03-19 21:14             ` Jens Axboe
2008-03-19 21:44               ` Johannes Schindelin
2008-03-20  6:00                 ` Jens Axboe
2008-03-19 20:37     ` Nicolas Pitre
2008-03-19 21:17       ` Jens Axboe
2008-03-19 23:05         ` Nicolas Pitre
2008-03-20  7:40           ` Jens Axboe
2008-03-20  7:55             ` Junio C Hamano
2008-03-20 17:31               ` Jens Axboe
2008-03-19 21:27       ` Brandon Casey
2008-03-19 21:53         ` [PATCH] builtin-gc.c: allow disabling all auto-gc'ing by assigning 0 to gc.auto Brandon Casey
2008-03-20  7:08           ` Teemu Likonen
2008-03-19 22:56         ` auto gc again Nicolas Pitre
2008-03-20  6:01         ` Jens Axboe
2008-03-19 21:27 ` Junio C Hamano
2008-03-19 21:52   ` Linus Torvalds
2008-03-19 22:28     ` Junio C Hamano
2008-03-19 23:16       ` Nicolas Pitre [this message]
2008-03-19 23:25         ` Junio C Hamano
2008-03-20  3:13           ` Nicolas Pitre
2008-03-20  4:09             ` Junio C Hamano
2008-03-20  4:40               ` Nicolas Pitre
2008-03-20  4:49                 ` Junio C Hamano

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=alpine.LFD.1.00.0803191910170.2947@xanadu.home \
    --to=nico@cam.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jens.axboe@oracle.com \
    --cc=torvalds@linux-foundation.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).