« November 2006 | Main | November 2007 »

February 16, 2007

bzr and different network protocols.

As "D" kindly pointed out to me in a comment in my previous post, the comparison I did was unfair in that I used sftp for bzr when pulling from a server, but http for hg.

While I realized there's crypto overhead etc involved in sftp, I didn't imagine that the overhead would be noticeable, but to be fair I re-ran the tests. The results are interesting to say the least. I did two pulls over http with bzr for the same repository I used for my earlier tests (still on localhost, served through apache), and I've yet to see a number that shows a significant speedup with http rather than sftp. One run took 28 minutes (vs 33 with sftp), the other took almost 44. Go figure. I also tested the bzr protocol, and that is faster, a pull using the bzr protocol, with bzr itself serving it, took 15 minutes, about half the time of my initial tests with sftp. So that's definitely a good improvement, but why http is as slow, or even slower, than sftp is beyond me.

Posted by jst at 4:27 PM | Comments (6)

February 13, 2007

More on distributed VCS performance.

This is a followup to my previous posting about bzr/hg/git performance, since the time when I wrote that posting I've continued to use git for my own use, but recently decided to look more into what it would feel like using either Bazaar (bzr) or Mercurial (hg). Since I wrote my previous post, bzr did release a new version (0.14) and performance did indeed improve some for the tasks I measured in my last posting (diff). Diffing is obviously not all you do when you're working with a VCS, and even though bzr was notably slower than the alternatives, it still wasn't unusably slow. I could live with that.

So I decided to perform some other tests. This time, since git is unfortunately out of the question here at Mozilla, I chose to compare only Bazaar (bzr) and Mercurial (hg). I started by Initializing a repository and populated it with a clean Mozilla trunk checkout (pulled a tree from CVS, removed all CVS directories and .cvsignore files, and committed the whole thing into the VCS). Once that was done, I performed a set of tasks that are likely to be performed more than occasionally by Mozilla developers. All times are single samples of wall clock time in minutes and seconds, but performed on a hot disk cache.

1. Pull/branch/clone from central repository. I.e. create a local working space, i.e. copy revision history from central repository (on localhost in this test) to local directory, and populate the local working space with what's in the repository.

- hg: 2:07 (hg clone http://...)
- bzr: 35:25 (bzr branch sftp://...)

2. Local branch/clone. Create a new working space for a large-ish change you're going to be working on. bzr calls this branching, hg calls it cloning.

- hg: 0:59 (hg clone src dest)
- bzr: 33:03 (bzr branch src dest)

3. Merge. Merge in a simple change from another branch you've been working on.

- hg: 0:05 (hg merge ...)
- bzr: 1:19 (bzr merge ...)

Now those are not pretty numbers from a bzr point of view. 10 or so second diffs I can deal with, half hour pulls aren't too bad, as you really wouldn't pull a whole tree from the central repository very often (ideally only once per computer). But half-hour branch times would be really tough to deal with, as I could see myself doing that more than once a day sometimes.

And note, these tests are done with virtually no history, things would only get slower as the amount of history in the repository grows larger.

Oh, and:

sh$ bzr rocks
it sure does!

Yup, I think it does too, but until it gets a fair bit faster, I can't say I'd be excited about using it for a project the size of Mozilla :(

Posted by jst at 5:17 PM | Comments (3)