8
I have a setup with some Mercurial repositories. For security and standardization reasons, https access to Mercurial repositories was recently disabled, which forced all developers to use ssh.
In Linux everything worked very well, but in Windows programmers began to complain of slowness. Using a colleague’s machine to Troubleshooting (Windows 7 + Mercurial 3.8.4) I realized that actually even cloning relatively small repositories takes quite a while:
$ time hg clone ssh://[email protected]/meuprojeto
destination directory: meuprojeto
requesting all changes
adding changesets
adding manifests
adding file changes
added 52 changesets with 216 changes to 55 files
updating to branch default
33 files updated, 0 files merged, 0 files removed, 0 files unresolved
real 2m58.229s
user 0m0.000s
sys 0m0.015s
Following a few tips (as such), tried to enable compression in the TortoisePlink
. I also tried to use a beta version of Plink
(theoretically faster) with little or no difference.
I then installed the Cygwin
with OpenSSH
and the difference was brutal:
$ time hg clone ssh://[email protected]/meuprojeto
destination directory: meuprojeto
requesting all changes
adding changesets
adding manifests
adding file changes
added 52 changesets with 216 changes to 55 files
updating to branch default
33 files updated, 0 files merged, 0 files removed, 0 files unresolved
real 0m15.794s
user 0m0.000s
sys 0m0.015s
The clone was ~11 times faster! Still 3 times slower than on Linux, but 15 seconds is an acceptable time.
I wonder if anyone has any idea what OpenSSH
so much faster than the Plink
when we use Mercurial on Windows? Is there anything that can be done to improve the performance of Plink
?
I believe that OpenSSH
is an acceptable solution since the target audience is developers. That said the Windows people are not very used to the Linux world and the integration of TortoiseHG + Plink + Pageant
ends up being far less alien than Cygwin + OpenSSH + ssh-agent
. Is there any other good performance and usability option for Windows?
It’s Marcos. Official Microsoft support will be beautiful. I played a game with Openssh at Powershell at home yesterday and the whole part of
ssh-agent
worked well. For theTortoiseHg
everything became transparent (thessh-agent
registered as service lifts keys). In terms of performance, at the moment Cygwin is a little faster (but that shouldn’t be true for long)... I’ll see if I can get this to run on Windows 7 (my colleague couldn’t).– Anthony Accioly
I was thinking about a crazy idea here. Have you tried installing Linux in Virtualbox, and running Tortoisehg there? Would the performance be better?
– Marcos Zolnowski
Hello Marcos, out of curiosity I took the test. Operations like
clone
has performance very close to the original Linux environment (they are faster than Cygwin). That said, the work of putting a VM to run, configuring shared folders, etc makes theCygwin
a more viable option. No other native alternative (so far found nothing) I think the best option is to initialize thessh-agent
as service and add the key in the startup. I even found a script for that reason.– Anthony Accioly
I understand, it’s not practical. But if you start using intermediate repositories, like Repodraft -> Repopublic -> Repocanonico, it might be interesting. Repodraft would be in Windows in the draft phase, the audience would be in its Virtualbox/Linux, and the canonical is the external server. With Windows communicating via HTTP with Linux, being an internal virtual network, it would be safe. Linux would continue to connect to the external server using SSH. To complete, Linux could be on the USB stick, and Virtualbox could start directly from there, facilitating mobility between computers.
– Marcos Zolnowski