[darcs-users] darcs benchmarking

Petr Rockai me at mornfall.net
Tue Dec 30 21:34:45 UTC 2008


Nathan Gray <kolibrie at graystudios.org> writes:
[snip]
> It is important to me to be able to benchmark current darcs against
> the version of darcs we are using in production, so I will know when I
> can upgrade.
You need to use a repository that's in darcs1 format for that, and also make
sure the initialise.sh script doesn't convert them to hashed when creating the
playgrounds (it uses the system darcs, keeping defaults).

> Another problem I discovered was that my repos are quite a bit
> bigger than the repos in big-zoo:
>
>   -rw-r--r-- 1 kolibrie kolibrie 124K 2008-11-24 15:44 small-repo_play.tar.gz
>   -rw-r--r-- 1 kolibrie kolibrie  12M 2008-11-24 15:41 darcs-repo_play.tar.gz
>   -rw-r--r-- 1 kolibrie kolibrie  74M 2008-11-24 15:44 ghc-hashed_play.tar.gz
>   -rw-r--r-- 1 kolibrie kolibrie 145M 2008-12-23 14:49 systems2_play.tar.gz
>   -rw-r--r-- 1 kolibrie kolibrie 383M 2008-11-25 14:57 cap2_play.tar.gz
>
> The memory requirements and time requirements were so great that my
> benchmark ran overnight and still did not finish.  So I changed
> darcs-benchmark to run just one iteration, rather than three, and ran
> it again while away on vacation.
>
> It did not finish over my vacation, but hung on the test after
> the test where it ran out of memory.
>
> Memory usage is interesting.  What darcs-benchmark reports for memory usage
> does not seem accurate.
>
> During the benchmark, in another window, I had a loop running to log
> stats about darcs processes every 60 seconds:
>
>   while [ 1 ]; do ps axo pid,euser,pri,ni,vsize,rssize,s,%cpu,%mem,cputime,etime,comm,args |grep darcs >> process_stats_all.txt; sleep 60; done
>
> So while darcs-benchmark reports that it took darcs 2.0.2 1219.6 seconds
> to check my cap2 repository (which seems fairly accurate), it also
> reports that it used 288MB (which seems quite a bit less than what was
> actually used):
Hm, the 288M figure comes from GHC RTS and is the peak heap size. There's
additional stuff in the running darcs image, but I'm not sure it could account
for the 300M difference. *But* if you are using uncompressed patches, it could
very well be just mmap memory: it gets counted into the memory use of a
process, even if it's just a mapped file (and behaves more like filesystem
cache than like actual allocated memory), IIRC.

> -- check, repo = big-zoo/cap2, bin = darcs210...
> iteration: 1.. best = 1208.8s, 288M
The code is virtually the same here as in 2.0.2, so no big surprise.

> -- check, repo = big-zoo/cap2, bin = darcs211...
> iteration: 1..error: user error (darcs failed with error code 1
> saying: /home/kolibrie/bin/darcs211 check --no-test +RTS -sstderr 
> Repairing patch 51/26411 : Fri Jan  1 00:36:41 EST 1999  cvs
> [snip]
> Writing pristine 4/42
> [snip]
> Writing pristine 21990/22004
> cleaning up... 33/75 : whxdata
> [snip]
> cleaning up... 2787/2906 : LinkInputList
> darcs211: out of memory (requested 1048576 bytes)
> )
Hm, not sure what is in 2.1.1, so can't comment.

> Benchmarking darcs 2.2.0 got up to about 3GB in about three hours, then
> hung for several days until I got back from vacation:
Hm, there's no 2.2.0 yet -- have you used http://darcs.net/ (and from which
date) or 2.2.0pre1? I have fixed a severe memory leak in 2.2, after the pre1
release -- if your 2.2 doesn't have my fix for check/repair, it obviously won't
finish on your big repo with just 4G of RAM.

To circumvent the hangs, you should probably set some reasonable ulimit. If
that doesn't help, it's alwas possible just to kill the darcs process being
benchmarked, the benchmark will continue where it left off.

If it's at all possible, please grab http://repos.mornfall.net/darcs/branch-2.2
-- this is what will become 2.2.0pre2 on 3rd January bar any release-critical
issues pop up in the meantime. It contains the leak fix mentioned above, so it
should improve check and repair performance drastically. If it doesn't, then we
have a some bug in there...

Yours,
   Petr.

-- 
Peter Rockai | me()mornfall!net | prockai()redhat!com
 http://blog.mornfall.net | http://web.mornfall.net

"In My Egotistical Opinion, most people's C programs should be
 indented six feet downward and covered with dirt."
     -- Blair P. Houghton on the subject of C program indentation


More information about the darcs-users mailing list