git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "George Shammas" <georgyo@gmail.com>
To: git@vger.kernel.org
Subject: Re: git performance
Date: Fri, 24 Oct 2008 13:42:00 -0400	[thread overview]
Message-ID: <dfdaadcd0810241042k1469fc30x62daa19273404edc@mail.gmail.com> (raw)
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:
> 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
>

  reply	other threads:[~2008-10-24 17:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-22 20:17 git performance Edward Ned Harvey
2008-10-22 20:36 ` Jeff King
2008-10-22 21:13   ` Peter Harris
2008-10-22 21:55   ` Edward Ned Harvey
2008-10-23  7:11     ` Andreas Ericsson
2008-10-23  7:11     ` Andreas Ericsson
2008-10-23  7:41     ` Andreas Ericsson
2008-10-23 12:16     ` Matthieu Moy
2008-10-23 16:39     ` Jeff King
     [not found]       ` <000001c9358f$232bac70$69830550$@com>
2008-10-24 14:29         ` Jeff King
2008-10-24 17:42           ` George Shammas [this message]
2008-10-24 19:06             ` Jakub Narebski
2008-10-24 17:53           ` Linus Torvalds
2008-10-24 18:20             ` Jeff King
2008-10-23 18:31     ` Daniel Barkalow
2008-10-23 22:24     ` Nanako Shiraishi
2008-10-24  3:56       ` Daniel Barkalow
2008-10-24  7:55     ` Pete Harlan
2008-10-24 23:10       ` Pete Harlan
2008-10-22 22:42 ` Jakub Narebski
2008-10-23  7:43   ` Andreas Ericsson
2008-10-23 13:04     ` Nguyen Thai Ngoc Duy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dfdaadcd0810241042k1469fc30x62daa19273404edc@mail.gmail.com \
    --to=georgyo@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).