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

Re: First Git status takes 40+ minutes, when mounting fileystem/diskimage with 50G GIT repo + 900G of builds articles

From
SSSaravanan Shanmugham (sarvi) <sarvi@cisco.com>
Date
Aug 23, 2019, 00:32 UTC
Message-ID
<A240FE33-2B36-46EF-8AE4-0B3B2106908A@cisco.com>
In-Reply-To
<xmqqh869oypk.fsf@gitster-ct.c.googlers.com>
Thanks. That seems to help.

Just for context, we are using a copy-on-write/cloning solution to give developers a prebuilt workspace with all the platforms fully built, as well as sources all cloned, So they are ready for incremental development.

We create a ext4 diskimage, with a git clone workspace(50G) and 900G of fully built trees, then freeze that diskimage. Developers have a way to clone that diskimage(into a copy-on-write) copy of the diskimage(in 30 seconds) that they can mount and use for incremental build development.

I did the following.

Mounted the existing filesystem git update-index --untracked-cache git update-index --refresh

Not sure what you meant by " working tree state in the diskimage"

I then detached the diskimage, dropped all the caches. Remounted the diskimage.

git status  - The very first git status after dropping the cache now returns in in 1.54 seconds, which seems very much acceptable.
I obviously need to do more read up on what/how git caches.
Can you point to any documentation on what sort of information GIT caches, and how to understand debug that?
I would like to understand what the above git update-index commands actually do, that is making this faster.
 
Thanks,
Sarvi
Occam’s Razor Rules
On 8/22/19, 11:13 AM, "Junio C Hamano" <gitster@pobox.com> wrote:
    "Saravanan Shanmugham (sarvi)" <sarvi@cisco.com> writes:
    
    > I suspect warming the filesystem caching is in play.
    > But so is the fact that walk every tree to find untracked files as well. 
    
    Enable the untracked cache and "update-index --refresh", before
    freezing the repository + working tree state in the diskimage?
    
Previous: Junio C HamanoNext: Johannes Sixt
Message 3 of 7 in “First Git status takes 40+ minutes, when mounting fileystem/diskimage with 50G GIT repo + 900G of builds articles”
  1. Saravanan Shanmugham (sarvi)Aug 22, 2019
  2. Junio C HamanoAug 22, 2019
  3. Saravanan Shanmugham (sarvi)Aug 23, 2019
  4. Johannes SixtAug 22, 2019
  5. Junio C HamanoAug 22, 2019
  6. Johannes SixtAug 22, 2019
  7. Junio C HamanoAug 22, 2019

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.