Small datapoint

Goffredo Baroncelli kreijack at alice.it
Tue Dec 13 21:50:42 GMT 2005


On Tuesday 13 December 2005 21:24, John Arbash Meinel wrote:
> I just did a quick test on my local network to see the difference
> between bzr with sftp and http when doing 'bzr branch'. What I found was
> pretty shocking:
> 
> $ time bzr branch sftp://juju//srv/bzr/public/branches/bzr/permissions
> Branched 1487 revision(s).
> 
> real    0m54.889s
> user    0m16.424s
> sys     0m3.983s
> 
> jameinel at liliana ~/dev/bzr
> $ time bzr branch http://bzr.arbash-meinel.com/branches/bzr/permissions
> Branched 1487 revision(s).
> 
> real    22m4.033s
> user    20m53.494s
> sys     0m41.984s
> 
> So it took 20x longer over http than it took over sftp. All of this is
> local (including a local DNS server). But noticing that the user time is
> 20minutes, it seems that all of that time is spent parsing something.
> (Probably the inventory).

I have found the same numbers. This is due to the fact that the [s|a]ftp transport
allow directory listing. Instead http:// doesn't allow.

The clone functions on transport which allow the directory listing, perform a list
of the .bzr/{weave,revision-store} and copy/merge every file. As consequence if the original
repository have a file missing, the code isn't able to detect this [**]

Otherwise the clone function on transport which doesn't allow the directory listing 
performs an extraction/parsing of inventories per every revision in order to detect which
weave have to be copied; even tough an extraction/parsing of the revision would taken
0.5 seconds, the fullhistory ( ~2900 revs ) requires 2900x0.5 = 1450sec = ~24 minutes...

With my patches (see  '[RFC][PATCH ] Speed improvement in fetch/clone' ) 
the speed of the http:// transport are similar to the other ones [*].

Todate, I think that bazaar with a http transport are quite unusable... :-(

[*]
Without my patch
$ time bzr clone ftp://ghigo:XXXX@127.0.0.1/home/ghigo/bazaar/bzr.dev
Branched 1487 revision(s).

real    2m39.826s
user    0m42.384s
sys     0m14.503s
$ du -sc bzr.dev/
35720   bzr.dev/
35720   total

With my patches ( but you have to consider that in a real case on http the latency 
is bigger on a not loopback interface):

$ time /home/ghigo/bazaar/bzr-ghigo/bzr clone http://127.0.0.1:8077/bazaar/bazaar-ng_stable_branch
Branched 1487 revision(s).

real    2m25.901s
user    1m29.213s
sys     0m17.086s

$ time /home/ghigo/bazaar/bzr-ghigo/bzr clone ftp://ghigo:XXXX@127.0.0.1/home/ghigo/bazaar/bzr.dev
Branched 1487 revision(s).

real    2m0.565s
user    0m40.874s
sys     0m13.133s

[**]
$ find a
a
a/.bzr
a/.bzr/revision-store
a/.bzr/revision-store/59
a/.bzr/revision-store/59/ghigo at therra.bhome-20051213205105-0ff08a662d8652d6
a/.bzr/revision-store/ff
a/.bzr/revision-store/ff/6789
a/.bzr/revision-store/ff6789
a/.bzr/weaves
a/.bzr/weaves/eb
a/.bzr/weaves/eb/A-20051213205059-b37ed202f70ea7d5.weave
a/.bzr/branch-format
a/.bzr/README
a/.bzr/revision-history
a/.bzr/branch-name
a/.bzr/branch-lock
a/.bzr/pending-merges
a/.bzr/inventory
a/.bzr/inventory.weave
a/.bzr/ancestry.weave
a/.bzr/stat-cache
a/.bzr/basis-inventory.ghigo at therra.bhome-20051213205105-0ff08a662d8652d6
a/A

$ mv a/.bzr/revision-store/59/ghigo at therra.bhome-20051213205105-0ff08a662d8652d6 .

$ bzr clone a f
Branched 1 revision(s).

$ cd f
$ bzr log
bzr: ERROR: Branch BzrBranch(u'/tmp/f') has no revision ghigo at therra.bhome-20051213205105-0ff08a662d8652d6
$ 

> John
Goffredo


-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack @ inwind.it>
Key fingerprint = CE3C 7E01 6782 30A3 5B87  87C0 BB86 505C 6B2A CFF9




More information about the bazaar mailing list