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

Re: git performance

From
PHPete Harlan <pgit@pcharlan.com>
Date
Oct 24, 2008, 23:10 UTC
Message-ID
<490255D1.8060804@pcharlan.com>
In-Reply-To
<49017F8F.3000908@pcharlan.com>
Pete Harlan wrote:
Show 15 quoted lines
> Edward Ned Harvey wrote:
>>> Yes, it does stat all the files. How many files are you talking about,
>>> and what platform?  From a warm cache on Linux, the 23,000 files kernel
>>> repo takes about a tenth of a second to stat all files for me (and this
>> I'm talking about 40-50,000 files, on multi-user production linux,
>> which means the cache is never warm, except when I'm benchmarking.
>> Specifically RHEL 4 with the files on NFS mount.  Cold cache "svn
>> st" takes ~10 mins.  Warm cache 20-30 sec.  Surprisingly to me,
> 
> I did some tests with a repo with ~32k files, and git was slightly
> slower than svn with a cold cache (10.2s vs 8.4s), and around twice as
> fast with a warm cache (.5s vs 1s).
> 
> Git 1.6.0.2, svn 1.4.6. Cache made cold with
> "echo 1 >/proc/sys/vm/drop_caches".  Timings best of 5 runs.

After redoing this test with "echo 3 >/proc/sys/vm/drop_caches" (which also discards metadata, as pointed out by Linus), the cold-cache timings are:

	svn 12.65 seconds
	git 10.3  seconds

So no Earth-shattering difference, but now git is somewhat quicker than Subversion at everything I tested.

--Pete
Previous: Pete HarlanNext: Jakub Narebski
Message 14 of 22 in “git performance”
  1. Edward Ned HarveyOct 22, 2008
  2. Jeff KingOct 22, 2008
  3. Peter HarrisOct 22, 2008
  4. Edward Ned HarveyOct 22, 2008
  5. Andreas EricssonOct 23, 2008
  6. Andreas EricssonOct 23, 2008
  7. Andreas EricssonOct 23, 2008
  8. Matthieu MoyOct 23, 2008
  9. Jeff KingOct 23, 2008
  10. Daniel BarkalowOct 23, 2008
  11. Nanako ShiraishiOct 23, 2008
  12. Daniel BarkalowOct 24, 2008
  13. Pete HarlanOct 24, 2008
  14. Pete HarlanOct 24, 2008
  15. Jakub NarebskiOct 22, 2008
  16. Andreas EricssonOct 23, 2008
  17. Nguyen Thai Ngoc DuyOct 23, 2008
  18. Jeff KingOct 24, 2008
  19. George ShammasOct 24, 2008
  20. Jakub NarebskiOct 24, 2008
  21. Linus TorvaldsOct 24, 2008
  22. Jeff KingOct 24, 2008

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.