Repository size . . . is this right

Russel Winder russel.winder at concertant.com
Wed Dec 10 08:24:25 GMT 2008


On Wed, 2008-12-10 at 10:12 +1100, Andrew Bennetts wrote:
> Russel Winder wrote:
> > I have a Git repository of the Gradle project with two branches and it
> > is 132932 MB.
> > 
> > I have a Bazaar shared repository of the Gradle project with 4 branches
> > (each branch working tree is about 30MB) and it was 481640 MB.  I did a
> > pack on the 4 branches in the shared repository and now the shared
> > repository is 758860 MB.
> > 
> > This is not good.
> 
> In addition to other comments, try "bzr upgrade --1.9".  (Don't forget to
> delete/exclude the backup.bzr directory when measuring disk usage.)
> 
> The 1.9 format has more compact index files than the default format.  The
> actual pack files are the same, but the index files can be a significant
> part of the repository data.
> 
> Once bzr 1.9 is old enough that most users are likely to have it, then we'll
> probably make the 1.9 format the default format for new branches.

It appears that is is not the indexes but the packs themselves that are
the problem.  I am beginning to think this is a garbage collection
problem.  I performed the upgrade and then:

|> du -s backup.bzr/repository/*
4	backup.bzr/repository/format
1772	backup.bzr/repository/indices
4	backup.bzr/repository/lock
308548	backup.bzr/repository/obsolete_packs
4	backup.bzr/repository/pack-names
306536	backup.bzr/repository/packs
0	backup.bzr/repository/shared-storage
4	backup.bzr/repository/upload
|> du -s .bzr/repository/*
4	.bzr/repository/format
540	.bzr/repository/indices
4	.bzr/repository/lock
4	.bzr/repository/obsolete_packs
4	.bzr/repository/pack-names
306536	.bzr/repository/packs
0	.bzr/repository/shared-storage
4	.bzr/repository/upload

So the indexes got reduced by 60%, but the packs are the same.

For comaprison the git repository:

|> du -s .git/*
4	.git/branches
4	.git/COMMIT_EDITMSG
4	.git/config
4	.git/description
64	.git/gitk.cache
4	.git/HEAD
44	.git/hooks
136	.git/index
12	.git/info
364	.git/logs
96976	.git/objects
4	.git/ORIG_HEAD
4	.git/packed-refs
56	.git/qgit_cache.dat
28	.git/refs
220	.git/svn
|> du -s .git/objects/*
8	.git/objects/info
96964	.git/objects/pack
|> 

and this has more history in it -- all the branches and tags from the
Subversion repository as well as one local branch, where the Bazaar
repository has only trunk plus 3 local branches not tracking anything in
Subversion.

I guess I should experiment by starting a new shared repository and
branching in the branches to see if an effective reinitialization cuts
down the problem.  If it does then I guess it is a garbage collection
issue.

-- 
Russel.
====================================================
Dr Russel Winder                 Partner

Concertant LLP                   t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,              f: +44 8700 516 084
London SW11 1EN, UK.             m: +44 7770 465 077
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20081210/b35efd6f/attachment.pgp 


More information about the bazaar mailing list