profile not showing it all?
bulatz at HotPOP.com
Fri Sep 9 04:42:32 EDT 2005
Friday, September 09, 2005, 2:21:51 AM, you wrote:
MW> Niels <cpjvelde at cs.uu.nl> writes:
>> since my application takes up way to much memory, i decided to profile it
>> (compile d it with -prof and -auto-all). After running it with +RTS -hc, it
>> shows a graph that reaches a peak at around 85mb.
>> However, when i check the memory usage with 'top' i see the application reach
>> over 300mb.
MW> If, however, you are comparing /unprofiled/ 'top' with the profile, it
MW> suggests a fault in ghc's profiling code.
i don't know what value shows the -xc oprion, but memory usage in
ghc-compiled program are increased because by default used "copying"
garbage collection algorithm. using option "+RTS -c" will
significantly reduce memory usage, which will make program faster if
it currently needs swapping. you can also force, for example, using of
compacting algorithm when memory usage grows more than 200 mb with
options "+RTS -M1G -c20". see "4.14.2. RTS options to control the
garbage collector" in ghc docs for details
btw, i suggested to GHC team auto-switching to compacting algorithm
when program begins swapping. you can vote for this suggestion if it
what you need ;)
Bulat mailto:bulatz at HotPOP.com
More information about the Glasgow-haskell-users