Post details: How to make Gentoo's CVS access suck less ...

11 October, 2007

Permalink 10:00 UTC, by Rémi CARDONA Email , 300 words, 1192 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

Trackback address for this post:

http://planet.gentoo.org/developers/htsrv/trackback.php/1411

Comments, Trackbacks:

Comment from: Markus Ullmann [Member]
Can we get that added to our docs as the speedup is just awesome
PermalinkPermalink 11 October, 2007 @ 11:09

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))

Rémi Cardona

August 2008
Mon Tue Wed Thu Fri Sat Sun
<< <     
        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: 55

powered by
b2evolution