[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cvs server/client protocol inefficiency

From: Mark D. Baushke
Subject: Re: cvs server/client protocol inefficiency
Date: Sun, 28 Jan 2007 09:42:37 -0800

Hash: SHA1

Hi Bruno,

Bruno Haible <bruno@clisp.org> writes:

> When the CVS protocol was designed, the structure of the Internet was
> such that an upload and a download of the same amount of data took
> roughly the same time.


...[via ADSL download is better than upload]..


> In this situation, look at what it takes to perform a "cvs diff -c3".
> I have a file 'ChangeLog', 914 KiB large, in the CVS. Here are the
> results of measuring the execution time and the network traffic of
> two CVS commands. (The execution time is measured with the "time" command,
> taking real time. The network traffic is measured by subtracting two
> subsequent runs of "netstat -s", more precisely the TCP traffic part.)
> "cvs diff -c3 ChangeLog", where the ChangeLog has only a 1-line modification:
> Time: 29 sec.
> Network traffic, first run:
>   416 segments received
>   784 segments send out
> Network traffic, second run:
>   411 received
>   675 send out
> "rm ChangeLog; cvs update ChangeLog":
> Time: 6 sec.
> Network traffic:
>   665 received
>   384 send out

Yes, I am not too surprised at this result.

> You can see here that the time to download the 914 KiB is 6 seconds.
> The "cvs diff -c3" could therefore be 5 times faster if it would download
> the 914 KiB and do the diff at the client side. Instead, it appears to be
> uploading significant amounts of data, which causes a big slowdown.

Yes, CVS 1.11.x and versions through CVS 1.12.13 will uploading the
entire locally modified file to the server and do the diff there. It
assumes that the CVS server has better provisioned resources for doing
the merge.

The top-of-tree CVS (cvs- may have a solution for you.

It allows for OpenPGP signatures to be made for each revision in the
repository. As such, it downloads the pristine copy of the file along
with a signature to verify and then does a local merge (for 'cvs
update') and or diff (for 'cvs diff') operations on the client.

If you wish to play with it, you may download a copy here:

  cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/cvs co ccvs

and you will probably also want to get a copy of gpg-agent to hold your
signing key otherwise you get to sign each and every file you modify
individually as you commit it to the repository.

I would be interested in learning the differences in timings you may

Please be advised that the current top-of-tree sources may not be
working on all platforms (I know that Windows for one is broken). 

All of the GNU/Linux, FreeBSD and Solaris platforms I use work fine, but
some older GNU/Linux 2.0.x on non-x86 platforms seem to have problems.

> $ cvs --version
> Concurrent Versions System (CVS) 1.11.6 (client/server)

That is kind of an old version of CVS wish a fair number of bugs. You
might want to see 'cvs version' to get the version of both the client
and the server and you might want to consier an update to cvs 1.11.22
which is the most recent cvs 1.11.x (STABLE) release.

        -- Mark
Version: GnuPG v1.4.6 (FreeBSD)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]