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

Re: large files and low memory

From
Shawn Pearce <spearce@spearce.org>
Date
Oct 4, 2010, 18:05 UTC
Message-ID
<AANLkTimbdrAqoWMxiteT5zNYmwHp8M698BEv1FLuiAxx@mail.gmail.com>
In-Reply-To
<20101004092046.GA4382@nibiru.local>
On Mon, Oct 4, 2010 at 2:20 AM, Enrico Weigelt <weigelt@metux.de> wrote:
Show 5 quoted lines
>
> when adding files which are larger than available physical memory,
> git performs very slow. Perhaps it has to do with git's mmap()ing
> the whole file. Is there any way to do it w/o mmap (hoping that
> might perform a bit better) ?

The mmap() isn't the problem. Its the allocation of a buffer that is larger than the file in order to hold the result of deflating the file before it gets written to disk. When the file is bigger than physical memory, the kernel has to page in parts of the file as well as swap in and out parts of that allocated buffer to hold the deflated file.

This is a known area in Git where big files aren't handled well.
-- 
Shawn.
Previous: Enrico WeigeltNext: Joshua Jensen
Message 2 of 29 in “large files and low memory”
  1. Enrico WeigeltOct 4, 2010
  2. Shawn PearceOct 4, 2010
  3. Joshua JensenOct 4, 2010
  4. Shawn PearceOct 4, 2010
  5. Enrico WeigeltOct 5, 2010
  6. Enrico WeigeltOct 5, 2010
  7. Matthieu MoyOct 5, 2010
  8. Enrico WeigeltOct 5, 2010
  9. Alex RiesenOct 5, 2010
  10. Matthieu MoyOct 5, 2010
  11. Nguyen Thai Ngoc DuyOct 5, 2010
  12. Junio C HamanoOct 5, 2010
  13. Nguyen Thai Ngoc DuyOct 5, 2010
  14. Nicolas PitreOct 5, 2010
  15. Jonathan NiederOct 4, 2010
  16. Shawn PearceOct 4, 2010
  17. Jonathan NiederOct 4, 2010
  18. Nguyen Thai Ngoc DuyOct 5, 2010
  19. Nicolas PitreOct 5, 2010
  20. Jonathan NiederOct 5, 2010
  21. Nicolas PitreOct 5, 2010
  22. Enrico WeigeltOct 5, 2010
  23. Ævar Arnfjörð BjarmasonOct 5, 2010
  24. Jonathan NiederOct 5, 2010
  25. Enrico WeigeltOct 5, 2010
  26. Jonathan NiederOct 5, 2010
  27. Enrico WeigeltOct 5, 2010
  28. Nicolas PitreOct 5, 2010
  29. Enrico WeigeltOct 5, 2010

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.