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

Re: Git exhausts memory.

From
AWAlif Wahid <alif.wahid@gmail.com>
Date
Apr 5, 2011, 04:35 UTC
Message-ID
<BANLkTik6XoWaehp7=5fxwcyhkTHWCO8-Eg@mail.gmail.com>
In-Reply-To
<20110405022235.GA4414@spacedout.fries.net>
Hi everyone,
On 5 April 2011 12:22, David Fries <david@fries.net> wrote:
Show 25 quoted lines
> On Mon, Apr 04, 2011 at 09:57:01PM +0700, Nguyen Thai Ngoc Duy wrote:
>> On Mon, Apr 4, 2011 at 7:52 PM, Alif Wahid <alif.wahid@gmail.com> wrote:
>> > Hi Nicolas,
>> >
>> > On 4 April 2011 01:18, Nicolas Pitre <nico@fluxnic.net> wrote:
>> >>
>> >> Something you can try is to simply tell Git not to attempt any delta
>> >> compression on those tar files using gitattributes (see the man page of
>> >> the same name).
>>
>> Should we change the default to not delta if a blob exceeds predefined
>> limit (say 128M)? People who deliberately wants to delta them can
>> still set delta attr. 1.8.0 material maybe?
>
> I think it would be better to define it in terms of available memory.
> Something like the minimum of system memory or address space, and
> delta up to X amount of that (it might be good to leave off swap to
> reduce trashing).  There has to be a better way than a straight 128MB
> default.
>
> The number which works on my 8GB desktop is going to kill the computer
> in the trunk of my car with 48MB of ram.  I've actually seen a 700 MB
> repository fail with `git-gc --aggressive` on a system with 4GB of ram
> because it ran out of memory, it only worked by leaving off the
> --aggressive option.

It seems to me that if "git init" creates a $GIT_DIR/info/attributes file by default with a line like "*.gz -delta", then that will disable the memory intensive deltra compression plumbing for those special cases where people need to track gzip archives (similarly another line "*.bz2 -delta" for bzip2 archives and so on). Since these files can't supposedly be compressed much more, I think Git ought to have a default heuristic to not attempt any compression on them.

Cheers
Alif
Previous: David FriesNext: Nguyen Thai Ngoc Duy
Message 8 of 19 in “Git exhausts memory.”
  1. Alif WahidApr 2, 2011
  2. Nicolas PitreApr 2, 2011
  3. Alif WahidApr 3, 2011
  4. Nicolas PitreApr 3, 2011
  5. Alif WahidApr 4, 2011
  6. Nguyen Thai Ngoc DuyApr 4, 2011
  7. David FriesApr 5, 2011
  8. Alif WahidApr 5, 2011
  9. Nguyen Thai Ngoc DuyApr 5, 2011
  10. Alif WahidApr 5, 2011
  11. Holger HellmuthApr 5, 2011
  12. Shawn PearceApr 5, 2011
  13. Junio C HamanoApr 5, 2011
  14. Nicolas PitreApr 5, 2011
  15. Junio C HamanoApr 5, 2011
  16. Shawn PearceApr 5, 2011
  17. Nicolas PitreApr 6, 2011
  18. Jay SoffianApr 6, 2011
  19. Junio C HamanoApr 6, 2011

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.