From: Linus Torvalds <torvalds@linux-foundation.org>
To: Craig Boston <craig@olyun.gank.org>
Cc: Junio C Hamano <junkio@cox.net>, Git Mailing List <git@vger.kernel.org>
Subject: Re: Efficient way to import snapshots?
Date: Mon, 30 Jul 2007 18:44:13 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.0.999.0707301825130.4161@woody.linux-foundation.org> (raw)
In-Reply-To: <20070731011707.GA91930@nowhere>
On Mon, 30 Jul 2007, Craig Boston wrote:
> >
> > So I _seriously_ hope that about 65 of those 67 seconds was the "cvs
> > update -d" or something like that.
>
> No, the only thing included in that is
>
> git ls-files -o | git update-index --add --stdin
> git commit -a -m "${COMMITMSG}"
Ouch.
> > Anything that takes a minute in git is way way *way* too slow. Any
> > half-way normal git operations should take less than a second.
>
> That said, I don't think it's git's fault. I think most of the time is
> spent calling stat() on all the files. The machine that took 60 seconds
> isn't what I'd call top-of-the-line:
>
> 1st or maybe 2nd-gen Willamette CPU
> 512MB memory (stupid motherboard that won't accept more)
> Slow disks in RAID-5 configuration
> Running ZFS with less than half of the recommended minimum memory, to
> the point where I had to reduce the number of vnodes that the kernel is
> allowed to cache to avoid running out of KVA
Oh, ok. Solaris.
With slow pathname lookup, and hard limits on the inode cache sizes.
Git really normally avoids reading the data, so even in 512M you should
_easily_ be able to cache the metadata (directory and inodes), which is
all you need. But yeah, Linux will probably do that a whole lot more
aggressively than Solaris does.
[ And to be honest, any CVS update would probably have blown the caches on
Linux too - I don't know what all CVS ends up doing, but from past
experience, I'll bet it's not good ]
But just for comparison, on a lowly 480MB mac-mini (running Linux, not OS
X, of course - and the 480MB is because the graphics is UMA and takes
part of the 512MB total), and the kernel archive (which is just 22k files,
not 37k), with a laptop drive:
- cold-cache "git status":
real 0m17.975s
user 0m1.098s
sys 0m0.539s
- rerunning it immediately afterwards:
real 0m1.079s
user 0m0.896s
sys 0m0.183s
so the target really _should_ generally be one second.
But yeah, in order to hit that target, you definitely do want to keep the
metadata cached, and I guess that means more than 512M on Solaris.
Linus
next prev parent reply other threads:[~2007-07-31 1:44 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-30 18:07 Efficient way to import snapshots? Craig Boston
2007-07-30 18:56 ` Linus Torvalds
2007-07-30 19:29 ` Craig Boston
2007-07-30 19:52 ` Linus Torvalds
2007-07-30 20:10 ` Craig Boston
2007-07-30 21:29 ` Junio C Hamano
2007-07-30 21:49 ` Craig Boston
2007-07-30 21:04 ` Junio C Hamano
2007-07-30 23:19 ` Linus Torvalds
2007-07-30 21:55 ` Junio C Hamano
2007-07-30 23:27 ` Linus Torvalds
2007-07-30 23:59 ` Junio C Hamano
2007-07-31 0:45 ` Linus Torvalds
2007-07-31 0:47 ` Junio C Hamano
2007-07-30 22:20 ` Craig Boston
2007-07-30 23:30 ` Linus Torvalds
2007-07-31 1:17 ` Craig Boston
2007-07-31 1:44 ` Linus Torvalds [this message]
2007-07-31 4:23 ` Theodore Tso
2007-07-31 13:53 ` Craig Boston
2007-07-31 15:50 ` Linus Torvalds
2007-07-31 16:15 ` Theodore Tso
2007-07-31 6:23 ` David Kastrup
2007-07-31 7:54 ` Florian Weimer
2007-07-31 8:48 ` David Kastrup
2007-07-30 21:22 ` Jakub Narebski
2007-07-30 21:54 ` David Kastrup
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=alpine.LFD.0.999.0707301825130.4161@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=craig@olyun.gank.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).