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

Regression in memory consumption of git fsck

From
DSDominic Sacré <dominic.sacre@gmx.de>
Date
Feb 14, 2018, 10:22 UTC
Message-ID
<b1a4d7ed-79b6-1f6b-1f0f-85536e943cef@gmx.de>
Hi,

I've noticed that recent versions of git consume a lot of memory during "git fsck", to the point where I've regularly had git fall victim to Linux's OOM killer.

For example, if I clone torvalds/linux.git, and then run "git fsck --connectivity-only" in the newly cloned repository, git will consume more than 6GB of physical memory, while older versions peak at about 2GB.

I've managed to bisect this down to this commit in v2.14:

ad2db4030e42890e569de529e3cd61a8d03de497 fsck: remove redundant parse_tree() invocation

If I revert that commit (on top of current master) the memory consumption goes down to 2GB again. The change looks relatively harmless to me, so does anyone know what's going on here?

Thanks,
Dominic
Next: SZEDER Gábor
Message 1 of 3 in “Regression in memory consumption of git fsck”
  1. Dominic SacréFeb 14, 2018
  2. SZEDER GáborFeb 14, 2018
  3. Jeff KingFeb 14, 2018

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.