git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Jon Smirl <jonsmirl@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: svn to git, N-squared?
Date: Sun, 11 Jun 2006 21:02:44 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0606112056440.5498@g5.osdl.org> (raw)
In-Reply-To: <9e4733910606112039p7aff60c7w7a074d0e35c7b0f@mail.gmail.com>



On Sun, 11 Jun 2006, Jon Smirl wrote:
> 
> I have it stopped and I am running the repack.
> There are 1.27M files in my .git directory

Yeah, that would do it. That's ~5000 files per object directory, so I 
assume that your directories are 200+kB in size, and for every new object 
added, you'll basically have to traverse the old directory fully in order 
to find an empty place for it (and without hashing, you'll traverse it 
_twice_ - first to look for it, then to look for the empty space).

Btw, after repacking, if it still has lots of lose objects, and you still 
have several directories that are huge (because there are pending objects 
for a commit that didn't happen yet when you ^Z'd the svnimport), you'll 
literally get better performance if you do something like

	for i in ??
	do
		cp -r $i $i.new
		rm -rf $i
		mv $i.new $i
	done

in your .git/objects/ directory (CAREFUL! Any script that does "rm -rf" 
should be double- and triple-checked for sanity! ;)

That should make sure that you don't still have huge directories.

(And yes, this is a real problem at least with ext3).

The git cvsimporter ends up repacking the archive every thousand commits. 
That's just a random number, but it's indicative of what we did there to 
handle large imports. I don't think anybody has done a large import using 
the git-svnimport before, so you're in new territory which explains some 
of the teething problems.

		Linus

  reply	other threads:[~2006-06-12  4:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-12  2:02 svn to git, N-squared? Jon Smirl
2006-06-12  3:31 ` Linus Torvalds
2006-06-12  3:39   ` Jon Smirl
2006-06-12  4:02     ` Linus Torvalds [this message]
2006-06-12 19:04       ` Yakov Lerner
2006-06-12 19:17         ` Linus Torvalds
2006-06-12 16:18   ` Randal L. Schwartz
2006-06-12 16:25     ` Randal L. Schwartz
2006-06-12  4:29 ` Eric Wong
  -- strict thread matches above, loose matches on Subject: below --
2006-06-12  4:39 linux
2006-06-12 15:32 ` Jon Smirl
2006-06-12 15:45   ` Linus Torvalds
2006-06-12 15:55     ` Jon Smirl
2006-06-12 16:12       ` Linus Torvalds
2006-06-12 16:22         ` Jon Smirl
2006-06-12 16:32           ` Jon Smirl
2006-06-12 16:57             ` Linus Torvalds
2006-06-12 16:41           ` Linus Torvalds
2006-06-12 16:44             ` Jon Smirl
2006-06-12 17:08               ` Linus Torvalds
2006-06-12 18:06                 ` Jon Smirl
2006-06-12 19:00                   ` Jon Smirl
2006-06-12 16:16     ` Jon Smirl

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.0606112056440.5498@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=jonsmirl@gmail.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).