[GRASS-dev] Raster format and dual function module
Joel Pitt
joel.pitt at gmail.com
Thu May 25 04:49:35 EDT 2006
On 5/25/06, Hamish <hamish_nospam at yahoo.com> wrote:
> > > Your OS should cache the data in non-reserved memory space and reuse
> > > it if possible, or dump it if something else wants the space.
> ..
> > Okay, good point about reading maps, however the writing still takes
> > time and writing to disk is the only simple way for passing a map from
> > one command to the other.
>
> tip: r.mapcalc lets you set intermediate variables, see eval():
> http://grass.ibiblio.org/grass61/manuals/html61_user/r.mapcalc.html
>
> (maybe someone who knows this better can provide an example?)
thanks, however I use several modules that behave differently from
what mapcalc can do. I also need to be able to use analysis tools on
the intermediate maps.
> > BTW, do you know whether a newly written file also changes the OS
> > cached version? Or in other words, is the cache invalidated after a
> > write changes the disk? Just curious...
>
> The act of writing will mean the data will pass through system memory
> and be cached. I am not qualified to say much further about it, other
> than it happens and correct tuning of this is what the kernel
> developers spend lots of time trying to get right.
>
According to http://www.tldp.org/LDP/tlk/fs/filesystem.html
It seems that writes to the disk do occur to the cache and that the
kernel schedules dirty pages to be written at an opportune time.
So in summary I probably wouldn't notice much speed up from keeping
the map in memory.
-Joel
--
"Wish not to seem, but to be, the best."
-- Aeschylus
More information about the grass-dev
mailing list