Smart server performance with checkouts

John Arbash Meinel john at arbash-meinel.com
Tue Jun 26 14:38:58 BST 2007


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

Nicholas Allen wrote:
> I was just doing some quick use cases with the smart server to see how
> it performed. It seems to make a huge difference when branching without
> any local history but I was suprised to find that a lightweight checkout
> now takes considerably longer than a full branch with all history. I
> would have thought that lightweight checkout would be much quicker as
> the server just needs to tar up the working tree and send it to the client:
> 
> 
> time bzr branch  bzr+ssh://user@host/project
> Copying repository content as tarball...
> Branched 102 revision(s).
> 
> real    0m19.064s
> user    0m4.340s
> sys     0m1.532s


Notice the "Copying repository" line. We have explicitly short-cutted the
"branch into a completely new target". Because we know there is nothing in the
destination yet, so we can just tar up what we have, copy it across, and unpack
it on the other side. However, this will fail if you have a local shared
repository, or are pulling 10,000 revisions on a branch that only has 1
revision, etc.

So the fix we have in place right now works in a fairly common case of "let me
get this project I'm interested in", but is pretty brittle. I believe Andrew is
working on a real solution (it is partially tied up in all of the pack format /
bundle discussions).

> 
> nick at nick-laptop /tmp> time bzr branch  sftp://user@host/project
> Branched 102 revision(s).
> 
> real    3m44.590s
> user    0m4.936s
> sys     0m0.436s
> 
> nick at nick-laptop /tmp> time bzr co --lightweight
> bzr+ssh://user@host/project
> 
> 
> real    1m7.126s
> user    0m1.880s
> sys     0m0.220s
> 
> Also a full checkout (which is really just a branch followed by a bind)
> took about the same amount of time as a lightweight checkout.

This is doing a direct grab of all the files (nothing specifically optimized).
It should be considerably faster than "bzr co --lightweight sftp://". But at
the moment we don't have any special cases for sending the current WT across
the wire.

> 
> It seems strange though that a checkout is so much slower than a branch
> when they are essentially the same command.
> 
> I guess there's still a lot of work to be done on improving the smart
> server.
> 
> Is this expected to improve in 0.18?
> 
> 
> Nick

I don't know the specific timeline for these. I believe the current focus is
local performance, but I know Andrew is still spending some time on the smart
server performance.

John
=:->


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

iD8DBQFGgRbyJdeBCYSNAAMRAvwDAJ0Q9fLAbKox9K9Ej7ZJnP2Qd3GBIwCdEvpn
henb+u37+bGA9QfMyugsL/4=
=ie+q
-----END PGP SIGNATURE-----



More information about the bazaar mailing list