bzr+ssh versus sftp
John Arbash Meinel
john at arbash-meinel.com
Thu Nov 29 20:55:28 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm a little concerned about something I'm seeing with bzr+ssh.
I'm using it on my local network as the transport for my bound branches. My
server isn't particularly fast but these numbers are really terrible.
This is just testing the time to download the 1.5MB of an index:
% TIMEIT -s "b = Branch.open('sftp://juju/srv/bzr/public/mirrors/bzr/bzr.dev')" \
-s "t = b.repository.bzrdir.transport" \
"bytes = t.get_bytes('repository/inventory.kndx')"
10 loops, best of 3: 601 msec per loop
Changing that to bzr+ssh://....
10 loops, best of 3: 4.09 sec per loop
lsprof seems to say that the bulk of the time is spent (on both sides) in
write() and read() system calls.
I also did a test to my local machine using 'localhost' as the path and a ~2MB
pack file. And I get:
bzr+ssh: 10 loops, best of 3: 6.03 sec per loop
sftp: 10 loops, best of 3: 712 msec per loop
hmm... I also did the test on the loopback for my slow (P-III 700 MHz server):
bzr+ssh: 10 loops, best of 3: 244 msec per loop
sftp: 10 loops, best of 3: 1.47 sec per loop
Something we are doing is provoking my poor little laptop into being extra
extra slow.
I'm really surprised to see it be 8.5x slower for bzr+ssh on my laptop, and
6.02x faster on my server. I realized my server is running an older version of
paramiko (1.5.2) so I upgraded and it got a little better:
sftp: 10 loops, best of 3: 358 msec per loop
so:
a) Upgrading to paramiko 1.7.1 makes sftp support a lot faster (it also
upgraded pycrypto, so I'm not 100% sure why).
b) Something is really broken on my Mac which is causing socket IO to be really
slow for bzr+ssh. Any thoughts about how I could play with this? Maybe it is
complaining about buffering to much data.
I've also seen cases where it will spin on empty strings, but that is something
else.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHTyc/JdeBCYSNAAMRAncSAKDQJFx+EU4K/6Rr+j9wNXxoOfsepACgi1IX
U/w6Hepnyhd1jhepVLEbYXY=
=BB/N
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list