Hello.
I run some test in pharo1.1 and magma installed from configuration. I insert 100000 objects to local Magma db. I use MargaCollection for this. And after test I have grow memory size. Before I have 90 mb. After I have 140 mb. My code for test is: session commit: [entitiesGroup entities add: payment]. session stubOut: entitiesGroup. session finalizeOids. Smalltalk garbageCollect entitiesGroup entities is MagmaCollection. During test I see that "payment class allInstances size" don't changed. Its ok. I do stub/finalize stuff for this. But memory usage grow. Its bad. At the end of test I watch in MaWeakValueDictionary allInstances. And I found that some instance has 141000 items. And 140000 items is nil. (self select: [:each | each isNil] a MaWeakValueDictionary(size 140064)). This is my problem What I do wrong? _______________________________________________ Magma mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/magma |
On 11 October 2010 13:46, Denis Kudriashov <[hidden email]> wrote:
> Hello. > > I run some test in pharo1.1 and magma installed from configuration. I insert > 100000 objects to local Magma db. > I use MargaCollection for this. > > And after test I have grow memory size. Before I have 90 mb. After I have > 140 mb. > > My code for test is: > > session commit: [entitiesGroup entities add: payment]. > session stubOut: entitiesGroup. > session finalizeOids. > Smalltalk garbageCollect > > entitiesGroup entities is MagmaCollection. > > During test I see that "payment class allInstances size" don't changed. Its > ok. I do stub/finalize stuff for this. > But memory usage grow. Its bad. > > At the end of test I watch in MaWeakValueDictionary allInstances. And I > found that some instance has 141000 items. And 140000 items is nil. > (self select: [:each | each isNil] a MaWeakValueDictionary(size 140064)). > > This is my problem > What I do wrong? > > If i remember correctly, there are a mechanism, which should clean it up periodically. But not too often , to prevent too much processing. > > > > > _______________________________________________ > Magma mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/magma > > -- Best regards, Igor Stasenko AKA sig. _______________________________________________ Magma mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/magma |
Is it automatic process? I have my image work after test finish duriing one day (holidays). And memory will not cleanup.
Maybe I should turn on this mechanizm manualy or explicitly perform some method after my transactions? 2010/10/11 Igor Stasenko <[hidden email]>
_______________________________________________ Magma mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/magma |
In reply to this post by Denis Kudriashov
Hi Denis, which version of Magma are you using? There had been a
regression related to this which I remember fixing earlier this year. You may wish to get the latest package versions from the MagmaTester project of SqueakSource.. Incidentally, it is never necessary to stubOut: a MagmaCollection. MagmaCollections only keep one page of objects in memory at a time, you may adjust the size of the page with the #pageSize: message. As Igor said, there is a cleaning process that runs every 90 seconds, but the next version of Magma will eliminate that in favor of Igor's finalization fix.. - Chris On Mon, Oct 11, 2010 at 5:46 AM, Denis Kudriashov <[hidden email]> wrote: > Hello. > > I run some test in pharo1.1 and magma installed from configuration. I insert > 100000 objects to local Magma db. > I use MargaCollection for this. > > And after test I have grow memory size. Before I have 90 mb. After I have > 140 mb. > > My code for test is: > > session commit: [entitiesGroup entities add: payment]. > session stubOut: entitiesGroup. > session finalizeOids. > Smalltalk garbageCollect > > entitiesGroup entities is MagmaCollection. > > During test I see that "payment class allInstances size" don't changed. Its > ok. I do stub/finalize stuff for this. > But memory usage grow. Its bad. > > At the end of test I watch in MaWeakValueDictionary allInstances. And I > found that some instance has 141000 items. And 140000 items is nil. > (self select: [:each | each isNil] a MaWeakValueDictionary(size 140064)). > > This is my problem > What I do wrong? > > > > > > > _______________________________________________ > Magma mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/magma > > Magma mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/magma |
Free forum by Nabble | Edit this page |