Can I use compression with bzr+ssh?

Asked by Elliot Murphy

I am helping a colleague convert to Bazaar, and he has a very large bazaar repository, several hundred megabytes. Can you help me answer them? I have already suggested creating a tarball on the remote machine and downloading that to prime the local repository (some of the developers are in an area that has expensive internet connection).

> - is it true that paramiko is used by default by bzr?
> - is it true that paramiko does not support compression, or that bzr
> does not ask it to use compression?
> - would we benefit from switching from paramiko to "ssh -C" (which
> seems to be doable by setting BZR_SSH=openssh and adding a '-C' in
> transport/ssh.py)?

Question information

Language:
English Edit question
Status:
Answered
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
John A Meinel (jameinel) said :
#1

We try to find an 'ssh' process. If it is available, we use it.
If not, we use 'paramiko'. (On win32 for a while we used plink directly, but then we ran into problems with password prompts. Since paramiko can use pagaent keys directly, there didn't seem to be a reason to use plink, but you can still explicitly request it.)

I don't know if paramiko supports or requests compression. I would guess it supports it, but may not request it by default?

for 'ssh -C' or "ssh -oCompression=XXX" you can easily set an option in ~/.ssh/config

A line like:

Host *
  Compression yes

should be sufficient. I don't know that it needs to be done by bzr itself. We probably could, and it is worth bringing up the idea.

My man ssh_config says:
     Compression
             Specifies whether to use compression. The argument must be ``yes'' or
             ``no''. The default is ``no''.

     CompressionLevel
             Specifies the compression level to use if compression is enabled. The argu-
             ment must be an integer from 1 (fast) to 9 (slow, best). The default level
             is 6, which is good for most applications. The meaning of the values is the
             same as in gzip(1). Note that this option applies to protocol version 1
             only.

I'm a little curious why "CompressionLevel" is only applicable to protocol v1, does that mean that Compression is interpreted differently for V2?

Revision history for this message
GuilhemBichot (guilhem-bichot) said :
#2

I wonder if the files which bzr transfers during the branch, are already compressed. If they are, using ssh's compression options would not help.

Revision history for this message
John A Meinel (jameinel) said :
#3

Most of the data is already compressed, but not everything is. index files are not compressed, though most of the user data is.

Can you help with this problem?

Provide an answer of your own, or ask Elliot Murphy for more information if necessary.

To post a message you must log in.