[RFC] Removing hash prefix in storage vastly improves performance

John Arbash Meinel john at arbash-meinel.com
Thu Aug 17 23:47:08 BST 2006


The attached patch adds a very simple new knit repository format. The
only change is that it doesn't use the hash prefixes when figuring out
where a given file id is stored, it stores everything in one directory.

Originally, I was suspicious that this would help, but I was seeing that
25+% of the time spent committing a new kernel was just creating the
knit index header. So I gave it a shot. And what I found was that:

time bzr.dev/bzr -q commit -m "first"
8:36.95

time no-knit-hash-prefix/bzr -q commit -m "first"
4:12.68

Yep, that's right. 2x faster. Just as some comparison points:
	
 1:21.56 time bzr-0.8/bzr add
11:03.12 time bzr-0.8/bzr -q commit -m "first"

   11.31 time bzr-0.9/bzr add
 7:51.00 time bzr-0.9/bzr -q commit -m "first"

    8.62 time bzr.dev/bzr add
 7:19.14 time bzr.dev/bzr -q commit -m "first"
 8:34.66 time bzr.dev/bzr commit -m "noisy"

    8.80 time no-knit-hash-prefix/bzr add
 4:43.66 time no-knit-hash-prefix/bzr -q commit -m "first"
 5:34.66 time no-knit-hash-prefix/bzr commit -m "noisy"

I'm also working on another patch to make commit faster without using
'--quiet'. It seems 'note()' is quite a bit slower than mutter(). Also,
there seems to be a bug where we are clearing the progress bar during
commit too often. You can really tell if you use 'bzr -q commit'.

This would be pretty easy to phase into an 0.10 release, since it really
is a small change. Because it is a repository format change, we may want
to just have it available, but not the default for the next release.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: no-hash-prefix.patch
Type: text/x-patch
Size: 7382 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060817/83476cac/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060817/83476cac/attachment.pgp 


More information about the bazaar mailing list