[Mono-devel-list] Memory management for long running processes (desc-heap profiler)

Alex Chudnovsky alexc at majestic12.co.uk
Tue Mar 29 16:14:01 EST 2005


Ben Maurer wrote:

>Does the heapsize = xxxxx bytes grow without bound (ie, does it leak?).
>If not, than managed memory is *not* your issue.
>  
>
It appears I have located at least one place in software that results in 
huge memory consumption
and it appears to be close to what I got reported by users of my 
software. Here is GC printout:

--------------------------------------------------------------------------------
Initiating full world-stop collection 65 after 32676644 allocd bytes
--> Marking for collection 65 after 32676644 allocd bytes + 618028 
wasted bytes
Collection 64 finished ---> heapsize = 56414208 bytes
World-stopped marking took 50 msecs
Complete collection took 80 msecs
Initiating full world-stop collection 66 after 29583120 allocd bytes
--> Marking for collection 66 after 29583120 allocd bytes + 516520 
wasted bytes
Collection 65 finished ---> heapsize = 56414208 bytes
World-stopped marking took 60 msecs
Complete collection took 80 msecs
Increasing heap size by 8388608 after 10701492 allocated bytes
Initiating full world-stop collection 67 after 26805540 allocd bytes
--> Marking for collection 67 after 26805540 allocd bytes + 662452 
wasted bytes
Collection 66 finished ---> heapsize = 64802816 bytes
World-stopped marking took 50 msecs
Complete collection took 70 msecs
Increasing heap size by 58474496 after 0 allocated bytes 
<------------------ PROBLEM
Initiating full world-stop collection 68 after 42697296 allocd bytes
--> Marking for collection 68 after 42697296 allocd bytes + 36000 wasted 
bytes
Collection 67 finished ---> heapsize = 123277312 bytes
World-stopped marking took 60 msecs
Complete collection took 80 msecs
Increasing heap size by 87617536 after 0 allocated bytes 
<------------------ PROBLEM
Initiating full world-stop collection 69 after 71215316 allocd bytes
--> Marking for collection 69 after 71215316 allocd bytes + 4580 wasted 
bytes
Collection 68 finished ---> heapsize = 210894848 bytes
World-stopped marking took 60 msecs
Complete collection took 70 msecs
Increasing heap size by 87617536 after 0 allocated bytes 
<------------------ PROBLEM
Increasing heap size by 52305920 after 70980096 allocated bytes
--------------------------------------------------------------------------

Note last few iterations -- memory usage grown BIG time all of a sudden, 
and what I find
interesting is that GC says that it increased heap after allocating 0 
(zero) bytes!!! 8-O

I am digging in now to try to get more information about where in my 
software exactly it happens and
any possible explanations to whether what happens is expected (you never 
know, maybe my
code tried to allocated gigabyte of RAM?)

Alex

p.s. Adding some nice formatting to big numbers would make them more 
readable...



More information about the Mono-devel-list mailing list