From: Ken Moffat <zarniwhoop@ntlworld.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kevin D <me@ikke.info>, Git Mailing List <git@vger.kernel.org>
Subject: Re: Git very slow ?
Date: Sun, 8 Mar 2015 23:31:54 +0000 [thread overview]
Message-ID: <20150308233154.GB3792@milliways> (raw)
In-Reply-To: <CA+55aFwn9vOWAL_9eHQt+kQN16j3+nQLeibWos86g5T_RZEizg@mail.gmail.com>
On Sun, Mar 08, 2015 at 12:39:10PM -0700, Linus Torvalds wrote:
> On Sun, Mar 8, 2015 at 12:02 PM, Ken Moffat <zarniwhoop@ntlworld.com> wrote:
> >
> > The comments on git bisect were for linus'skernel tree, on a local
> > disk. 2.3GB of repo, just under 57000 files.
>
> Ugh. I hope you are talking about checked-out size.
>
> [torvalds@i7 linux]$ du -sh .git
> 850M .git
>
> because otherwise it sounds like that repo hasn't been repacked in forever.
>
Yes - I had finished bisecting, with the build still present.
> To really pack things (which can slow things down for old history as
> people said, but on the whole it tends to be a big win due to less
> IO), do
>
> git repack -adf --window=200 --depth=200
>
> and go away for a while. Oh, and make sure your machine has enough
> memory and CPU to make that "for a while" not be *too* long.
>
For that, many thanks - this desktop has about 7GB (integrated
graphics steal a bit), current AMD desktop, and the repack of my
scripts repo took about 56 seconds. I'll do that on my copy of
the kernel tomorrow (it's on another machine).
> You should have a few hundred files (just a few tens of files directly
> after the repack) and that roughly 850MB of space for the repository
> information itself.
>
> But yeah, fully checked out and built with all the modules etc, you
> would have much more.
>
> That said, if you have something fairly that is consistently really
> slow (like the "git commit" you mentioned), *before* doing the repack,
> do
>
> strace -o ../trace-file -Ttt git commit
>
> and we can get a much better guess about why it's so slow. Send it to
> me in private email if you don't want to make it public, and I can
> take a look.
I don't think you need to look - it was taking most of the time
(about 8 seconds) looping through the many files below .git/objects.
The trace was just over 9000 lines, repeating after the repack was
less than 1300 lines. It's available (97K after using xz) if you
think it would be useful, but I think you have already diagnosed the
problem and solution.
>
> > ping between them gives times of 0.25 to 0.3 seconds
>
> .. and I *really* hope that was not seconds, but ms. Otherwise your
> nfsv3 setup is going to be really really painful.
>
> Linus
Yes, I'm not always good at knowing the right units. Thanks for the
help.
ĸen
--
Nanny Ogg usually went to bed early. After all, she was an old lady.
Sometimes she went to bed as early as 6 a.m.
prev parent reply other threads:[~2015-03-08 23:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-07 1:30 Git very slow ? Ken Moffat
2015-03-08 15:51 ` Kevin D
2015-03-08 16:21 ` David Kastrup
2015-03-08 19:20 ` Ken Moffat
2015-03-08 19:37 ` David Kastrup
2015-03-08 19:46 ` Linus Torvalds
2015-03-08 19:02 ` Ken Moffat
2015-03-08 19:39 ` Linus Torvalds
2015-03-08 23:31 ` Ken Moffat [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150308233154.GB3792@milliways \
--to=zarniwhoop@ntlworld.com \
--cc=git@vger.kernel.org \
--cc=me@ikke.info \
--cc=torvalds@linux-foundation.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).