[PATCH 2 of 2] hgext: add a new packed repository extension, packrepo

Noel Grandin noel at peralex.com
Fri Aug 17 07:03:30 CDT 2012


On 2012-08-16 20:41, Bryan O'Sullivan wrote:
> On Wed, Aug 15, 2012 at 4:18 PM, Bryan O'Sullivan <bos at serpentine.com 
> <mailto:bos at serpentine.com>> wrote:
>
>     On my machine:
>
>       * "cp -a" takes 8 seconds
>       * "tar | tar" takes about 4.5
>       * "tar | nc; nc | tar" takes about 5.5 (just making sure that
>         the network stack isn't at fault)
>       * "hg serve; hg clone --uncompressed -U" takes ... 35 seconds !?
>
>     First observation: the files streamed are presented in a crazy
>     random order [...]
>
>     Just fixing this improved the performance of uncompressed clone to
>     25 seconds, which is rather nice for a one-line change.
>
>
> I wrote a tiny Python program that somewhat mimics the behaviour of 
> stream_out: http://pastebin.com/9ay1XPYH
>
> Piped through netcat, this is just a little slower than the tar 
> measuremet above.
>
> So it looks as though somewhere between the stream_out code and the 
> bytes hitting the wire on the receiver's side, something is terribly 
> slow. I'm investigating, but the code is rather convoluted.


Smells to me like a "tcp window" problem i.e. something is sending data, 
then waiting for confirmation, but it's not sending enough data to keep 
the IO pipeline busy.

Something like Wireshark should be able to pinpoint this.
Take a network trace and look at the delta-times between the packets.

Disclaimer: http://www.peralex.com/disclaimer.html


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120817/f93a5e9e/attachment.html>


More information about the Mercurial-devel mailing list