People unaware of the importance of "git gc"?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Git Mailing List <git@...>
Date: Wednesday, September 5, 2007 - 3:09 am

So we had a git bof at linux.conf.eu yesterday, and I leart something 
new: even people who have been using git for a long time apparently don't 
necessarily realize the importance of repacking.

James Bottomley (the Linux SCSI maintainer) is an old-time BK user, and 
very comfy using git. But when he was demonstrating things on his poor old 
laptop, simple things like "git branch" literally took a long time, and 
James didn't seem to realize that the fact that he had apparently never 
ever repacked his repository was a big deal.

The kernel archive is a 190MB pack for me fully repacked (I just checked - 
I had actually thought that it was somewhat larger than that), but because 
James hadn't repacked, his .git directory was over a gigabyte in size, and 
his laptop wasn't able to cache anything at all effectively as a result.

Repacking it took over an hour, simply because everything was *so* 
unpacked, and James' kernel repository had something like 92 thousand 
loose objects, and several hundred packfiles. Simple operations that 
really take much less than a second for me ("git branch" takes 0.022s on 
my laptop, which has the same 512M that James had on his) took many many 
seconds as a result, and James seemed to think that this was all normal.

And James didn't even want to repack, because it was so expensive (which 
he knew - he claims to have never ever repacked at all, but maybe he had 
started it and just control-C'd it when it was really slow at some point).

Now, it may be that James didn't realize how important the occasional 
garbage collect is exactly *because* he is an old-timer and used BK long 
before he used git, and just continued using git simply as a BK 
replacement, but it did make me wonder whether maybe this lack of 
repacking awareness is fairly common. 

I've been against automatic repacking, but that was really based on what 
appears to be potentially a very wrong assumption, namely that people 
would do the manual repack on their own. If it turns out that people don't 
do it, maybe the right thing for git to do really is to at least notify 
people when they have way too many pack-files and/or loose objects.

I personally repack everything way more often than is necessary, and I had 
kind of assumed that people did it that way, but I was apparently wrong. 
Comments?

		Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
People unaware of the importance of "git gc"?, Linus Torvalds, (Wed Sep 5, 3:09 am)
Re: People unaware of the importance of "git gc"?, Alex Riesen, (Wed Sep 5, 5:07 pm)
Re: People unaware of the importance of "git gc"?, J. Bruce Fields, (Wed Sep 5, 1:44 pm)
Re: People unaware of the importance of "git gc"?, Brandon Casey, (Wed Sep 5, 2:46 pm)
Re: People unaware of the importance of "git gc"?, David Kastrup, (Wed Sep 5, 3:09 pm)
Re: People unaware of the importance of "git gc"?, Mike Hommey, (Wed Sep 5, 3:20 pm)
Re: People unaware of the importance of "git gc"?, J. Bruce Fields, (Wed Sep 5, 3:13 pm)
Re: People unaware of the importance of "git gc"?, David Kastrup, (Wed Sep 5, 3:43 pm)
Re: People unaware of the importance of "git gc"?, Govind Salinas, (Wed Sep 5, 12:47 pm)
Re: People unaware of the importance of "git gc"?, Steven Grimm, (Wed Sep 5, 1:35 pm)
Re: People unaware of the importance of "git gc"?, Carl Worth, (Wed Sep 5, 1:19 pm)
Re: People unaware of the importance of "git gc"?, David Kastrup, (Wed Sep 5, 4:16 am)
Re: People unaware of the importance of "git gc"?, Pierre Habouzit, (Wed Sep 5, 3:42 am)
Re: People unaware of the importance of "git gc"?, Steven Grimm, (Wed Sep 5, 2:14 pm)
Re: People unaware of the importance of "git gc"?, Nicolas Pitre, (Wed Sep 5, 2:54 pm)
Re: People unaware of the importance of "git gc"?, Junio C Hamano, (Wed Sep 5, 4:01 pm)
Re: People unaware of the importance of "git gc"?, Johannes Schindelin, (Thu Sep 6, 11:54 am)
Re: People unaware of the importance of "git gc"?, Junio C Hamano, (Thu Sep 6, 1:49 pm)
Re: People unaware of the importance of "git gc"?, Johannes Schindelin, (Fri Sep 7, 6:12 am)
Re: People unaware of the importance of "git gc"?, Shawn O. Pearce, (Fri Sep 7, 12:48 am)
Re: People unaware of the importance of "git gc"?, Linus Torvalds, (Thu Sep 6, 2:15 pm)
Subject: [PATCH] git-merge-pack, Junio C Hamano, (Thu Sep 6, 7:12 pm)
Re: Subject: [PATCH] git-merge-pack, Andy Parkins, (Fri Sep 7, 3:24 am)
Re: Subject: [PATCH] git-merge-pack, Johannes Sixt, (Fri Sep 7, 3:11 am)
Re: Subject: [PATCH] git-merge-pack, Junio C Hamano, (Fri Sep 7, 3:34 am)
Re: Subject: [PATCH] git-merge-pack, Nicolas Pitre, (Thu Sep 6, 8:51 pm)
Re: Subject: [PATCH] git-merge-pack, Junio C Hamano, (Fri Sep 7, 12:43 am)
[PATCH] pack-objects --repack-unpacked, Junio C Hamano, (Sat Sep 8, 6:01 am)
Re: [PATCH] pack-objects --repack-unpacked, Shawn O. Pearce, (Sat Sep 8, 10:57 pm)
Re: [PATCH] pack-objects --repack-unpacked, Junio C Hamano, (Sun Sep 9, 1:04 am)
Re: [PATCH] pack-objects --repack-unpacked, Nicolas Pitre, (Sun Sep 9, 8:29 am)
Re: [PATCH] pack-objects --repack-unpacked, Shawn O. Pearce, (Sun Sep 9, 1:49 pm)
Re: Subject: [PATCH] git-merge-pack, Shawn O. Pearce, (Fri Sep 7, 12:07 am)
Re: Subject: [PATCH] git-merge-pack, Junio C Hamano, (Thu Sep 6, 9:58 pm)
Re: Subject: [PATCH] git-merge-pack, Nicolas Pitre, (Thu Sep 6, 10:32 pm)
Re: Subject: [PATCH] git-merge-pack, Linus Torvalds, (Thu Sep 6, 7:35 pm)
Re: People unaware of the importance of "git gc"?, Steven Grimm, (Thu Sep 6, 2:29 pm)
Re: People unaware of the importance of "git gc"?, Shawn O. Pearce, (Wed Sep 5, 10:45 pm)
Re: People unaware of the importance of "git gc"?, Steven Grimm, (Wed Sep 5, 10:49 pm)
Re: People unaware of the importance of "git gc"?, Shawn O. Pearce, (Wed Sep 5, 10:56 pm)
Re: People unaware of the importance of "git gc"?, Alex Riesen, (Wed Sep 5, 5:18 pm)
Re: [PATCH] Invoke "git gc --auto" from "git add" and "git f..., Johannes Schindelin, (Thu Sep 6, 8:02 am)
Re: People unaware of the importance of "git gc"?, Nicolas Pitre, (Wed Sep 5, 4:35 pm)
Re: People unaware of the importance of "git gc"?, Junio C Hamano, (Wed Sep 5, 5:49 pm)
Invoke "git gc --auto" from commit, merge, am and rebase., Junio C Hamano, (Wed Sep 5, 5:59 pm)
Re: People unaware of the importance of "git gc"?, Junio C Hamano, (Wed Sep 5, 5:46 pm)
Re: People unaware of the importance of "git gc"?, David Kastrup, (Thu Sep 6, 1:55 am)
Re: People unaware of the importance of "git gc"?, Nicolas Pitre, (Wed Sep 5, 7:04 pm)
Re: People unaware of the importance of "git gc"?, Junio C Hamano, (Wed Sep 5, 7:42 pm)
Re: People unaware of the importance of "git gc"?, Carlos Rica, (Wed Sep 5, 8:27 pm)
Re: People unaware of the importance of "git gc"?, Steven Grimm, (Wed Sep 5, 4:50 am)
Re: People unaware of the importance of "git gc"?, David Kastrup, (Wed Sep 5, 5:13 am)
Re: People unaware of the importance of "git gc"?, Pierre Habouzit, (Wed Sep 5, 5:14 am)
Re: People unaware of the importance of "git gc"?, Junio C Hamano, (Wed Sep 5, 5:07 am)
Re: People unaware of the importance of "git gc"?, Martin Langhoff, (Wed Sep 5, 5:27 am)
Re: People unaware of the importance of "git gc"?, Matthieu Moy, (Wed Sep 5, 5:33 am)
Re: People unaware of the importance of "git gc"?, Johan De Messemaeker, (Wed Sep 5, 10:17 am)
Re: People unaware of the importance of "git gc"?, Matthieu Moy, (Wed Sep 5, 1:31 pm)
Re: People unaware of the importance of "git gc"?, Jeff King, (Wed Sep 5, 7:56 pm)
Re: People unaware of the importance of "git gc"?, Junio C Hamano, (Wed Sep 5, 4:16 am)
Re: People unaware of the importance of "git gc"?, Junio C Hamano, (Wed Sep 5, 3:30 am)
Re: People unaware of the importance of "git gc"?, Wincent Colaiuta, (Wed Sep 5, 4:51 am)
Re: People unaware of the importance of "git gc"?, Johan Herland, (Wed Sep 5, 4:13 am)
Re: People unaware of the importance of "git gc"?, Matthieu Moy, (Wed Sep 5, 4:39 am)
Re: People unaware of the importance of "git gc"?, Pierre Habouzit, (Wed Sep 5, 4:51 am)
Re: People unaware of the importance of "git gc"?, Matthieu Moy, (Wed Sep 5, 5:04 am)
Re: People unaware of the importance of "git gc"?, Johan Herland, (Wed Sep 5, 4:41 am)
Re: People unaware of the importance of "git gc"?, Tomash Brechko, (Wed Sep 5, 3:26 am)
Re: People unaware of the importance of "git gc"?, Martin Langhoff, (Wed Sep 5, 3:21 am)