[darcs-users] Memory usage of record in darcs-hs
Jason Dagit
dagit at codersbase.com
Sun Sep 13 20:56:36 UTC 2009
Hello,
Today I was trying my test case on darcs-hs and noticed some stuff. Here
are my findings.
My test case is as follows:
Setup:
1) get the linux source repository (just using the tar ball)
2) darcs init
3) darcs add --recursive *
Test:
4) compile darcs and darcs-hs for profiling: in my path as darcs-prof and
darcs-hs respectively
5a) echo q | darcs-prof +RTS -p -hc -sstderr -RTS record -m "import" 2>
darcs-prof.summary
5b) echo q | darcs-hs +RTS -p -hc -sstderr -RTS record -m "import" 2>
darcs-hs.summary
6a) hp2ps -c darcs-prof.hp
6b) hp2ps -c darcs-hs.hp
7) look at darcs-prof.ps, darcs-prof.prof, and darcs-prof.summary (likewise
for darcs-hs) to inspect the profiling data.
In addition to using -hc above, -hy is particularly helpful (gives you heap
usage by data type), and -hm for break down by module.
Without making changes to darcs my test case runs in about 20 seconds and
uses 450megs of physical ram and over a gig of virtual
memory. I've been able to reduce this quite a
lot with several experimental changes, but nothing to celebrate yet.
With darcs-hs the story is quite a bit different. The physical ram usage is
about 365megs, but the run time was around 100 seconds.
I'm noticing the memory usage varies in darcs-hs quite a bit depending on
the profiler options. Running with -hm I'm seeing it take about 250megs of
physical ram.
I don't have a good baseline set of files to attach from regular darcs, but
I have attached the profiling artifacts from darcs-hs so others can examine
them.
In the attached .tar.gz file you should find:
darcs-hs-hc.ps (profiled with -hc)
darcs-hs-hy.ps (profiled with -hy)
darcs-hs-hm.ps (profiled with -hm)
darcs-hs.prof (normal profiling summary)
darcs-hs.summary (GC summary)
I hope you find this useful.
Thanks,
Jason
PS I was going to add this to the wiki but I can no longer log in to the
wiki, no idea why because no error is given.
PPS In both versions of darcs Darcs.Patch.FileName seems to be a memory hog.
I'm still Investigating.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20090913/1dfc3ba0/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: darcs-hs-profiling.tar.gz
Type: application/x-gzip
Size: 699220 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20090913/1dfc3ba0/attachment-0001.bin>
More information about the darcs-users
mailing list