git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Performance regression in connectivity check during receive-pack (git 2.54)

From
WKWolfgang Kritzinger <wkritzinger@atlassian.com>
Date
Jul 21, 2026, 03:17 UTC
Message-ID
<CAFXJcxvpKHoVDwE5mBOd=w-A5vPdUmehqr8SHLUD7qv1qB00rA@mail.gmail.com>
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?
Next: Jeff King
Message 1 of 13 in “Performance regression in connectivity check during receive-pack (git 2.54)”
  1. Wolfgang KritzingerJul 21, 2026
  2. Jeff KingJul 21, 2026
  3. Taylor BlauJul 21, 2026
  4. Junio C HamanoJul 21, 2026
  5. Patrick SteinhardtJul 22, 2026
  6. Junio C HamanoJul 22, 2026
  7. Jeff KingJul 23, 2026
  8. Patrick SteinhardtJul 24, 2026
  9. Jeff KingJul 26, 2026
  10. Justin ToblerJul 27, 2026
  11. Patrick SteinhardtAug 4, 2026
  12. Jeff KingJul 23, 2026
  13. Jeff KingJul 23, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.