Re: q: git-fetch a tad slow?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: q: git-fetch a tad slow?

Shawn Pearce
Ingo Molnar <[hidden email]> wrote:
> alas, fetching still seems to be slow:
>
>   titan:~/tip> time git-fetch origin
>
>   real    0m5.112s
>   user    0m0.972s
>   sys     0m3.380s

What version of git are dealing with on the client side?

I only have a MacBook Pro (2.4 GHz Intel Core 2 Duo) and I'm getting
fetch times of ~472 ms over git:// to your -tip.git tree and ~128
ms for strictly local fetch.  If your SSH overhead is ~300 ms this
is only a ~700 ms real time for `git fetch origin`, not 5100 ms.

Is your git-fetch a shell script?  Or a compiled binary?  The port
into C made it go _much_ faster, even though it is still a naive
O(N^2) matching algorithm.  Yea, we still should fix that, but
I think an upgrade to 1.5.4 or later would make the client side
improve consideribly.

--
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reply | Threaded
Open this post in threaded view
|

Re: q: git-fetch a tad slow?

Ingo Molnar

* Shawn O. Pearce <[hidden email]> wrote:

> Ingo Molnar <[hidden email]> wrote:
> > alas, fetching still seems to be slow:
> >
> >   titan:~/tip> time git-fetch origin
> >
> >   real    0m5.112s
> >   user    0m0.972s
> >   sys     0m3.380s
>
> What version of git are dealing with on the client side?

the client side on titan has:

 titan:~> git version
 git version 1.5.2.2

oldish but not outrageously old, right?

 server side has:

 earth4:~> git version
 git version 1.5.6.1.108.g660379

>
> fetch times of ~472 ms over git:// to your -tip.git tree and ~128 ms
> for strictly local fetch.  If your SSH overhead is ~300 ms this is
> only a ~700 ms real time for `git fetch origin`, not 5100 ms.
>
> Is your git-fetch a shell script?  Or a compiled binary?  The port
> into C made it go _much_ faster, even though it is still a naive
> O(N^2) matching algorithm.  Yea, we still should fix that, but I think
> an upgrade to 1.5.4 or later would make the client side improve
> consideribly.

ah, it is a shell script indeed! I'll upgrade to latest.

        Ingo
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reply | Threaded
Open this post in threaded view
|

Re: q: git-fetch a tad slow?

Ingo Molnar

* Ingo Molnar <[hidden email]> wrote:

> > for strictly local fetch.  If your SSH overhead is ~300 ms this is
> > only a ~700 ms real time for `git fetch origin`, not 5100 ms.
> >
> > Is your git-fetch a shell script?  Or a compiled binary?  The port
> > into C made it go _much_ faster, even though it is still a naive
> > O(N^2) matching algorithm.  Yea, we still should fix that, but I
> > think an upgrade to 1.5.4 or later would make the client side
> > improve consideribly.
>
> ah, it is a shell script indeed! I'll upgrade to latest.

on another box, with 1.5.4, i have:

 dione:~/tip> time git fetch origin

 real    0m0.481s
 user    0m0.136s
 sys     0m0.060s

 dione:~/tip> time ./tip-fetch
 b714d1a257cca93ba6422ca3276ac80a2cde2b59
 b714d1a257cca93ba6422ca3276ac80a2cde2b59

 real    0m0.273s
 user    0m0.012s
 sys     0m0.020s

that's a 2.66 GHz core2 quad, i.e. a pretty fast box too. As you can see
most time spent in the tip-fetch case was waiting for the network. So
there's about 200 msecs of extra CPU cost on the local side. On a CPU
1-2 generations older that could be up to 1000 msecs or more.

In any case, performance has improved significantly with the C version!
(I'll still use tip-fetch to squeeze out the last bit of performance,
but it's quite comparable now.)

Sorry that i didnt notice that titan had 1.5.2 - i almost never notice
it when i switch between stable git versions. (you guys are doing a
really good job on compatibility)

        Ingo
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reply | Threaded
Open this post in threaded view
|

Re: q: git-fetch a tad slow?

Shawn Pearce
Ingo Molnar <[hidden email]> wrote:

>
> on another box, with 1.5.4, i have:
>
>  dione:~/tip> time git fetch origin
>
>  real    0m0.481s
>  user    0m0.136s
>  sys     0m0.060s
>
>  dione:~/tip> time ./tip-fetch
>  b714d1a257cca93ba6422ca3276ac80a2cde2b59
>  b714d1a257cca93ba6422ca3276ac80a2cde2b59
>
>  real    0m0.273s
>  user    0m0.012s
>  sys     0m0.020s
>
> that's a 2.66 GHz core2 quad, i.e. a pretty fast box too. As you can see
> most time spent in the tip-fetch case was waiting for the network. So
> there's about 200 msecs of extra CPU cost on the local side.

Yea.  My testing last night was suggesting about 1/2 of that 200
ms is on the client, and the other 200 ms is on the server side
of the connection.  That matches up somewhat with your test above,
where git-fetch used about 100 ms more user time on the client side
than your tip-fetch shell script.

I have no clue where the bottleneck is, I didn't get that far before
I realized you must have been running a shell script based git-fetch
to be seeing the performance you were.

Maybe 1.6.1 or .2 we can try to squeeze fetch to run faster.
Its far too late for 1.6.0.

> Sorry that i didnt notice that titan had 1.5.2 - i almost never notice
> it when i switch between stable git versions. (you guys are doing a
> really good job on compatibility)

Yea, its easy to not realize your git isn't giving you the latest
and greatest toys.  ;-)

--
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html