Question

I've noticed that cloning repo via ssh is much slower than through http regardless if it is from my own servers or BitBucket. Much in my case equals to 10 seconds from http vs. more than 2 minutes with ssh on the same BitBucket repository.

I'm using Mercurial on Windows (TortoiseHg 1.5, Mercurial 1.7). Both tests were done from GUI as well as from CLI.

Is it a common "issue" or I'm doing something wrong?

Was it helpful?

Solution

Have you turned on ssh compression in your ssh client?? It's on by default in HTTP, but it's off by default in ssh it's a setting that ssh and not mercurial controls.

http://confluence.atlassian.com/display/BITBUCKET/Using+SSH+to+Access+your+Bitbucket+Repository#UsingSSHtoAccessyourBitbucketRepository-EnablingCompression

Usually Mercurial ssh access is faster than http -- it is for me anyway.

I find that on a LAN things are faster without compression (compression takes more time than xfer) and on a WAN it's the reverse.

OTHER TIPS

I have seen the same.

At first, I had a RHEL4/RHEL5 ssh issue, that prohibited compression to be negotiated - but that's fixed now (configuration tweaks). Unfortunately, I still see a factor of ~3 in cloning a repo (http vs. ssh).

I used "ssh = ssh -C -v" to see the compression ratio.

I'm using Linux, and I see this when cloning a large repo (180M+) - over a WAN (Europe <-> India/Asia).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top