Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

FW: Memory use

New Message Reply Date view Thread view Subject view Author view

Subject: FW: Memory use
From: Louise Erasmus (lerasmus@zoology.up.ac.za)
Date: lun oct 22 2001 - 09:35:28 CEST

For those struggling with memory problems - this is very good advise!

-----Original Message-----
From: Steven Kelly [mailto:stevek@metacase.com]
Sent: Monday, October 22, 2001 9:13 AM
To: 'Louise Erasmus'
Subject: RE: Memory use

Hi Louise,

I hope the others' comments helped you already. If not, there was a problem
in vw30 with garbage collection, which caused the whole vw process to hang
totally (although it looks like it's garbage collecting, it actually isn't
going anywhere). This is because the safety margins are set too low (how
much memory should always be free, to ensure that garbage collection has
enough space to run).

You should do the following:
| mp |
mp := MemoryPolicy new setDefaults
        contiguousSpaceSafetyMargin: 500000;
        availableSpaceSafetyMargin: 500000;
        growthRegimeUpperBound: 48*1024*1024.
ObjectMemory installMemoryPolicy: mp.

The 500K safety margins are definitely enough, the growth regime uppper
bound is your own choice; Janko Mivsek already suggested changing that, and
his suggestion of 2/3 of available RAM is good for starters. The higher you
put it, the more memory VW grabs before trying to garbage collect. This of
course makes things quicker up to that point, but garbage collecting 64MB of
memory is a lot slower than 32MB of memory, and I've noticed VW itself
seemingly slow down when it has a lot of memory in use (could be due to any
number of things, not VW itself).

If you can, I'd suggest you move to VW 5i.4, it's quite a bit faster, and
you're far more likely to persuade Cincom to make bug fixes to the current
version than to 3.0.

Hope this helps,
Steve
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Steven Kelly, Product Development Manager www.metacase.com
MetaCase Consulting, Ylistonmaentie 31, FIN-40500 Jyvaskyla, Finland

> -----Original Message-----
> From: Louise Erasmus [mailto:lerasmus@zoology.up.ac.za]
> Sent: 11. lokakuuta 2001 23.00
> To: VisualWorks
> Subject: FW: Memory use
>
>
> -----Original Message-----
> From: Louise Erasmus [mailto:lerasmus@zoology.up.ac.za]
> Sent: Thursday, October 11, 2001 9:01 PM
> To: eliot@parcplace.com
> Subject: RE: Memory use
>
>
> Eliot,
>
> To ask a zoologist to "describe the application from a data modelling
> perspective" is a tall order - I'm not sure what you mean,
> but I'll try my
> best. I used CIRAD's Cormas platform for multi-agent systems
> modelling (not
> sure if you know it - Christophe Le Page's platform) to construct a
> spatially-explicit model of South African development. What I
> need to do is
> to model indicators of development for at least another 100
> years. There are
> about 150 (instance) variables that I need to record (i.e.
> write to a file
> and examine retrospectively) for each of 289
> magisterial/political districts
> respectively. I then need to test various management policies, which
> requires numerous runs. In other words, I need to simulate
> development for
> all of these districts simulataneously, and then compare the
> outcomes of
> different runs (management policies). That adds up to about
> 50 000 values
> that I need to store during simulation runs.
>
> One time step (year) takes about 15-20 minutes to complete -
> without writing
> anything to a file. On unpredictable moments vw goes into
> ininite garbage
> collection loops - I've double checked and it's definitely
> not the model. I
> presume this happens when my computer runs out of virtual
> memory (although
> in other instances I've noticed it usually gives me a warning
> message).
> Unfortunately, I am not very experienced in computer
> programming, except in
> the bare basics (usually most inefficient basics). The only
> method I know of
> for controlling memory is global garbage collection. My
> computer has only
> 128 megabytes of ram, I've ordered more, but it is caught up in
> administrative processes.
>
> Since my districts are stepping asynchronously, I thought
> that if I wrote
> these instance variables to a file, clean them from memory
> and recall them
> only when I need them, it might make the memory load less. But, I have
> noticed that reading/writing takes very long, and seemingly
> uses a lot of
> memory. I am a bit weary of trying to figure out
> reading-writing methods
> since I am under a bit of a time strain and I'm not sure
> whether it would
> work.
>
> Hope you can help - sorry for the long story.
>
> (vw30)
>
> Louise
>
> Centre for Environmental Studies / Department of Zoology and
> Entomology
> University of Pretoria
> Pretoria
> 0002
>
> http://www.up.ac.za/academic/centre-environmental-studies/
>
> Tel. +27 12 420 4527
> Fax +27 12 420 3210
>
> "Criticism comes easier than craftsmanship."
>
> -Zeuxis
>
>
> -----Original Message-----
> From: eliot@parcplace.com [mailto:eliot@parcplace.com]
> Sent: Thursday, October 11, 2001 2:54 AM
> To: lerasmus@zoology.up.ac.za
> Subject: Re: Memory use
>
>
> Louise,
>
> can you step back a bit and describe the application
> from a data modelling
> perspective? Without more specification/requirements/problem
> description to
> go on its hard to know what implementation strategy you've chosen and
> whether that's appropriate or not. So get a beverage and
> write something
> both more detailed and more abstract.
>
> Cheers
>
> +-----------------------------
> | Date: Thu, 11 Oct 2001 02:33:45 +0200
> | From: "Louise Erasmus" <lerasmus@zoology.up.ac.za>
> | Subject: Memory use
>
> | Hi everybody
>
> | I am trying to run a model in vw that takes up a lot of
> virtual memory due
> | to extensive use of instance variables. If I write these instance
> variables
> | into files and discard them after use, read them in the
> next time step,
> | would this help to resolve the problem, given that
> reading/writing takes
> up
> | a lot of memory as well? If not, is there anything else I
> can do to use
> less
> | memory?
>
> | Kind regards
>
> | Louise
>
> | Centre for Environmental Studies / Department of Zoology
> and Entomology
> | University of Pretoria
> | Pretoria
> | 0002
>
> | http://www.up.ac.za/academic/centre-environmental-studies/
>
> | Tel. +27 12 420 4527
> | Fax +27 12 420 3210
>
> | "Criticism comes easier than craftsmanship."
>
> | -Zeuxis
> ---
> Eliot Miranda ,,,^..^,,,
> mailto:eliot@parcplace.com
> VisualWorks Engineering, Cincom Smalltalk: scene not herd
> Tel +1 408 216
> 4581
> 3350 Scott Boulevard, Building 36, Santa Clara, CA 95054 USA
> Fax +1 408 216
> 4500
>
>
>

New Message Reply Date view Thread view Subject view Author view
 

Back to home