Bazaar traffic during commit

John Arbash Meinel john at arbash-meinel.com
Fri Feb 19 19:08:29 GMT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eli Zaretskii wrote:
> I just committed 2 files whose combined size is 32KB from a bound
> branch to the Emacs repository, and Bazaar showed that it moved 4.5MB
> through the wire (we are still using SFTP, so I have nothing better to
> do than watch the bytes move ;-).
> 
> Is this expected?  What are those megabytes?
> 
> (This is with bzr 2.0.3 on Windows XP.)
> 
> TIA

The most likely culprit is that bzr decided to repack part of the remote
repository. (Look in ~/.bzr.log for a line about autopacking.) Since you
are accessing the repo over sftp, that requires re-downloading some
content, putting it together with other content, and then re-uploading it.

If you were accessing over bzr+ssh, the autopack would be happening on
the server side.

Note that in newer bzr's you can add "-Dbytes" or set: debug_flags =
bytes in ~/.bazaar.conf and it will print the total transferred bytes
when the command ends. It also indicates up vs down, etc. (This is in
the 2.1 series.)

The reason we autopack is to avoid a slowdown as the number of packs
grow large. If you are searching for a revision, searching within one
index is O(log100(Nrevs)), but searching across indexes is O(Nindices),
so 10 100 node indexes is 10*log100(100) = 10, searching within 1 1,000
node index is 1*log100(1000) = 1.5, about 6.7x faster. In a different
view, on-average you find the revision you care about half-way through,
so it takes 5 lookups to read 5 tiny indexes, but 2 lookups to read the
root+appropriate page of 1 large index.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkt+4a0ACgkQJdeBCYSNAAOXOQCaA3uY/aBGvc9Gp9yCi5Yf3f0s
zZQAnjlgv7Hw1bvffnZZ+xH604aw4D9n
=GZkt
-----END PGP SIGNATURE-----



More information about the bazaar mailing list