Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial: performance of access via ssh and http

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?

like image 749
zerkms Avatar asked Nov 10 '10 13:11

zerkms


2 Answers

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.

like image 171
Ry4an Brase Avatar answered Oct 22 '22 15:10

Ry4an Brase


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).

like image 23
Lars Povlsen Avatar answered Oct 22 '22 16:10

Lars Povlsen