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

Re: [PATCH] git-svn: make batch mode optional for git-cat-file

From
EWEric Wong <normalperson@yhbt.net>
Date
Sep 23, 2015, 00:35 UTC
Message-ID
<20150923003516.GA6086@dcvr.yhbt.net>
In-Reply-To
<20150923001350.GA22266@dcvr.yhbt.net>
Eric Wong <normalperson@yhbt.net> wrote:
Show 7 quoted lines
> Victor Leschuk <vleschuk@accesssoftek.com> wrote:
> > The thing is that git-cat-file keeps growing during work when running
> > in "batch" mode. See the figure attached: it is for cloning a rather
> > small repo (1 hour to clone about ~14000 revisions). However the clone
> > of a large repo (~280000 revisions) took about 2 weeks and
> > git-cat-file has outgrown the parent perl process several times
> > (git-cat-file - ~3-4Gb, perl - 400Mb).

How much of that is anonymous memory, though? (pmap $PID_OF_GIT_CAT_FILE)

Running the following on the Linux kernel tree I had lying around:
(for i in $(seq 100 200); do git ls-files | sed -e "s/^/HEAD~$i:/"; done)|\
  git cat-file --batch >/dev/null

Reveals about 510M RSS in top, but pmap says less than 20M of that is anonymous. So the rest are mmap-ed packfiles; that RSS gets transparently released back to the kernel under memory pressure.

Previous: Eric WongNext: Victor Leschuk
Message 7 of 10 in “git-svn: make batch mode optional for git-cat-file”
  1. git-svn: make batch mode optional for git-cat-fileVictor Leschuk, Sep 21, 2015
  2. Junio C HamanoSep 21, 2015
  3. Victor LeschukSep 21, 2015
  4. Victor LeschukSep 22, 2015
  5. Junio C HamanoSep 22, 2015
  6. Eric WongSep 23, 2015
  7. Eric WongSep 23, 2015
  8. Victor LeschukSep 23, 2015
  9. Eric WongSep 23, 2015
  10. Victor LeschukOct 11, 2015

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.