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

Re: Funny error with git gc...

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
May 15, 2009, 19:16 UTC
Message-ID
<alpine.LFD.2.01.0905151212160.3343@localhost.localdomain>
In-Reply-To
<alpine.DEB.1.00.0905152105340.26154@pacific.mpi-cbg.de>
On Fri, 15 May 2009, Johannes Schindelin wrote:
Show 10 quoted lines
> > 
> > 	[core]
> > 		packedGitWindowSize = 16k
> > 		packedGitLimit = 1M
> > 
> > you should hopefully be able to repack (slowly) even with a low file 
> > descriptor limit, because of the total limit on the size.
> 
> I don't think so, because the window size has nothing to do with the 
> amount of open windows, right?
No, but the packedGitLimit does.
So the argument is that you can't fit all that many open windows in 1M. 
> No, in this case, nothing was disabled.  auto-gc did not kick in, probably 
> due to funny Git usage in hg2git.
Ahh. Scripting.
> > Dscho? What are your pack-file statistics in this case?
> 
> Mostly around 50kB.
Can you give us an approximation for how many are under 16kB or so?

The 16kB cutoff is where it's usually just better to malloc+read (because even if you don't end up using all the 16kB, just a page-fault or two is already more expensive than just doing the memcpy implied in a 16k read() system call).

> But using malloc()+read() to avoid my use case sounds not 
> straight-forward; it is rather a work-around than a proper solution.

Well, it's a workaround that is correct for other reasons too. So it's likely worth doing.

The "proper solution" is likely to not avoid repacking. Scripted stuff that does that is buggy.

			Linus
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 12 of 18 in “Funny error with git gc...”
  1. Johannes SchindelinMay 15, 2009
  2. Junio C HamanoMay 15, 2009
  3. Avery PennarunMay 15, 2009
  4. Linus TorvaldsMay 15, 2009
  5. Johannes SchindelinMay 15, 2009
  6. Johannes SchindelinMay 15, 2009
  7. Johannes SchindelinMay 15, 2009
  8. Linus TorvaldsMay 15, 2009
  9. Johannes SchindelinMay 23, 2009
  10. Linus TorvaldsMay 23, 2009
  11. Johannes SchindelinMay 24, 2009
  12. Linus TorvaldsMay 15, 2009
  13. Johannes SchindelinMay 15, 2009
  14. Daniel BarkalowMay 15, 2009
  15. Matthias AndreeMay 18, 2009
  16. Cope better with a _lot_ of packsJohannes Schindelin, May 15, 2009
  17. Shawn O. PearceMay 15, 2009
  18. Junio C HamanoMay 21, 2009

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.