On Sat, Jul 27, 2013 at 4:15 PM, Richard Hipp <d...@sqlite.org> wrote:

>
>
> On Sat, Jul 27, 2013 at 3:41 PM, Eric Rubin-Smith <eas....@gmail.com>wrote:
>
>> On Sat, Jul 27, 2013 at 3:23 PM, Richard Hipp <d...@sqlite.org> wrote:
>>
>>> What's the total size of all those files (how big is the checkout)?
>>>
>>
>> [monk:repo.fossil] $ du -sch .
>> 392M    .
>> 392M    total
>>
>
>
> That would be the culprit.  As one of several "self-checks" (see
> http://www.fossil-scm.org/fossil/doc/trunk/www/selfcheck.wiki), Fossil
> always computes an MD5 checksum over the entire check-out and compares that
> to the content being checked in, to make sure they are identical.  With a
> 392MB checkout on an older machine, that might easily take a minute.
>


I tested this basic claim and do not believe it holds:

[monk:~] $ head -c $(echo 392*1024*1024|bc) /dev/zero > foo
[monk:~] $ du -sch foo
392M    foo
392M    total
[monk:~] $ time md5sum foo
c6d8f8fc5c75fd6ecceb4edf42f3ac4d  foo

real    0m1.324s
user    0m0.998s
sys     0m0.247s

So just over a second to calculate that hash on the same box.  I retried
this after dropping kernel caches to test whether it's the disk, and it
still only took 3.6 seconds to calculate the hash.

Of course, that's just the time it takes to calculate the hash.  Obviously
it does not include the time spent concatenating the world together to send
to your MD5 function.  Perhaps there's a super-linear algorithm in that
concatenation stuff?

Turning off repo-cksum* **did* address the issue, at least by an order of
magnitude:

[monk:code] $ fossil setting repo-cksum off
[monk:code] $ time fossil commit -m "test commit"
New_Version: 4d3b92dca8a617d6004bbe4e9c158fc11882720d

real    0m7.365s
user    0m0.627s
sys     0m0.398s

Does this leave any serious gaps in fault-tolerance?

The new performance is acceptable, though I'm still happy to keep digging
around if you're still curious (either about what was taking so long, or
about what is still taking 7 seconds, or both).

Thanks Richard.

Eric
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to