> < ^ Date: Fri, 14 Oct 1994 23:10:00 +0100
> < ^ From: Harald Boegeholz <hwb@ix.de >
> < ^ Subject: Re: Best Memory Size under OS/2
X-Miles:        GAP Forum article 395 accepted at 10 Oct 94 10:03 +0100
Date:           07 Oct 94 09:22 +0000 (GMT)
From: Johannes Mueller <mueller@leon.informatik.uni-bonn.de>

can you tell me, what number X (given to GAPEMX.EXE with parameter -m Xm)
works best (fastest) with respect to invoking Editor or computation of
large objects (garbage collection etc.).

My own tests (I have a 386-PC with 8Mb) brought this: Calling GAP with -m
4m results in (a little) faster Execution as -m 6m being faster as -m 7m.

Dear Johannes,

I don't have an OS/2 specific answer to that, but rather some general
remarks.

GAPs memory management works in such a way that it periodically has to
collect garbage. During this process, practically all memory in GAPs
workspace gets touched. Which means that if you use GAP under _any_
operating system with virtual memory (even extended DOS is such an
operating system), you will get extremely poor results if you specify
more than your physical memory size. This is because for every garbage
collection, the swapper will have to pull the whole workspace
"through" the real memory and swap it out again causing heavy disk
I/O.

If you have lots of memory, my experiences show that a larger
workspace makes GAP faster. If you know in advance that during the
computation of a given problem GAP has to enlarge the workspace, you
can save lots of time by specifying a sufficient initial memory
size. To find out, run GAP with the -g option.

On the other hand, GAP slows down as soon as it has to swap. On your
machine with 8MB, GAP's working set alone is 4MB data plus some
code. I don't know what the working set of OS/2 is when runs just GAP,
but remember you have a powerful object oriented graphical user
interface running all the time (and maybe some toys like screen savers
etc.)

Based on my subjective experience (not exact measurements) I recommend
a workspace at least as large as the problem requires, of course. More
workspace doesn't hurt, unless you have to swap. So if you run just
GAP and nothing else, use a workspace of MMS - 4MB (MMS = Main Memory
Size). If you run GAP under Emacs, use MMS - 8MB (which means don't
do it at all on your machine, sorry). Generally (for all operating
systems I can think of), make sure the working set of all active
processes fits into physical memory for optimum performance.

If you want to do some work to really analyze this, I can recommend
the tool Theseus2. It is part of a (commercial) IBM product called
SPM/2. Theseus2 gives you extensive information about memory usage of
all processes including the OS/2 kernel. It also allows you to measure
the working set of active processes.

Maybe one of the GAP developers (Martin?) can confirm that in theory
(if you have enough physical memory), a larger workspace should by no
means slow GAP down. (I hope it is designed this way.)

mfg
hwb

--
Harald Boegeholz | hwb@mathematik.uni-stuttgart.de
| os2a@info2.rus.uni-stuttgart.de


> < [top]