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

Re: git performance

From
George Shammas <georgyo@gmail.com>
Date
Oct 24, 2008, 17:42 UTC
Message-ID
<dfdaadcd0810241042k1469fc30x62daa19273404edc@mail.gmail.com>
In-Reply-To
<20081024142947.GB11568@coredump.intra.peff.net>

If you are really trying to backup a filesystem, you may want to look at a filesystem that can do snapshots, it would be a lot more efficient then a version control system. Such as NILFS and ZFS.

http://en.wikipedia.org/wiki/NILFS http://en.wikipedia.org/wiki/ZFS

Both these will allow you to look at changed files over time. NILFS is slightlly diffrent in that it doesn't take snapshots, because it never deletes, so you can rollback every change on a file. They both also allow each user to rollback their own files if they wanted to, so if this is your goal, source code version control is not for you, and a good file system is for you.

-G
On Fri, Oct 24, 2008 at 10:29 AM, Jeff King <peff@peff.net> wrote:
Show 59 quoted lines
> On Fri, Oct 24, 2008 at 12:15:19AM -0400, Edward Ned Harvey wrote:
>
>> Feel free to forward to the list, if anyone's still talking about it.
>> I already un-subscribed.
>
> Posting is not limited to subscribers, so you can happily continue the
> conversation there by cc'ing the list (and I am cc'ing the list here).
>
>> I did my benchmarking at least two months ago, so I forgot the exact
>> results now, so I ran the benchmark once just now.  I also downloaded
>> git, and did "git status" for comparison.  I rebooted the system in
>> between each trial run, to clear the cache.  Here's the results:
>
> Side note: on Linux, it is much easier to clear the cache via
>
>  echo 1 >/proc/sys/vm/drop_caches
>
> than to reboot for each benchmark.
>
>> Local disk mirror "time git status" on the same tree. 17,468 versioned files, so the whole tree is 30,647 including .git files
>>       0m 25s  cold cache
>>       0m 0.2s warm cache trial 1
>>       0m 0.2s warm cache trial 2
>
> Hmm. That's a lot of increase in files for .git. Did you try repacking
> and then running your test?
>
>> I questioned whether svn and git were causing unnecessary overhead.
>
> Sure, they are doing more than just walking. So there is overhead, but
> it's hard to say how much is unnecessary. However, if you were working
> with an unpacked git, then it may have had to open() a lot of files in
> the object db (keep in mind that status doesn't just show the difference
> between the working tree and the index; it shows the difference between
> the index and the last commit. So maybe "git diff" would be a more
> accurate comparison).
>
>> Conclusions:
>> * For "status" operations on cold cache, large file count, Neither the
>> performance of git or svn approaches the ideal.  Both are an order of
>> magnitude slower than ideal, which is still assuming "ideal" requires
>> walking the tree.  A better ideal avoids the need to walk the tree,
>> and has near-zero total cost.
>
> Try your git benchmark again with a packed repo, and I think you will
> find it approaches the time it takes to walk the tree.
>
> That being said, if walking the tree is unacceptable to you, then no,
> current git won't work. You would need to patch it to use inotify (once
> upon a time there was some discussion of this, but it never went
> anywhere -- I guess most people work on machines where they can keep the
> cache relatively warm).
>
> -Peff
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Previous: Jeff KingNext: Jakub Narebski
Message 19 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.