Git development
 help / color / mirror / Atom feed
* Performance regression in connectivity check during receive-pack (git 2.54)
@ 2026-07-21  3:17 Wolfgang Kritzinger
  2026-07-21  3:57 ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Kritzinger @ 2026-07-21  3:17 UTC (permalink / raw)
  To: git

Hi!

I'm a developer working on the on-premise version of Bitbucket at
Atlassian.

We noticed pushes to Bitbucket got much slower after upgrading Git
on the server side from 2.50 to 2.54. I traced the slow part to
the connectivity check that receive-pack runs:

git rev-list --objects --stdin --not --exclude-hidden=receive --all \
--quiet --alternate-refs --progress=Checking connectivity

`strace` shows that after a push, 2.54 does a failing open() of
of numerous loose objects -- once in the quarantine (incoming)
directory and once in the main object store -- before finding it
in a pack:

openat(".../objects/tmp_objdir-incoming-XXXX/ed/58..", O_RDONLY) = ENOENT
openat(".../objects/ed/58..", O_RDONLY) = ENOENT

2.50 does not do this. In most customer deployments of Bitbucket,
the Git data lives on an NFS share. The extra latency on NFS makes
this process of checking for non-existent loose objects take too
long, the push essentially hangs at the "Checking connectivity" step.

I believe this new behavior was introduced in the recent object
database rework. After using bisect, I belive the problem can be
traced back to commit 8384cbcb4c.

I don't know the codebase well, but from what I can see is that
the order in which objects are looked up in object databases
changed.

Assuming there are two object databases configured (Main repo,
and the quarantine directory, for example), the lookup order used
to be:

1. _quarantine dir_ packs
2. _main dir_ packs
3. _quarantine dir_ loose objects
4. _main dir_ loose objects

With Git 2.54, the order appears to have changed to:

1. _quarantine dir_ packs
2. _quarantine dir_ loose objects
3. _main dir_ packs
4. _main dir_ loose objects

In my testing, within a well-packed repo, Git 2.50 actually never
performed a loose object lookup.

The current design seems to iterate over the configured object
databases and perform a pack and loose object lookup for each.

Is there a way to avoid these costly loose object lookups?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-21 14:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-21  3:17 Performance regression in connectivity check during receive-pack (git 2.54) Wolfgang Kritzinger
2026-07-21  3:57 ` Jeff King
2026-07-21  5:05   ` Taylor Blau
2026-07-21 14:40   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox