Slow push of large file over HTTP

Michael Tjørnemark mtj at pfa.dk
Wed Apr 25 13:26:03 UTC 2012


I have a repository with a single changeset which adds a single 60 MB file (zip-file). Pushing this repo over HTTP is much, much slower than other commands on the repository, including a similar pull - is this to be expected? I have recreated the problem on other machines and files as well, so it seems to be a general problem with pushing a large(ish) file.

Times (all on my local machine):
Commit file - 4 secs
Push to empty repo using filesystem - 7 secs
Clone from repo over HTTP - 23 secs
Pull to empty repo over HTTP - 23 secs
Push to empty repo over HTTP - 4 mins <-- SLOW

Command to serve empty repo:
hg serve --config web.allow_push=* --config web.push_ssl=false

Command to push to empty repo:
hg push http://localhost:8000/ --debug --time

In the debug output (see below), bundling and sending takes around 10 secs. Then there is a almost 4 min pause between "sending: 60342/120684 kb (50.00%)" and "remote: adding changesets". (Also it seems wrong that sending only goes to 50%, but that is another problem). The CPU usage for the hg.exe server process goes to 25% during the whole wait, so my guess is it is using one core on a quad-core machine, and the CPU is the bottleneck.

I understand that the largefiles extension might help, but this requires that everybody that uses the repo enables the extension, so i would rather avoid that. And also everything else is fast (commit, clone, pull), so it seems as if something is wrong with push over HTTP.

I am using Mercurial 2.1.2 on Windows 7 with 8 GB RAM.

Debug output from push command:

pushing to http://localhost:8000/
using http://localhost:8000/
sending capabilities command
query 1; heads
sending batch command
searching for changes
1 total queries
1 changesets found
list of changesets:
348061fb227571ccffc13c4f8b114b990b5c20d4
bundling: 1/1 changesets (100.00%)
bundling: 1/1 manifests (100.00%)
bundling: large.fil 1/1 files (100.00%)
sending unbundle command
sending 61790423 bytes
sending: 64/120684 kb (0.05%)
sending: 128/120684 kb (0.11%)
sending: 192/120684 kb (0.16%)
...snip...
sending: 60288/120684 kb (49.96%)
sending: 60342/120684 kb (50.00%)
sending: 60342/120684 kb (50.00%)
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
sending listkeys command
sending pushkey command
sending 0 bytes
checking for updated bookmarks
sending listkeys command
Time: real 229.104 secs (user 5.335+0.000 sys 1.513+0.000)

Michael Tjørnemark

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20120425/75085971/attachment-0002.html>


More information about the Mercurial mailing list