Excessive network traffic for pulling a small change

Martin Geisler mg at lazybytes.net
Fri Mar 12 17:55:01 GMT 2010


Adrian Wilkins <adrian.wilkins at gmail.com> writes:

> On 11/03/10 22:48, bazaar-request at lists.canonical.com wrote:
>> Re: Excessive network traffic for pulling a small change

> It would be interesting to see how git copes with doing this over dumb
> HTTP.

I cannot answer for Git, but being a Mercurial developer, I got curious
and tested with the system I know best :-)

I got a Bazaar branch up to revision 2250 and converted that into a
Mercurial repository with 'hg convert grub'. That gave me a Mercurial
repository with some 2848 changesets. I'm not sure why there are more
changesets than Bazaar revisions. The repository is 13 MB in size, so
there are indeed data behind the numbers :-)

I've put the clone here:

  http://bitbucket.org/mg/grub/

> Although by contrast, doing the corresponding pull is a lot smaller via
> a smart protocol, and then doing the log is free.
>
> bzr -Dbytes -Dfetch pull -r 2251 \
>    bzr+ssh://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr
>
> Transferred: 286KiB (53.8K/s r:282K w:4K)

To test pulling the final changeset, I made a clone up to revision 2848:

  $ hg clone -r 2848 ssh://hg@bitbucket.org/mg/grub/

The remote clone has one extra changeset with the trivial patch. I used
'ssh -v' as the transport to get bandwidth statistics. The result was:

  $ hg pull -e 'ssh -v'
  [...]
  Transferred: sent 2912, received 4424 bytes, in 2.8 seconds

> The traffic consumption for HTTP from the Launchpad mirror is larger
>
> bzr -Dbytes -Dfetch pull -r 2251 \
>    https://code.launchpad.net/~vcs-imports/grub/grub2-bzr
>
> Transferred: 511KiB (65.2K/s r:490K w:20K)

Retrieving the final changeset over HTTP takes 6 round trips whereby
1255 bytes are sent and 2115 bytes received (3370 bytes total).

> And Savannah still seems to produce the largest traffic.
>
> bzr -Dbytes -Dfetch pull -r 2251 \
>   http://bzr.savannah.gnu.org/r/grub/trunk/grub
>
> Transferred: 2357KiB (95.0K/s r:2329K w:29K)

As I understand it, this is a plain (dumb) HTTP server. For fun, I also
tried uploading the repository to such a dumb server and pulled the
final changeset. Using wireshark, I saw a total of 8 round trips and 544
KB transferred. Quite a lot for a tiny patch like this.

It should be said that we don't really advertise this dumb HTTP
transport and expect our users to use a the CGI script instead.
Consequently, I don't think the dumb HTTP transport has received much
attention.

-- 
Martin Geisler

Fast and powerful revision control: http://mercurial.selenic.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20100312/0e0563a2/attachment.pgp 


More information about the bazaar mailing list