On Sun, May 25, 2008 at 4:49 PM, Janko Mivšek <[hidden email]> wrote:
Is there an order to the above instructions? When I do WebSessionManager allInstances do: [:each | each removeGuestSessions]. WebSession allInstances do: [:each | each initAppsForObjects]. followed by Smalltalk garbageCollectMost, it seems to have no effect on my ever growing image size, which start off at about 35Mb, and is now up to about 76Mb working on just one Aida project with on site and lots of testing in the web browser. Is this normal? Do I need to ask the Beginners list about simple image maintenance? Is this a normal Aida phenomenon, or could I be not maintaining my objects properly? If I was programming for Windows, I'd say I have a memory leak somewhere! Thanks, Rob _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
On Sun, May 25, 2008 at 4:49 PM, Janko Mivšek <[hidden email]> wrote:
Is there an order to the above instructions? When I do WebSessionManager allInstances do: [:each | each removeGuestSessions]. WebSession allInstances do: [:each | each initAppsForObjects]. followed by Smalltalk garbageCollectMost, it seems to have no effect on my ever growing image size, which start off at about 35Mb, and is now up to about 76Mb working on just one Aida project with on site and lots of testing in the web browser. Is this normal? Do I need to ask the Beginners list about simple image maintenance? Is this a normal Aida phenomenon, or could I be not maintaining my objects properly? If I was programming for Windows, I'd say I have a memory leak somewhere! Thanks, Rob _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Hi Rob,
Rob Rothwell wrote: > Is there an order to the above instructions? When I do > > WebSessionManager allInstances do: [:each | each removeGuestSessions]. > WebSession allInstances do: [:each | each initAppsForObjects]. > > followed by > > Smalltalk garbageCollectMost, it seems to have no effect on my ever > growing image size, which start off at about 35Mb, and is now up to > about 76Mb working on just one Aida project with on site and lots of > testing in the web browser. > > Is this normal? Do I need to ask the Beginners list about simple image > maintenance? Is this a normal Aida phenomenon, or could I be not > maintaining my objects properly? > > If I was programming for Windows, I'd say I have a memory leak somewhere! You probably have not memory but "object leak" somewhere. First, to measure real Squeak memory consumption, use MemoryUsage (load it from SqueakMap) and not what is reported by Linux. For instance, by MemoryUsage my squeaksite demo uses 88.4M right now bit Linux reports 95M RES and even 1029M VIRT! I just checked how much memory consumes Damien's squeak-web with Aida preloaded: 38M Ok, who is consuming the rest of memory is harder to find. Usually you start with counting allInstances of your classes to see if there is unusually high number of some of them. Janko -- Janko Mivšek AIDA/Web Smalltalk Web Application Server http://www.aidaweb.si _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
On Tue, Jun 3, 2008 at 2:50 PM, Janko Mivšek <[hidden email]> wrote:
You probably have not memory but "object leak" somewhere. First, to measure real Squeak memory consumption, use MemoryUsage (load it from SqueakMap) and not what is reported by Linux. For instance, by MemoryUsage my squeaksite demo uses 88.4M right now bit Linux reports 95M RES and even 1029M VIRT! I loaded my package into a clean image and will keep an eye on MemoryUsage while I ask for some general advice on being a good caretaker of my objects...I feel like I must be doing something not quite right... I just checked how much memory consumes Damien's squeak-web with Aida preloaded: 38M I started with squeak-dev, added a few packages + Aida, and am at 49M. I figure the FreeType fonts chew up a good part of that... Ok, who is consuming the rest of memory is harder to find. Usually you start with counting allInstances of your classes to see if there is unusually high number of some of them. Thank you again, Rob _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Le mardi 03 juin 2008 à 19:09 -0400, Rob Rothwell a écrit : > On Tue, Jun 3, 2008 at 2:50 PM, Janko Mivšek <[hidden email]> > wrote: > You probably have not memory but "object leak" somewhere. > First, to measure real Squeak memory consumption, use > MemoryUsage (load it from SqueakMap) and not what is reported > by Linux. For instance, by MemoryUsage my squeaksite demo uses > 88.4M right now bit Linux reports 95M RES and even 1029M VIRT! > > I loaded my package into a clean image and will keep an eye on > MemoryUsage while I ask for some general advice on being a good > caretaker of my objects...I feel like I must be doing something not > quite right... > > > I just checked how much memory consumes Damien's squeak-web > with Aida preloaded: 38M > > I started with squeak-dev, added a few packages + Aida, and am at 49M. > I figure the FreeType fonts chew up a good part of that... > > > Ok, who is consuming the rest of memory is harder to find. > Usually you start with counting allInstances of your classes > to see if there is unusually high number of some of them. > > > I'll wander on over to the Beginners List and start asking for some > advice! I can do MyClass allInstances; now I just need to find > MyPackage allClasses! > | instances | instances := 0. (Smalltalk allClasses select: [:each | each category beginsWith: 'xxx']) do: [:each | instances := instances + each allInstances size]. Cheers! Nico -- Nicolas Petton http://nico.bioskop.fr ___ ooooooo OOOOOOOOO |Smalltalk| OOOOOOOOO ooooooo \ / [|] -------------------------------- Ma clé PGP est disponible ici : http://nico.bioskop.fr/pgp-key.html _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida signature.asc (204 bytes) Download Attachment |
In reply to this post by Rob Rothwell
Usually, when my image size grows up, I clean up with some simple code
like: WebSessionManager allInstancesDo: [:each | each removeAllSessions]. MCFileBasedRepository flushAllCaches. SMSqueakMap default clearCaches. Smalltalk removeEmptyMessageCategories. Undeclared removeUnreferencedKeys. Symbol compactSymbolTable. Smalltalk garbageCollect. Nico Le mardi 03 juin 2008 à 19:09 -0400, Rob Rothwell a écrit : > On Tue, Jun 3, 2008 at 2:50 PM, Janko Mivšek <[hidden email]> > wrote: > You probably have not memory but "object leak" somewhere. > First, to measure real Squeak memory consumption, use > MemoryUsage (load it from SqueakMap) and not what is reported > by Linux. For instance, by MemoryUsage my squeaksite demo uses > 88.4M right now bit Linux reports 95M RES and even 1029M VIRT! > > I loaded my package into a clean image and will keep an eye on > MemoryUsage while I ask for some general advice on being a good > caretaker of my objects...I feel like I must be doing something not > quite right... > > > I just checked how much memory consumes Damien's squeak-web > with Aida preloaded: 38M > > I started with squeak-dev, added a few packages + Aida, and am at 49M. > I figure the FreeType fonts chew up a good part of that... > > > Ok, who is consuming the rest of memory is harder to find. > Usually you start with counting allInstances of your classes > to see if there is unusually high number of some of them. > > > I'll wander on over to the Beginners List and start asking for some > advice! I can do MyClass allInstances; now I just need to find > MyPackage allClasses! > > > Thank you again, > > Rob > _______________________________________________ > Aida mailing list > [hidden email] > http://lists.aidaweb.si/mailman/listinfo/aida _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida signature.asc (204 bytes) Download Attachment |
In reply to this post by Nicolas Petton
On Tue, Jun 3, 2008 at 9:27 PM, Nicolas Petton <[hidden email]> wrote:
| instances | No...(hangs head in shame!)...the "each category beginsWith:" eluded me... (I was admittedly, doing it "by hand") So...183 instances of my various objects in my Package...I will have to find a way to get their memory usage... So, for grins, I removed my package, ran your "simple" code: WebSessionManager allInstancesDo: [:each | each removeAllSessions]. MCFileBasedRepository flushAllCaches. SMSqueakMap default clearCaches. Smalltalk removeEmptyMessageCategories. Undeclared removeUnreferencedKeys. Symbol compactSymbolTable. Smalltalk garbageCollect. and STILL have an image about twice as large as when I started?! This may take a while to figure out. I think I need training in object maintenance. Thank you! Rob _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Free forum by Nabble | Edit this page |