Archives for: October 2007, 11

11 October, 2007

Permalink 10:00 UTC, by Rémi CARDONA Email , 300 words, 1276 views   English (US)
Categories: Gentoo

How to make Gentoo's CVS access suck less ...

This post started out as a major rant against CVS and how it sucks to be using it from Europe and how all those round trips in the protocol make even just bumping a single ebuild a tedious task that I have never been able to do in under 4~5 minutes.

But no! I shall not lower myself to this level and instead write a praise for the OpenSSH folks who through their l33t coding skills give us the opportunity to improve CVS for free :D

The problem : the CVS protocol sucks because for each file/directory you want to update, CVS will open a new SSH connection to send its command. The SSH protocol does not really help with that since creating a new connection brings a lot of overhead.

The solution : use the OpenSSH ControlMaster option to tell it to use a single connection that stays open (somewhat like Keep-alive in HTTP) and that will be used to create new "sub-connections" that are much cheaper.

"How?" you ask me. Well, here's how.

  1. Add this to your ~/.ssh/config

    Host *
    ControlMaster auto
    ControlPath ~/.ssh/master-%r@%h:%p

  2. After running ssh-agent, run the following command :

    ssh -M -N -f login@cvs.gentoo.org

  3. Enjoy a 3x speed-up like I did! For those that doubt it, here's how I measured

    cd gentoo-x86/profiles
    find &> /dev/null
    time cvs up -dP
    ssh -M -N -f login@cvs.gentoo.org
    time cvs up -dP

I'd like to give a big "Thank You" to Robin who suggested I try those steps and helped me set them up. Here's to hoping it helps other fellow devs ;)

References

Rémi Cardona

October 2007
Mon Tue Wed Thu Fri Sat Sun
 < Current > >>
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

Search

Categories

Misc

XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 49

powered by
b2evolution