git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Andreas Krey <a.krey@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: Flurries of 'git reflog expire'
Date: Tue, 04 Jul 2017 11:43:33 +0200	[thread overview]
Message-ID: <87podgbkqi.fsf@gmail.com> (raw)
In-Reply-To: <20170704075758.GA22249@inner.h.apk.li>


On Tue, Jul 04 2017, Andreas Krey jotted:

> Hi everyone,
>
> how is 'git reflog expire' triggered? We're occasionally seeing a lot
> of the running in parallel on a single of our repos (atlassian bitbucket),
> and this usually means that the machine is not very responsive for
> twenty minutes, the repo being as big as it is.

Assuming Linux, what does 'ps auxf' look like when this happens? Is the
parent a 'git gc --auto'?

> The server is still on git 2.6.2 (and bitbucket 4.14.5).

You might want to upgrade, we've had a bunch of changes since then,
maybe some of this fixes it:

    git log --reverse -p -L'/^static.*lock_repo_for/,/^}/:builtin/gc.c'

> Questions:
>
> What can be done about this? Cronjob 'git reflog expire' at midnight,
> so the heuristic don't trigger during the day? (The relnotes don't
> mention anything after 2.4.0, so I suppose a git upgrade won't help.)
>
> What is the actual cause? Bad heuristics in git itself, or does
> bitbucket run them too often (improbable)?

You can set gc.auto=0 in the repo to disable auto-gc, and play with
e.g. the reflog expire values, see the git-gc manpage.

But then you need to run your own gc, which is not a bad idea anyway
with a dedicated git server.

But it would be good to get to the bottom of this, we shouldn't be
running these concurrently.

  reply	other threads:[~2017-07-04  9:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-04  7:57 Flurries of 'git reflog expire' Andreas Krey
2017-07-04  9:43 ` Ævar Arnfjörð Bjarmason [this message]
2017-07-06 13:27   ` Andreas Krey
2017-07-05  8:20 ` Jeff King
2017-07-06 13:31   ` Andreas Krey
2017-07-06 17:01     ` Bryan Turner
2017-07-11  4:45       ` Andreas Krey
2017-07-11  7:25         ` [BUG] detached auto-gc does not respect lock for 'reflog expire', was " Jeff King
2017-07-11  9:06           ` [PATCH] gc: run pre-detach operations under lock Jeff King
2017-07-12 16:46             ` Junio C Hamano
2017-07-12 16:58               ` Jeff King
2017-07-12 21:10                 ` Junio C Hamano
2017-07-11  7:35         ` Flurries of 'git reflog expire' Bryan Turner
2017-07-11  7:45           ` Jeff King
2017-07-11  7:31       ` Jeff King

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87podgbkqi.fsf@gmail.com \
    --to=avarab@gmail.com \
    --cc=a.krey@gmx.de \
    --cc=git@vger.kernel.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.
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 NNTP newsgroup(s).