Re: [vwnc] Memory not shrinking (was debugging memory growth)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Memory not shrinking (was debugging memory growth)

giorgiof
Hi,
I did some testing, using just a loop to allocate memory and see it growing.
Now, what I see is that memory grows, and, if I do a Collect All Garbage, I have this result:

Global garbage collection (please wait)...
reclaimed 0 Mbytes of data and 0 OTEntries in 81.3 sec.
472.64 Mbytes total;    127.81 Mbytes used,    344.82 Mbytes free.

So, my memory is not reclaimed back and released to the Operating System (windows).

I was following memory reclaiming, and on MemoryPolicy>>shrinkMemoryIfRequired I can see that there are more than 300 Mb to be reclamed, so, #shrinkOldSpaceBy: is called, and then  #primShrinkOldSpaceBy:, but this latest, that is a primitive, return zero bytes reclaimed.

I'm not so deep on memory policy question. Someone knows why memory get not released back  to the OS?.

There is some parameter settings that avoid releasing back and I'm unaware of?

thanks

Giorgio


On Tue, Jun 16, 2009 at 10:31 AM, giorgio ferraris <[hidden email]> wrote:
Hi,
thanks to all for the suggestions.
I try to see if I can find some light.
Ciao
Giorgio


On Tue, Jun 16, 2009 at 9:26 AM, Karsten <[hidden email]> wrote:
Hi Giorgio,

what i've also found helpful in this area is the Class Report from Advanced Tools. Sometimes you might just reference a lot of objects in your image so that they don't get garbage collected.

Simply load All Advanced Tools from the Parcel Manager and go to Tools->Advanced->Class reports in the Launcher. Then right-click on the list of classes and select Add All. On the right side of the window select space and run a class report on the instance size. This will list all the objects that are present in your image, maybe this helps you find a clue which objects are still in your image.

Kind Regards
Karsten



giorgio ferraris wrote:
Hi,
I'm experiencing a similar situation, my memory grows from 70 mb to 500 mb (looking at the memory usage on the  Windows Task Manager), and it grows almost instantaneously.
The memory is never reclaimed back, but this is what I see on on the Windows Task Manager.
If I look at the image, using both Memory Monitor and SystemAnalizer showSystemHistogram, I  don't see a big difference in Smalltalk memory between the state where TaskManager show an image of around 70 Mb and an when it shous one of around 500 Mb. SystemAnalizer showSystemHistogram just show a small grow, not a tenfold one!
It's like if I'm allocating memory outside of the reaching of smalltalk itself!! (the growing seems connected to big select from DB, but the strange is, if I do select again and again, memory never grows more than that first burst of 500 mb. And this seems strange, I'm loading new data... )
I'm Using VW 7.6 with Postgres exdi on windows.


Any Idea on how trubleshooting this? Or where I missed the point?

Thanks a lot
Giorgio


On Fri, May 22, 2009 at 7:21 PM, Mike Hales <[hidden email]> wrote:
In my application, under certain circumstances I see slow memory growth of the image until eventually it runs out of memory and crashes. Does anyone have a good set of steps they use to troubleshoot this kind of problem? I don't know where to start looking for the cruft that is building up. Are there any good tools in the public store that help with this?

Thanks,

Mike

Mike Hales
Engineering Manager
KnowledgeScape
www.kscape.com

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
SystemAnalyzer showSystemHistogram

_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

--
Karsten Kusche - Dipl.Inf. - [hidden email]
Tel: +49 3496 21 43 29
Georg Heeg eK - Köthen
Handelsregister: Amtsgericht Dortmund A 12812



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Memory not shrinking (was debugging memory growth)

Andres Valloud-4
Giorgio,

If there is some object left in a large old space segment, then the
large old space segment cannot be given back to the operating system
even though there appears to be a lot of free memory.  I am not
necessarily surprised by the "reclamation" behavior you describe.  What
does surprise me is that your image states it took 81 seconds to do a
GC???...

Andres.


giorgio ferraris wrote:

> Hi,
> I did some testing, using just a loop to allocate memory and see it
> growing.
> Now, what I see is that memory grows, and, if I do a Collect All
> Garbage, I have this result:
>
> Global garbage collection (please wait)...
> reclaimed 0 Mbytes of data and 0 OTEntries in 81.3 sec.
> 472.64 Mbytes total;    127.81 Mbytes used,    344.82 Mbytes free.
>
> So, my memory is not reclaimed back and released to the Operating
> System (windows).
>
> I was following memory reclaiming, and on
> MemoryPolicy>>shrinkMemoryIfRequired I can see that there are more
> than 300 Mb to be reclamed, so, #shrinkOldSpaceBy: is called, and
> then  #primShrinkOldSpaceBy:, but this latest, that is a primitive,
> return zero bytes reclaimed.
>
> I'm not so deep on memory policy question. Someone knows why memory
> get not released back  to the OS?.
>
> There is some parameter settings that avoid releasing back and I'm
> unaware of?
>
> thanks
>
> Giorgio
>
>
> On Tue, Jun 16, 2009 at 10:31 AM, giorgio ferraris
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi,
>     thanks to all for the suggestions.
>     I try to see if I can find some light.
>     Ciao
>     Giorgio
>
>
>     On Tue, Jun 16, 2009 at 9:26 AM, Karsten <[hidden email]
>     <mailto:[hidden email]>> wrote:
>
>         Hi Giorgio,
>
>         what i've also found helpful in this area is the Class Report
>         from Advanced Tools. Sometimes you might just reference a lot
>         of objects in your image so that they don't get garbage collected.
>
>         Simply load All Advanced Tools from the Parcel Manager and go
>         to Tools->Advanced->Class reports in the Launcher. Then
>         right-click on the list of classes and select Add All. On the
>         right side of the window select space and run a class report
>         on the instance size. This will list all the objects that are
>         present in your image, maybe this helps you find a clue which
>         objects are still in your image.
>
>         Kind Regards
>         Karsten
>
>
>
>         giorgio ferraris wrote:
>>         Hi,
>>         I'm experiencing a similar situation, my memory grows from 70
>>         mb to 500 mb (looking at the memory usage on the  Windows
>>         Task Manager), and it grows almost instantaneously.
>>         The memory is never reclaimed back, but this is what I see on
>>         on the Windows Task Manager.
>>         If I look at the image, using both Memory Monitor and
>>         SystemAnalizer showSystemHistogram, I  don't see a big
>>         difference in Smalltalk memory between the state where
>>         TaskManager show an image of around 70 Mb and an when it
>>         shous one of around 500 Mb. SystemAnalizer
>>         showSystemHistogram just show a small grow, not a tenfold one!
>>         It's like if I'm allocating memory outside of the reaching of
>>         smalltalk itself!! (the growing seems connected to big select
>>         from DB, but the strange is, if I do select again and again,
>>         memory never grows more than that first burst of 500 mb. And
>>         this seems strange, I'm loading new data... )
>>         I'm Using VW 7.6 with Postgres exdi on windows.
>>
>>
>>         Any Idea on how trubleshooting this? Or where I missed the point?
>>
>>         Thanks a lot
>>         Giorgio
>>
>>
>>         On Fri, May 22, 2009 at 7:21 PM, Mike Hales
>>         <[hidden email] <mailto:[hidden email]>> wrote:
>>
>>             In my application, under certain circumstances I see slow
>>             memory growth of the image until eventually it runs out
>>             of memory and crashes. Does anyone have a good set of
>>             steps they use to troubleshoot this kind of problem? I
>>             don't know where to start looking for the cruft that is
>>             building up. Are there any good tools in the public store
>>             that help with this?
>>
>>             Thanks,
>>
>>             Mike
>>
>>             Mike Hales
>>             Engineering Manager
>>             KnowledgeScape
>>             www.kscape.com <http://www.kscape.com>
>>
>>             _______________________________________________
>>             vwnc mailing list
>>             [hidden email] <mailto:[hidden email]>
>>             http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>>
>>         SystemAnalyzer showSystemHistogram
>>         ------------------------------------------------------------------------
>>         _______________________________________________ vwnc mailing
>>         list [hidden email] <mailto:[hidden email]>
>>         http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>         --
>         Karsten Kusche - Dipl.Inf. - [hidden email]
>         <mailto:[hidden email]>
>         Tel: +49 3496 21 43 29
>         Georg Heeg eK - Köthen
>         Handelsregister: Amtsgericht Dortmund A 12812
>
>
>
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc