From: Linus Torvalds <torvalds@osdl.org>
To: Keith Packard <keithp@keithp.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: git-fetch per-repository speed issues
Date: Mon, 3 Jul 2006 16:14:10 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0607031603290.12404@g5.osdl.org> (raw)
In-Reply-To: <1151949764.4723.51.camel@neko.keithp.com>
On Mon, 3 Jul 2006, Keith Packard wrote:
>
> With git, we'd prefer to use the git protocol instead of rsync for the
> usual pack-related reasons, but that is limited to a single repository
> at a time.
Well, you could use multiple branches in the same repository, even if they
are totally unrealated. That would allow you to fetch them all in one go.
One way to do that is to just name the branches hierarcially have one
repo, but then call the branches something like
libXrandr/master
libXrandr/develop
Xorg/master
Xorg/develop
..
> And, it's painfully slow, even when the repository is up to
> date:
>
> $ cd lib/libXrandr
> $ time git-fetch origin
> ...
>
> real 0m17.035s
> user 0m2.584s
> sys 0m0.576s
That's _seriously_ wrong. If everything is up-to-date, a fetch should be
basically zero-cost. That's especially true with the anonymous git
protocol, which doesn't have any connection validation overhead (for the
ssh protocol, the cost is usually the ssh login).
But there may well be some bug there.
Look at this:
[torvalds@g5 git]$ time git fetch git://git.kernel.org/pub/scm/git/git.git
real 0m0.431s
user 0m0.036s
sys 0m0.024s
and that's over my DSL line, not some studly network thing.
Basically, a repo that is up-to-date should do a "git fetch" about as
quickly as it does a "git ls-remote". Which in turn really shouldn't be
doing much anything at all, apart from the connect itself:
[torvalds@g5 git]$ time git ls-remote master.kernel.org:/pub/scm/git/git.git > /dev/null
real 0m1.758s
user 0m0.188s
sys 0m0.024s
[torvalds@g5 git]$ time git ls-remote git://git.kernel.org/pub/scm/git/git.git > /dev/null
real 0m0.431s
user 0m0.056s
sys 0m0.016s
(note how the ssh connection is much slower - it actually ends up doing
all the ssh back-and-forth).
Can you try from different hosts? One problem may be the remote end
just trying to do reverse DNS lookups for xinetd or whatever?
Also, one thing to try is to just do
strace -Ttt git-peek-remote ...
which shows where the time is going (I selected "git-peek-remote", because
that's a simple program).
Linus
next prev parent reply other threads:[~2006-07-03 23:14 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-03 18:02 git-fetch per-repository speed issues Keith Packard
2006-07-03 23:14 ` Linus Torvalds [this message]
2006-07-04 0:21 ` Jeff King
2006-07-04 1:22 ` Ryan Anderson
2006-07-04 1:44 ` Jeff King
2006-07-04 1:55 ` Ryan Anderson
2006-07-04 3:07 ` Linus Torvalds
2006-07-05 6:47 ` Jeff King
2006-07-05 16:40 ` Linus Torvalds
2006-07-04 6:44 ` Jakub Narebski
[not found] ` <1151973438.4723.70.camel@neko.keithp.com>
2006-07-04 3:21 ` Linus Torvalds
2006-07-04 3:30 ` Junio C Hamano
2006-07-04 3:40 ` Linus Torvalds
2006-07-04 4:30 ` Keith Packard
2006-07-04 11:10 ` Andreas Ericsson
2006-07-04 11:18 ` Matthias Kestenholz
2006-07-04 12:05 ` Andreas Ericsson
2006-07-04 4:02 ` Keith Packard
2006-07-04 4:19 ` Linus Torvalds
2006-07-04 5:05 ` Keith Packard
2006-07-04 5:36 ` Linus Torvalds
2006-07-04 6:21 ` Junio C Hamano
2006-07-04 5:29 ` Keith Packard
2006-07-04 5:53 ` Linus Torvalds
2006-07-04 15:42 ` Jakub Narebski
2006-07-04 16:30 ` Thomas Glanzmann
2006-07-04 17:45 ` Junio C Hamano
2006-07-04 19:22 ` Linus Torvalds
2006-07-04 21:05 ` Junio C Hamano
2006-07-06 23:36 ` David Woodhouse
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=Pine.LNX.4.64.0607031603290.12404@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=git@vger.kernel.org \
--cc=keithp@keithp.com \
/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).