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

Re: git doesn't like big files when pushing

From
Linus Torvalds <torvalds@osdl.org>
Date
Mar 1, 2006, 23:00 UTC
Message-ID
<Pine.LNX.4.64.0603011448230.22647@g5.osdl.org>
In-Reply-To
<20060301220802.GA18250@kroah.com>
On Wed, 1 Mar 2006, Greg KH wrote:
Show 13 quoted lines
> 
> That worked fine, but when I went to push the stuff to my server, I got
> the following errors:
> 
> $ git push origin
> updating 'refs/heads/master'
>   from 490badd9bec9ada3a21be275c97fb2a3a390f49e
>   to   16be8985abc8a9c89ad2cc8f46a0d8e9786e832f
> Generating pack...
> Done counting 8 objects.
> Deltifying 8 objects.
> fatal: Out of memory, malloc failed
> fatal: early EOF

Gaah. We probably have a memory leak somewhere, and it just normally doesn't much matter.

Git does want to keep the "window" of the objects it packs in memory while packing (it would be really costly to read them in one at a time, over and over again), but it should hopefully not really not need tons more memory than that. Since the window is normally 10, and you only have 8 objects, it really wants to have all eight in memory, but it shouldn't need a whole lot more.

But maybe it's really the case that you can't fit those 8 objects in memory. One option (which might also solve some of the performance issues) is to make the window be based on object _size_ rather than just be a fixed number (ie with an 80MB object, you'd only try a couple of objects around it, not the full window).

		Linus
Previous: Martin LanghoffNext: Simon Richter
Message 9 of 10 in “git doesn't like big files when pushing”
  1. Greg KHMar 1, 2006
  2. Greg KHMar 1, 2006
  3. Greg KHMar 1, 2006
  4. Junio C HamanoMar 1, 2006
  5. Greg KHMar 1, 2006
  6. Greg KHMar 1, 2006
  7. Greg KHMar 2, 2006
  8. Martin LanghoffMar 2, 2006
  9. Linus TorvaldsMar 1, 2006
  10. Simon RichterMar 2, 2006

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.