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

Re: Poor performance of git describe in big repos

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
May 30, 2013, 15:17 UTC
Message-ID
<CALkWK0=6xg8X7ZLXoaTk_ZgRnhgXWsftsTzr6JAWFBJvmVOgFw@mail.gmail.com>
In-Reply-To
<CAJ-05NMt6h=JFLLCP+LASKMcToENhF=BSsk1dPML0024hJTwTw@mail.gmail.com>
Alex Bennée wrote:
Show 9 quoted lines
> 15:50 ajb@sloy/x86_64 [work.git] >time git log --pretty=oneline | wc -l
> 24648
>
> real    0m0.434s
> user    0m0.388s
> sys     0m0.112s
>
> Although it doesn't take too long to walk the whole mainline history
> (obviously ignoring all the other branches).
Damn, non-starter.  linux.git has 361k+ commits in mainline history.
Nit: use git rev-list --count HEAD next time.
Show 9 quoted lines
> 15:52 ajb@sloy/x86_64 [work.git] >git count-objects -v -H
> count: 581
> size: 5.09 MiB
> in-pack: 399307
> packs: 1
> size-pack: 1.49 GiB
> prune-packable: 0
> garbage: 0
> size-garbage: 0 bytes

linux.git has 2.9m+ in-pack. The pack-size is much lower at about 800+ MiB, but I don't think 1.49 GiB is a problem in itself. Looking forward to your big-files report to see why it's so big.

Show 6 quoted lines
> It is a pick repo. The gc --aggressive nearly took out my machine keeping
> around 4gb resident for most of the half hour and using nearly 8gb of VM.
>
> Of course most of the history is not needed for day to day stuff. Maybe
> if I split the pack files up it wouldn't be quite such a strain to work
> through them?

Really out of my depth here, sorry. Let's see what Duy (or the others) have to say.

Show 13 quoted lines
>> 2. You have have huge (binary) files checked into your repository.  Do
>> you?  If so, why isn't the code in streaming.c kicking in?
>
> We do have some binary blobs in the repository (mainly DSP and FPGA images)
> although not a huge number:
>
> 15:58 ajb@sloy/x86_64 [work.git] >time git log --pretty=oneline -- xxx
> xxx/xxxxxx/*.out ./xxx/xxx/*.out ./xxx/xxxxxxx/*.out | wc -l
> 234
>
> real    0m0.590s
> user    0m0.552s
> sys     0m0.040s

log is streaming, and is not a good measure: it doesn't even walk the entire commit graph. How big are these files?

> How can I tell if streaming is kicking in or now?

I use callgrind (and kcachegrind to visualize). Can you post callgrind output? It will be helpful in figuring out where exactly git is spending time.

Previous: Alex BennéeNext: Thomas Rast
Message 6 of 33 in “Poor performance of git describe in big repos”
  1. Alex BennéeMay 30, 2013
  2. Ramkumar RamachandraMay 30, 2013
  3. Alex BennéeMay 30, 2013
  4. Ramkumar RamachandraMay 30, 2013
  5. Alex BennéeMay 30, 2013
  6. Ramkumar RamachandraMay 30, 2013
  7. Thomas RastMay 30, 2013
  8. Alex BennéeMay 30, 2013
  9. Thomas RastMay 30, 2013
  10. Thomas RastMay 30, 2013
  11. Antoine PelisseMay 30, 2013
  12. John KeepingMay 30, 2013
  13. Alex BennéeMay 31, 2013
  14. Thomas RastMay 31, 2013
  15. Alex BennéeMay 31, 2013
  16. Thomas RastMay 31, 2013
  17. Alex BennéeMay 31, 2013
  18. Alex BennéeJun 3, 2013
  19. Junio C HamanoJun 3, 2013
  20. Junio C HamanoJun 3, 2013
  21. Thomas RastMay 31, 2013
  22. Jeff KingMay 31, 2013
  23. Alex BennéeJun 3, 2013
  24. Jeff KingJun 3, 2013
  25. John KeepingMay 31, 2013
  26. Alex BennéeMay 31, 2013
  27. John KeepingMay 31, 2013
  28. John KeepingMay 30, 2013
  29. Alex BennéeMay 30, 2013
  30. Duy NguyenMay 30, 2013
  31. Alex BennéeMay 30, 2013
  32. Duy NguyenMay 30, 2013
  33. Alex BennéeMay 30, 2013

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.